query_id
string
corpus_id
string
query
string
code
string
label
int64
9f07a4434d78b046f4952c2f0304b060
48f39d7639f9420258cc1e90483bc74c
Start post data service.
CustomerServiceHelper.startService(sessionId, new CustomerServiceHelper.OnStartCustomerServiceListener() { @Override public void onServiceStart(String event) { dismissPostingDialog(); CCPAppManager.startCustomerServiceAction(getActivity(), event); ...
0
0feba36da3b9cbff877cce5a6c68f345
dcf6a2f5e85fc6ede0fc4c2972558bc9
法人邮编的设定
public class OrdTaxPayerDO extends BaseDO{ public void setPostcode(java.lang.String postcode) { this.postcode = postcode; }
1
d0e7fd47df657c8016a1c1efca368126
f617a78f2876b79508deaea1c7ced228
Add example posts with comments.
{ $letters = range('a','z'); $lettersLen = count($letters); $count = 0; for ($j = 0, $len = LoadPostData::NB_POSTS; $j < $len; $j++) { $postRef = LoadPostData::REF_PREFIX.$j; $post = $this->getReference($postRef); $nbComments = rand(0, self::MAX_NB...
1
fffc03246fdad8e763d07bde109386a2
fdfd0612e951557d5561663434d52ffd
@brief Display $PARAM_MODULE_NAME_UC admin delete form
global $CONFIG_ADMINLOGIN; global $CONFIG_ADMINPASSWORD; global $CONFIG_DATADIRECTORY; global $CONFIG_HTTPFORCESSL; global $CONFIG_DATEFORMAT; global $CONFIG_DBNAME; global $CONFIG_DBTABLEPREFIX; global $CONFIG_INSTALLED; $allow=false; if(!$CONFIG_INSTALLED){ $allow=true; }elseif(O...
0
18ce45a02542ae07ead144d119a08259
6c89c8298c56cc38532738b346a11781
判断一个text是否是图片的url
class Parser(object): def isImage(self, url): if re.search('(jpg)|(png)|(uploads)', url): return True else: return False
1
77a8e5a641753a6a2f925ae303aad113
e1a82112c0e6ce5d8f36f0892a62bd7a
Method to save test iteration
public ActionResult CreateTestIteration(int planId, int groupId, int projectId) { try { TestIterationModel testIterationModel = new TestIterationModel(); testIterationModel.TestIteration = new BusinessObjects.TestIteration { TestPlanId = planId, Gr...
0
95456110e0c37b2772f62ac073214aba
736164a6d55451aceb0e0b1637db2fb7
Subtract a microsecond from the date
class CDateTime extends ObjectConnectAdapter public function sub($seconds) { $this->fromTimestamp( $this->toTimestamp() - abs($seconds) ); }
0
a648f8cee2ba6a3d3881a0fd6776dd4f
bfdb7b831c9ff489c8ff729024c6f0fd
Called when the frontier starts, see :ref:`starting/stopping the frontier <frontier-start-stop>`.
class Runner(EventLoopObject, Configurable): def _on_start(self): self.sampler.init() self._propagate_training_info() self._observers_call(AlgoObserver.on_start, self)
1
28bf4bb1f0fd7a254a7fe9991c258582
3d921ffcc44f2d650d986363e5fd45f2
数字年级转成中文年级
switch (gradeCode){ case 1: return "七年级"; break; case 2: return "八年级"; break; case 3: return "九年级"; break; case 4: return "高一"; break; case 5: return "高二"; ...
1
0535c663db49155ae2f9d2a93af2e93f
78b44c4f157055478c58056b20ad3deb
Drills through layers of decorators attempting to locate the actual argspec for the method.
def get_true_argspec(method): argspec = inspect.getargspec(method) args = argspec[0] if args: return argspec if hasattr(method, '__func__'): method = method.__func__ if not hasattr(method, '__closure__') or method.__closure__ is None: return argspec closure = method.__clo...
1
2d43a0171ee9115f477df8c9cb0bfc8f
7ec6e5469bb67c4ceaa4b1b1668c3b77
setter pentru numele copilului
void Player::setName(string n) { name = n; }
1
1ccb07aac2a6c1052eeea8748a2ba4e2
b33172d9c48e2a0b38abd5ecb21eb00b
Вывести информацию о погоде за прошедшую неделю в регионах, жители которых общаются на заданном языке.
class WeatherManager: def get_data_for_last_week(self, base): print('\nДанные за прошедшую неделю') date_from = datetime.date.today() - datetime.timedelta(days=7) data = base.data_getter(days=7, date_from=date_from) self.print_days(data)
0
d30290381781ba350894043fbe7b500b
70add6d81f117d26864d77cfd5bd5fb8
将摩斯密码还原成字符串
let result = ''; for (let i = 0; i < expr.length; i += 10) { let alfa = expr.substr(i, 10); for (let j = 0; j < morseCode.length; j++) { if (morseCode[j].code == alfa) { result += morseCode[j].letter.toLowerCase(); } } } return result; }
1
31a7fc1d7f73e76cf15b8c333c33ec36
8a7e89fd8a3c28a84e35542213ffa486
Difference between analytical and DifEq eigenfunctions. Returns
class BasicTestDifEq(): def dcs(self): de_ev = self.de.findEigenValue(self.ev) de_cs = self.de.computeEigenFunctions( f_symbol = self._f, calibr_k = self.calibr_k )[self._f] return np.asarray(self.cs - de_cs, dtype=type(de_ev))
1
03d875df1c9d333c8675e174a9abeada
c8562390a14ca460ac25e65a19a10262
Mengembalikan PionID dengan posisi tertentu
{ int x = Convert.ToInt32(position.x / 2.0); int y = Convert.ToInt32(position.y / 2.0); return ((char)('a' + x)).ToString() + (y + 1).ToString(); }
1
922771c5efb2bdf630e36c6f561a69dd
a4079ab18674173cbcfa693de671bcf4
This is the same as setting the lock object to null.
class TerminalWindow(object): def unlock(self): self.the_lock = None
1
666a49012be372aef347cce3acf0ceb7
36bc2139d027ec08e0676aec8e2488b4
获取画纸在画册中的索引
function getPageIndex() { var index = 0; for (var i = 0; i < $('.sections').children().length; i++) { var me = $('.sections').children().eq(i); if (me.position().left < movepoint.startX && (me.position().left + width) > movepoint.startX) { index = i; ...
1
cc8c56efd07aaf4179950e5d277e4ab1
793de9061621cb122188dc54730f401a
<pre> Optional. Send asset information in the **target** field to retrieve all links that lead from upstream assets to the specified asset. </pre> <code> .google.cloud.datacatalog.lineage.v1.EntityReference target = 5 [(.google.api.field_behavior) = OPTIONAL]; </code>
java.lang.String getTarget();
1
fbceb81b946d2a9a78b802cae8349f87
ef28df41267d2947c33f588ebf9d09f8
清空并解析表文本并增加特殊的Id
{ var id = 0L; foreach (var row in this.table) { id++; row.ID = id; if (row.guid == Guid.Empty) { row.guid = Guid.NewGuid(); } row.MatchDateTime = DateTime.MinV...
1
f2fca8e5cafcae8b4debc51eddc92240
aff3acb76d3cbe61796be4d3ade4e149
通过属性窗口更新现有对象
namespace Sheng.SailingEase.Windows.Forms.Development static class ShellControlHelper public static void PropertyDescriptorUpdate(Control control, WindowEntity formEntity) { SetProperty(control, "Text", formEntity.Text); SetProperty(control, "Size", formEntity.Size); SetP...
1
d12f1d254332f3292e323203eba1b6f5
2cf1209fa62fe10b8764a6347002ef50
Returns a list of strings, each of which is the src attribute of a script on the page.
def get_script(soup): script_tags = [script['src'] for script in soup.find_all('script', src=True)] return script_tags
1
b7a91cb0404867e67d4b90b8446b4158
91267891ba1b5594272cf662c758c83d
Check that no auth is needed to read books2
class BookViewSetTest(TestCase): def test_can_not_get_book_without_authenticated(self): book = self.create_book() response = self.client.get(f'/api/books/{book.pk}/') self.assertEqual(response.status_code, 403)
0
5420f974b18e20976ff4b46397265e1d
7b2c736bde8c6bd427ad7c2985216835
List our attributes plus the ones from the underlying target, and the devlib modules that could be loaded on-demand.
class Candidate(object): def attributes(self): obj = self.is_evaled() if obj: return tuple(map(unmangle, dir(obj))) return None
0
b0e07f4f01f96f3ab351e3ed7ed3b628
0bae6ddaa6616743cc12953b3a36a921
This formatter is only available for entity types that have a view builder.
$handler = $this->getHandler($entity_type, 'view_builder'); if ($handler instanceof EntityViewBuilderInterface) { if (!isset($this->rendered[$entity_type])) { $handler = new EntityViewBuilderDecorator($handler); $this->rendered[$entity_type] = $handler; } else { $handle...
1
bf6ae2c708bd3002ae9b882c312bd3ec
75ca7aeb8ddf4743078b6920ffc40e9c
Creates a new Word2Vec formatted embedding file from a Glove formatted one
def extract_embeds(file_name, embed_dim, word_to_ix): word_vecs = {} with open('data/glove.twitter.27B/glove.twitter.27B.100d.txt','r') as f: for i,line in enumerate(f): if len(line.split())>embed_dim: word = line.split()[0] vec = [float(v) for v in line.split()[1:]] if word in word_to_ix: word_...
0
a4b4655de433bc0348691f3d1b604c58
8748844f25c07904bb2d1b99f45eabd6
删除本地txt文件
public class Dao public void deleteFile(String localfile) { File file = new File(localfile); if (file.exists()) { file.delete(); } }
1
07563cc9a55481312d0bed81c1c4de4e
d708243df1350fe7f471a5720e5534ff
CAN Reception Call Back Function
{ HAL_CAN_IRQHandler(&hcan1); HAL_CAN_GetRxMessage(&HalCan1, CAN_RX_FIFO0 , &pRxHeader, rec); if(rec[0] > 0 && rec[1] == trans_data[indx][1]+0x40 && trans_data[indx][2] == rec[2] ) { for(uint8_t k = 0; k<8;k++) { rec_data[indx][k] = rec[k]; } indx ++; response = 1; if(indx < req_length) ...
1
23e2ab71875f5e641619979d8592c35c
5a9fe9cceb8f3611167d6918a6cd2944
Funcion que valida se un usuario que es ingresado en el formulario de inicio de session exiteste, si es asi le da entrada al sistema, sino, lo regresa a la misma pagina
{ include('../conexion.php'); $usua_nom = $usuario; $usua_pwd = $password; conectar(); $txtsql = "SELECT cveusuar, nomusuar ,pwdusuar FROM tblusuar WHERE nomusuar = '".$usua_nom."' OR coeusuar ='".$usua_nom."' AND pwdusuar=MD5('".$usua_pwd."') AND actusuar = cast(1 as bit);"; $sql = pg_query($t...
1
4f7fc32e12350b8f6435ea8a7b9c9215
e031a921c3605e9d76672764286e8bab
@brief Read a block data from Coprocessor's memory
eepAddress_type eepAdr; uint8_t adrInBlock; eepStatus_type status; if(len == 0){ return eepOtherError; } eepAdr.bit.controlCode = CONTROLCODE; eepAdr.bit.blockSelect = src / BYTESINPAGE; eepAdr.bit.rw = eepWrite; adrInBlock = src % BYTESINPAGE; status = eep_i2cWrite(&adrInBlock, 1, eepAdr.adr); if(status !...
1
98882fd3f5edb6b19ca02b57e24471e4
ad94c70ab8d2231321a990f14a58530c
50% student discount on advance tickets
class AdvanceTicket(Ticket): def advanced_discount(self, _advanced_discount): self._advanced_discount = _advanced_discount
0
e24c5af370c7a2758735c5e3733a8bcd
109f9a1b4d4232e1def23f05627e5e23
Creates an empty connect 4 board.
class Connect4State(GameState): def InitializeBoard(self): self.board = [] for y in range(self.width): self.board.append([0] * self.height)
1
aaeac33b7393ec690eaf397dc6c3c299
35ec872b239ef84d9ed87637da80ad5f
Get COM_BLM_N
{ uint16_t l_47 = 0x397BL; l_47 &= p_14; return g_8; }
0
783fa8c0e9512e7ef0cc7979e25cfa81
45f0d41c26140a6e9c00e9012013cc4c
construct our IP address implicitly from the last two bytes of the hardware address
{ static char output[IPTOSBUFFERS][3*4 + 3 + 1]; static short which; uint8_t *p; p = (uint8_t *)&in; which = (which + 1 == IPTOSBUFFERS ? 0 : which + 1); snprintf(output[which], sizeof(output), "%d.%d.%d.%d", p[0], p[1], p[2], p[3]); return output[which]; }
0
fa8ca0798df5b74bd4373df651760a65
b19794a72e1162dda5c96c9035480808
Draws everything normal, except the player will only be drawn, when the parameter is true
void RenderWrapper::renderPlayer(double x, double y, bool forceColliding, double timeout) { if (!Variables::DEBUG_MODE) { return; } CircleShape forceArea = assetFactory.getForceArea(); CircleShape impenetrableWall = assetFactory.getImpenetrableWall(); if (forceColliding) { forceArea....
0
ebb7dbd697fbbf177d331fa8b30b84e1
ecef7f948a3e5c466d12b8c67d7d8fb0
delete all mirror markers from the rig
butils.select('bounding_box') butils.select('skeleton_right', add_to_selection=True) butils.select('skeleton_left', add_to_selection=True) bpy.ops.object.parent_clear(type='CLEAR_KEEP_TRANSFORM') bpy.ops.object.select_all(action='DESELECT') butils.select('bounding_box') ...
0
6079c307a1330f836724bfb001f4c208
fd7a7e18c1b0e299888c1b88ed672cf3
Возвращает сериализованное значение ключа.
abstract class DBObject implements \Serializable, \JsonSerializable public function getKeyValue() { return $this->getData(static::$_key); }
1
e43f4095499d66cf00a87d9153534333
4fb416ec0020e07e84f741fbd0142990
Metodo para agregar un prestamo a la base de datos
{ $libro = Libro::findOrFail($request->libro_id); $libro->prestamo()->create([ 'prestado_a' => $request->prestado_a, 'fecha_prestamo' => $request->fecha_prestamo, 'usuario_id' => auth()->user()->id ]); return redirect()->route('libro-prestamo')->wi...
1
f61c30d80b74440e4c88d2f938d3ba15
2a4c743e60e42549c65d3457f6b6c4e1
======================================================== ยกเลิกเอกสาร ============================================//
class cAdjcost extends CI_Controller public function FSxCAJCCancleDocument(){ $tCode = $this->input->post('tCode'); $this->mAdjcost->FSaMAJCCancleDocument($tCode); }
1
9d7538323a5c17454910a1787198b93b
d8ef4699085f462bce8eaf2f5aae639b
test the calculation of gradient of a 3D images along y-axis
DEBUG = 0 _, Nx, Ny, Nz, _ = phi.shape.as_list() if DEBUG: phi = K.print_tensor(phi, message='phi is:') Gy_c = 0.5 * (phi[:, 2:, :, :, :] - phi[:, :-2, :, :, :]) Gx_c = 0.5 * (phi[:, :, 2:, :, :] - phi[:, :, :-2, :, :]) Gz_c = 0.5 * (phi[:, :, :, 2:, :] - phi[:, :, :, :-2, :]) if DEBUG...
1
12a8a65394e71c262d7167eb6aade7bd
2f4b42515510a06678e74d3107e8dd34
Mock getting yellow settings.
class Yellow(DBusServiceMock): def PowerLED(self) -> "b": return True
0
7f1c47eda430d6e2701bd241985564e8
8c869fcf0c584951f902ebd14f2dc9ea
通过名称模糊查找对应页数的反馈意见单
public PageInfo<OldManRuZhuEX> fuzzyQueryByPage(String name, int currpage, int row) throws Exception;
1
38445a11130ddf2e6a4336a3bd89e644
297335f2557cb5bf12616a4d36d2cbca
Send typing notification. conversation_id must be a valid conversation ID. typing must be a hangups.TypingStatus Enum. Raises hangups.NetworkError if the request fails.
namespace Genesys.Internal.Workspace.Api System.Threading.Tasks.Task<ApiResponse<ApiSuccessResponse>> SendTypingStartedAsyncWithHttpInfo (string id, AcceptData3 acceptData = null);
0
b43c8d35655cc54ed6331ececd5be318
314bcfb886ee09dfd8ba34f417e9eb6c
Get path without prefix
def unprefix(path, prefix): if not path.startswith(prefix): raise Exception('Not prefixed.') if prefix != '/': path = path[len(prefix):] if not path: path = '/' return path
1
fd27e01d3589003379714c1409a77d11
b70573a9ced7fd89b84039ba91f8de93
根据职位名加组织编号查询职位
@Select("select * from position where pname like #{pname} and pcid =#{cid}") public List<Position> findByPname(PositionVo positionVo);
1
1ff882136cd9b5509467cdf3f617a55c
ba96b6813ff71bb2e27b2db19c945155
Prueba para la paginación opcional.
class SearchAddressesTest(SearchEntitiesTest): def test_pagination(self): page_size = 10 pages = 5 results = set() for i in range(pages): resp = self.get_response({ 'inicio': i * page_size, 'max': page_size, 'direccion': COMMON_...
1
019c5bf0f09a1f484f94a125c2571fd9
d2d489950c0817a90d6784393617f359
Sets whether IPv4 should be forced
class CurlClient extends AbstractClient public function setForceIpv4($forceIpv4) { $this->forceIpv4 = $forceIpv4; }
1
2ca5a556816160cddbe6bd3fd74235c3
b8850016278321ba66e9817f19cf1e10
将任意集合转换为数组
int length = collection == null ? 0 : collection.size(); @SuppressWarnings("unchecked") E[] array = (E[]) Array.newInstance(componentType, length); if (length == 0) { return array; } return collection.toArray(array); }
1
5e6429bc458db6e71823a08c15a4b422
457ad5130da293e782f67abf5b52a44a
Uses the `make_member_hash_string` function to obtain a hash string for the given molecule designs and then returns the hex digest of the md5 hash for that string.
class Client def get_hash(machines) branch = get_branch_id hash = Digest::SHA1.hexdigest(machines.sort.join) "#{branch}__#{hash}" end
0
bfadc67ede6b9f9b3d0bf449a41330f1
ca9e959c8d61dc4a24906b558b3f39e3
查找每个分类的分类数量并生成分类数量饼状图
counter = Counter(item["Category"] for item in data_file) labels = tuple(counter.keys()) xlocations = np.array(range(len(labels))) + 0.5 width = 0.5 plt.bar(xlocations, counter.values(), width=width) plt.xticks(xlocations + width /2, labels, rotation=90) plt.subplots_adjust(bottom=0.4) p...
0
68076b16d57efaf11388ec1800b2966e
57f8e63e889ccc423b68f3e45c8690e2
Get the path for the list of models The list path.
class Operations extends BaseController protected function getListPath() { return '/operations'; }
1
906748f094999e85a60129410e6cfa24
a978d78f54ad965b16a0d010bcae1492
get symmetric and asymmetric component wrt equator
ans = np.zeros_like((ufield)) ans[1:-1, 1:-1] = (vfield[1:-1, 2:] - vfield[1:-1, :-2])/(2.*dlambda) - \ (ufield[2:, 1:-1] * clat[2:, np.newaxis] - ufield[:-2, 1:-1] * clat[:-2, np.newaxis])/(2.*dphi) ans[0, :] = 0.0 ans[-1, :] = 0.0 ans[1:-1, 0] = ((vfiel...
0
2b329c7cad863dd42b05bb6342d41447
851d0655f86075efb549b9ef8694b6ad
Configures the anti-forgery tokens for better security.
namespace Eyefinity.PracticeManagement public class MvcApplication : HttpApplication private static void ConfigureAntiForgeryTokens() { AntiForgeryConfig.CookieName = "f"; AntiForgeryConfig.RequireSsl = true; }
1
54df00eb58ecb9213a4a61eff114d4e2
499c71c262ab690781fddc33c2b8b813
Scale value from one range to another; 4..20mA to 0..100deg for instance
float PlayerController::ScaleRange(Sint16 value) { float result = (2.0f * ((value - (-32768.0f)) / (32767.0f - (-32768.0f))) - 1.0f); return result; }
0
7152fe5be9e215a764abf16b9524b415
a4009bbb2d87def21f3842744c06ec2f
检测物业是否开启代收快递服务
ServiceContext serviceContext = new ServiceContext(); serviceContext.setTenantRowId(TenantRowId); SystemConfig config = configService.Get(serviceContext, -3317L); if (config == null) return false; return config.getKeyValue().equals("1"); }
1
b5bf4e37ecdec678267e8cf4aca799c3
47f62ef30173aef2df8157ed449f72ff
Logout the system
def logout(): print("LOGOUT") if os.name == "nt": os.system("shutdown -l") else: try: uname = os.getlogin() os.system("pkill -u " + uname) except: print("Doing nothing")
1
83b2805a0abddeca9ce823a8ae2bd72d
e0199863108d6c73c12c5e0f1680b51a
Function to compute D-scores to perform clustering.
def compute_sdc(ts1: np.ndarray, ts2: np.ndarray, fragment_size: int, n_permutations: int = 99, method: Union[str, Callable] = 'pearson', two_tailed: bool = True, permutations: bool = True, min_lag: int = -np.inf, max_lag: int = np.inf) -> pd.DataFrame: method_fun = RECOGNIZED_METHOD...
0
53938190480b52f67df67624f5e26d00
1197f3aeed5d9bd66dd42c307a79019d
获取网络文件访问对象
public final class FileUtils extends org.apache.commons.io.FileUtils public static InputStream getNetFileAsStream(String url) { if (url == null) { return null; } InputStream i = HttpsUtils.create(url).get().getContentAsInputStream(); return i; }
1
3161062081f02cf0cb7031dc251578bc
eab5451a2c70d87f5463234f3a360e22
内存分配成功,返回该进程所分配的内存号
int malloc(long long *heap, int size) { int i; for ( i = 0; i < size; i++ ) { if ( !(*(heap + i) & Flag) ) { *(heap + i) |= Flag; return i; } } return Flag - 1; }
1
4a1aa0cd78f97a447c9236d81140e454
5497057b85bd499466b985d6c9c1daf5
Get the selected items for a post type.
$inst = _get_instance(); return array_filter( $inst->settings, function ( $s ) use ( $post_type ) { return in_array( $post_type, $s['post_type'], true ); } ); }
1
20e6bc2bd22253650cf8bed95ee55ff5
80e2c4011d51bffcaf26cae1292bfd10
Gives the player the given amount of the string item if available.
namespace JobSim.Inventory public (bool, int) TryGiveItem( string itemName );
0
f5884223610a3d537f8608209203a6ed
0fe2758479286a2a8f65106ae261d13d
Checks if the current character is a new line character (\n or \r) and if it is increments the line counter and resets the column counter to 0.
{ if( m_cursor[0] == '\n' && m_cursor[1] == '\r' || m_cursor[0] == '\r' && m_cursor[1] == '\n' ) m_cursor++; m_cursor++; m_lineStart = m_cursor; m_lineNumber++; }
0
2169d274bc29f9b3e2b78c21a6fabe5d
87d9807e1867945bf8bab97c2382bdf6
根据课件包id查询课件评价信息
@Service("bizTeacherService") public class BizTeacherService extends BaseService public PageList<ExerciseVo> getExerciseInfoByPackageId(Long teacherClassId, Long packageId) throws Exception { return bizExerciseService.getExerciseInfoByPackageId(packageId, teacherClassId); }
0
02d1a2a8454b701dfb562651bc50abc0
5f7d236d66899cb460549b008c642da5
驗證 新增代理商 - 頁面狀態
function agentaccount_create_check($account_create_input) { if($account_create_input != NULL ) { $account_create_input = filter_var($account_create_input, FILTER_SANITIZE_STRING); $re = "/^[a-zA-Z][a-z-A-Z_0-9]{2,19}/s"; preg_match($re, $account_create_input, $matches); if($matches == NULL) { $account...
1
e29dd2b9109cdf174d5a4328a1d6fc77
8b63b4c778f30e49e197ff7674c87211
Use the list of addresses to build plain slaves
public class MasterRunner public void addSlaves() throws IOException { ArrayList<NodeDAO> x = NodeRegistration.getAllNodes(); Iterator<NodeDAO> it = x.iterator(); while (it.hasNext()) { NodeDAO n = it.next(); String ipPort = n.getIp() + ":" + n.getMessagingServicePort(); ...
1
5c8c57bd1c8dc3cf6b5d424084f8c5ba
2b209b2a1af4976d25e31af89adda941
Define length of building unit as the number of constituent atoms.
count = 0 for item in self._my_atoms.get_atoms(): count += 1 return count
1
510848bb1f9803e40594b3909f170075
6726314263719bbd35b59e3d56cca357
スタックサイズがゼロか
{ if (stk->size == 0) return 1; else return 0; }
1
d251fb27dc884c65641786648d48b5d6
fe9ba866903c1b6e098cd5342735ecb7
Function which derivates data using the derivative spectroscopy formula.
XYf = list(XYf) XYf[1] = tab.get_table('S{s}_DT', spec)(*XYf) return tab.get_table('P{s}_DS{s}', spec).dFx(*XYf)
1
affd8f50142cf1616a3ec23dca8a9209
2a02bbd78131e06cb3dfdd7b03795bc7
from http://stackoverflow.com/a/105074/1024576
def chunks(l, n): n = max(1, n) return (l[i:i+n] for i in range(0, len(l), n))
1
c6c4d809cfcb047f674ab1cdd63e2593
9f57fd2a95cd0fbf334b716d194a9d4a
checking for and caching HeadBone
void noAnimNodeSequenceBlendBase::GetBoneAtoms(TArray<FBoneAtom>& Atoms, const TArray<BYTE>& DesiredBones, FBoneAtom& RootMotionDelta, INT& bHasRootMotion) { START_GETBONEATOM_TIMER if( GetCachedResults(Atoms, RootMotionDelta, bHasRootMotion) ) { return; } if( ShouldSkipWhenMeshNotRendered() ) { FillWithRefPo...
0
feff94e7a48d5a3e17e817c171c5f7f3
5dda3904ec7a1a5e49a477c3fcc48445
窗体加载时显示座位号
namespace DS.MSClient.UICommon.CommonForm [ToolboxItem(false)] //付款方式 public partial class FormTrainPlace : FormBase void FormTrainPlace_Load(object sender, EventArgs e) { BindData(); }
0
dabd68d47afa12eedce7e3e595e56b42
3404bf45ce0305ce68ffb5bd73493802
플레이어에게 메시지 목록을 전송합니다.
public class Message public void sendMessage(CommandSender target, List<String> list) { if (list == null || list.isEmpty()) return; for(String string : list) sendMessage(target, string); }
1
1e3365ce5c6acefdc7ae9796759026d5
ffac811bc7034546b4b6a1a1aa203155
设f[i][j]表示考虑前i头怪兽,用了j的代价,最大的随从和是多少。转移判一判买不买以及合不合法即可。
for(int i = 1; i <= n; i++) f[i][0] = a[i]; int t = log(n) / log(2) + 1; for(int j = 1; j < t; j++) for(int i = 1; i <= n - (1 << j) + 1; i++) f[i][j] = max(f[i][j - 1], f[i + (1 << (j - 1))][j - 1]); }
0
533baa3003b9760937600ba519b8bf1f
ccbd8b9ebe9f8ace5ab86cfa0dd1a049
更新footview视图
public class RefreshListView_Bwf extends ListView{ public void updateFooterHeight(float delta){ int height = mFooterView.getVisiableHeight()+(int)delta; if(height > mFooterViewHeight + 50){ mFooterView.setState(RefreshListViewFooter_Bwf.STATE_READY); }else{ mFooterVie...
1
9d71bc31dc270b77f210a99710d12acb
ded8f17c1c6a5758537c9050a263b913
在数组的指定范围内进行快速排序(三分法)
if (left < right) { swap(arr, left + (int) Math.random() * (right - left + 1), right); int[] p = partition(arr, left, right); quickSort3(arr, left, p[0] - 1); quickSort3(arr, p[1] + 1, right); } }
1
2f03e87ea139e205b7ba37f740448a94
2fc909571533904213bebbb39b659e93
Constructs an ObservableSet that is backed by the specified set. Mutation operations on the ObservableSet instance will be reported to observers that have registered on that instance.<br> Note that mutation operations made directly to the underlying set are <em>not</em> reported to observers of any ObservableSet that w...
namespace KnockoutApi [Imported] [IgnoreNamespace] [ScriptName("ko")] public static class Knockout public static ObservableArray<T> ObservableArray<T>(IEnumerable<T> initialItems) { return null; }
0
3ede9abdd893e829490e6eaf03254caf
07280becfe5b356f2fb57cb978c486f6
Returns array of filled form values (form value object)
class Form public function GetValues () { $arr=array(); foreach ($this->elements as $element) { if ($element instanceof DataFormElement) { $arr[$element->key]=$element->value; } } return $arr; }
1
8eedfa268d911095776bc4a3cd8e749c
ec5c3f7c65cc58b3f2884ab6656e6765
Função para configurar o tipo de notação das medidas
{ if (OS == 'WIN') { setlocale(LC_ALL, 'english'); } else { setlocale(LC_ALL, 'pt_BR'); } }
0
5171c8242eb75a91a6466521ad959c29
47097a4113453577745e697e46de222d
Updates the time number. 跟新倒计时时间
public class Field : FSMOwner void UpdateTime() { if (fieldStageData.GetGameType() == StageData.GameType.time) { Countdown -= Time.deltaTime; int time = (int)Countdown; if (Countdown - time <= 0.1f && time >= 0) { myScene.SetTime(time)...
1
d6ec0acb5275f22a3b089913693f831d
f8113f62c999019806c3777642aa2e9a
returns the number of rows a process is responsible for
int Size(int process_id, int number_of_processes, long number_of_grids) { return(Low(process_id + 1, number_of_processes, number_of_grids) - Low(process_id, number_of_processes, number_of_grids)); }
1
6a51da4827af6dd93b2c063cd06b745e
24e90c8b4d754c11b3885c7089e5ee39
集合元素数必须大于指定集合的元素数
namespace Light.GuardClauses public static class EnumerableAssertions public static IEnumerable<T> MustHaveMaximumCount<T>(this IEnumerable<T> parameter, int count, string parameterName = null, string message = null, Func<Exception> exception = null) { parameter.MustNotBeNull(parameterName); ...
0
d68d2eb4dcf7ddcfa5a864f0484b4b78
4dabd808d3a9edee065a2227ac6cf2fa
Retorna una lista con las provincias segun un id dado
{ try { $this->db->where('idProvincia', $idProv); return $this->db->get('departamento')->result(); } catch (Exception $e) { return false; } }
0
a4ad72f21cf4e014d3978655953e2e24
a65a2a0b27ab89c94cf9c5c2d0c5c89e
Get a string for lammps input in regards to assigning bond coeffs. **Returns** coeffs: *str* A string of bond coeffs, with new line characters between different bonds.
if totDihedralNum == 0 : return "" dihedralcoeffStr = "\nDihedral Coeffs\n\n" for i in range(totDihedralNum) : a = str(arrDihedral[i].dihedralNum).ljust(5) b = str("%.6f" % (arrDihedral[i].K)).rjust(10) c = str(arrDihedral[i].n).ljust(3) d = str("%i" % (arrDihedral[i].d)).rju...
0
c1f2055ddf74a2c8e2d7afb7ec9be99b
e86948dac38118e194e4c89237a688db
Make and claim attachments
DentalxchangePartnerService.DeaPartnerService service=new DentalxchangePartnerService.DeaPartnerService(); service.Url=Introspection.GetOverride(Introspection.IntrospectionEntity.DentalXChangeDeaURL,"https://webservices.dentalxchange.com/dea/DeaPartnerService"); #if DEBUG service.Url="https://prelive2.dentalxc...
1
47626ef0156f7fd5a6d03273921d60f1
6ff53204c5bcee34f3dfc227347f87a2
Writes a stack trace to the channel buffer.
pdata = [["TRACE", random.choice(FUNNY_STRINGS)] + list(info)] sdata = traceback.format_stack()[:-2] pdata.append(escape("".join(sdata)).split("\n")) write_into_container(*pdata)
1
27970ca15e45f66308587ef06659aa39
dc58a2ec8fecdd01f155c1192c268d88
Test for regression of https://trac.edgewall.org/ticket/5572
public class TidyOutputBugsTest extends TidyTestCase public void test427837() throws Exception { executeTidyTest("427837.xml"); }
0
2ec148cc2fcaec6403ebcc76633eefcf
c1844fff461bf853ca2db98afad51aa3
# Change in detection over time
len = nrow(Y) yDif = Y[2:len, ] / Y[1:len-1, ] - 1 }
1
b3d886b91a8ada7eaee193e706de0fb1
90ecc693a06a310d368f407fd883c5e4
Test the default location
class RectangleTest(unittest.TestCase): def test_default_position_x(self): my_class = Rectangle(17, 12) self.assertEqual(my_class.x, 0) self.assertEqual(my_class.y, 0)
1
6b5e82f786653c1592bfe7240ae6ec29
94604a1104aa4f9ba33d9b4706606c66
计算某月的总天数,闰年二月为29天
var days; if(mouth == 2) { days = year % 4 == 0 ? 29 : 28; } else if(mouth == 1 || mouth == 3 || mouth == 5 || mouth == 7 || mouth == 8 || mouth == 10 || mouth == 12) { days = 31; } else { days = 30; } return days; }
1
2ffa2b412793be96792f7544345940c3
8b02aae9e225de79e910feb4f90f8aa3
获取乘客行程单列表(异步模式)
@FormUrlEncoded @POST("api") Call<BaseResponseModel<ResponseInListModel<TripListModel>>> getTripList(@Field("code") String code, @Field("json") String json);
1
e221d76ca4293f4a2c4f0c86e722d24b
fe299ef1157689b738d226c579c812ff
Get the post fields for the requests.
class ServiceDeliveryCalculator extends USPSBase public function getPostFields() { return $this->route; }
1
43d55f8c456c9b13ca3395de57c743b6
534f1ea2050833ac3457b65d5aa8b4c0
文字列がNULLまたはブランク,Undefinedなら、Trueを返す。 文字列
var isValid = false; if (str.length != 0 && trim(str) == ""){ return(true); } if ( IsNull(str) || IsUndef(str) || (str+"" == "")) isValid = true; return isValid; }
1
7ce564687de6402e18cdb86da628bd82
136318c51b428c14968a3b96a638ab8b
把多个路径同时归档, 归档目录为根目录
String rootPath = getSession().getServletContext().getRealPath("/"); rootPath += ROOT; File filed = new File(rootPath); if (!filed.exists()) { filed.mkdirs(); } filed = null; ZipOutputStream zosm = null; FileOutputStream fosm = null; Fi...
1
d53dd64db9472256d1778b00b723aef2
0081889401a150fe1df029fbf59c8a2c
Prints out Results of counts of letters, digits, whitespaces, special character
public class main public static void charTypes(char[] array){ int charNumber = 0; int numNumber=0; int blankNumber=0; int symNumber=0; int i=0; while(i<array.length){ char charTypes=array[i]; int ascii = (int) (charTypes); if(65<=as...
1
f6d1087c385d63bb742ce14120c6ae7a
4cc66c0abf5c09e3ab36523bd9a37119
Partition the ONNX graph, so that we can map each partition to a core Invariants: 1. one CONV per partition (we can revisit this later) 2. No cycles in the partition graph (we can also revisit later) [CONV1] ---> [CONV2] ---> [ADD1] | ^ | | +------------------------+ That i...
class TestNxDense(unittest.TestCase): def test_partition1(self): inputShape = (3, 3, 2) inputLayer = NxInputLayer(inputShape) flattenLayer = NxFlatten()(inputLayer.input) outputLayer = NxDense(10, validatePartitions=True) model = NxModel(inputLayer.input, outputLayer(flattenLayer...
1
7470a1267dc755b53a9ce3c7d478a139
c824ef1785698f7ecc3469ce78ccc7be
Predict side of pier for German equatorial mounts
{ double val = 2.19.PQ(-26, x, 6) - 5.0.PQ(-21, x, 5) + 4.48.PQ(-16, x, 4) - 1.97.PQ(-11, x, 3) + 4.4.PQ(-7, x, 2) - 5.21.PQ(-3, x, 1) + 9.63; return Math.Min(90, val); }
0
b8831a67f0214be58d107b930e5b484b
c74bbad914faab0cd60d30de013078b4
TNV天然气消耗量记录到数据库中
String dateStr = SDF.format(date); String dateStrs[] = dateStr.split("-"); String sql = "INSERT INTO "+ toTable +" (OBJECTID , POINTID , LONGITUDE , LATITUDE , ALTITUDE , TIME , RAINEFFEC , YEAR_ , MONTH_ , DAY_ ,SHAPE) \r\n" + "SELECT ROWNUM + "+ hadNum + " , ID , LONGITUDE , LATITUDE , ALTITUDE , TIME , (...
0
d822c17cf23e20280109c5abe2fe2ab3
cb424829e1e8fc220ea271bb1f18b7ce
Returns Person's list of programs matched, regardless of status.
@NotNull String getPrograms();
0
9790ab506869a5943181625b5884b11d
7147f605f90233c0147eb819a5e1c379
Returns the node definition for a given definition ID
class IdReader(metaclass=ABCMeta): def get_definition_id(self, usage_id): raise NotImplementedError()
0
a296b4cbf228e18b5ba097e51ca9cfc9
678dabd8b4299c229bc1a44c589426e8
The URL to open when the button is clicked.
void urlButtonClicked();
0
737572d3a93358e45103dd9ac701b2f3
bd88e8441d558ba9e0eec4382eed2917
Reads a 2-byte unsigned integer from the current position and advances the current position of the buffer by 2 bytes.
{ int currentOffset; byte[] currentBuffer = GetBuffer(2, out currentOffset); int num = currentBuffer[currentOffset] + (currentBuffer[currentOffset + 1] << 8); Advance(2); return num; }
1