query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
5f95395f64037eba79ef4f6807818414 | f9b944b56693ea4d5ffac0acd774c06f | Display a listing of the ProductSubCategory. | class ProductSubcategoryController extends Controller
public function index()
{
$categories = ProductCategory::all()->groupBy('type_name');
$breadcrumbs = [
['link'=>route('admin.dashboard'),'name'=> __('general.dashboard')], ['name'=> __('general.subcategories')]
];
retu... | 0 |
8a779a6d8e16a1092ce4f7a8aff98b3b | 39bd4342f7d5d121ca500f0d6e65d86a | Transport address that will be attached to transmitted data that
are input to serial port 2. | void initSportUart( struct t_sportData *pdata )
{
FirstData = ThisSportData = pdata ;
TRXDDR &= ~( 1 << PIN_SERIALTX ) ;
TRXPORT &= ~( 1 << PIN_SERIALTX ) ;
#if PIN_SERIALTX == 4
PCMSK2 |= 0x10 ;
#elif PIN_SERIALTX == 2
PCMSK2 |= 0x04 ;
#else
#error... | 0 |
689df1209f0ff30cc991bd607e9fdc5a | b006e5dee0322b83f63b935b154c36fc | 指定this为void类型,表明在该函数中this不可用/不可访问 | function say():void{
console.log("Hello Word Void");
} | 0 |
b1ce7690888798cb347058d6f443b66b | 8f2c167298f781fc0f8c2c1797712928 | Funkcia vytvarajuca novy list stromu s danou hodnotou | Tlista *wynik = (Tlista*)malloc(sizeof(Tlista));
if(wynik != NULL) {
wynik->w = x;
wynik->nast = a;
}
return wynik;
} | 1 |
f90076b4df87059d729fbcfb655693d2 | 3206511e22f5462db3d1d73907a69138 | Sets the free parameters of stochastic oscillator. | res = []
N = random.randint(10, 400)
n = N - random.randint(1, N - 1)
z = talib.MA(self._apply_price, timeperiod=N) - talib.MA(self._apply_price, timeperiod=n)
res.append(N)
res.append(n)
res.extend([random.uniform(np.nanmin(z), np.nanmax(z)) for _ in range(6)])
... | 0 |
46d879f453d34fbccd4daa86b470ce8d | a2c11fdc7e1e5769ce03733cc8e25761 | 运营活动优先级查询 | class CustomerController extends AdminController
public function loadDemandPriority(){
$value = i('search');
$offset = i("offset");
$limit = i("limit");
$where['DelFlag'] = 0;
if($value){
$where['FbPriorityName'] = array('LIKE',"%$value%");
}
$count = ... | 1 |
0519e61513f4a8f3a8eaf55351a92388 | a904182e3c401c808a69ca26c99c0a75 | 지도 상에 추가되어 있는 대여소 리스트 초기화 | def add_restarea_list():
global restarea_Listbox, Highway_combo, RESTAREA, route_list
restarea_Listbox.delete(0,restarea_Listbox.size())
route_list = []
for route_num, route_name in RESTAREA.items():
if(route_name == Highway_combo.get()):
route_list = Rest... | 1 |
d98185bb039afa9181e98676ebb00b09 | ad1a3706692a3a9c2a3214d7c8f52e51 | Answers a Challenge Response type challenge. This is a BankSolutions challenge that generates a response based on an inputed value | class NLS_Client(NLS_Session):
def process_challenge(self, bytes_s, bytes_B):
self.s = bytes_s
self.B = b2i(bytes_B)
if (self.B % self.N) == 0:
return None
self.u = get_u(self.B)
if self.u == 0:
return None
self.x = get_x(self.username, self._passw... | 1 |
d5902ac8f88f3fd75f39c18eef4b55ba | cddbbe967d0689b4f6530c618d807fb7 | calculate the average unit vector which is perpendicular to the bp planes | Eigen::Vector3d polar_angles_to_unit_vector(double angle_a, double angle_b)
{
} | 0 |
5407cdde2422c5fe11061f7086d8fb50 | 9ce5518dfb9a19fa07d54b4d856b1c62 | Getter method for enable_remote_id, mapped from YANG variable /relay_agent/dhcpv6/options/state/enable_remote_id (boolean)
YANG Description: Sets DHCPv6 OPTION_REMOTE_ID (37). This option is the
DHCPv6 equivalent for the IPv4 (DHCPv4) Relay Agent Option's
Remote-ID suboption as specified in RFC 3046. The remote-id
fie... | class yc_state_openconfig_relay_agent__relay_agent_dhcpv6_options_state(PybindBase):
def _get_enable_remote_id(self):
return self.__enable_remote_id | 1 |
47c0d377e443962b4ce2a95cb8a0c06d | 6f5227a754c774afedd003d8ffed9297 | Gets the root node in the merkle tree. | public class StandardLearnerTreeView implements LearnerTreeView<MerkleNode>
@Override
public MerkleNode getMerkleRoot(final MerkleNode node) {
return node;
} | 1 |
adfa359314cb7302c2a0d5b969aacb8b | 34972f09561274c76c68df4e64d7e3f6 | NAME
DAdestroy_array - Destroy a dynarray
DESCRIPTION
Destroy an existing dynarray from use. This routine de-allocates the
dynarray structure and deletes the current dynarray.
RETURNS
Returns SUCCEED if successful and FAIL otherwise | {
if (!D) return (NULL) ;
cs_free (D->P) ;
cs_free (D->Q) ;
cs_free (D->R) ;
cs_free (D->S) ;
return ((csd *)cs_free (D)) ;
} | 0 |
9675012e0fd4b3e437678539acd8c164 | 2ee2deeb04da1048f8df10646d6341aa | Find all gates that have been saved for a qubit or None if the qubit
doesn't exist. | class PauliZ(_InvolutoryMatrixObservable):
def diagonalizing_gates(self, num_qubits: Optional[int] = None) -> Tuple[GateOperation, ...]:
return () | 0 |
ce2723f0f4d203ac90264d56c2cb771e | 7bb21b04b1ba82859f4ab54733f50158 | 初始化最高分 | public class ScrollScoreCtrl : MonoBehaviour
private void Initialize(){
high_score = PlayerPrefs.GetInt (highScoreKey, 0);
} | 1 |
c597acbf024d6a2832994b6fdfe2e846 | c9092a885b2380f95db8ed65049ecfc1 | 使用WinForm生命周期 | static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
var form = new Form {
WindowState = FormWindowState.Minimized,
ShowInTaskbar = false };
form.Shown += delegate
... | 1 |
d127d613bdb6f9fdb9a1fee9aedac70d | 20ffaad2e3cbd16a1a989b93d53097ad | Returns the variable representing the current amount if energy of this battery in the given energy unit. | if (energyUnits.indexOf(this) + 1 > energyUnits.size() - 1)
return energyUnits.get(0);
return energyUnits.get(energyUnits.indexOf(this) + 1);
} | 0 |
015ffc8a765194454fcf82f6c8e93caf | 26f8c2ff5f5a23b2714615f46b5a31c4 | 待支付金额变化 | function handle_order_money_change($order, &$msgs, &$links)
{
$order_id = $order['order_id'];
if ($order['pay_status'] == PS_PAYED || $order['pay_status'] == PS_PAYING)
{
$money_dues = $order['order_amount'];
if ($money_dues > 0)
{
update_order($order_id, array('pay_statu... | 1 |
91896742123423f9b9daf082f1af25ca | 757c3eb589cf0f4da204d0dda70f520d | A module indicates that it wants to discover all concrete instances of a given
IKnownPluginType by declaring an enumerable property of that know-type. The
property will be populated with instances that are derived for the specified
known type. | namespace Nuclei.Plugins.Core
public sealed class PluginRepository : IPluginRepository
public TypeBasedDiscoverableMember DiscoverableMember(TypeIdentity identity)
{
lock (_lock)
{
return _discoverableMembers
.Where(m => m.Key is TypeBasedDiscovera... | 0 |
b7ac7f37c57b5d3faf3b0919a63a2a08 | 0c5effe7afbe85b92f1c6ed23d398b82 | Concat RFM quartile values to create RFM Segments | no_days_to_cin_bins = np.arange(start=7, step=14, stop=350)
no_days_to_cin_bins = np.insert(no_days_to_cin_bins, 0, -1)
no_days_to_cin_bins = np.insert(no_days_to_cin_bins, no_days_to_cin_bins.size, 1000)
df['no_days_to_cin_bin'] = pd.cut(df['no_days_to_cin'], no_days_to_cin_bins).cat.codes
df['stay... | 0 |
d382d501bcbd93ee60286b56e33537d6 | 3ff11fb3db7fdb4b3819663e3032dd2d | Toggles the project detail view | class TtmdTableController
toggleDetail(b) {
if (b) {
this.isDetailShown = b;
} else {
this.isDetailShown = !this.isDetailShown;
}
} | 1 |
9735ec540ecdb5a9aff1ec9cfb846d46 | cb0389edf8ee18b85744c9f3bb9ad14a | set which buildings are drawn | namespace GUI
void ChooseToolBar::showBuildings()
{
_back->setVisible(true);
_build->setVisible(false);
_move->setVisible(false);
_work->setVisible(false);
_attack->setVisible(false);
_house->setVisible(true);
_field->setVisible(true);
_road->setVisibl... | 1 |
fa3b5d3853331addb5b3c8456a591093 | 745cbe9218463cd4618fcae77541403b | Stop the recognizer before the application is closed | namespace VHMIS
public partial class PatientVisit : Form
private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
{
speechRecognitionEngine.RecognizeAsyncStop();
speechRecognitionEngine.Dispose();
} | 1 |
46c0f2e6c3bc3a4d5711165cb2b819a1 | 82173f0b0c9a6c583996719f7b7495e4 | 删除物业 | function BuildingDelete() {
var r;
messageBox.show("确认", "确定删除该物业?", MessageBoxButtons.OKCANCEL, MessageBoxIcons.question);
$(".btn-confirm").click(function () {
r = true;
buildingDel();
})
$(".close span").click(function () {
r = false;
})
function buildingDel() {
... | 1 |
63b10867d88093d4fcd2f86d50281fe7 | fb073cf90c44a703241c0d9c5ab0ba14 | Returns the numeric value associated with a base64 character | namespace Alphicsh.Ston.Tokenization
public static class StonChartable
public static byte GetBase16Value(this int c)
{
return Base16Values[c];
} | 0 |
b5536370395f3b3faa628af1d21e905d | 7dc42fb1784f6995cbc3479416ca0408 | 初始化界面 首页加载时第一个的豆豆为红色 | function BagMainView:initView()
self.slider_cq:addEventListener(handler(self, self.onSliderMoveEvent))
if GameApp:IsCommonGame() then
self.btn_save:setTouchEnabled(false)
self.btn_save:setAllGray(true)
self.btn_take:setTouchEnabled(false)
self.btn_take:setAllGray(true)
se... | 0 |
e71bd8e7a28f60bba9077a93b0886b67 | 9e3a5d22bdb19658845ec609497ce5dd | {@code GET /region-zip-lists} : get all the regionZipLists. | Resolution rerturnDefault = new StreamingResolution(MIME_TYPE_JSON, getDefaultJSONResult().toString());
if (StringUtils.isBlank(optUserProfile.getCompanyNo())) { return rerturnDefault; }
JSONObject params = (JSONObject)JSONObject.toJSON(zip);
if (null == params) { params = new JSONObject(); }
params.pu... | 1 |
30a4ebbea691982585c6542d3772b9bd | 505119dd3605de4fd73aa483d07f037c | Return true if word is in the dictionary, and false otherwise | public class Dictionary
public boolean isValidWord(String word) {
return dic.contains(word);
} | 1 |
8a63a48143d2dd01f4747d3446994f84 | 68b5982397cd9a24be3cb5e187637d1f | Refresh the number of diamonds left to collect | {
Vector3 playerForward = Vector3.Cross(transform.forward, new Vector3(0, 1, 0));
Quaternion playerRotation = Quaternion.Euler(90, 180, 0);
if (diamondCount < playerScript.exhaleTargetTime)
{
remainingDiamondDistance += 320;
Vector3 spawnPosition = GameObject.... | 0 |
358020384cf05ebc7cb7e58c8bca3760 | b6c2d3b5c7984302e69d5f88b45811b8 | 这里使用inherits()函数判断父部件是否是菜单或工具栏
如果是,则创建该父部件的子部件,并返回子部件
如果不是,则直接返回0 | {
HWND hBar = NULL;
if( hParent && IsWindow( hParent ) )
{
hBar = CreateToolbarEx(hParent,
WS_CHILD | WS_BORDER | WS_VISIBLE
|TBSTYLE_TOOLTIPS, 200, 4, (HINSTANCE) GetModuleHandle(DLL_MODULE_NAME),
IDR_TOOLBAR1, (LPCTBBUTTON)&tbButtons,
6, 20, 20, 20, 20, sizeof(TBBUTTON));
if( ... | 0 |
a180381016be4a0d6698c4d38f84718b | e0a0cb066c1a7eaf53bfd0e45b8e96b9 | Picks a random index that is then used to access the word and clue | let min = 0;
let max = this.words.length;
let randomNumber = (Math.random() * (max - min + 0)) << 0;
return this.words[randomNumber];
} | 1 |
fff851a847af8d6c9df511edbd6c9082 | 5eb25b518d6c5a7b569e7b327478322a | 用于获取豆瓣电影Top250的数据,直接拿到Subject数据 | movieService.getTopMovie(start, count)
.map(new Func1<HttpResult<List<Subjects>>, List<Subjects>>() {
@Override
public List<Subjects> call(HttpResult<List<Subjects>> listHttpResult) {
if (listHttpResult.getCount() == 0) {
... | 1 |
364526ce280ad79c7b51442bab43f491 | d03377a91070b9492f5f44f21c4233cf | Generate player decks containing 26 integers representing cards | {
for (int i = 0; i < numberOfDecks_; i++)
{
for (int value = 1 ; value <= 13 ; value++)
{
for (int suitInt = Hearts; suitInt != Spades; suitInt++)
{
Suit suit = static_cast<Suit>(suitInt);
Card card = Card(suit, value);
car... | 0 |
775059cde3c888cb56b6611c3c87090e | 0e728fa1a8876481970a423a40d6fd4a | Return amount value. Specific for Paypal | class PayPal
public function get_amount()
{
return (isset($this->_response['PAYMENTINFO_0_AMT'])) ? ($this->_response['PAYMENTINFO_0_AMT']) : (0);
} | 1 |
b1552d4e1201703a66cb12543b470d11 | 8e494ba32173e59debcbcf61a388de84 | Test that if the running application dies then the
agent and debugger will also shut down. | public void AgentServiceTest()
{
CommandAndControlAgentService_Accessor target = new CommandAndControlAgentService_Accessor();
target.OnStart(new string[0]);
System.Threading.Thread.Sleep(10000);
object sender = null;
ChangedEventArgs e = new C... | 0 |
1e8e5f7b14f63a3ab838dd9e4836a8a1 | 7460b5436a90f62bab55e6586fa920d4 | @brief Set advertising interval, this belongs to advertising parameters | void ptpSignallingTlvSetAnnounceInterval(SignallingTlvRef tlv, uint8_t announceInterval)
{
assert(tlv);
tlv->_announceInterval = announceInterval;
} | 1 |
36f93239b85a2587898a978df57ed269 | b952a94a8fc705e6a8ef8a4cf9b7ef73 | Построение компонент для матрицы с отбрасыванием малых контуров | {
var bitmapData = bitmapWithPoints.LockBits(
new Rectangle(0, 0, bitmapWithPoints.Width, bitmapWithPoints.Height),
ImageLockMode.ReadWrite, bitmapWithPoints.PixelFormat);
var blobCounter = new BlobCounter
{
FilterBlobs = true,
... | 1 |
74eb669f4b9da5cff36f4c674cef113f | add9039395c91d22564637ceeba8ddda | Método getNotes(): retorna a lista notes (principal) | public class UserPage
public List<Document> getNotes() {
return pageUser.getUserNotes();
} | 1 |
7beea872ee7a46b109508bb7a4579ff1 | 6309c00252200d4fdfa5feb8e5b4f5f4 | Switches the renderer mode. | {
m_RenderMode = ERenderMode.Unknown;
if (GetComponent<CanvasRenderer>() != null)
{
m_RenderMode = ERenderMode.ConvasRenderer;
}
else
{
if (GetComponent<MeshRenderer>() != null)
{
... | 1 |
4c4058a115603d9fa483981bbc7e571e | 4e1dc0811fe645648575a3c8eeeddfcf | This method enters text in Email field on Registration Form | public class SspResetPasswordPage extends TestBase
public void enterValidEmailInEmailtextfield(String _EmailvalidValue) {
status="FAIL";
textArea_ForgotPasswordTextPlaceholder.click();
textArea_ForgotPasswordTextPlaceholder.sendKeys(_EmailvalidValue);
status="PASS";
takeScreenShot();
} | 0 |
0403ad187a5602378e586060300a94ff | 4f4e06e4e595d069119b61eb19d9287c | 기업 프로필 수정 | @Controller
public class ManageController
@GetMapping("/manage/profile/update")
public String updateProfile(Integer id, String nickname, String resume, HttpServletRequest request, Model model) {
User user = (User)request.getSession().getAttribute("user");
String message = null;
if(usersServi... | 0 |
a9f02788ad6e3849d930f18865411cf5 | eca7794ff42d5c016d24b5b7ed8775a3 | Function to update main tree parameter "isPruned" to 1 to avoid
selecting same attribute again. | if isinstance(node, DecisionTree.DecisionTreeLeafNode):
return
elif isinstance(node, DecisionTree.DecisionTreeClassifyNode):
for sub_value in node.subtrees.values():
if isinstance(sub_value, DecisionTree.DecisionTreeClassifyNode):
prune_node(sub_value, tree, alpha)
... | 0 |
4ee6a7523ed3554ac97d24929951002c | 9343aa81aa9e81ed9681c39264375aaf | validate whether the score user entered is assignable or not in the array | function validateAssignment() {
var assignment = document.getElementById("assignment").value;
if (assignment < 0 || assignment > 5) {
document.getElementById("assignment_prompt").style.color = "red";
document.getElementById("assignment_prompt").innerHTML = "The grades should between 1–5";
... | 0 |
a4531aeb616c231d223bf728185fc153 | 8b654a2ce52444c3e8941d9d0524cca2 | 删除不在sis数据库中的图片 | {
string[] listids = IDS.Split(new string[] { "," }, StringSplitOptions.None);
foreach (string s in listids)
{
int gsID = Convert.ToInt32(s);
Cases _info = new CaseManager().GetCaseByID(gsID);
string ImgUrl = _info.ImgSrc;
... | 0 |
88ae8cdcb09ee849acabecfbc27db444 | ac657f50cf79065f4560a14c22d5457c | 组合mongo查询 | class Result implements \IteratorAggregate, \ArrayAccess, \JsonSerializable
public function joinMongo(string $linkMongoName, $relation, array $fields = [], $where = [], $sort = []): Result
{
if (empty($fields)) {
return $this;
}
$mongo = mongo($linkMongoName);
list ($fiel... | 1 |
0ed9899da71742eb34a201053336c259 | d9f18bf4f0bd1b10d9040deefbb1add5 | check authenticated status and toggle state based on that | class App extends React.Component
checkAuth(){
if(this.state.authed){
} else {
return false;
}
} | 0 |
4a279dcbb4200bc5aeb7a6bb6c0c48a6 | 169fe4e44d28faccd3549f59f28dcbec | https://leetcode.com/problems/parallel-courses/ | public class Solution
public boolean canFinish(int numCourses, int[][] prerequisites) {
int[] needHowManyCourses = new int[numCourses];
LinkedList<LinkedList<Integer>> dep = new LinkedList<LinkedList<Integer>>();
for(int i=0;i<numCourses;i++){
dep.add(new LinkedList<Integer>());
... | 0 |
f58968685a4b190975027e262be04ea9 | 7c12300e7cdc94e1b5c77d4431929958 | This error handler logs exception and then makes response with most
appropriate error message and error code | ErrorResponseDTO response = ErrorResponseDTO.builder()
.errorCode(httpStatus.value())
.httpStatus(httpStatus)
.message(Arrays.stream(e)
... | 1 |
b2d38fb12bfe044cdcd4b1980d66a349 | 49707948c5dbcdf79599969dca76c0e8 | Parses a call statement after its leading annotations and tag have been consumed. | const keyword = this.parseExpectedToken(SyntaxKind.CallKeyword);
const identifier = new IdentifierNameSyntax(this.parseExpectedToken(SyntaxKind.IdentifierToken));
const argumentList = this.parseArguments();
checkSemicolon && this.parseExpectedToken(SyntaxKind.SemicolonToken);
ret... | 1 |
39b44153f1269e33b0be7194048c6693 | 974c5f6ee2a2495802b2b5c7cfcd8d07 | Given a source ID from CantusDB, returns a dictionary of
source metadata required to create a Cantus Ultimus
manuscript object. | class AbstractDatabase(abc.ABC):
def get_source_metadata(self, src_name: Union[str, SourceName]) -> Dict: | 1 |
8e45b2b58dca339be57c31285c0d82a2 | cbabc1819aff62a8c6a3f81e3d695a93 | Ensure metrics related to kerberos login is updated. | def test_CMSSW_7_0_4():
cmd = ' &&\n'.join(
initialize_kerberos_keytab_cmd() +
initialize_cms_environment_cmd() +
run_and_validate_configs_cmd()
)
process = subprocess.Popen(['bash'],
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
... | 0 |
d40de2d5992ed1ef61cbc34f6e1194d7 | ee91dff58e82b3d1a310b44a853dbbac | GET: JobAppointment | namespace HRM.ERP.Controllers.HRM
[Authorize]
public class JobsController : Controller
[Route("HRM/Job")]
public async Task<IActionResult> Index()
{
var userId = Guid.Parse(User.FindFirst(ClaimTypes.NameIdentifier).Value);
Organisation org;
var otheruser = _context.OtherUsers.Where(x... | 0 |
2c4971c2262d61593adf4f7155460cff | a60044677f764f174bb36b513dd501eb | Internal callback function used by the UIP web client.
Called when connection is closed (finished reading a page) | def lb_close_cb(*kwargs):
global lb_buffer
lb_buffer = None
return weechat.WEECHAT_RC_OK | 1 |
67eb43b7ba7d64155a3b9c7dae79b0da | 95b3b5e98602ae9d7780603d1afd4939 | Muestra la lista de profesores de un departamento | def busqueda_profesores(id_departamento):
jsons = []
conn_string = "host='localhost' dbname='DepartamentoProfesores' user='ISA' password='1234'"
conn = psycopg2.connect(conn_string)
cursor = conn.cursor()
query = "SELECT \'id_profesor\' FROM profesor WHERE id_departamento="+id_departamento+";"
c... | 1 |
a98843571ebbc679fc7315511403743b | b58696e0ba248fc96e9cbcfb86cbbcbe | Get list of ordered tickets by order id | ticket_id = args.get('id')
command = None
if ticket_id:
command = TicketController.GetTicketCommand(self.env, ticket=ticket_id)
command.native = True
else:
command = TicketController.ListTicketsCommand(self.env, limit=20)
result = TicketControl... | 0 |
891d3be1358386a9cfe33294ed092fce | 69d2d92147b24426cdfece5c5d9da81f | Como una especie de malloc para las tareas. | void crear_tareas(TaskFunction_t tarea,const char * const nombre)
{
uint16_t i;
char nombre_aux[STR_AUX];
for(i = 0 ; i < N_TECLAS ; i++)
{
strcpy(nombre_aux, nombre);
strcat(nombre_aux, (char)(i+48));
crear_tarea(tarea,
nombre_aux,
SIZE,
&teclaLED[i],
PRIORITY,
NULL);
}
return;
} | 0 |
6398c3dcd70923fd6394da389e3dbb73 | 2ab22ff6d36029757cdc80e81b4364ff | the new data will be located at the front of database array | function add(newData) {
let data = get();
data.unshift(newData);
save(data);
} | 1 |
4e5fc25560a9f19279414bcdd2ed872c | ec07ed60f322cb3261b2d4ceca85aa00 | 只渲染显示列 | {
string showColums = string.Empty;
var tableNameList = searchShowObjList.Select(l => l.TableName).Distinct().ToList<string>();
var onlyShuiWu = tableNameList.Count(t => t.Contains("DISHUI") || t.Contains("GUOSHUI")) == tableNameList.Count;
foreach (var tableName ... | 1 |
82345c6738a02f4b2cde87ebfee50d82 | 3ef0210b801f8b3bb843a1f9473417d1 | Uses Knuth's algorithm 2.3.1T (inorder traversal). | if (!root){
return;
}
if (root->left){
treeToListCore(root->left, last);
}
root->left = *last;
if (*last){
(*last)->right = root;
}
*last = root;
if (root->right){
treeToListCore(root->right, last);
}
} | 1 |
ffdf1fbc65608744a468ad0be0f1a624 | ca26a0ec299bd2f205ed4553d8df92ce | Returns the digestion preferences. | public final class KeyStoreParameter implements ProtectionParameter
public @KeyStoreKeyConstraints.DigestEnum Integer getDigest() {
return mDigest;
} | 1 |
b8267142150423c20e527657ea642fb1 | 11b5afa49bf7373ade9a7ef611706f1e | 从json字符串中获取avro的schema | throws IOException {
GenericDatumReader<Object> reader = new GenericDatumReader<>(schema);
Object datum = reader.read(null,
DecoderFactory.get().jsonDecoder(schema, jsonData));
return datum;
} | 0 |
61862d765008fcb7968b18369baa7257 | 52f0ad8578a224a9ad8fa658316d1702 | Reinicia el cliente que consume los servicios del juego | def restart_client():
print('Client restart.') | 1 |
0b4a52a03a528ac4b6fcc514893a13c4 | 75f17cf1e809d715c7418e4c26bce4ad | ConnectionオブジェクトをもとにconnectionIdを設定する | public class LogEntry implements Serializable
public void setConnection(Connection connection) {
try {
this.connectionId = Integer.toHexString(connection.hashCode());
this.autoCommit = AutoCommit.fromBoolean(connection.getAutoCommit());
} catch (Exception e) {
systemLogger.warn(e.getMessage(), e);
}
} | 1 |
5ab769c65ac39a1ad83a6c29ab4c4141 | b7f2895b5709841b7a1bc4b82cb1087e | Configures the service locator (Microsoft Common Service Locator) if used. | namespace DContainer.Prism
public abstract class DContainerBootstrapper : Bootstrapper
protected override void ConfigureServiceLocator()
{
Locator.SetCurrentLocatorProvider(() => Locator.Root);
} | 1 |
88298e7a2e67219a850c4eb47a4e38f7 | c96e72208f2ca3381bdeece23551847c | Closes all stores in the list.
This is safe to call in all circumstances. Implementations
can not trust that OpenAllL has been called before. | public function closeAll(); | 1 |
830477886bd2c9c73d6c22940a52058a | 80a0a0a3ec08d5e27652b1ea09a8c4a9 | Determines whether the matrix A is non-singular. | public class LUDecomposition
public boolean isNonsingular() {
for (int j = 0; j < n; j++) {
if (LU[j][j] == 0) {
return false;
}
}
return true;
} | 1 |
4cf69fed9172cc52721818364e9fd9f3 | 969c47767e152691ac90221655a9dcdc | Geeft het mutatieobject terug. | public class State
public Mutation getMutation() {
return mutation;
} | 1 |
7dbc22e7cb948b90e8fcf99b49a53fe2 | 45bb76ed604ed5b22910bb1a3b6d23d5 | Method to handle open the selected poll | {
$user = auth()->user();
$selectedChoice = $poll->vote()->where('user_id',$user->id)->select('choice_id')->first();
if($poll->deadline > Carbon::now())
{
return view('poll.pollview',compact('poll','selectedChoice'));
}
else
{
return r... | 1 |
a82841f7911aa3e47ee9c763e51be601 | 1ad89f901e2fc1ae230cb3907861f85a | Test case for update_agent
Update agent # noqa: E501 | body = UpdateAccount()
response = self.client.open(
'/accounts',
method='PUT',
data=json.dumps(body),
content_type='application/json')
self.assert200(response,
'Response body is : ' + response.data.decode('utf-8')) | 0 |
6a22bd232e39145b1763222b18033b73 | 7286e4854ae054d50516cb8767fb0a97 | kéo | local function onTouch( event )
if not (boolStart) then
if event.phase == "began" then
local posIniX = sprite.x
local posIniY = sprite.y
display.getCurrentStage():setFocus( sprite, event.id )
sprite.isFocus = true
sprite:toFront()
... | 1 |
d42c095ff9bbc466472c0a882eba1dcf | 37e054b8ed82a7340311c3de1f300eca | 删除条目的同时,减去缺课老师缺课时长,减去代课老师代课时长 | public void removePlanCourse(PlanCourse planCourse, TeachPlan plan,
boolean needReCalculateCredit); | 0 |
dfadb288e2c2d8872b8f8c672c9743f3 | d2f26b13a459d1c682d7accb0bb6edf6 | Cette fonction permet d'afficher les photos rangées dans une arborescence de dossiers. | {
$dirName = str_replace( '../', '', $dirName );
$d = dir( $dirName );
while (false !== ($entry = $d->read()))
{
if( $entry == "." || $entry == ".." )continue;
$other = "";
if( is_file( $d->path.$entry ) )
{
$relPath = str_replace( PATH_UPLOAD, "", $d->path);
$link = "download.php?path_fil... | 1 |
3f5f2c16ed642cc0c865afa6ffb8a3cc | 39385524a93cc198ecfef4a767c07b5f | 续签申请 | {
if (intval($_GET['re_id']) <= 0) exit();
$model_store_reopen = Model('store_reopen');
$condition = array();
$condition['re_id'] = intval($_GET['re_id']);
$condition['re_state'] = 1;
$reopen_info = $model_store_reopen->getStoreReopenInfo($condition);
$store_i... | 1 |
cd8d6eac6cf93b51a57fd7bba15bcfad | c0eb3f47e43488e35e91f36a5db32692 | Removes an element from this document. | namespace org.aoas
void Remove(TElement e); | 1 |
3d12ff71d229240cd64068881d5ca602 | 18ebaa45e02d8ac8940b45031f050491 | Disables sorting buttons during sorting to restrict use of another sorting algorithm in between | document.querySelector(".bubble_sort").disabled = true
document.querySelector(".insertion_sort").disabled = true
document.querySelector(".merge_sort").disabled = true
document.querySelector(".insertion_sort").disabled = true
document.querySelector(".selection_sort").disabled = true
} | 1 |
dbbc260bdf72102a1fd8f0afe2ac1dcf | 64d6c28c0ac20656a9f1fcb379e96c07 | Function used to create recurring bookings. | class BookingsService
public function create() {
} | 0 |
9a8283001939a5244d7c47b94678577b | f1b7359a37271e14d41dbb8243223f1c | Modifica los atributos de un objeto Tipo_docuemnto ya existente en base de datos.
Puede recibir NullPointerException desde los métodos del Dao | @Stateless
@LocalBean
public class TipoDocumentoServicio
public void actualizar(TipoDocumento tipoDocumento) {
this.tipoDocumentoDAO.update(tipoDocumento);
} | 1 |
559a3be03ad3bdfc20bd24f80d2acbef | 5aeacac5b92c4d6727d8ff5d2a6207ae | Returns the meta object for the attribute '{@link IOTApplication.Person#getGender <em>Gender</em>}'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | @XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "ConsumerEnquiryData", propOrder = {
"idType",
"idNumber",
"gender",
"dateOfBirth",
"lastName",
"forename1",
"forename2",
"branchCode",
"appliedOn",
"reference"
})
public class ConsumerEnquiryData
public EGender getGender() {
... | 0 |
393d500bd5c85b15ef4b5fa5a4e7f699 | 1a9d2e9ed971bb444a5def50e58ae985 | Returns the weights along with the the soure and destination pairs | {
List<totaledgs> mlist = new List<totaledgs>();
Console.WriteLine("Edge Weight");
for (int i = 1; i < V; i++)
{
totaledgs obj = new totaledgs();
obj.Src = parent[i].ToString();
obj.Dst = i.ToString();
... | 1 |
56587a27fff2e05219d46ff276361a43 | fa3e4dcf31ea7af09a03d9ef154ca01d | 先创建socket,绑定本地地址,然后开始监听 | void Socket::SocketInit() {
createSocket();
bindIPandPort("127.0.0.1", 2233);
listenSocket();
CreateSocketInformation(listenScok);
while (true)
{
ReadyConn();
if (FD_ISSET(listenScok, &ReadSet)) {
if (AcceptSocket() == false) {
std::cout << "\n客户端连接错误!";
close(listenScok);
close(clientSock... | 1 |
789fae7fb54999808b6d4c4d2f467ddb | c771f80cae5f99e971b2dd1cf3797fea | start the dressing activity | public class MainActivity extends CustomActionBarActivity
public void onDietButtonClick(View view) {
startNewActivity(DietHomeActivity.class);
} | 0 |
cd72c7c63493706957bf1ab9f374a569 | 53b10a0c005142ab6b69b8c675c2c23d | Same as vanilla bow, except it can be fired without arrows with infinity. | public class BehaviorOverhauledArrowDispense extends BehaviorProjectileDispense
@Override
protected float func_82498_a() {
return 6.0F;
} | 0 |
010eb701d5d46e093b52ab48886441b7 | 6feba00832e9cc04336e377d0da49315 | Calculate the power in the given frequency band using the Lomb-Scargle
periodogram. | def lombscargle_periodogram(time, data, edata=None, freqs=None,
samples_per_peak=5, nyquist_factor=5, norm=False):
kwargs = dict(samples_per_peak=samples_per_peak,
nyquist_factor=nyquist_factor)
if freqs is None:
freqs = LombScargle(time, data, dy=edata).aut... | 1 |
071cc4f71ba7005e84932616b31a2bc9 | cf6d92bd6b2beced4de054b4250a36c8 | 根据月份英文缩写获取数字月份 | for (Integer ks : MTH_MAP.keySet()) {
if (MTH_MAP.get(ks).equals(month)) {
return ks;
}
}
return 0;
} | 0 |
6ef9892f2bf81a0d2162d617fd957abc | 2dc1e5a5548f6482a0ade5d468383cf2 | Construct resumptionToken from parameters for query | string_builder = ["until=",
self.end_date.strftime("%Y-%m-%dT%H:%M:%S.") + str(self.end_date.microsecond // 100) + "Z",
"&since=",
self.start_date.strftime("%Y-%m-%dT%H:%M:%S.") + str(self.start_date.microsecond // 100) + "Z"
... | 1 |
cc9b7a187a23c0b75da3ef45968d2a6e | 0d7975edd8f4648045d23b490d56a0cd | Power up the IC. | void IS31FL3194::powerUp()
{
uint8_t d = readByte(IS31FL3194_ADDRESS, IS31FL3194_OP_CONFIG);
writeByte(IS31FL3194_ADDRESS, IS31FL3194_OP_CONFIG, d | 0x01);
} | 1 |
a1c631bf7f7bb52647fd3289c5278157 | 18e40f28737b7656ff7c7c6c2693a6b0 | 根据RoleId查询Claims | namespace Bing.Admin.Systems.Domain.Models
public partial class User
public List<Claim> GetClaims() => _claims; | 0 |
40d2031793392759b72111b7659cdf4d | 62da2c7dae51ab20ffdd9690f5326546 | 超时处理:获取在线人数 | class msm_session extends ms_base
function get_online_total()
{
$cache = _G('dbcache')->fetch(self::CACHE_KEY_ONLINE);
if($cache) {
list($count, $total_time) = explode("\t", $cache);
if(600 > $this->timestamp - $total_time && $this->timestamp > $total_time) return $count;
... | 1 |
d332620c46c6268cb4c5f10b3fb1dfec | 1a3c3883edde3b531b0208960e2118a7 | Call API to get resources by SPARQL | Query queryInstance = QueryFactory.create(sparql);
QueryExecution qexecInstance = QueryExecutionFactory.sparqlService(
SERVER, queryInstance);
ResultSet results = qexecInstance.execSelect();
return results;
} | 1 |
52d7b4079fabd2eb26a2b086d98d1c61 | 3d8b2dfa1c352a2ecff65043e64dc710 | 如果是可以展开返回true,如果是不可展开返回false | export default class TreeNode extends UIComponent{
get canExpansion(){
return this.expansion.canExpansion;
} | 1 |
f9de3ed21343bb8c456aafcc1430e12d | c4532291ebf0c4f191b11200976c46a9 | 媒资标题,长度不超过128个字节,UTF-8编码。 | @Table( name = "WX_MEDIA" )
public class Media implements Identity, Serializable
public String getTitle() {
return title;
} | 0 |
c80b84c582cdfcaafd6e7c33748e0852 | 3acad1ab51258a1fb09c3c9a9b2c202d | 生成YUV420P格式的灰阶测试图
Generate YUV420P gray scale bar. | int simplest_yuv420_graybar(int width, int height,int ymin,int ymax,int barnum,char *url_out){
int barwidth;
float lum_inc;
unsigned char lum_temp;
int uv_width,uv_height;
FILE *fp=NULL;
unsigned char *data_y=NULL;
unsigned char *data_u=NULL;
unsigned char *data_v=NULL;
int t=0,i=0,j=0;
barwidth=width/barnum;... | 1 |
8a654c04347481827cf37ed07785ed69 | 00f64727fa749e27121063251526558f | Set handlers for label position based on link position (label's
position is based on link's position) | if (on_off===undefined) on_off = this.label_drag===this.empty_behavior;
if (on_off) {
this.reaction_label_drag = this.get_reaction_label_drag(this.map, this.scale);
this.node_label_drag = this.get_node_label_drag(this.map, this.scale);
this.text_label_drag = this.get_text_label_drag(this.map, this.scal... | 0 |
88f579fbabe9681483132b744d02507f | 69fca811141b7cac0c98debed208b5c6 | 点击删除按钮监听回调 | public class FullManagementAdapter extends RecyclerView.Adapter
public void setOnDeleteClickListener(OnDeleteClickListener onDeleteClickListener) {
this.onDeleteClickListener = onDeleteClickListener;
} | 1 |
67374d0c2f49d58edffbf7c991eb30d2 | d9f7c66f35b486e947eb534976103932 | Get the nb attest emploi a deduire. | class Compteur
public function getNbTabAmortImprimesADeduire() {
return $this->nbTabAmortImprimesADeduire;
} | 0 |
67dab42588c67b950e4b51bd703b2bdc | 250569612509ad8a2c84ca908b882f2a | Get selected categories array | const categories = [];
$('.category:checked').each( function() {
categories.push($(this).val());
});
return categories;
} | 1 |
bd1cd63b17c33868d90167edf2b23ee3 | e14cb3ccd3274d78c5ef8af4c9dbc6fa | Initialize the password field names structure. | global _password_field_names
_method_name = '_initialize_password_field_names'
if _password_field_names is None:
password_field_names_stream = FileUtils.getResourceAsStream(_password_field_names_file)
if password_field_names_stream is None:
ex = exception_helper.create_encryption... | 1 |
3fae13da4b9ace2b40cfeeee92a4c45f | c4c9c655e993d3f8233354cd1401c5d9 | Get a show by name | class CinemaController extends BaseController
public function show($name)
{
return Cinema::where('name', $name)
->take(1)
->get();
} | 1 |
1499c1c6836c7ce471388a50e7adf4b6 | 90717997e014d03a3c0530f483df5e19 | recursive helper function to traverse BSTree for input to an array | void BSTree::addToArrayUtil(Node* subTreePtr, string* z) {
if (root == nullptr) {
return;
}
else
{
if (subTreePtr->left != nullptr) {
addToArrayUtil(subTreePtr->left, z);
}
arrayLocation++;
z[arrayLocation] = subTreePtr->data;
if (subTreePtr->right != nullptr) {
addToArrayUtil(subTreePtr->right, z... | 1 |
8c0f64c68a9444d1d94ee7609368fdf8 | 79f7d4ae16485dbe0d5ecc4dbf4258ce | 刷新方案进度 | if not self.plan_data then return end
local name_str = TI18N("无方案")
if self.cur_plan_data and self.cur_plan_data.plan_id then
for k,v in pairs(self.plan_data) do
if v.id == self.cur_plan_data.plan_id then
name_str = _string_format(TI18N("已使用方案【%s】"), v.name)
e... | 0 |
6c6235e9aec9b5812a7dedc082d95274 | b87b81e6a22898aad690ac931876dcce | Orient an object to point to magnetic north | {
if( d.isNaN() || (d.length() == 0.0) ) return;
_dir = d;
osg::Quat rot;
rot.makeRotate( osg::Vec3d(0.0, 0.0, 1.0), _dir );
_body->setRotation(rot);
_head->setRotation(rot);
reposition();
} | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.