query_id
string
corpus_id
string
query
string
code
string
label
int64
31bf2161400ed68c7fc22d999b9df01b
0a25217d5535f7d1b4989eba4a50513d
Returns true if the user passed follows the cookbook.
public function isFollowedBy(UserInterface $user);
0
f14b8f4ec8400b16c3eaea561d5bb6bb
831535968903e534a8a7999f5e98608e
write current state to background.js
function saveOptions() { var background = chrome.extension.getBackgroundPage(); background.setItem("full-header", document.getElementById("full-header").value); background.setItem("photos", document.getElementById("photos").value); background.setItem("promo", document.getElementById("promotions").value)...
1
ffc17d8ef8775b43aa220953787dda1c
eb339005859374d7aa7e254957ba7974
Función usada para comprobar si se ha alcanzado el creterio de parada, devolviendo cierto cuando se alcanza el número de reinicios de parada
if(Contador == 99) { return 1; } else { return 0; } }
1
3f5ad6552bb5966cb019f1fd28c4183c
87389810da5c0255a6e087a0d5f00008
가격순으로 사진 보기
{ $datas = Photo::selectRaw('photos.*, gallery.galleryname AS galleryname') ->leftJoin('gallery', 'gallery.id', '=', 'photos.gallery_id') ->latest()->get(); return view('shopping', ['datas' => $datas]); }
0
3be942ca5a2a8131fc7acfcbea24f44f
9f117ead423768825350fa7a1890074b
@brief 设置X轴量程
{ int nodeID = 0x0C; nodeID <<= 7; nodeID |= slaveID; Message.ID = nodeID; Message.LEN = 6; Message.MSGTYPE = MSGTYPE_STANDARD; Message.DATA[0] = 0x2B; Message.DATA[1] = 0x60; Message.DATA[2] = 0x60; Message.DATA[3] = 0x00; Message.DATA[4] = mode_x; Message.DATA[5] = 0x00; Status=CAN_Write(P...
1
9e4f0dfc1fd84ffcee591f2e0d3eb5da
1c79cbfd9ea431f6eefc6e5d5e3f3670
日記作成処理が成功することを検証する
class TestDiaryUpdateView(LoggedInTestCase): def test_update_success(self): diary = Diary.objects.create(user=self.test_user, title='タイトル編集前') params = {'title': 'タイトル編集後'} response = self.client.post(reverse_lazy('diary:diary_update', kwargs={'pk': diary.pk}), params) self.assertRedirec...
0
c03ea0aa3ed4ae31f86e326c1f26a9b9
e54827c545228eda73bc29f660853926
富友扫码
@POST("api/wft/fyPayscan") Call<Object> fyPayscan(@Field("token") String token, @Field("body") String body, @Field("mid") String mid, @Field("order_type") String order_type, ...
1
73165ffb7350959882f6f0ac654367c2
6087175a083f8d1da11b48753c5f6d63
function to get the last received message from the RX FIFO buffer
int i; for(i=0; i<cant;i++){ if(buffer_is_not_empty(rx_buffer_id)){ msg[i]=(char)pop_buffer(rx_buffer_id); } else{ return i; } } return i; }
0
140f0cf87b8c0e69e0ba9ad8668b7b48
9b0900c27b440a71dd086ba193ff2e49
Sets the Decoder settings based on user preferences
try { XMLDecoder xmlDe = new XMLDecoder(new FileInputStream("preferences.xml")); Properties p = (Properties) xmlDe.readObject(); xmlDe.close(); setNumOfThreads(p.getNumOfThreads()); setGameInterface(p.getGameInterface()); setGenerateAlgo(p.getGenerateAlgo()); setSolveAlgo(p.solveAlgo); setIp(...
1
ffa235328fd8aa2f4d810970f58dc973
075c20579debfed8449fb98312aae7f2
Adds a new shape with the given mass properties.
if (density > 0.0) { shape.calcMass(density); } else { setStatic(); } }
0
8a764c1766192a03b6e374dccf425d91
8c40d6622129723f3a0c836c642a0614
Adds a user, and replaces any matching existing user
async def add_user(user_data: dict) -> dict: user = await user_collection.replace_one( {"email": user_data["email"]}, user_data, upsert=True ) new_user = await user_collection.find_one({"email": user_data["email"]}) return user_helper(new_user)
1
b073c30085cb1b7ff5ace81b3cdbec8c
f931700525f3ade4d3c83f281aefb0dc
Find all accordion panels.
function initAccordions() { var $panels = $(".accordion-container:not(.added-by-AJAX) .panel"); $.each($panels, function() { if (!$(this).hasClass("hidden")) { $(this).addClass("hidden"); } }); var $accBtns = $(".accordion-container:not(.added-by-AJAX) button.accordion"); $.each($accBtns, function() { add...
1
f8213c5799820fc68e8e5f7f8c7f28f6
e636620b8e885872397c00a072b02e79
Returns the meta object for class '{@link org.xtext.projet.selemodel.selemodel.Check <em>Check</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
EClass getUMLConstraintCheck();
0
5fcec20c038fe38099f6857e5d5ec23a
247a014bcf76330b3103cf811908f180
Determines if the specified network interface is used for AWDL.
namespace AirDropAnywhere.Core internal static class Utils public static bool IsAwdlInterface(this NetworkInterface networkInterface) => networkInterface.Id == "awdl0";
1
b891fecb2f4122c7a4250fd3ca0584a4
e2fe03904a35931409eb0a5e2b5c796a
Calculates the area of the bounding box.
namespace fusion_portableglobe double Grid::BoundingBoxArea() { return (polygon_east_boundary_ - polygon_west_boundary_) * (polygon_north_boundary_ - polygon_south_boundary_); }
1
f4487d0b2ad884c4b04ed7c6676afe30
dd596ae91008a2502141bbf30fc8b94f
测试双向多对多的加载
tests.InitTestEnv() query := New() var u models.SysRole var us []models.SysRole tableName := u.TableName() err := global.Mysql.Table(tableName).Preload("Users").Find(&us).Error fmt.Println(err, us) var us2 []models.SysRole err2 := query.Table(tableName).Preload("Users").Find(&us2).Error fmt.Println(err2, us2)...
1
876a6031079e9a54c466c77269379ac7
4ffb2eb30574e1fdcebe3d12cd3f4be9
Triggers the process to create all necessary files
public function generateFiles(): void;
1
ef1e3ea69fc2c81b97ce0e17f6c0f755
c4041ed1446370c7febd8d854d7607d1
根据oilGunNo更新gas_station_oil_gun表数据
{ StringBuilder strSql = new StringBuilder(); strSql.Append("update gunark_gunark set "); strSql.Append("GUNARK_NUMBER=@GUNARK_NUMBER,"); strSql.Append("GUNARK_BIGTYPE=@GUNARK_BIGTYPE,"); strSql.Append("GUNARK_IP=@GUNARK_IP,"); strSql.Appen...
0
3cb6959f2af24089f307f631b692afa8
776fa5e2eb9625137e83f58e597d7202
设置当前的推荐算法
Jedis jedis = null; String key = RECOMMEND_ALGORITHM_PREFEX + userId; String key1 = RECOMMEND_ALGORITHM_PREFEX_NUM + userId; try { jedis = getInstance(); if (jedis != null) { Long num = jedis.incrBy(key1, 1); jedis.expire(key1, 10);...
1
f2342d6734bbe6cdc6406b1274443145
35ef1772eea8adf38aa1e5b559e68911
article class to define article objects
class Article: def __init__(self): pass
1
428b8ff440177dc6625aace49b876f6f
7b31bcd803f9add191ae65ac4a2eb74e
Comprobamos que no exista otro tag con esa variable
class Pm_Validator_TagExists extends Validator function validate($attributes, $errStr, $params) { $tag_edit_id = $attributes["tag_id"]; $tag_name = trim($attributes["tag_name"], "\t\n \r\0\x0B"); $container =& DIContainerFactory::getContainer(); $pmView =& $container->getComponent("pmView"); $tag_i...
1
a5812b4293340940c3fd2b7cddf72007
9502335f7ccf8de96277a2efda3791bd
Remove all views and add the given view to the viewgroup
mAnchor = view; LayoutParams frameParams = new LayoutParams( ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT ); removeAllViews(); View v = makeControllerView(); addView(v, frameParams); }
1
47129d85c7e46b1e171198fc3e805a7a
10c0608ba895b49366c5b3629dc734aa
Since we are storing user's nomination in local storage, we check if the user has stored nominates and they have not exceeded their limit.
function App() { if (localStorage.getItem("candidates") === null) { localStorage.setItem("candidates", JSON.stringify(getCandidates())); } return ( <React.Fragment> <Switch> {} <Route path="/" exact component={Filter} /> <Route path="/candidates" component={Candidates} /> ...
0
3de24de047b1fdf566396744989a8642
5cae0bbb399857ef592aba64a9c7911a
Clears DbgUart component buffers.
{ DALDEVICEID id = uart_ctxt->dal_id; HALUartRegisters registers; HAL_uart_GetRegisters(uart_ctxt->hal_id, &registers); DALSYS_LogEvent(id, DALSYS_LOGEVENT_INFO, "UartDbg: MR1 (0x00) - 0x%08X", registers.MR1); DALSYS_LogEvent(id, DALSYS_LOGEVENT_INFO, "UartDbg: MR2 (0x04) - 0x%08X", registers.MR2); ...
0
0a0a6dc8b9ebc6c4b5f02cbd0a4f6c77
51437e1b8458b091b8d2db03cba4510f
是否是本端发送的消息
class Notice public get IsMySend(): boolean{ if( this._sendOpenId != UnitManager.PlayerID){ this._isMySend = false; }else{ this._isMySend = true; } return this._isMySend; }
1
ab63270d521dd00169bdd9546d6e1d49
897aa8036e4de71f60ea53625437f5bf
Get cell indices for filled clues
(indexes_x, indexes_y) = np.nonzero(self.grid) while len(indexes_x) >= clues: idx = np.random.randint(0, len(indexes_x)) row, col = indexes_x[idx], indexes_y[idx] self.grid[row][col] = 0 indexes_x = np.delete(indexes_x, idx) indexes_y = np.dele...
0
78291e17a16b8630641b3c124f1ee9bc
8f30b6f84e620c21241ff808c5a17e34
Returns a new array of the given length with the specified component type. <pre> Arrays.newArray(String.class, 10) = new String[10) Arrays.newArray(Foo.class, 0) = new Foo[0] </pre>
public final class Array public static Object newInstance(Class<?> componentType, int length) throws NegativeArraySizeException { return newArray(componentType, length); }
1
78d578005502d13c953af3cd2406be60
6598e37d08108bb7b2c1496777d71af7
得到静态资源目录路径,目录不存在就创建
path = os.path.join(sys.path[0], "static", 'image', dir_name) if not os.path.exists(path): os.makedirs(path) return path
1
a09c9f42f67c43523c6595c0ff846719
64ab90eddd48ef883fd44a8fa9d9f100
根据关键词获取关键词ID
class KeywordsModel extends MallBaseModel{ public function addWords($kw, $type = 1){ $info = $this->where(array('words'=>$kw,'type'=>$type))->find(); if(empty($info)){ $id = $this->data(array('words'=>$kw, 'type'=>1, 'create_time'=>time()))->add(); }else{ $this->where(arr...
1
7f9ce2d8d42a4291ca8354dc84a65bf4
c7bf282df896a8b5414be57aa60df8e2
获取这个对象的所有消息并添加到列表中
if (msg == null) { msg = new ArrayList<Msg>(); } return this.msg; }
0
726041a80cb7872b6968744af9e14d03
05f1aa46a3de418b8d5cdb3f32757abe
Returns the indirect object representing the given font.
static int getImageObjectID(int index) { return PdfWriter::N_FONTS + index + 1; }
0
6752f1c020fa66d90f7fadbd4a5f03be
14f1e42bbac0541b241eb273944917a9
Run one step of chosen strategy
class CanvasMaze(tkinter.Tk): # the maze itself is a grid of cells (cells are tkinter labels) def showStrategyOneStep(self,path): toContinue=GUIAgentStep.guiStrategyOne(self.maze,self.flammabilityRate,path) self.updateDrawing() if toContinue[0]: self.after(1000,self.showStrategyOneStep,toC...
1
5c19a7bcc44fe871b7f6f569dd0a8475
13eac1c86c0bed708cb6b9ec5ee6fcb2
Renvoie le nombre de variables auxilliaires à créer.
public class Compiler private int getNbOutput(Function f) { int nbOutput = 0; Variables vars = f.getDefinition().getOutput().getVariables(); for (@SuppressWarnings("unused") String var : vars.getVariables()) { nbOutput++; } return nbOutput; }
0
83390e6583fd8a3786a859064310d7cf
2f36547f0520a50f30d1cb6e6412fe21
锁定DSFID
if(empty($ids)){ return $this->format_ret(KCSDD_ERROR_NODATA); } $res = array(); foreach ((array)$ids as $id) { $ret = $this->sf($id); if ($ret['status'] == OP_SUCCESS) { $res['data']['success_count']++; $res['data']['success'][] = $id; ...
0
71ad81bde178b4b1b9f592f04cb8e55f
d0e83e7e59b47064888a61b0ae165031
Handles the DataError event of the uxExchangeRateDataGridView control.
namespace ABC_Management_Studio internal partial class FrmCourses : Form private void dgvCourses_DataError(object sender, DataGridViewDataErrorEventArgs e) { statusStripErrorLabel.Text = Messages.InvalidDataText; dgvCourses.CancelEdit(); }
0
e8e165e8413f4c6578f4a5eac79931b8
b3401d23dd7fd2c13c3a72284e09be11
Parses old format and current format pack XML into a button_array which button setupdata understands
self.allCombos = [] self.activeCombos = {"early":[], "mid":[], "late":[]} self.inactiveCombos = {"early":[], "mid":[], "late":[]} for active in self.combos[0]: timeOfUse = active[0].text spells = list(map(lambda spellNode : spellNode.text, active[1:])) ...
0
5237a949509060fc340c6a31c1107b60
c0d185ea99f81e0cc17eb1b31460fa29
@brief Initialize external dynamic memory
{ decoder->dec_ext = calloc(1, sizeof(wav_dec_external_t)); RETURN_VAL_IF_FAIL((decoder->dec_ext != NULL), AUDIO_DECODER_ERROR); *((wav_dec_external_t *)decoder->dec_ext) = *((wav_dec_external_t *)dec_ext); decoder->dec_mem = calloc(1, sizeof(wave_format_extensible_t)); RETURN_VAL_IF_FAIL((decoder->dec_mem != NULL...
1
cc7944eca662c82f361ed4a4fabecf82
bfcc570ae1c2f314ce1bdf9c3f035447
对比2个枚举值的大小
{ Type type = value1.GetType(); Type type2 = value2.GetType(); bool flag = Type.GetTypeCode(type) != TypeCode.Object; bool flag2 = Type.GetTypeCode(type2) != TypeCode.Object; success = false; if (flag) { if (type != type2) { if (type.IsEnum) { value2 = Utility.ConvertTo(va...
1
0b2fc290320fcc5028eb926e452ce870
98506a976bc5d4a0d17656237cbe860f
Test suite for functions in elementary module, for Dual class including exp, sqrt, log, log_b, logistics sin, cos, tan arcsin, arccos, arctan sinh, cosh, tanh
MU_TEST_SUITE(test_suite) { MU_RUN_TEST(test_extended_gcd_int); MU_RUN_TEST(test_modint); MU_RUN_TEST(test_modpoly); MU_RUN_TEST(test_modpoly_div); MU_RUN_TEST(test_extended_gcd_poly); MU_RUN_TEST(test_matrix); }
0
12d828375959db7ed997a32105e4ccdc
3736d9f07e4f922b0145e9d54a0b73dc
NewResponseWriter creates a new response writer.
func NewResponseWriter(rw http.ResponseWriter) ResponseWriter { return &responseWriter{rw, 0, 0, nil} }
1
381608318ce86a3d6efada4ddf8e5a27
b604ec3f7105a406ae0398376bdb85b3
Reusuable assembly instructions for local, argument, this, that
{ String seg = ""; if (segment.Contains(target_lcl)) seg = "LCL"; if (segment.Contains(target_arg)) seg = "ARG"; if (segment.Contains(target_this)) seg = "THIS"; if (segment.Contains(target_that)) ...
1
5665ea3ba92154142316fd8868773af4
3dfb9a5b4d0c6c76d7c73ce0104d9a88
리뷰 목록 조회
public List<HashMap<String, String>> selectReviewList(HashMap<String, String> paraMap) { List<HashMap<String, String>> reviewList = sqlsession.selectList("review.selectReviewList", paraMap); return reviewList; }
1
82840661c0d06bfb95a595d35a5dbafc
9a45ec12991318d245b068b9c6c54c36
유저의 프로필 정보가 업데이트가 필요한 경우 서버에 request 를 보내 유저의 프로필 정보를 새로 받아와 업데이트 한다
class UserInfoRepository @Inject constructor(private val apiService: NetworkService) fun requestUpdateInfo(userId: String, email:String, phone: String, name:String, address:String): Single<LoginResponse> { return apiService.requestUpdateProfile(userId, email, phone, name, address) }
1
f2972867ab1b43e19da0166b12baba2d
a0b7d6db7f425277d101f4e317b3f621
\brief Reads a byte from an arbitrary address in kernel memory.
class ConnectionWrapper uint8_t readMemory(const uint64_t address) { return m_connection.execute<sitl::cmds::Mrd<uint64_t, uint8_t>>(address); }
1
7765b61476a1f26c75f5a9f5a304167b
f1124856e40eeb656b9400f8e9927b65
Naive prime test, does not generate a (potentially huge) sieve.
bool isPrime( const HugeInt & n ) { Random r; for( int counter = 0; counter < TRIALS; ++counter ) if( witness( r.randomInt( 2, n - 2 ), n - 1, n ) != 1 ) return false; return true; }
0
650a2e1cccb6eb4ab5af8d911429368d
ca61ef58b9eab915db2ff1270b6d4e6f
mysql数据行发生变化, 同步数据到redis
public class Main private static void syncMysql() { final Handler handler = new DefaultMysqlHandler(); ExecutorService executors = MysqlFactory.getExecutors(); List<Future<Boolean>> futures = new ArrayList<Future<Boolean>>(); for (final String table : MysqlFactory.RES.getAllTables()) { Future<Boolean> future...
0
c409a24fbc7f5981fa78e89df9328ece
a01696c4ad56e5cdcce84e98665ae723
Esta funcion implementa la busqueda por descenso de colina
def distancia(size,vector1,vector2): d=0 for i in range(size): d=d+(vector1[i]-vector2[i])**2 d=math.sqrt(d) return d def grad(x,A,b): r=np.dot(A,x)-b return r def Alpha(x,A,b): alpha=np.dot(g...
1
2409353b4080de5391c22b29dbd26c19
53f8a85e1eb383efddb5e5221eea0c1d
Performs recovery by saving the state
public abstract class AbstractServer implements ServerRpc, RaftServer, ServerRpcProvider, MetricProvider @Override public synchronized void recover() throws IOException { try { acquireFileLock(); lastSavedServerMetadata = metadataPersistence.load(metadataFile(), ServerMetadat...
0
83781e9ec0b3cf119356e5b348a2d381
2d624733ef34a9decca667658977cacd
<p> Description:查询最大合同号<br /> </p>
@Controller @RequestMapping("/contract/user") public class ProjectContractController extends BaseController @RequestMapping(value = "/contractMaxNo.htm", method = RequestMethod.POST) public void getContractMaxNo(HttpServletResponse resp, ProjectContractForm form){ Map<String, Object> model = new HashMap<Str...
1
dea48813e45345432b2e3ac5ad8e50fc
9f75258bc5a892a90f82f44410c673f5
查询未同步收入记录list
function getNotArrivedIncomeDetails(params) { return request({ url: '/partnerInfo/getNotArrivedIncomeDetails', method: 'post', data: params }) }
1
91526936c2a48ac8c6327ebfd80c0842
9a72590963520a63e0c8581297dc8c4f
IsWeekend reports whether the given date falls on a weekend.
isWeekend(date) { return dateObj.weekendDays.includes(date.getDay()); }
1
33cf5735f6b8823c6f82390155fadf10
82a1bb6531bed1c3da9f558e069440d8
Check series filtering.
class TestHTMLResponseSequence(unittest.TestCase): def test_filter(self): res = self.app.post( '/.html', { "var1_sequence": "sequence.byte", "op_sequence": ">", "var2_sequence": "10", }) self.assertEqual( res.location, "...
1
6ec34d1f7dedfd23e58a8ab4922eeb3f
431842833808ef8472c3e558bd1bc861
Set a validation error on this field. This allows fields to be externally marked as invalid by application logic.
public abstract class InputField extends Composite implements HasValueChangeHandlers<String> public abstract void forceInvalid(String errorText);
1
6009878c18c09fb0070e9ed70f647e7b
08daafa9804c27fef2409f08361157ca
将二维数组看成嵌套矩形,我们对每层矩形的边进行旋转, 即可完成数组的旋转 在进行每层边旋转时,我们可以每次选择四条边上对应的位置同时进行顺时针置换 我们将矩形的四条边定义为:上下左右,则初始置换位置为矩形顶点坐标:(x1,y1),(x2,y1),(x2,y2),(x2,y1) 每次置换完成后,上条边:y坐标右移一位,右条边:x坐标下移一位, 下条边:y坐标左移一位,左条边:x坐标上移一位 然后继续顺时针置换,直到所有位置完成置换
function clockwiseRotateMatrix<T extends Array<SquareListData>>(arr: T, n: NType, r = 1): T { r = r % 4 if (r <= 0) return arr const len = arr.length const resArr = new Array(len) as T for (let x = 0; x < n; x ++) { for (let y = 0; y < n; y ++) { resArr[x * n + n - y - 1] = arr[x + y * n] } } ...
0
31f650b060af495566242a4bcda9cdf3
d45eb4b3f03634713898fd95fa55a6a9
カメラ映像を取得する
{ Texture2D res = null; try { if (_camTex != null) { if (_camTex.isPlaying) { Color[] colors = _camTex.GetPixels(); res = new Texture2D(_camTex.width, _camT...
1
dec4bdf144b4bd1cca276dba331d3b6e
8cead7d915cf58aed4e41e15bd7f5169
checks if email confirmed
namespace WildeRoverMgmtApp.Controllers public class AccountController : Controller public IActionResult EmailConfirmed() { return View(); }
0
bc79b406f6996f65a7056bf8f7755a22
91833fb3fdc1624c463380966668e57b
Sets the selection status of an icon. \par Description: Sets the selection status of an icon and updates the view. \author Arno Klenke (arno_klenke@yahoo.de)
namespace lsw void CListView::SetItemSelection( INT _iItem, BOOL _bSelected ) { LVITEMW iItem = {}; iItem.stateMask = LVIS_SELECTED; iItem.state = _bSelected ? LVIS_SELECTED : 0; ::SendMessageW( Wnd(), LVM_SETITEMSTATE, static_cast<WPARAM>(_iItem), reinterpret_cast<LPARAM>(reinterpret_cast<const LV_ITEM *>(&iIt...
1
d797d7bf0914294760e7b6d0f9b6cf4c
63f126e86ae8b8286fe1c15817d8a37c
Returns the meta object for class '{@link de.uka.ipd.sdq.stoex.NamespaceReference <em>Namespace Reference</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
EClass getNamespaceDeclaration();
0
221d27f2708ac7a744013f3f4383edf8
23ade869d7c7358ff86eaebb5af9f565
Returns true if this graph supports self loops (a vertex has edge to itself).
default boolean allowsSelfLoops() { return false; }
1
d889d994dd88fb55fdcba6b7fe87db60
bf7bfab0f7dd2704764a2a34cd6f3446
偷取金币
{ if (sd != NULL && bl != NULL && bl->type == BL_MOB) { int rate, skill; struct mob_data *md = (struct mob_data *) bl; if (md && !md->state.steal_coin_flag && md->sc_data && md->sc_data[SC_STONE].timer == -1 && md->sc_data[SC_FREEZE].timer == -1) { ...
1
18e7d50b2238a8777cba5b04d052cfcc
06c8ff5ad370ef7567f8a31db7826809
Returns the latitude edge of given y-tile.
return ROOT_LR.lat + (numTilesAtDepth(depth) - yIndexUpper(ulLat, depth)) * tileLatLength(depth); }
1
e7b65a15037c4efcb3b767f2e84e5d7a
440282d1422396060064ca90e981737e
Distinguer les jours de mois précédent de suivant en gris et encadre le jour courant.
public partial class Form1 : Form public void coloriseBouton() { foreach (Button b in ListeBoutons) { int JourBouton = int.Parse(b.Text); if (JourBouton == jourActuel) { b.BackColor = Color.SkyBlue; } ...
1
4a9025cce741e22471860a1201a5b82b
96f0c57fe60cbb3d1c150f5f215762d6
cron to delete the booking dates which exceeds the current date
def run_booking_cleanup(): delete_unpaid_bookings() while True: time.sleep(60) delete_unpaid_bookings()
0
47230ef9895c420017c2f1ed7b465110
7102e8a1a5dfcf48d5582eaec2540f56
remove control from tab controls list
void QuakeLiveRcon::QLRcon::removeTab(int remove) { this->outBox[remove]->ResetText(); this->inBox[remove]->ResetText(); this->rconTabs->Controls->Remove(this->serverTabs[remove]); if (!this->rconTabs->TabCount) { this->viewServerTabButtons(); } }
1
919e2490b823270bf66017b050ceaff1
934041260884d1a9a3178e1aaeb419bc
helper method to notify the user of the score and the end of the game. Also ends the program if called.
quitGame = true; SYS.sleep(GameConst.HALF_SECOND); System.out.println("\nFinal Score -- \n\tPlayer: " + playerScore + " | CPU: " + cpuScore); if (playerScore > cpuScore) { System.out.println("\nCongrats! You Won!"); } else { System.out.println("\nBetter Lu...
1
0028a0161120ff9762abce2b797fe095
18a8827fee06a494c1b0e26d262d64a3
It should initialize with overridden default values
class LdapTest(ModuleTestCase): def test_init_defaults(self): self._set_args(log_path=None, state='present', username='myBindAcct', password='myBindPass', server='ldap://example.com:384', search_ba...
1
1f846136698b14ee60c1659d935c65af
17d678bf2c151d2e4f5edf9e22adca2b
************************** Detects if the current browser is on an HP tablet running WebOS.
public class MDetectControl : System.Web.UI.UserControl public bool DetectWebOSTablet() { if (useragent.IndexOf(deviceWebOShp) != -1 && useragent.IndexOf(deviceTablet) != -1) { return true; } else return false; }
1
30d9837937037db03c066d241f5acaf9
fa412d28bc4fccd2f8f32d981ca9e8b8
Sets the specified status for the specified member of the specified image. (Since Image API v2.1.) Method: URI:/v2/images/{image_id}/members/{member_id}
headers = {} if status: headers['x-image-meta-status'] = status url = '/v1/images/' + image_id response = self._put(url, headers) response.raise_for_status()
0
6e24e5fe34f47964a56d7542f63d83fc
255d754a7275e6944432421286e1745c
Retrieves the value for the given switch, or the default value if the given switch is not found. present. default value if the switch was not found.
public class FreeSwitchEvent public String getEventValue(String name, String onNull) { String value = getEventValue(name); return value == null ? onNull : value; }
1
62983d98ce872b91eeddd5d289a9d300
05cc647b4da62d1fcc4a02a680e7d407
Returns the value of the '<em><b>Empstatus</b></em>' attribute. <!-- begin-user-doc --> <p> If the meaning of the '<em>Empstatus</em>' attribute isn't clear, there really should be more of a description here... </p> <!-- end-user-doc -->
public class EmployeeTransfer extends EmployeeCommon public Integer getEmpState() { return empState; }
0
85b220ef5970e314144103fda59d87de
835e5b9a14e3f7a0b45f661353c0c7bc
Create a activity template Activity Templates define a type of activity and the properties they have. &lt;br&gt;&lt;br&gt;&lt;b&gt;Permissions Needed:&lt;/b&gt; TEMPLATE_ADMIN
class ActivitiesApi def update_activity_template(id, opts = {}) data, _status_code, _headers = update_activity_template_with_http_info(id, opts) return data end
0
ee629f9ab97e00e8e237b11c7e01ab09
9e71d335c5f8c58803b9a9bedaf1ba47
Generate a single suggestion.
def main_make_suggestion(req): return new_response()
0
6c2cb343de484670a8b84307a25e86e6
33f46335ec9e63a7d1b7f23438877a2c
创建所有数据合并成一个txt文档函数
def File_data_merging(): path="E:\\campus big data\\File_data_merging\\new_data\\" txt_file=[fname for fname in os.listdir(path) if fname.endswith('.txt')] for j in range(0,len(txt_file)): file_path=path+txt_file[j] print (file_path,"finish!") fo = open("E:\\campus big data\\File_dat...
1
0844f10ecfa4936b136cb2c9fc46773d
00b2b13f108e12d6176b8c60050aa131
<pre> Represents the specific type of a message. </pre> <code>.google.cloud.gkehub.servicemesh.v1alpha.AnalysisMessageBase.Type type = 1;</code>
public final class StreamingRecognitionResult extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.StreamingRecognitionResult) StreamingRecognitionResultOrBuilder public static final class Builder extends com.google.protobuf...
0
0172bbc6fe4b9a4f624ca6b0b0767a4a
297488c9bf8ba355e64f47a530cb30a0
Get a changeset for the specified revision
public function getCommit($revision);
1
175e40b82ab92870f6af9d3e7924e575
c2d198d75247ece61907414254616b8f
Returns the foreignkey the column is part of, if any. null otherwise.
class FDef: def foreign_key(self: FDef) -> Optional[str]: self._resolve_if_needed() return self._foreign_key
1
ffc7cfe6c04888a920e5372180615fed
0bdac54e2c9ab407dad3188ca575b5dd
调用有参构造函数初始化MyTester5
void example4(){ Test3 t(1,2,3,4); t.show(); }
0
2a46be19b7b1996779499ecc5e9d70b3
e4aa10b4603c8487bf810aef83add3b4
Use the useTable Hook to send the columns and data to build the table
this.$el = $(this.el); this.$el.DataTable({ data: this.state.users, columns: [ { title: "Name", data: "name" }, { title: "Username", data: "username" }, { title: "Email", data: "email" }, { title: "Phone", data: "phone" }, { title: "Website", data: "website" ...
0
9f5e9e5846fc5d925da1c122e523e7aa
3d7dc225cbdf2c28901f801c61fcdf8b
Constructs a track & trace url based on a barcode and the destination of the package (country and zipcode)
class TIG_MyParcel2014_Helper_Data extends Mage_Core_Helper_Abstract public function getBarcodeUrl($barcode, $destination = false, $lang = false, $forceNl = false) { $countryCode = null; $postcode = null; if (is_array($destination)) { if (!isset($destination['countryCode'])) {...
1
ba3fb69c42d32e2ee3c7227692b618db
5e9bedb0fbf956d028f1c95198a2aeb6
This method was generated by Apache iBATIS ibator. This method returns the value of the database column DBA_DATA_FILES.INCREMENT_BY
public Object getIncrement();
1
245fdf08ae5729ff5278cddb07c1d9a2
04ab1ac9ad16e4b3c7a4f1899786642f
保存数据对象,包括了的添加和更新情况,会自己判断是更新还是添加操作。
public void save(T entity) { if ((entity.getId()==null)) { entity.preInsert(); dao.insert(entity); } else { entity.preUpdate(); dao.update(entity); } }
1
e7392f23aa25f43874a3263a4163c27f
57e87b7cfda59f328c279a90d4da857f
创建rpc client池
public class ClientConfig<T> implements IConfigCheck @SuppressWarnings("unchecked") protected GenericKeyedObjectPool<ServerNode, T> bulidClientPool(ClassLoader classLoader, Class<?> ifaceClass) throws ClassNotFoundException, InstantiationException, IllegalAccessException { GenericKeyedObjectPool...
1
20c4785cfe54ef6da2dcd30780a5a0e4
763bb0e735bcca703cd52c35a9b06783
Funktion für das Erstellen von Lobbies
public class NetManager : Photon.PunBehaviour public void CreateRoom() { RoomOptions roomOpt = new RoomOptions(); roomOpt.IsVisible = true; roomOpt.MaxPlayers = 6; TypedLobby lobby = new TypedLobby (gameName, LobbyType.Default); PhotonNetwork.CreateRoom (roomName,roomOpt,lobby); }
1
dfd424c1a8e2545a148402e159cf5d55
7c53231a3f02a4ebdd80c42f0b462d0d
Writes properties of the model to JSON (asynchronous way).
{ var sb = new StringBuilder(); var sw = new StringWriter(sb); var jsonWriter = new JsonTextWriter(sw) {Formatting = Formatting.Indented}; WriteProblem(jsonWriter); var stw = new StreamWriter(stream); await stw.WriteAsync(sb.ToString()); ...
1
ec17e9574ca8a70c4b3a3d054ed1f1b9
44f9e9142948269cfc3917fd6a856144
从lua全局变量中获取数据
scoped_lock lock(m_mutex); varlist_maker callback; if (iterate_fields(callback, GetLua(), LUA_GLOBALSINDEX) != 0) { return LuaVarList(); } return callback.get_result(); }
1
2553340564a4389921784e80bfb67dde
9cc16fa2302737a711fa175bee164b51
将匹配到的目标点和目标窗口显示在图片上
{ assert(_target.elemSize() > 0); Mat result = Mat(img.rows - _target.rows + 1, img.cols - _target.cols + 1, CV_32FC1); matchTemplate(img, _target, result, CV_TM_SQDIFF_NORMED); normalize(result, result, 0, 1, NORM_MINMAX, -1, Mat()); double minVal, maxVal; Point minLoc, maxLoc; minMaxLoc(re...
0
53d2500e46df0614c628e4d8886e4b45
3dc8dfd5b62d91962327e57d3eb793cf
中文的大写数字转数字类型
class dianzu int zh(string s) { int a = 0; long d = 0; while (a < 1) { if (s == "黑") jiyi[a] = '0'; if (s == "棕") jiyi[a] = '1'; if (s == "红") jiyi[a] = '2'; if (s == "橙") jiyi[a] = '3'; if (s == "黄") jiyi[a] = '4'; if (s == "绿") ...
0
c7643fb359773d78c6aef9f41ffbe52d
04f625d329777b02d0e6be60ccd8f6fe
Test if it is a spark job with yarn cluster mode
def is_remote() -> bool: return "SPARK_CONNECT_MODE_ENABLED" in os.environ
0
8ae673aeae4b6cb2a971d2c82a05cdcb
4ae184150d7fff68da69ede1056fe83a
checking if a contract is currently being worked on
nowTime = str(now.time()) for i in range(len(contractTime)): if nowTime >= contractTime[i][0] and nowTime < contractTime[i][1]: return True return False
1
d19fedc5954e3061df1346c3178822a3
88b7eeab7e9366d93ead4d219e091c9b
Takes a string as a parameter.
def echo(any_string) return any_string.to_s end
1
de0798feb2befd0b3480fd40efe57dcc
020c8030d59eae69d36ea32ef985f9c8
Executes the default command which displays the room with its properties.
public class Room public String displayRoom() { return null; }
0
dc0d5d3771a254b98201350a5c979775
361016efce27a0bab33ee0f8eda90ad2
Populates the GUI using the given settings.
public class MyriMatchParametersDialog extends javax.swing.JDialog implements AlgorithmParametersDialog private void populateGUI(MyriMatchParameters myriMatchParameters) { if (myriMatchParameters.getMinPeptideLength() != null) { minPepLengthTxt.setText(myriMatchParameters.getMinPeptideLength() + "")...
1
e60d5ebbf011d301ab2b7594be82b85f
91a48b0fa1e7598248658606f3432d17
Perform a single training step and updates the target network.
class QNet(GenericNet): def train_net(self, target, mini_batch): s, a, r, s_prime, done = mini_batch loss = F.smooth_l1_loss(self.forward(s, a), target) self.losses = loss.data.numpy().astype(float).mean() self.optimizer.zero_grad() loss.mean().backward() self.optimizer.s...
0
1d7ee1851558878dc9adcb82ceed5c25
b489f37f454ca901e8f41e6cf50243b6
Normalizes patient info for display in ui
if (patient != null) { idLabel.setText(Integer.toString(patient.getId())); firstNameLabel.setText(patient.getFirstName()); lastNameLabel.setText(patient.getLastName()); diagnosisLabel.setText(patient.getDiagnosis()); roomLabel.setText(Integer.toString(patient.getRoom()))...
1
d49362cdf24add6817d618585517c31d
9a583c2392c37dabe247fe55cc1c9628
Implementazione dello steepest descent
void ITERATIVE_SOLVER<T>:: Steepest_Decent(NONLINEAR_FUNCTION<T(T,T)>& F,T& x,T& y,const T alpha_max) { iterations=0;T Fxy=F(x,y),partial_x=F.Partial_X(x,y),partial_y=F.Partial_Y(x,y); while(sqrt(sqr(partial_x)+sqr(partial_y))>tolerance && iterations++<max_iterations){ PARAMETRIC_LINE<T,T(T,T)> line(F,x...
1
4ce0ed5665e7d2340653d9640fb0675c
01f1b94e33570199fe9c52699e1b1537
Updates next run time and manual schedule flag in the app_config DB table
{ $this->task_next_run_date = $this->task_next_run_date . ' ' . $this->task_next_run_time; }
0
a7eeaf9f2a995b4ec3124d6eb8ed51d5
498e07d58e1cb4edde96e203c026a3b1
GET: api/BidderMarketplace
namespace MVC_Vendor_Management.Controllers public class BiddingController : BaseController public ActionResult List() { return View(); }
0
4f57a5e6553364b8a7a1dc39a52c4aca
86e7c5a74ad38648ab8890386acdf43f
Get the travel distance.
public class RemotePilotControl implements RemotePilotMethod public float getTravelDistance() { report(); return _distance; }
1
8bd779f853df5a03d828dfbf38c98d97
963388dc845cb384843051c0f40aff08
Populates a bit-array to determine if a number was found.
for seed_count in range(self.number_hashes): result = mmh3.hash(username, seed_count) % self.bit_array_size self.bit_array[result] = 1
1
2c80deefd0c22640a422d04e0e3a32a6
4513b5a7d748730d14d02a9e321adfd1
调整旧元素样式
function showOption(oldOption) { var re = oldOption; if($.browser.msie ){ if (oldOption.tagName == 'DIV') { var oldStr = oldOption.innerText; var newOption = document .createElement('<option' + oldOption.outerHTML .match(/(<\w*)([^>]*)(>)/)[2] + '>'); newOption.innerText = oldStr; n...
0