query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
58a5bc52ef65c00338ce52a471f392b8 | 99bbb3f1c9ef2bb185c938d34326dc80 | 以字节数组的形式返回指定的字符串 | {
byte[] result = new byte[Encoding.UTF8.GetByteCount(Str)];
result = Encoding.UTF8.GetBytes(Str);
return result;
} | 1 |
56ba550e6b86d4402e1b7ab6fd906661 | d0c9df1890bb2bdf510ea09a6113ec64 | Read handler for the IIR register. | int read_IIR(uint8_t *data)
{
if (sys_inb(COM1_INIT_ADDRESS +2, (uint32_t*)data) != 0)
return 1;
return 0;
} | 1 |
93e266c8eb899a1d6fd6b87d5bcccc7d | 66842dec735d1a7c2d925878049bec4a | Creates the intent to launch Activity with [getScreenClass] or [getScreenClassPath] class.
You should override this method if you need custom behavior (system intents, choosers, etc) | packageName: String,
className: String,
bundle: Bundle?
): Intent {
val intent =
Intent(Intent.ACTION_VIEW)
if (bundle != null) intent.putExtras(bundle)
val cn = ComponentName(packageName, className)
intent.component = cn
return intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
} | 1 |
6f1dd06688b53df5be45f78fe5921253 | bb0fc9d41a5aa142453eea174295d2a7 | đăng bài | {
$post = Post::find($id_post);
if ($post->status != 1) {
return response()->json([
'message' => "Bài đăng chưa được duyệt",
]);
}
$request->validate([
'req' => 'required|max:10000',
]);
$user = $request->user();
... | 0 |
6ff0da87121a9ab78990d338aa84f521 | 88327f7a33fd25c7b572a619816e0557 | Called when the left-mouse is used to drag a point on the VOI. | if ( pointerVOIButton != null ) {
pointerVOIButton.setSelected( true );
}
} | 0 |
02d0d1ce755be4ece6dc004899cecbd3 | f4ea2f830710dcaa2562265cb6e0bf4d | 根据输入的各元素权重,计算原参考文献与证据参考文献相似度 | def docdocsim(filename1,filename2):
cosine_weight_doc1=getcosnormwtdoc(filename1)
cosine_weight_doc2=getcosnormwtdoc(filename2)
result=0
for key1,val1 in cosine_weight_doc1.items():
for key,val in cosine_weight_doc2.items():
if(key1==key):
result+=val*val1
... | 1 |
fda6365982cf3edddd162de471f805c3 | 64d38e828aaa431dcad966ddff15785c | Поиск по ФИО+ДР | @Named
@Stateless(name = EmployeeBean.NAME)
// , mappedName = EmployeeBean.NAME)
@Remote(EmployeeBeanRemote.class)
public class EmployeeBean implements EmployeeBeanRemote, EmployeeBeanLocal
@Override
@TransactionAttribute(REQUIRED)
public List<EmployeeDTO> findAllByFio(String employeeFio) {
List<Employe... | 0 |
f90b0e7522e34f5dc693b94bf812eadf | 04ae62216c15af69602f5fd179c10e20 | Function for Generating voter info piechart | {
$votings = \DB::table((new Voting)->getTable())
->select(\DB::raw('count(*) as total'))
->groupBy('candidate_id')
->get()->toArray();
$votingsLength = count($votings);
$datasets['datasets'][] = [
'data' => ... | 1 |
ba509bb57060d7ca385c474ca7d637d5 | ec3cc8b608541b5cc1cb157067325a90 | List of files sorted by size descending. | def get_files_by_file_size(dirname, reverse=False):
filepaths = []
for basename in os.listdir(dirname):
filename = os.path.join(dirname, basename)
if os.path.isfile(filename):
filepaths.append(filename)
for i in range(len(filepaths)):
filepaths[i] = (filepaths[i], os.path... | 1 |
41293fbb4793b6640eb9aeeabb57000e | 6c22267c0b511d3795913dfb7045ef4b | 查询最近3条记录 | class Estate_M extends MY_Model
public function get_recent($limit = 3){
$limit = (int) $limit;
$this->set_created();
$this->db->limit($limit);
return parent::get();
} | 1 |
65ff849186ed9fe5ecd8eb751c7de2b4 | 13e42e5e6a54d40f48dffbf8e8d126fa | 迭代表格测试 | function Infotest(){
var info = new NSF.System.Data.Grid();
info.Pagination("first-ds-pag", $('div.list-item').find('div[name="first-ds-pag"]'));
info.Initialize("/", "infotest", $("ul[name='infotest']").attr("view-id"), $("ul[name='infotest']"));
var str = $(".score tr td").text();
var strs = str.split("#");
for... | 1 |
8360a7c26304bc4a7934490c4e125aa2 | b19fd9c6cba2406e00a047468c7a99ba | Change wiring attribute for a map/virtual-address pair. | wire_module(int source, int output, int sink, int input) {
--output; --input;
printf("Wiring %s[%d] -> %s[%d]\n",
ModuleConf[source].instname, output,
ModuleConf[sink].instname, input);
ModuleConf[sink].in_src[input] = source;
ModuleConf[sink].in_pos[input] = output;
ModuleConf[source].out_dst[output] =... | 0 |
62d7e7362f89697fda28afeb4490c916 | 9a56493a4510e1eb4af1fd586b3620b0 | Returns the document type declaration associated with this document. For
documents without a document type declaration this returns
<code>null</code>. | public NodeTypeDefinition getDocumentTypeDefinition(Document doc); | 1 |
cfe206c5af2b22014028cc25ac9be9ac | 122f63c6a2dc4f4e6ef948f62eb1ad72 | An internal method used by operations to save their results for advanced users. | namespace Microsoft.ApplicationInsights.Extensibility.Implementation
internal static class AsyncLocalHelpers
internal static void SaveOperationContext(OperationContextForAsyncLocal operationContext)
{
AsyncLocalContext.Value = operationContext;
} | 0 |
8d24875b1ca90ce78a86a867cc99aa17 | 6b8e7abab00eca1f611ffb48a1d9382e | Read follower relationship in an app | data = self._list_response(serializer_filter='is_follower')
if hasattr(data, 'status_code'):
return data
return Response(data) | 1 |
fe241600984dbd56c95a00f24e9d70d6 | 3e78dd69224c5dc32957233a94565458 | 通过腾讯证件库进行活体检测 | namespace TencentCloud.Iai.V20200303
public class IaiClient : AbstractClient{
public async Task<VerifyPersonResponse> VerifyPerson(VerifyPersonRequest req)
{
JsonResponseModel<VerifyPersonResponse> rsp = null;
try
{
var strResp = await this.InternalRequ... | 0 |
5797f4e5986ca24a800f61b0426e0c04 | 1b54af103786669ced6f9ac4b54d26b7 | 회의 저장 | public void insert(MeetingVO meeting); | 1 |
e9516343524992018921d90009b24392 | 2a9102f559c93dcf06ba93dc3c39021d | Test si les valeurs ne représentent pas un triangle. | public class TriangleTest
@Test public void getClassificationNotATriangleTest() {
Triangle t = new Triangle(0, 7, 7);
Assert.assertEquals("getClassification test",
"not a triangle", t.getClassification());
t = new Triangle(7, 0, 7);
Assert.assertEquals("getClassificat... | 1 |
79b434e9b590b1cd3cbcea5349050111 | cf437126bcd57b7985d20cea36007129 | convert keys to symbols | class Hash
def symbolize_keys
update_keys(&:to_sym)
end | 1 |
9a53fa00f8ed6a772179752acb9306ba | 1c2e8d4bb723dd60a04367eb547a8f5a | 给该任务包含的机器下发所包含的文件 | def download_files(file_list):
body = []
for file1 in file_list:
for file2 in all_files:
if file1 == file2.get("file_id"):
download_file_id = file2.get("file_id")
ppc = file2.get("ppc")
file_size = file2.get("file_size")
piece_s... | 1 |
86fbb53548437331177d7bea991f59bd | de294739cc10c700cc0e206b0f9f885a | Test retrieving a list of liked movies | interface UserService
@GET("/api/user/list/movie") fun getUserLikeList(@Query("customer_id") id : String) : Call<MovieList> | 1 |
f12dc2a50a201d05048c5854eee2dce5 | f9f18f7c9c9d0abc70bf16e2f2da3a1f | Splits the children nodes. This should only be used when initializing the model with multiple parameters. | class Spline2D_v2(CompoundModel):
def split_params(self, p):
if isinstance(p, Parameters):
return p.tolist()
return np.split(p, np.cumsum(self.dofs)) | 1 |
064615665ccbd0dcae806a844bb720c3 | 3f707630aa995d26b77330e0150a1144 | Reveals parts of the secret word that were guessed correctly. Non guessed parts will appear as underscores. | {
string uncovered = "";
for (int i = 0; i < wordToAnswer.Length; i++)
{
char letter = wordToAnswer[i];
if (wrongLetters.ToUpper().Contains(Char.ToUpper(letter)))
{
uncovered += letter + " ";
... | 1 |
69f6507cb5969cc34119148feed790ed | 2bd4e4640dda97bde15cf2027e3d838a | Taking out the NaN values from the catalogs | def fantom(file1):
file2 = []
for i in range(len(file1)):
file3 = []
for c in range(len(file1[i])):
if not np.isnan(file1[i][c]):
file3 += [file1[i][c]]
if file3 != []:
file2 += [file3]
file2 = np.float64(file2)
return file2 | 1 |
c4d19159f0bb48a843390361337ca34e | 0045c35bac1f97d3fd472d74affb640d | Sends user's move choice to the model for board state changes. | public class ConnectClient extends Application
implements ConnectConstants
private void sendMove() throws IOException {
toServer.writeInt(rowSelected);
toServer.writeInt(columnSelected);
} | 1 |
5d98c8a7abb354d7187d6dbb2abec530 | a5c1d803598abb27a4e8dee485e8d400 | 执行供应商售后列表导出任务 | {
$ietaskModle = new Ietask();
$orderModel = new Order();
$orderItemModel = new OrderItems();
$goodsModel = new goodsModel();
$header = $orderModel->csvHeader();
foreach ($header as $key => $val) {
$order['header'][$key] = $val['desc'];
}
$... | 0 |
acd874e7eca1f6d7fbf64d13d929fd49 | faf75ce54f6d52752789a9ddb4d9ff6b | 最新ブロックを取得 | return new Promise((resolve, reject) => {
level.getLatestBlockDB().then(resolve, reject);
});
} | 1 |
6797cd40d799056622e25eda941706e8 | 9fc469effbc8ac56841b4a6f35b452c3 | Reverts the seat change. | public class TableGrid : MonoBehaviour
public void ReleaseSeat(Vector2 location)
{
if(usedSeats.Contains(location))
{
usedSeats.Remove(location);
seatLocations.Add(location);
}
} | 1 |
ecea53b8b496e001a2629305bade86c5 | c615374d10da32ca32c20d0e707de55f | Sets the series down-sampling threshold value | thr = float(value)
if thr < 0 or thr > 100:
raise ValueError("Invalid value for v")
self.__t_dl_thr = thr | 1 |
866994243c196dbf57690881fecf4971 | f2a69c66d0e32274253ec01f945cc0df | This returns the shortest delta between the given angles (between -Pi and Pi). | function angleDelta(a0: number, a1: number): number {
return shortAngleDist(a0, a1)
} | 1 |
e977b98412f51cf5a9ef91138aad512a | d668dde1b40598fa93587dc5369cb188 | Constructs the consent url. | namespace CJ.IdentityServer.Web.Controllers
public class ConsentController : ControllerBase
[HttpGet]
public async Task<IActionResult> Index(string returnUrl)
{
var vm = await ConsentVMFactory.BuildConsentVMAsync(_securableService, _logger, returnUrl);
if (vm != null)
{
return View("... | 0 |
9839acc888596cd8bd8b503a7d55dfdd | 890006cc2938aaa7c36cdcf88380a166 | позиції, які покриває даний захист | bool PositionStruct::Protected ( const int sd, const int dst, const int ban ) const {
int k, p, r, c, t;
const int ST = SIDE_TAG ( sd );
for ( int i = KING_FROM; i <= KING_TO; i ++ ) {
if ( piece[i+ST] && piece[i+ST] != ban ) {
k = 0;
while ( KING_HIT[ piece[i+ST] ][k] != 0 ) {
if ( KING_HIT[ piece[i+ST]... | 1 |
6468d8f1cf0a1f4271a684b829cd4b21 | c9f67d7536cacd73a19d1bfb45c6f2eb | delay mute alert until action sheet has closed | function closeSheetandShowMuteOptions() {
$('.action-sheet').removeClass('in');
setTimeout(showMuteAlert, 300);
} | 1 |
9611eee121bb5bae177ae4ca119e1a1b | d0a0443e5fb761c4b3861f3f6325e6c0 | 立方体数据转换为数据点 | {
int xmax = 200;
int xmin = 0;
int xnum = 3;
int ymax = 200;
int ymin = 0;
int ynum = 3;
int zmax = 1000;
int zmin = 0;
int znum = 6;
List<point> point = new List<point>();
int x ... | 1 |
a852a9535bcea3ba08218bde617d4227 | a5d95cb46f4ee1033c2264f027e63040 | Очистка полей "пробег" и "цена" от лишних символов | class Shop extends Model
private function sanitize()
{
$this->title = filter_var(trim($this->title), FILTER_SANITIZE_STRING);
$this->address = filter_var(trim($this->address), FILTER_SANITIZE_STRING);
$this->city = filter_var(trim($this->city), FILTER_SANITIZE_STRING);
} | 0 |
6fab3252bd3512ac2d09bc3ddd642aaa | 282449c4769384a0f2477dff4d8fb5f5 | Merge the old record with the new one. | if old is not None:
pkey = old[self.PKEY]
self.mark_dirty(pkey)
if pkey in self.rows:
self.rows.pop(pkey)
if new is not None:
pkey = new[self.PKEY]
self.rows[pkey] = new
self.mark_dirty(pkey) | 0 |
da5ecdc0dbfd9c4c9932b882e59d05e6 | 6b67aa9a3a14102416cef2b1fa4bd65e | <p>flist を取得します。 | @jp.ecom_plat.saigaitask.action.RequestScopeController
@RequestMapping("/mob")
public class MlistAction extends ListAction
@org.springframework.web.bind.annotation.RequestMapping(value="/mlist/filelist/{value}/{id}")
@ResponseBody
public String filelist(Map<String,Object>model, @Valid @ModelAttribute ListForm listFor... | 1 |
adf13b984988c09b74a83496524642ca | 68c6a2fe58967ca4a50f7dea84529a7a | :result: Sets the vertical scrollbar to the middle of the selected area in the picture (keep it visible) | vbar = self.__scrollArea.verticalScrollBar()
vmin, vmax = vbar.minimum(), vbar.maximum()
if vmax <= vmin:
return
nPages = (vmax-vmin)/float(vbar.pageStep())
newH = self.__scrollArea.viewport().height() * nPages
lineSpacing = self.__scrollArea.fontMetrics().lineSpacing()
if self.__origEndOffset < lineSp... | 0 |
36e7e7dd4633923a64391552ee444959 | 4d8db742e3a200377a881eccfa21044b | 检查点(x,y)是否在棋盘上 | def isOnBoard(x, y):
return 0 <= x <= 59 and 0 <= y <= 14 | 1 |
d34007ff71e83d11eea3df877ce2e816 | 395b6ebcecebfb9ca5b2d8e15cdd9c2f | Get the Point coordinate for all the Queen on ChessBoard //layout[size][size] | queens = []
for i in range(len(matrix)):
for j in range(len(matrix)):
if(matrix[i][j] == 1):
queens.append([i,j])
return queens | 1 |
e5009b578e7f74533deb5ff7af074958 | d218284c3edac0689a3d02d3a07106c7 | generates phrase for cloudy weather | rn = random.randint(0,1)
if rn == 0:
return ""
else:
n = random.randint(0,(len(prep)-1))
phrase = " " + prep[n] + " " + NounPhrase(1)
return phrase | 0 |
76d4a9fbc8a134e20226f5382408a11b | d83b378024bfb0343c1a3a69afa26c57 | Searches each line in @filename for the substring specified in @substring. | def example_get_lines_matching_substring():
my_file = FileAsObj('/tmp/example_file.txt')
result = my_file.grep('#')
return result | 1 |
37e268d132b61cce592dbb428f9bf68a | 834fdbf944b290e1485bec0919611624 | Swap needed fields in font info record to put in 630 format on
3B2. | for l in self.nuked_value_store.get_list():
if l['tag'] == '650' and l['subfield'] == 'a':
self.nuke_field_by_contents(record, '650', 'a', l['value'])
return record | 0 |
52234f1235d3733cfc538ef42b82d7ed | b2ba15ca9bd56a15c3c8ee12a50f8c7e | 根据模版生成package.json文件 | return getParameters({
files: {
'package.json': {
content: JSON.stringify({
title: meta.title,
dependencies: {
...getDeps(code),
vue: 'next',
'ant-design-vue': packageInfo.version,
},
devDependencies: {
'@vue/cli... | 1 |
885769cf36302c3b6c1b7ca8efbd3065 | 7e64e927f7a86453513edaf395abd6ec | Функция колбэк | function callback(data) {
console.log(data);
} | 1 |
d1acb2d793b80a7aee9b6f2349b13823 | 0721126dfebf2f12bc1dac2687373ceb | DecodeJWT decodes a JWT and returns the payload as a map[string]interface{}. | tokenClaims, err := jwt.ParseWithClaims(token, &Claims{}, func(token *jwt.Token) (interface{}, error) {
return jwtSecret, nil
})
if tokenClaims != nil {
if claims, ok := tokenClaims.Claims.(*Claims); ok && tokenClaims.Valid {
return claims, nil
}
}
return nil, err
} | 0 |
517439e0a42b62074260740094b5826a | 4b69ee7522156d67c68573cc4bf63b26 | If a test fail, some jobs might not be deleted correctly, try to cleanup all created jobs here. | class ClientTest(unittest.TestCase):
def testDeleteAllJobs(self):
self.assertTrue(1==1) | 0 |
0123583e4b69b29cc19000d4bd532738 | 3bbecb37995a551d2dd7a06d6dd72d73 | Animation chains are great for consecutive animation blocks. Each chain can
take the same options that UIView##animate take. | @Generated
@Library("SceneKit")
@Runtime(ObjCRuntime.class)
@ObjCClassBinding
public class SCNAnimation extends NSObject implements apple.scenekit.protocol.SCNAnimation, NSCopying, NSSecureCoding
@Nullable
@Generated
@Selector("animationEvents")
public native NSArray<? extends SCNAnimationEvent> animationEv... | 0 |
553270f921a496888b059b60b1c8b77a | 8a7bae16d83d16c6b7add0dd1bf85b7d | Tests that creation of the document failed | class FactoryTest extends BaseTestCase
public function testCreateDocument()
{
$this->assertNotNull($this->factory->createDocument());
} | 0 |
fc085f272cca3958179db5b2c7f8322c | 3b217f56e32e0f5a3ded54d486da9715 | получить ключи статистики для активных подарков | class Osm_api
public function get_points_gift() {
$rst = $this->client->GetPointsGift($this->params);
$rst = $this->_xml_string_to_array($rst->GetPointsGiftResult->any);
return $rst;
} | 0 |
f9255dde43e0b519361be4c948ac1cb6 | c68560deec278ebf30bdf23b36766999 | Get User extended value after checking read permissions against current Editor | {
var user = await _userManager.GetCurrentUserAsync();
IEnumerable<string> roles = new List<string> { GlobalResources.Roles.ANONIMOUS_USER };
if (user.IsSuccess)
{
roles = _userManager.GetRolesFromClaims();
}
return await Ge... | 0 |
e225c26277eb47b8014b0ae42d9cd9fe | d9c22c98d5c2a744c3a41d0fe34f68c9 | 根据项目Id获取财务年度到帐记录 | namespace Application.Business.Erp.SupplyChain.CostManagement.CostItemMng.Service
IList GetCostAccountSubjectByInstance(string projectId); | 0 |
9df6fe9dc258a4b8b9890985d284c030 | e4df1f44c48a30b8dd879b7475ea64bd | 将协议的字节转化为本机的Int16类型 | namespace Moons.Common20.ProtocolImplements
public abstract class ByteProtocolImplementBase
protected virtual long ProtocolToHostInt64(IBinaryRead reader) {
return ProtocolToHost(reader.ReadInt64());
} | 0 |
1d3bf9d277ce67d96190b253acd7a449 | 6e1218209b847cec211f72d399cd98a5 | 게시판 글/댓글 삭제 | @Controller
public class BoardController
@ResponseBody
@GetMapping(value="/deletePost/{category}/{bid}")
public String deletePost(@PathVariable int bid, @PathVariable String category, Authentication authentication)
{ return service.deletePost_S(bid, category, authentication); } | 1 |
b42cd3d10b646ca388342d0044cb86ab | 1b6d786d395b90ba3664cb2161dd995b | Получить статистику пользователей по странам или городам | $counts = array();
$Grouper = new Grouper();
$Grouper->setResultType(Grouper::TYPE_COUNT);
foreach (array(User::SEX_MALE, User::SEX_FEMALE) as $sex) {
$pool = $sex == User::SEX_FEMALE ? 'female' : 'male';
$sexCityCounters = $Grouper->groupForSex($sex, ... | 1 |
47b6d7aff42bda732b17546705aae4c7 | d815a729d4e2dcaa58e7b70764a5b07b | Принимает html текст и парсит вакансии с hh.ru | class Scraper:
def superjob_parse(self, text):
domain = 'https://www.superjob.ru'
soup = bs(text, 'html.parser')
listV = soup.find_all(attrs={'class': "_2g1F-"})
for i in listV:
v = i.find(attrs={'class': re.compile("_2JivQ _1UJAN")})
if v:
vac = v... | 0 |
77d1e270815f744c6091c0fe38129b1b | 45f59896b078af605c3679106ead026f | Takes multidimensional arrays produced by simulation and flattens them for use in dataframes | class DeepSolve():
def unroll(self, dict):
dict_unrolled = np.array([])
keys = list(dict.keys())
for k in keys:
t = np.array(dict[k])
dict_unrolled = np.append(dict_unrolled,np.ravel(t))
dict_unrolled = dict_unrolled[:,None]
return dict_unr... | 1 |
e4e965f2643877349730434adc9415fd | 0d70e221d0d750a249a3dafdec52f29d | Return a fully-qualified billingAccountLocationBucketView resource name string. | final class ResourceNames
public static function forGeographicView(
$customerId,
$countryCriterionId,
$locationType
): string {
$pathTemplate = new PathTemplate(
'customers/{customer_id}/geographicViews/{country_criterion_id}~{location_type}'
);
return $pa... | 0 |
8bfae231afa1ea77ea60b4109a1e2549 | 50ae10e8f674711e4510b71652c27c8a | Returns true if the surface is ready to handle events and draw. | boolean hasSurface(); | 1 |
6b488cd1ef5b8de83f0d211e4073f7a2 | 3799ed976816f31c4a57d6e849ce3069 | Creates a new wrapper model that consists of multiple replicas of
the original model placed on different GPUs. | use_gufunc=True, parallel=True, fastmath=True):
super().__init__(model, alloc)
self.use_gufunc = use_gufunc
self.parallel = parallel
self.fastmath = fastmath | 0 |
606a1d5c43cd99f80441e4e39151fc61 | 222948586b6a001819a63f22b24d4061 | 创建session,保存到数据库 | func AddSession(sess *model.Session) error {
sqlStr := "insert into sessions(session_id,username,user_id) values(?,?,?)"
_, err := utils.DB.Exec(sqlStr, sess.SessionID, sess.UserName, sess.UserID)
if err != nil {
return err
}
return nil
} | 1 |
eef871518f7bae51e45ceb82f41a1792 | 4dc91008a5c75dd1f17d33538ee9c2a9 | ● UI-设置按键提示精灵 | class Spriteset_Map
def create_ui_view
@fillup =
[ Sprite.new(@viewport1),
Sprite.new(@viewport1),
Sprite.new(@viewport1),
Sprite.new(@viewport1),
Sprite.new(@viewport1)
]
@fillup.each_with_index{|i,j| i.opacity = Fuc::SP_OPA[j]}
@fillup[0].bitmap = Fuc.mouse_icon
@fillu... | 1 |
d156fad4455b68877d92eaac3717bd67 | 1eeb59064a14cafd34d4f8a7c9441966 | Executes a Blue Magic Ball attack. | public class MagicPanelControl : MonoBehaviour
void LaunchMagic(SkillDAO skill)
{
BattleSystem._instance.OnAttack(skill);
} | 0 |
d7792cc6ed7d0b636c453027f9735cb9 | 2dd56c8284686691942dc28e72a72a26 | Gets all characters in a circle area. | Characters result_of_Characters = new Characters(Dispatch.call(this, "Characters", start, length).toDispatch());
return result_of_Characters;
} | 0 |
b906636dc36874e5e48e8482509cd3b5 | d41737e8be0e83d9f58f5415f27b0403 | Realiza o teste para recuperar o proximo dia util. | public class DataUtil
public static Date obterDiaPosterior() {
return obterDiaPosterior(new Date());
} | 0 |
9a545046d89cff5574e3bcf05cbe8cae | 837e18cdd555bc6394b2f51fe6131d33 | @brief Set result code presentation mode | int ss_set_result_code(struct msg **msg, uint32_t val){
return set_uint_value((avp_or_msg **)msg, ss_result_code, val);
} | 0 |
3e95c21fc911541fae995258d93c581c | 9155d71122f03956b1d98d17f1fd40aa | moves an Image form one layer to another | if(typeof firstLayer == "string" && typeof secondLayer == "string"){
if(map.getLayer(firstLayer) && map.getLayer(secondLayer)){
var fir = dojo.byId(firstLayer+"_layer");
var sec = dojo.byId(secondLayer+"_layer");
dojo.place(fir,sec,"after");
}
}
} | 0 |
f5950c69831023f2a28df6d1b8fcbe2b | 56f1e9ca4ae97ab83267e2043f904b3d | Returns log2(x) rounded down to the nearest integer. | namespace MaxMath
unsafe public static partial class maxmath
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static short floorlog2(short x)
{
return (short)floorlog2((ushort)x);
} | 1 |
138f2df51b79acddd6c9d2431d75f75f | 24ff5499a754cf0bd4fb186790d9e4c7 | Getter for the list of error statuses of this class. This implementation returns an
empty list.
process. | public class ManagerProcessResult
public List<Exception> getErrors()
{
return listOfErrors;
} | 0 |
56752d29130c6268377bee7a4f5ed6bf | ad68da20d04c0d1c07e62f3b1bfe3d12 | Convert a date string of the format "%Y-%m-%dT%H:%M:%S.%f" to a datetime object | def parse_datapack_date(sDate):
return datetime.datetime.strptime(sDate, '%Y-%m-%dT%H:%M:%S.%f') | 1 |
a873e597a40b771f50c8dee0f7cb4549 | 52cf5560e9c7e23d3d90235955f33a5b | 清空已选择的通道 | {
try
{
return base.ClearSel();
}
catch (Exception ex)
{
Tracer.WriteError(String.Format("BladeId: {0} Method: {1} Exception: {2}", this.DeviceId, "ClearSel", ex.ToString()));
return false;
}
... | 1 |
79208849cdded46f848ce65c99116fcc | 3141ed5a6a6c1cbc8bbd97f7c220b744 | Get all of the classes in the \App namespace extending the
\Illuminate\Database\Eloquent\Model base class. | class EloquentModelsReflector extends ModelsReflector
protected function findModelClasses()
{
return $this->finder->eloquentModelClasses();
} | 1 |
4e933cc6fe8327d608664b80597df110 | 2ef460d3a1e486ef66a9240411b9a502 | function to calculate total linguistic complexity (total observed/ total possible) | class Analyzer(object):
def lexicalDiversity(self):
return (self.numberOfTokens()/self.vocabularySize()) | 0 |
77bb2a3313e61f1c4e7d4313f4728041 | 2dd4c0436f071b65f32195126f0fc2b7 | Close all of the browser windows except the original one. | def close_all_browsers():
drivers = browser.get_open_browsers()
for driver in drivers:
_close_remote_browser_session(driver, close_only=True)
driver.quit()
browser.clear_browser_cache()
BuiltIn().set_global_variable('${BROWSER_REUSE}', False)
CONFIG.set_value('Headless', False) | 0 |
b359c0073c65a2052c960987fe53b208 | 13dca995784311abc4a44be6c802f503 | 上传视频结束 | function ended(){
_that._obj.upload_info_summary(_that._obj._total_waiting_time + _that._obj._video.currentTime,_that._obj._video.currentTime);
_that._obj._total_waiting_time = 0;
_that._obj._waiting_num = 0;
clearInterval(_that._obj._online_timer);
_that._obj._is_first_error = 1;
_that._obj._mark_tim... | 1 |
a4d2adbbcf0ed5592179bba08542b38e | 8cd5704ba8897bd1a0c3d27fbd209dd0 | Get verbose name for a table column | $labels = $this->labels();
return (array_key_exists($column_name, $labels) ? $labels[$column_name] : $column_name);
} | 1 |
b3c2625d5c96ef6753bc457a90bd786e | 75ec76d4009ecdeef9cbc29c806711a6 | 【窗口】利用真实的输入法,对指定的窗口输入文字 | def Input(handle,msg,enter=False):
win32gui.SendMessage(handle,win32con.EM_SETSEL,0,-1)
win32gui.SendMessage(handle,win32con.EM_REPLACESEL,False,'')
for zi in msg:
win32gui.SendMessage(handle,win32con.WM_IME_CHAR,ord(zi),-1)
if enter==True:
time.sleep(0.01)
win32gui.PostMessage(h... | 1 |
5135b28ef8a3f43b622f2e40f1b5e99a | 3cc5bcb08faded74d1b0f89be4d279c0 | Returns all the members of the set value stored at key.
This has the same effect as running SINTER with one argument key. | public Set<String> sMembers(String key); | 1 |
eeff9f9fd2a2be2d7eab2b4d51c8d8d1 | 13d725d92725d2755f109ad81cafbc00 | Returns true if entered interests are valid, else false. | class Validator
function validOutdoor($outdoor)
{
$validOut = $this->_dataLayer->getOutInterests();
foreach ($outdoor as $out) {
if (!in_array($out, $validOut)) {
return false;
}
}
return true;
} | 1 |
6e83b39fc85e6f4d21060a772a230251 | d76511d63f176e1c7096d3f0da707d50 | Find first Fibonacci term to contain `digits` number of digits. | import math
cache = {0: 0, 1: 1, 2: 1}
cache_last_10 = {}
pandigital_set = set("123456789")
def fibonacci(n):
if n in cache:
return cache[n]
assert (
isinstance(n, int) and approx_thresh >= n > 2
), f"Invalid Fibonacci index {n}"
value = fibona... | 0 |
1ca94ddd3edcf9b4b4cd3fad4356c23b | 809bcfef37e23b80eb0cdbe825771d92 | Retrieve from centralized setting storage when running in the cloud.
Retrieve from App.config / Web.config when running on-premises. | {
var configurationRoot = _environment.GetEnvironmentVariable(_environmentVariableKey);
if (string.IsNullOrEmpty(configurationRoot))
{
return _factory.Build(_directoryFileSystem.GetCurrentDirectory());
}
return _factory.Build(configurat... | 0 |
015449198d4293dcd441b1db62f560bb | 490a17ca402b66f8418757165f328535 | works similar to the main loop in write_frame but only draws 4 boxes | offset = 20
height = 40
sdl2.sdlgfx.boxRGBA(self.renderer.renderer,
int(offset),
int(self.height - offset - height),
int((self.width - offset * 2) * sum(self.videoFaces) / len(self.videoFaces) + offset),
... | 0 |
24366d11d8d0474aa5cacccdd5917a70 | c156de5128dfe02be2adc44b100960bf | Use dictionary as a simple lookup for matching control types with configuration functions | class MessageMapper(object):
def _configureEventMap(self):
self.__eventMap['controller01'] = self._controllerEvent
self.__eventMap['controller02'] = self._controllerEvent
self.__eventMap['key'] = self._keyEvent
self.__eventMap['switch-07'] = self._blueButtonEvent
self.__eventMap[... | 1 |
59b5ba012aed4db85efc182fa872ae4f | 228eb0a3b13ec303973c4c3784321dff | 空文字列を返す | func TestCheckToString(t *testing.T) {
check := check{
column: "",
expected: "",
code: checkErrorNone,
}
result := check.string()
assert.Equal(t, "", result)
} | 1 |
6713ba279fb8756584a2c2929de86930 | 57e6b15d479e04c858d2475f5148fcfc | 从DBserver加载公告 | def get_all_notice():
if ServerNotice.is_need_refresh():
sql = "SELECT * FROM server_notice"
notice = mysql_connection.get_game_manager_mysql_connection().query(sql)
if notice:
ServerNotice.cur_server_notice = notice
else:
ServerNotice.cur_server_notice = ''
... | 1 |
9f9edfeddb5c732fff5a6cb2689f7bd1 | 243c9e57f00c3f06638046d16d847e75 | Test that if request is redirected to logistration MFE,
query params are passed to the redirect url. | response = self.client.get(
TaskDetailTest.first_task.get_absolute_url()
)
expected_url = f'{reverse("account_login")}'
expected_url += f'?next={TaskDetailTest.first_task.get_absolute_url()}'
self.assertRedirects(response, expected_url) | 1 |
66d89d95a354bf8dd18510784de7e40e | 5621d5762d19dbc265eee1c5acc0141b | 编辑用药信息 | namespace HIS_ZYDocManager.日常业务
public partial class FrmOrderManager : GWI.HIS.Windows.Controls.BaseForm, Action.IFrmOrderManagerView
private void btnjz_Click(object sender, EventArgs e)
{
this.chkEdit.Checked = false;
if (_DataGridViewEx == null || _DataGridViewEx.Rows.Count == 0 ||... | 1 |
1c3d78b056d3b9565270de0910d5456c | bc9ffd41ee60bcba2a6fd1093e2b90f5 | Remove the specified resource from storage.!! | class AdminController extends Controller
public function destroy($id)
{
dd($id);
} | 0 |
aa56383e718f97c17125154e9246c650 | c86142cbf7bd790d7f7c78fd07210676 | Is passed a hash containing (at least) a name and a parent number.
Adds the new element the list of the parent element's children.
Returns the newly-created-element number. | public function createElement(): int; | 0 |
5815b862423775d3b87e982d0e5b5089 | 9e1c94e8bbbe91fdfc920c2611b894f2 | 更新抵质押品记录表状态为已处理及会计分录流水号 | Map<String, Object> params = new HashMap<String, Object>();
params.put("accountNo", accountNo);
params.put("requestNo", requestNo);
super.getSessionTemplate().update(getStatement("updateCompleteSettTo100_t0"), params);
} | 1 |
8271edcd2785d7af55f0f8ff6f8c0fbb | 30383fb361b8e4f95ffed4966d0e83e7 | Event handler for the USB_UIDChange event. When fired, the event is logged to the USART. | EventHandler(void *pvCBData, uint32_t ui32Event, uint32_t ui32MsgData,
void *pvMsgData)
{
switch(ui32Event)
{
case USB_EVENT_CONNECTED:
{
HWREGBITW(&g_ui32USBFlags, FLAG_CONNECTED) = 1;
if(g_ui8PrevUSBDisplay != DISPLAY_USB_CONNECTED)
{
... | 0 |
d171a04fc9079df73ac244ce64e58c76 | 9ff0cdc41edcab2bd043f3292f206e22 | 是否为镇级部门 | when (this.type) {
Town -> return true
Street -> {
if (this.name.isBlank()) return false
return this.name.length <= 4 && (this.name.last() == '镇' || this.name[this.name.lastIndex] == '乡')
}
else -> return false
}
} | 1 |
86cc59e83b8eca6025f23edcb64d2e57 | ce76a6df12190aec726ee546d2117540 | 填充下拉框:票券类型 | public class ReaderBookRecommend extends JFrame
private void fillBookType(){
Connection con = null;
BookType bookType = null;
try {
con = getConnection();
ResultSet rs = BookTypeDao.bookTypeList(con,new BookType());
bookType = new ... | 0 |
1ea8f9e894989bd0710de457fa7274d6 | 26fbcafea3e843456f4ee64c7e8874da | Clear history of connecting clients used by entry and bridge stats. | namespace DotRas.Internal
int ClearLinkStatistics(RasHandle handle, int subEntryId); | 1 |
284e1d4b80eaae077b6cac4e56829b53 | ffe71cc4de391751021767c780e98c5a | Print out the given block using the following seperator for decoration | static void printseparator(char *p)
{
printdashline(1);
printf("%s",p);
printdashline(1);
return;
} | 1 |
a0d2597a1dbfb486ffd9531ab0e31980 | 552ada4e1d4ad8eaa51113ffad6bec6e | Converts a packed ensemble forecast to a netCDF4 file. | class Flight_segment(recarray):
def to_ncdf(self, collocate=True, file_flight='test.nc', **kwargs):
from netCDF4 import Dataset
from numpy import array, vstack
dbg(file_flight)
with Dataset(file_flight, 'w') as cdf:
wave = self.shis.radiances[0].wavenumber
nfov = self.shis.size
nwvn = wave.size
nla... | 1 |
4a3e2aa7819b633b8f6b49f222935287 | 934ad340bd32cfeacfa587533fde23d1 | Gets the default template used to notify the booking manager | public class GPSTool implements PropertyChangeListener, ProgressListener
public static String getDefaultTEmplate()
{
return(DEFAULT_TEMPLATE);
} | 1 |
357ba5ddb7c176778fdbd6a691e59374 | 6add25bc632a2606dc7e41c2284fc4b1 | Stops all applications. | namespace net.vieapps.Services
Task StopAsync(string[] args = null, Action<IService> next = null); | 0 |
bafdbaaf98df0d51223c0a056bd27bc6 | 934aeb25af248e31d2e98e184f18a52d | 생산이력관리 상세 화면을 구성한다. | namespace Micube.SmartMES.QualityAnalysis
public partial class ReliaVerifiResultRegularAbnormalOccurrencePopup : SmartPopupBaseForm, ISmartCustomPopup
private void InitializeGrdMeasureHistory()
{
grdManufacturingHistory.GridButtonItem = GridButtonItem.Expand | GridButtonItem.Restore;
... | 1 |
14eb3d235d3f97223031f9bced69b245 | 5a26eb687dd1c1c587fc912e98cc10f7 | 自动生成协议module的ts文件中的function内容 | let code='//TODO 待完成的方法\n//'+item.description+'\n//'+item.tag+'\n';
let addArr=item.address.split('/');
let parametersCodeUrl =`+'/'+${item.parameters[0].name}`
let itemName= changeName(addArr.filter(i=>i).toString().replace(/,/g,'_').replace('{','').replace('}',''))
code+=item.method+itemName+`(${i... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.