query_id
string
corpus_id
string
query
string
code
string
label
int64
e9aadc97dfdb20f566e158ff1ff54954
a6cb9bafa5de8449c3668438f810940e
Apaga o conteúdo do TextBox 2
namespace QuantBet_Developer_Challenge public partial class MainWindow : Window private void txtb_Number2_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e) { txtb_Number2.Text = ""; }
1
583a1c907ee8d25d83546fed5ffbbd81
40f9714b651e4416352f692929adcd18
局面を駒の配列で表現
class State: def pieces_array(self) -> np.ndarray: def pieces_array_of(pieces): table_list = [] for i in range(3): table = [p[i] for p in pieces[:9]] table_list.append(table) for i in range(3): table = [pieces[9 + i][0]] * 9 ...
1
3d65334589c67cde39ac5281787cd600
28534a0fc8186f40cd7d3aad39412d4e
Quando o robô for "deletado" aparecerá uma mensagem.
public void onLost(Message message) { String messageAsString = new String(message.getContent()); Log.d(TAG, "Lost sight of message: " + messageAsString); }
0
fdff1a5082bde62a3bc9d68c7c3c73d2
031432c9af91220144a771c1e7f5c8c0
Searchs the button list for the button with the identifier given and changes its toggled status
@SideOnly(Side.CLIENT) public abstract class GuiBase extends GuiContainer protected void flipButtonEnabled(List<GuiButton> buttonList, int id) { if (id < buttonList.size() && buttonList.get(id) instanceof GuiButton) { GuiButton button = buttonList.get(id); button.enabled = !button.enabled; } }
1
b5592e883898f1498184d1aa16be787a
e88890a9a4066ed0df16434b3c4d87fe
Fits a poisson regression given data and outcomes. Inputs: X - array. Design matrix y - array. Observed outcomes Outputs: betas_est - array. Coefficients which maximize the negative log-liklihood.
if self.intercept: X = np.column_stack([np.ones(X.shape[0]), X]) beta_hat = self.fgls(X, y) return beta_hat
0
84275d4ac2632a9703c767a4b0e0bb95
6009de5d1ac1db819d05ef5660971775
handles clicking the like button on a book
final RelativeLayout likeButton, final ImageView iconImage, String userId, String bookId){ SubmitTaskEngine taskEngine=new SubmitTaskEngine( context,userId,bookId); taskEngine.setSubmitTaskHandler( new S...
1
b874b1724a3f42b68a99b6b072c6506d
680f3d8bb60169f06bce556970ce323a
Returns the {@link CategoryTable} instance, creating it if needed.
class Blog_Model_Mappers_Category public function getTable() { if (!isset($this->_dbTable)) { $this->_dbTable = new Blog_Model_DbTable_Categories(); } return $this->_dbTable; }
1
090522d23ee91e9c237893828bf605fe
7de980e7541b8f891168b7d728ad2dcc
startDatetimeのプロパティ名を返します。
class CreateOrGetPostRequestBody def start_date_time return @start_date_time end
0
8e94b70d7bd19d34b9863463db7a8f8c
bafedeb3f88c6539d4e690f26a0bea59
Вернуть монеты.
public function getMonies();
1
96bc8b5100ed23bd0e1ad48597c75dd9
cfd5cde5e53dd25c795b18e60cd67e1d
Checks if the environment variable 'LARALASTIC_HOST' isset, if so the function will return an array with the splitted string. If the variable is not set the functions returns the standard hosts array.
class Config extends AbstractHelpers implements ConfigInterface public function getHost() { if (isset($this->hosts[$this->environment]) === false) { throw new Exception(900); } return $this->hosts[$this->environment]; }
0
cf03da78c14d6e7f394ea79e3a2f257b
5ed1a20837e5e97f9584e62cdce86ba1
# Reduce autocorrelation
autocorr <- function (q){ acf(q[q != 0], lag.max = 5, plot = FALSE) }
0
378e8c9de8520d81f9930e31470b201c
2ee681d9d0d64588f6a24b9778120d63
Capture the value of a tensor.
if not self.atomic: raise AttributeError("not atomic batch") return cast(Tensor, self.value)
1
50a1e3f5927a1b3ade8776d9f88ad6c5
433272bd098020df5a55bb120b5b7a2d
Determines the energy required to complete the job.
float AJumpStart::CalculateEnergy ( float SkillLevel, long SkillRank ) { float EnergyCost = 20.0f * SkillLevel; return EnergyCost; }
1
d29727f51b376a62f1ef61def8cef9c7
541498f9df1f40ebb9bf46defeb0b14b
Transformuje souřadnice matice.
namespace SGAB.SGAB_Karta public class CoordinateTransform public double[] Transform(double[] d) { double[] dOut = _coordTrans.MathTransform.Transform(d); return dOut; }
1
34651e6da06fe0f3f420554a20ca8267
b3e72d07ac25e9e93ba799056f5af96c
Method returning an integer representing the cost of an upgrade to the next level.
int Installation::getUpgradeCost() const{ return getValueAtLevel(_level+1) - getCurrentValue(); }
1
cf145a6153d427ad9c9267a28c888743
5cfaab857e464be4741b3d9dd8ef87b5
Returns a clean integer passed as argument. Returns it as a list to conform with the create_exercise method that also works for many combined terms.
if type(raw) == list: return [int(i) if type(i) == str else i for i in raw] else: return raw if type(raw) == int else int(raw)
1
22573df6158b1d231bdb4f6fe5af8632
cacf1bb7d828d8dfe88b3b6f109fc3a7
Find all strings in the first argument that are not in the second.
func StringIn(setA map[string]bool, setB map[string]bool) []string { diff := make([]string, 0) for key, _ := range setA { if setB[key] { diff = append(diff, key) } } return diff }
0
6b69e6a7caf01b809b78b0e0d0d97e3f
d43caf42df118e717069daad5de6d55a
Uppers the first character, lowers all subsequent characters
function String:capitalize_initial() local val = self.val:sub(1, 1):upper() .. self.val:sub(2) self.val = val end
0
a2b45e395fb347a4279649dee5d5d140
5e25d6f73db29b4e0958a92151b1f52c
This function implements the IsAttachment API call.
namespace Microsoft.Protocols.TestSuites.MS_ASCMD GetAttachmentResponse GetAttachment(GetAttachmentRequest request);
0
621ea240e55535d18fee1f0b23fb829b
bc9f5543ed9270a07b0be3982ae0b4f1
razdeli karte za začetek igre
{ sobaIgre.Igrac.mojeKarte.Sort(); for (int j = 0; j < sobaIgre.Igrac.mojeKarte.Count; j++) { sobaIgre.Igrac.mojeKarte.ElementAt(j).xPoz = 50 + j * 140 / 2; sobaIgre.Igrac.mojeKarte.ElementAt(j).yPoz = 500; } }
0
19d724cfd2e574fa8b717e5bbefb081d
e4bd8231277de1b17f8b26f0a96470a2
load a wav file into a numpy.ndarray object
def _load_audiofile(fname): return asg.from_file(fname).resample(sample_rate_hz, bytewidth, nchannels).to_numpy_array().astype(float)
1
5c3fd0afe4b9ea5701e7161fba7c3ab4
488f6a599d86891c7eb0b74898f00fd7
Returns dress description from cart page
def get_descs(inp): descs = inp.find("p", attrs = {"class": "_1gJzwc_bJS _2rwkILN6KA Rmplp6XJNu mT74Grr7MA nCFolhPlNA lqg5eVwdBz _19l6iUes6V _30RANjWDIv"}).text return descs
1
c23c109696ea85cc9ce6bb0a7dfa1a8e
0af16c90ca00275cb43806a483e38c8e
Performs a search for board games based on the given input.
function searchGames() { global $db; $searchVar = $_GET['search']; $sql = 'SELECT game_id, title FROM game WHERE title LIKE "%'.$searchVar.'%";'; $searchResults = $db->select($sql); foreach ($searchResults as $maybeMe) { echo searchGamesHTML($maybeMe); } }
1
5afdef7309e667cd9607bb4feb2b8acf
66dd31d0eec421d4885e2a03f0e293c7
Notify data service to load list dirty word
try { this.mIsDirty = true; } catch(Exception ex) { reportError(ex); } finally { setUserServices(); } }
0
e37b2fc7a05e2b0ca4ec50d00055d424
55a60f57917a3ff73bb96d5a257dbf5f
使用cglib来实现动态代理
public class ProxyTest public static void main(String[] args) { InvocationHandler handler = new MyInvokationHandler(); Person p = (Person)Proxy.newProxyInstance(Person.class.getClassLoader() , new Class[]{Person.class}, handler); p.walk(); p.sayHello("cyh"); }
0
b1f39b727af8f360653c04c074882472
dc1ad14fd9dfb84c67dd41f088f90012
Reduce a class instance back into a stream suitable for writing to disk.
with open(fname, 'w') as f: for class_id in self._iterate_classes(): for (url, val, datestamp) in self._iterate_urls(class_id): class_id = class_id.decode('utf-8') f.write(str('\t').join([datestamp, class_id, val, url])+str('\n'))
1
f41af53782baac2578afb5d2e90e6633
bb902ef8a31b7f77238d0dead59352aa
电话号码补全
var str = JSON.stringify(phoneNum); var str2 = str.substr(0, 4) + '****' + str.substr(8); return JSON.parse(str2); }
0
5c3c48b483397332b69e82ef8346e817
c8d5a66b71c3a7f845651d0dcdc58e5c
instantiate graph from dependency tuples
self.reset_graph() graph_dict = deepcopy(graph_dict) graph_dict.update( {v: [] for l in graph_dict.values() for v in l if v not in graph_dict} ) for new_node in graph_dict.keys(): self.add_node(new_node) for ind_node, dep_nodes in graph_dict.items(...
1
a4395a20e9cead332ad08eb4f7625766
714ad91b64fd54ac9fab2c3082bad4d8
Obtiene ingredientes para un producto con su cantidad para lote.
namespace MrVeggie.Contexts public class Admin public List<Ingrediente> getIngredientes(StringValues ids) { return _context_i.Ingrediente.Where(i => ids.Contains(i.id_ingrediente.ToString())).ToList(); }
0
86eff8377dbd92b520fff59227216c32
05debb78f25246b9946967e6483de74e
Get the list of resolutions for the tile grid.
@javax.annotation.Generated( value = "by gRPC proto compiler (version 1.19.0)", comments = "Source: video_recorder.proto") public final class VideoRecorderGrpc public static final class VideoRecorderStub extends io.grpc.stub.AbstractStub<VideoRecorderStub> public void listResolutions(com.google.protobuf.Empty...
1
9ee817d82b1bc0b10017a0219c99b6ee
8d98d2d6047a17d7f1047a5636175b73
函数功能:管理员查找用户 函数参数:用户链表头节点 返 回 值:无
{ USER *p = reg_head->pNext; while(1) { if(p == NULL) break; printf("user_info: %d\t%s\t\t%s\n",p->num,p->name,p->password); p = p->pNext; } }
1
3ed04588417eb284da38d991e47f73c5
16ddd69bc1430e41642d6b6651c9c0e0
This tests two processes asking for the same virtual address.
int main(int argc, char *argv[]) { void *p1, *p2, *brk1, brk2; p1 = malloc(ALLOC_SIZE); brk1 = sbrk(0); p2 = malloc(ALLOC_SIZE); if (brk1 == NULL) { fprintf(stderr, "sbrk() failed: %p %p\n", p1, p2); } if (brk1 == sbrk(0)) { return 0; } else { return 1; } }
0
658356cb2829e7bb7d5f391144348c9a
9c4696859222bd823f705c81d7d399fb
Executes the open folder command.
{ if ((DataContext?.SelectFolderCommand is null) || (!DataContext.SelectFolderCommand.CanExecute(null))) { return; } DataContext.SelectFolderCommand.Execute(null); }
1
2c73d08b933d805c56c24544cea5520d
00f18426fbadde2198b94e0e49b1e32d
Univariate iMOM prior
def prior(beta, params): if len(beta) == 2: beta0, beta1 = beta mu0, sigma0, mu1, sigma1 = params S0 = -1. / 2 * (beta0 - mu0)**2 / sigma0**2 S1 = -1. / 2 * (beta1 - mu1)**2 / sigma1**2 P = np.exp(S0 + S1) / (2 * np.pi * sigma0 * sigma1) elif len(beta) == 4: beta0...
0
a52d45dc88d046bdcf2d59864a244f74
d79372128ac77262b25524a62b181f58
根据部门id查询部门人员,包含所有子级部门
"left join auth_getaway_department_employees de on de.employees_id = e.id\n" + "left join auth_getaway_department d on d.id = de.department_id\n" + "where d.parent_id=:departmentId", countQuery = "select count(*) from auth_getaway_employees e\n" + "lef...
1
4a57e8e79ac29c61b39e560b5da8d4b2
bd86487ec146db5c5681529eb2a3a195
primary ::= ID
if len(p) == 3: p[0] = (p[1], ast.ID(p[2], p.lineno(2), p.lexpos(2))) else: return tuple()
0
770fcfaa9ebd70347eefd97f44fe2471
b21402be07509cc33c5920d387b2f8da
Skip creating references to built in types like 'bool' etc
{ if (type.IsPrimitive) return false; if (type.IsArray && type.HasElementType && type.GetElementType().IsPrimitive) return false; return type != typeof(object) && type != typeof(Guid) && Type.GetTypeCode(type) == TypeCode.Obj...
1
18f387497e3bad4bee25a18f1819c5f5
1a5deaecaec722e41469ec96a471bf2e
名称: BSP_DHT11_Init_Port 功能: DHT11 IO初始化 输入: 无 输出: 无
void DHT22_Init(void) { DHT22_PinConfig(GPIO_MODE_INPUT); }
0
ef89469581c52e338b887060b99253db
6a62cba41d93c52fa2662827d88d28a1
stops pinching the currently pinched object
{ m_isZooming = false; m_isPinching = false; m_pinchedObj.pinches--; m_pinchedObj.gameObject.GetComponent<Rigidbody>().constraints = RigidbodyConstraints.None; m_pinchedObj = null; GrabVolumeEnable(true); }
1
ad270daf6edc1e727c2fc6a8f5e1c81a
f70914d088ef54581ecc9bf5199dcc19
check character limit for description , should be less than 2000 / Mayur
function commentsLength() { for (let i = 0; i < modifyComments.length; i++ ) { let lengthCheckEx = /^.{200,}$/; if (lengthCheckEx.test(modifyComments[i].value)) { modifyComments[i].value = modifyComments[i].value.substr(0,200); } } }
0
01b5e0a14afcf8d08398f886fde5c7e4
164d3a9f961f98631b4bdb75e21dc167
Get a list of availability zone profile objects.
class TunnelAPI(api.BaseAPI): def availabilityzoneprofile_list(self, **kwargs): url = const.BASE_AVAILABILITYZONEPROFILE_URL response = self._list(url, **kwargs) return response
1
0f4eab97247d48578da8a1292032e7a5
a891e996c5fa11b41d42b7987a60ba7c
往SD中的文件追加内容 (用File的方式)
public class FileUtil public void saveMemoryAppend(String fileName, String content) throws Exception { File f = new File(Environment.getExternalStorageDirectory(), fileName); FileOutputStream fos = new FileOutputStream(f); BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(fos)); ...
0
cee640ea4165046dbdd803254482906c
7d7a0205db9cc3e2570816157bd913d8
this function remove the first complete message from the byte stream
void kilob_message_sent() { RB_popfront(kilob_message_buffer); }
1
91c11567d8275a56eb7a5d443f6cafe3
5564c9cf7be624a6c7ab97c43cf5aed4
查询好友正在直播的视频(只显示能看到的)
{ $sql = "SELECT v.id AS room_id, v.sort_num, v.group_id, v.user_id, v.city, v.title, v.cate_id, v.live_in, v.video_type, v.room_type, v.create_type, (v.robot_num + v.virtual_watch_number + v.watch_number) as watch_number, v.live_image, v.head_image,v.thumb_head_image, v.xpoint,v.ypoint, u.v_type, u.v_icon,...
0
933cf1b24b87df8d80644be7bf0a0ea8
582df9b86ffc0ecbe21ae4dc4919340f
Helper to configure signals that must be blocked.
{ sigset_t signal_set; sigfillset(&signal_set); sigdelset(&signal_set, SIGPROF); for (auto sig : core_signals) sigdelset(&signal_set, sig); pthread_sigmask(SIG_BLOCK, &signal_set, nullptr); }
1
0bac6991159b3f89c21bf828f6f96251
72994840728e7652f90ae28001a625b3
Creates the 2d distribution of two parameters, used when the "corner" package is not being used to create the corner plots
def make_dag2D_data(make_dag2D_params): alpha, gamma, beta, eps, nu = make_dag2D_params return make_data(alpha, gamma, beta, eps, nu)
1
a304bb60d18c5859fe3f99c28bf9631a
fb8e0d2cc579a66808895024577db28f
prints 20 '-' in a single line
public class Program2 public static void printDash(){ for (int k = 0; k<=100;k++){ System.out.print("-"); } System.out.println(); }
0
a65ecf9cf4346df30e0690c2d377c7d1
534e688790fcd2e7b966a4272687ed87
Returns the thread which is assigned to executes the replay task
namespace TestRunner.Lib.Engine string GetSelectedThread();
1
54c2bba165487f64c85f0bc517955da6
6b92f1d2813f79b08754225d9f5af319
Generate Premenstrual Dysphoric Disorder Questionnaire Mapping
conn = psycopg2.connect(database='mimicld', user='shiliangchen', password='inori7') cur = conn.cursor() cur.execute("drop table if exists tab_drug_0;" "create table tab_drug_0 as " "with ch7 as " "(select hadm_id,date(startdate) as startdate,date(enddate) as e...
0
47398acc74c42cda0161bb04038255da
49ba49997035e0c6517a0665babef530
Get whether to obey robots.txt directives during discovery operations.
class TestTask def force_discovery? @force_discovery end
0
b4724dc752a8eecc8d24fdcbdac81a4c
de9a2427785695189d70db141944b851
Update the contents of a Tool Shed repository with specified tar ball.
class SourceUpdateManager(UpdateManager): def update(self): base_url = furl(self.repositoryBase) base_url.path.add(self.repository) base_url.path.add("tarball") base_url.path.add(self.branch) tar_download_url = base_url.url main_dir = os.path.dirname(os.path.dirname(__fil...
1
aecb52cae69d2a31e752a385e6bc3d6f
c6290636552a99ae4238b113d63aceba
Cambiar el estado del Detalle de Solicitud
public class SolicitudFacade public boolean modificarSolicitud(String estado, int idSolicitud) throws SQLException { boolean result = false; Connection conn = null; try { conn = ConnectionManager.getConnection(); PreparedStatement nuevoU = conn.prepareStatement(modificarSolicitud); nuevoU.setString(1, es...
1
5d69a547c5ca9bb7cfeed65e07cc31ee
f1ca8ac5b8dcc1ff4aefbe65b8e3c1f5
Возващает итератор на элемент с минимальный ключом.
namespace PriorityQueue Key Min();
0
cfeb6d3c36226d38028b21035df7c428
d7a8fbcf78ddad4b04dd1d75aba8c2ce
Obtains a handle to the Pandas data frame created from the html report for the game corresponding to the given link.
driver = webdriver.Chrome("/Users/Bryce/Projects/selenium/chromedriver") driver.get(link) shot_dict = None if check_exists_by_xpath(driver, True): shot_dict = driver.execute_script("return shotsData;") driver.close() return shot_dict
0
ce234e9c8388b68ddd46b81950630108
e7ea930d0012c08bf5576d669d3cfa9e
水車の動作
public function wareki();
0
575667ea26e8fcd5e8d77c42a992471f
957784b403c547b6a94ade8a3c5c85ad
Gibt das ausgerüstete Equipment eines Avatars als Liste von Gegenständen zurück. <p>
public class UprootModel public ArrayList<Equipable> getEquipped(){ return game.getPlayer().getEquipped(); }
1
7c969dd95f0ef56b93316d2c16db25da
c2e72b38346b8f8e50ec352afaffb451
Perform a scan and scroll through the results, bulk deleting by result ids
export class ScanResultsApi extends runtime.BaseAPI implements ScanResultsApiInterface async deleteScanResultsForScanID(requestParameters: DeleteScanResultsForScanIDRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> { await this.deleteScanResultsForScanIDRaw(requestParameters, i...
0
05cb2ace9a11c28859fef1beaf2ae343
052f6228be9a1efea81b67772e52377c
导入选择的老师,前端传课程id和所有选择可以评价的教师的姓名集合
BmobQuery<Course> query = new BmobQuery<>(); List<String> courseIdList = new ArrayList<>(); for (ChoseCourse course : list) { courseIdList.add(course.getCourseId()); } query.addWhereContainedIn("objectId", courseIdList); query.findObjects(new FindListener<Cour...
0
31d271b70f0cdbb50b11e3f8cd9ebb1b
c14127fa9aeaf0a5b584b257c3ee73f1
Translate between FATFS error codes and POSIX ones
int guac_rdp_fs_get_status(int err) { if (err == GUAC_RDP_FS_ENFILE) return STATUS_NO_MORE_FILES; if (err == GUAC_RDP_FS_ENOENT) return STATUS_NO_SUCH_FILE; if (err == GUAC_RDP_FS_ENOTDIR) return STATUS_NOT_A_DIRECTORY; if (err == GUAC_RDP_FS_ENOSPC) return STATUS_DISK_FULL; if (err == GUAC_RDP_F...
0
40c59a8de7dba00b44d8f045e7805169
78265c89c051ebec5bba2461962fcb80
Converts a name usage into a writable name usage by looking up or inserting name and citation records and populating the writable instance with these keys.
throws IOException { if(objects == null) return null; List<NameUsage<T>> nameUsages = new ArrayList<>(objects.size()); for (NamedObject<?> object : objects) { if(object instanceof NameUsage) { @SuppressWarnings("unchecked") NameUsage<T> usage = (NameUsage<T>)object; nameUsages.add(usage); ...
0
65cef80294dd54cfc2a8fb101396030a
704ab9f001cd439cee6e59bd111354cf
returns true if order is for buying a security, false for if selling
public class BuyFromMarketAction implements Action{ public boolean getIsRow(){return isRow;}
0
b26b8edb1c3ae7a25798bc9b6713f8ff
54d4ec9a61a03b46ed235c9895baf648
GET: HomeEntity
{ var allRecords = await _entityService.GetEntitiesAsync(); var items = allRecords .OrderBy(x => x.Desc); return View(items); }
1
3a3297aac1b480023b8f243f371ab8f9
df82c90862f3a461221469de33c70b78
Get the transaction composite key from a utxo composite key.
return UniqueIdentifier.of( nodeId.getScheme() + '-' + positionOrTradeId.getScheme(), nodeId.getValue() + '-' + positionOrTradeId.getValue(), StringUtils.defaultString(nodeId.getVersion()) + '-' + StringUtils.defaultString(positionOrTradeId.getVersion())); }
0
66a3d203ce630b6c1dbcfee106ae3921
45e57cf2c7a3e2d51bbf26057ba7a80f
添加新元数据的方法
if (!$taskIDData){ $taskIDData = $this->_getTaskIDsWithGroupID(); } extract($metaData); $theData = array('PlatFormInfos'=>array('PlatFormInfo'=>$platFormArray), 'Attributes'=>array('AttributeItem'=>array_values($newKeyAttributeArray))); $metaDataXml = new Xml(array('MeteData'=>$theData),...
0
14aa1a0327b55b07b03da250ba7ef60c
2b47c14fc6243fdb4d6e17961f952737
setupUi é um método do PyQT5 utilizado para a construção da interface gráfica.
palette = QtGui.QPalette() QtGui.QFontDatabase.addApplicationFont("font/Roboto-BlackItalic.ttf") QtGui.QFontDatabase.addApplicationFont("font/Roboto-Bold.ttf") QtGui.QFontDatabase.addApplicationFont("font/Roboto-BoldItalic.ttf") QtGui.QFontDatabase.addApplicationFont("font/Roboto-Italic.ttf") QtGui.QFontDat...
0
4d74a5633d20ff5c6656d13d1ce53e60
c08ecf8069031e87dd42e7a1b451ed5f
insert new row into tableWidget bibliografia
class MainWindow(QMainWindow, Ui_MainWindow): def insertSourceRow(self, i): self.tableWidget_2.blockSignals(True) self.tableWidget_2.insertRow(i) type = QComboBox() type.addItems(['atinf', 'point', 'nonpoint']) color = QComboBox() color.addItems(self.colors) self...
1
17e84adff6c3a78d8e2ebaaa97e157d3
f87e665e03c45ac3e4228a4fdc70706b
returns temperature in Fahrenheit
let tf = (9 / 5) * tc + 32; tf.toFixed(0); return tf; }
1
f9e2dc963b9ffd333936910d3533ad23
d2d6070f39ae0531304eea776943e2b6
Plays the new subscriber sound, ignoring the current playing ones.
{ if (audioSource == null) throw new ArgumentNullException(nameof(audioSource)); if (volumeMultiplier < 0 && volumeMultiplier > 1) throw new ArgumentException("Must be a number between 0 and 1", nameof(volumeMultiplier)); return sound.PlayOneSh...
1
3023e0cd99bacee3d73b56eb7644a0a4
c6d26661fa965a74e6b2bee256f2bce4
Converts data coordinates into pixel coordinates.
x0 = data.margin y0 = data.margin rowHeight = (data.height - (2 * data.margin)) / data.rows colWidth = (data.width - (2 * data.margin)) / data.cols xn = x0 + column * colWidth yn = y0 + row * rowHeight return xn, yn, (xn + colWidth), (yn + rowHeight)
1
eea51e386944a81df2aa27baea14375a
a7fe0828102c278ef3f612e72677b1ec
向Redis中设置布隆过滤器配置
logging.info("init redis bloomFilter") self.key = "url" self.redis_client = redis.Redis(host='127.0.0.1', port=6379) error_rate = 0.001 initial_size = 1000 try: self.redis_client.execute_command("bf.reserve", self.key, error_rate, initial_size) except ...
1
fc2a5ae55438cd91a805eba59d653ab4
418892f96b8cd71aedd3fe6f24ca49c5
Retrieve basic Guzzle options for making an API call
{ return [ 'base_uri' => $this->settings->getEntryPoint(), GuzzleOptions::AUTH => [$this->settings->getLogin(), $this->settings->getPassword()], GuzzleOptions::TIMEOUT => $this->settings->getTimeout(), GuzzleOptions::HEADERS => [ ...
1
d7a7b998a02d25a367a98cf333c58bed
ecacd6b90240a995e26c5568cec10199
Circular rotation of bits to the right for 32-bit values
public static UInt32 RotateRight(UInt32 value, Int32 rotation) { rotation &= 0x1F; return (value >> rotation) | (value << (32 - rotation)); }
1
83c023eb6f407dbcf4522e381698f63e
52a433b873cdd9ecfc423c4a93bda481
читаем системный кадр
if(DEATH_FLAG || TIMER_FLAG){ return; } TIMER_FLAG = true; updateSysClock(1, 15, true, 1); tick(); }
0
662c780b7eaccce323f8bbd89ab32ffd
0fc48d8c0ce9fea828bb096ae86c9f41
Returns the CSRF Token Name.
class util_csrf static public function key() { return 'csrf_token'; }
1
46c750d74897f4f687518d2e2bc72396
a0ff78521f4d72bb572dd980eb2de1f7
Retrieve CaseInsensitive for field: ResponseCode (BMF_UNAPPLIED.response_code)
public class UnappliedPaymentObjectFilter extends BaseFilter implements Serializable public boolean getBmfErrorTextCaseInsensitive () { return this.BmfErrorTextCaseInsensitive; }
0
7c4d20a45211cb370b787719567f1ffd
9905760d926ba854de499c652d0d5370
This function simply returns the coverage of the given orbit kernel.
def get_coeffs(kernel_fn,order): N = 10**4 x = np.linspace(-30,30,N) fn_values = kernel_fn(torch.from_numpy(x).float()).cpu().data.numpy() w = 2*np.pi*np.fft.fftfreq(N,60/N) fft_values = np.absolute(np.fft.fft(fn_values)/(2*np.pi*np.sqrt(N))) obj_fn = partial(coverage_diff,order=order,x=x,w=w,fn...
0
90be9d50f064580e975a22d494b73f82
a4413d5590b2133bd68bbbba25c59467
3Dセキュア実行を行う.
void command_sealedkernel32(uint8_t * module_addr, uint32_t module_size, char * module_name, int32_t argc, char ** argv) { int idx = 0; uvideo_printf("command_sealedkernel : '%s' mod_start: 0x%x, mod_end: 0x%x\r\n", module_name, module_addr, module_a...
0
325371a8699a630918de5f5f3426f440
084948e381773743d06c7aecd92dae03
生成部门的xml
namespace K12.Club.Volunteer class CLUBImportBOT public string GetDeptXML(string Dept) { if (!string.IsNullOrEmpty(Dept)) { string[] DeptList = Dept.Split('/'); DSXmlHelper dsXml = new DSXmlHelper("Department"); foreach (string each in ...
1
0cadc78fd7ac6d030d15303a7fb29190
a89e872b17e5844d9b971f419f1035b8
加载执照信息
loadlicenseItem(idx) { var info = {}; info = this.licenseInfoList[idx]; if (this.licenseList[idx] == null) { this.licenseList[idx] = {}; } var curItem = this.licenseList[idx].curItem; if (this.myLicenseList[idx] == 0) { if (curItem != null) { ...
1
f261e0c810e769dfff4ccfa33ef8bda7
6e799d165061adc7c7e2bfa63439e6ef
Decorator for tests requring specific service feature enabled in tempest. The decorated test will be skipped when a specific feature is disabled.
def requires_service_type(service_type): def decorator(test_method): conf = getattr(config.CONF, 'heat_plugin', None) if not conf or conf.auth_url is None: return test_method manager = clients.ClientManager(conf) try: manager.identity_client.get_endpoint_url( ...
1
c503b00006f5ef3a75e49b018a3c63d0
8c21d567bf431da798cacb4e2ad80d1c
Computes p(x|word) edit model for a given word. Returns a dictionary mapping x -> p(x|word).
def edits0(word): return {word}
0
7c336761cdbdc3c4d8d7f20909075c9a
976cd4d650cbf3a1a46a9b495b7d1627
VERIFICAR SI EXISTE BOTON PRESIONADO
public class ControllerHelper public boolean isPressedButton(HttpServletRequest hsr, String nameButton) { if(hsr.getParameter(nameButton) != null){ hsr.setAttribute(nameButton, hsr.getParameter(nameButton)); return true; } return false; }
1
25b0abd1ad669a578b05ee4c3b07513c
4229437dc32a7cb69025b560fe40fe42
qq登录用户信息入库以及session存储
{ $MenberModel = new MenberModel(); $data['mem_openid'] = session('qq.openid'); $data['mem_name'] = session('qq.nick'); $data['mem_img'] = session('qq.img'); $data['mem_sex'] = session('qq.sex'); $data['mem_logintime'] = time(); $data['mem_loginnum'] = 1; $info = $MenberModel::where('mem_openid',$d...
1
a7cf8ddc151a6c1fec58cdb6639e9bff
23ca425bc014637a6fab1b6cf7cd20ab
Construct the XML from the current tree
{ if (is_null($this->root)) { return null; } if (is_array($this->templateData) && count($this->templateData) > 0) { $this->updateValues($this->templateData, $this->root); } return $this->root->toXml( $spaces ); }
1
2774b858b7bca903439456bd7c341c8e
8cfa15b029e41bbfe7acb20dc720ab38
Creates new notebook
class Notebook(Identified): def __init__(self, *, id=None, cells=[]): super().__init__(id=id) self.cells = cells self.workspace = {}
1
5c7324046225833d54ff932797a4f247
a30f7c4baaccaf9aaaf13f591703909e
检查是否同一天
if (record != null && DateUtil.isSameDay(record.getCheckin_time(), new Date())){ return true; } return false; }
1
acaa2ba00c82b4ae693c3122fd56f522
5fb3076ea2f274850a121fe6d57c60ef
Set the Processor Status Carry Flag
class CPU(): def STC( self ): self.flagALU_carry = 1 self.updateALUFlags_Register()
1
b6cf15a5106f2e056619474b8cbb88ec
daf9c057b6188bcd6dd51d41aed2c8f5
Initialize the container. thing -- the thing to store
class ThingTable(ABC): def __init__(self): self._boxed_thing_to_id = {} self._id_to_boxed_thing = [] self._total_bytes = 0
0
89957f894e45cc3455e03f5759d7c79f
a8db8db7eeda657598a8fd9acd39f538
The default retention period that you want to apply to new objects placed in this bucket.
class BucketObjectLockConfigurationRuleDefaultRetentionArgs: def days(self) -> Optional[pulumi.Input[int]]: return pulumi.get(self, "days")
1
c9dbd1d250ee65ad2afc270b9bc75070
6ebb2de2bb9ae8a262420531ac6451d6
Split the output file into parts by size.
def main(): split_file(os.path.join(src_path, big_file), per_file_size)
1
5653182cce125555d66fd471cfbd44d4
96d2f451f93691be893976a282de467c
Test that the forwarding rule dashboard loads properly.
class TestSetup(unittest.TestCase): def test_monitor_rule(self): data = {'name': NAME, 'value': 0} with self.app.test_client() as c: login(c) self.assertEqual(200, c.post('dashboard/api/set_rule', data=data).status_code)
0
bd1ed2f13d82a8da499c28117343028a
79a52ff2c363e8552102445e7d8e0298
Returns the current board from the server
{ _restClient.BaseUrl = new System.Uri(Uri); _restRequest.Parameters.Clear(); _restRequest.Resource = $"api/Player/gameboard"; _restRequest.Method = Method.GET; _restRequest.AddQueryParameter("token", Token); var response = await _restClien...
1
7f205ac5e0221877ce81e74c1e381720
fb595ee16f5142c8ad0489c05e6f2c4f
Mutator method to calculate pounds of CO2 produced based on tons produced (no parameters)
{ myGasWaste = myAnnualGas * 8.78 * Math.pow(10, -3) * 2204.6; }
0
9764f00152b6b4dd3eba3795c14dc486
9cfdf23f45c88e02130f497f6c1d3374
ユーザーの貸出本数を+1するメソッド
def bookIncrement(): global countBook countBook += 1
1
7837727b83e0018d4eb35d1860d69617
ace6c0f0ca898d375e6f9a654aaecc52
Returns information on the specified SAML attributes.
class IAMConnection(AWSQueryConnection): def get_saml_provider(self, saml_provider_arn): params = {'SAMLProviderArn': saml_provider_arn} return self.get_response('GetSAMLProvider', params)
0
4f204543eb4506dcc9c72d3a999ba343
391e2f1a3040e07570d8d1cdfb736ba4
Define the default sender address.
def default_sender DEFAULT_SENDER end
1
53477f6b2af6e847563fd717bf21a31c
fbc06cc90991f54b293a5edcd6623f52
Use itertools to compute the power set of A.
def powerset(iterable): s = list(iterable) return chain.from_iterable(combinations(s, r) for r in range(len(s) + 1))
1
a3372582c45b695768b8370f089c1ae7
538ce8fbf98452058be393587cec4336
检测上传数量是否超过
namespace czy.MyClass.Web public class UpLoadFile public UpLoadCountResoult CheckFileCount() { this._uploadFileLimit = this._uploadFileLimit == 0 ? HttpContext.Current.Request.Files.Count : this._uploadFileLimit; GetFileCount(); if (this._uploadFileLimit == 0) ...
1
aa8ed89c813beffae1113f1db7f6e6a7
032d71dd77d3ed4477c803771c291668
Sets the "received_MarketDocument.createdDateTime" element
boolean isSetReceivedMarketDocumentType();
0
205cdb44556bd72a1d257f203f6eab15
4464e4c8cddb427c0b47452b81680f3b
取出堆積頂元素(最小值)
{ if (isEmpty()) return NULLMark; T min = Key[pq[1]]; Deleted(pq[1]); return min; }
1