query_id
string
corpus_id
string
query
string
code
string
label
int64
deb39eaf3d55ac650132e4b26b6c2963
1377371181af8467857703f41a9eb42a
The asynchronous version of the {@link #getAll()} method.
CompletionStage<Map<String, Object>> getAllAsync(String... key );
1
e74cd5749a84dd01908a9e6a1a3473d6
10caa827baa46be9ffbf50eb4161135c
Вычислить высоту строки для длинного текста Excel
namespace WritersToolbox.views public partial class addNote : PhoneApplicationPage private double heightCalculator(String str, FontFamily font, double size, FontStyle fontstyle, FontWeight fontweight, TextBox t) { TextBlock l = new TextBlock(); try { ...
0
7a98b9f4a5c4b6d6b1078f537a0a13c8
0675d084c4922d219b94e53c9ef83835
Overwrites start in parent class so it doesn't run in two threads Creates a selector to block if the socket hasn't received any data since we set the socket to nonblocking. If it receives data, it then calls the udpReceiver function to get the newest packet. Then it calls the unpackageData function to unpackage and sen...
{ stopReceive = false; socketInfo = new SocketInfo (); Socket socket =new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp); ipEndPoint = new IPEndPoint (IPAddress.Any, 1511); socket.Bind (ipEndPoint); while (true) { socketInfo.nBytesReceived = socket.Receive (socketInfo.inB...
0
7f05bf9aedfbba9cc44ab4a01ddaf8c0
cdd4206d55a70c51fb9fe1ce46535265
Close channel asynchronously
namespace DotNetty.Transport.Channels Task CloseAsync();
1
1cbd0799bb325dd746c4c1f6b2082f8c
2648dfe2f51b4d43df5c84f5b9521c21
返回该函数是否要解析参数.
class ParsedParameterInfo implements ParameterInfoInterface public function isCallable() { return $this->param->isCallable(); }
0
c2cebabda9154db09c7d1e9f498b7982
656dc1ff0e18737c9a5a588a4c26b726
========================================================= Makes a contour/vector plot of the solution =========================================================
def plot_sol(): u,z = stfem(ue, f, k, ind_omega, 128) vtkfile = File('conv_128_u.pvd') vtkfile << u
0
381612471fc7021075d75108fdd674e9
206948777b7b05a536c700edc12248b8
Waits for Angular on page to load.
namespace SpecBind [Binding] public class WaitingSteps : PageStepBase [Given(GivenWaitForAngularRegex)] [When(WaitForAngularRegex)] [Then(WaitForAngularRegex)] public void WaitForAngular() { WebDriverSupport.WaitForAngular(); }
1
612e6687098197e9a2a895fb70ba453c
247bc4b6fd57e257a623e49e6eaa9a77
Get url for a particular station
station = get_object_or_404(Station, id=station_id) serialized_station = serializers.serialize('json', [station]) return HttpResponse(json.dumps(json.loads(serialized_station)[0]))
0
3e7fd4dec7fed81894fe4af4345b6019
fc8585a1b7e255949f38b48a0bf764cc
función que introduce el tipo de configuración a la que pertenecerá el ordenador creado
intTipo=0; if(des == 1): intTipo+=16 if(alm==1): intTipo+=8 if(com==1): intTipo+=4 if(mer==1): intTipo+=2 if(cen==1): intTipo+=1 return intTipo;
1
d0469eddd62899b70344cf6d882743bf
cfa60df94572f826e0cbc97106948bd2
To signal whether underlying user store supports SCIM attributes.
boolean supportsAttributes();
1
048c4ffa24cfc1570b797ce279674a1c
c6ae6832762f87326cf42f528c009a14
ローカルファイルの存在を確認 arg なし ret TF
class ModuleFs extends Module public function IsExistsFileLocal($sFile) { return file_exists($sFile); }
1
cbc08db09a53dd8d78f0e9c2438449f8
cb7af4bfdf7a02505c63926d49afcca9
The amount of entries on one page
public class PhotoEntriesHolder public int getPerPage() { return mPerPage; }
1
8a0edbf54607b99e612bd670e187b22a
7ea72c7143b8eb9308de4fce61b2abcc
处理添加项目get请求的业务逻辑
@Controller @RequestMapping("/admin/project") @Slf4j public class ProjectController @PostMapping("/add") public String addProject(Project project){ projectManageService.addOneProject(project); return "redirect:list"; }
0
62c44fdbf21c00626e627e93c82c339f
eb66e44ff27eb9467f3d9ab0aa0acc82
Retrieve all FirstClassFields that are not currently annotated
{ $reader = new IndexedReader($this->getAnnotationReader()); $refClass = new \ReflectionClass($this->className); $class = __NAMESPACE__. '\Annotations\BlacklistField'; $filtered = array_filter( $refClass->getProperties(), function ($property) use ($class, $rea...
0
3d252f2a48d77ce4fbd5d4cd6c9084b1
5c81f4611fb551c053b91f0fc3386a32
Returns the factory class name which will be used to instantiate the queue store. The class should implement the {@link QueueStoreFactory} interface.
Collection<String> getQueueStoreNames();
0
2efac3bb9561e0898baafe12d699670e
02eaf8201ffc6e2e6fbff2139003f302
現在アクティブなTweenが存在するか確認する。
function areActiveTweens(): boolean { return ACTIVE_SPRITES !== undefined && ACTIVE_TWEENS !== undefined && ACTIVE_TWEEN_ON_COMPLETE !== undefined }
1
e0970a1f60f2af828272e2eaab663286
27ac2a128a8c79db0bb3cf397f724ba5
Exits to main menu.
public class ClearStatisticsScene implements Initializable{ public void mainMenuPressed() throws IOException{ Stage stage = (Stage) yesLabel.getScene().getWindow(); stage.close(); }
1
a5b48010748ae4034613d20283ed32a7
c93709ba80ab0737cfdea0c83a3d6251
Filter words from documents.
def filter_out_stopwords(document_lst, lst): new_list = [] for el in document_lst: new = [word for word in el.lower().split() if word not in lst] new_list.append(new) return new_list
1
e09feea2eb6c6096c878af453e8a0471
06f8de6dd85e925c35466297f16de497
Regression test of calwebb_spec2 pipeline performed on a single MIRI LRS fixed-slit exposure with multiple integrations. Compare _calints.
files_to_download = ['la7u04w0q_rawtag.fits', 'la7u04w0q_spt.fits'] self.get_input_files(files_to_download) input_file = 'la7u04w0q_rawtag.fits' calcos.calcos(input_file) outroots = ['la7u04w0q'] outputs = [] for outroot in outroots: ...
0
d911e2f0f9ee9a9b4b7dfe75695c2709
f00e25a790e036d8dbcb2b55c1580647
convert Option value to float
match self { XItem::XINode{value} => { return Ok(atof(&value.string_value())); }, XItem::XIString{ref value} => { return Ok(atof(value.as_str())); }, XItem::XIInteger{ref value} => { return Ok(i64_to_f64(...
0
714e629676c700c0076abe958b4d41de
6fdd2e618d982bf43c885cd819d59f0c
用于客户端根据邮箱获取对应的jid帐号
@RequestMapping("/getAccountByEmail") @ResponseBody public String getAccountByEmail(String email) throws Exception{ String account = employeeService.getAccountByEmail(email); return account; }
1
0c29fba6af1972da6d15d929a5b75df6
bbf3592c847dad6e39889d376499858e
获取数组中的第一个元素 Time Complexity O(1) Space Complexity O(1)
K[] a = array; return a.length == 0 ? null : a[0]; }
1
3c9d00bd4d9483ae510a0af86d5a10ca
8131f1e2f271056537502482992c12b9
Temperature formatter.
class NuWeather(callbacks.Plugin): def _format_temp(self, f, c=None): if f is None: return _('N/A') f = float(f) if f < 10: color = 'light blue' elif f < 32: color = 'teal' elif f < 50: color = 'blue' elif f < 60: ...
1
b878d8318f685f415bce862f563f2f48
e7a52e77dde8b4880c67e458615c8518
# n_top_teams_in_break measures how many of the top teams make the break, where the top teams are those (size-of_break/2) teams with the largest pre-defined strengths
res <- db[round == 'F' & tourney_level == category] res <- res[, c("winner_name")] dbm <- db[tourney_level == category] wins <- match_df(dbm, res) dbm <- wins dbm <- dbm[!dbm$score == "W/O" & !dbm$score == "DEF" & !dbm$score == "(ABN)"] res <- dbm[, .N, by = winner_name] setorder(res, N, n...
0
f3facddca7ac767301c6785f42664a1c
fa7313a6877fcb2ab7fd18dbfdf536e8
Retrieves information regarding each task in the Mission from the GitHub repository.
class TasksCommand(BaseTasksCommand, GitHubCommand): def _get_tasks(self): return self.github.get_tasks(self.issue)
1
7d2aeb4311a9ea44ca4c4b44916b2e2b
399242c7b798e6462f00ecae0fa89ad4
FX55 - LD [I], VX. Store registers V0 through VX in memory starting at location I.
void Chip8VM::i_ld_b_vx() { Byte vx = memory[reg.pc] & 0x0f; auto address = reg.i; unsigned b = reg.v[vx]; memory[address] = (b / 100) % 10; memory[address + 1] = (b / 10) % 10; memory[address + 2] = b % 10; reg.pc += 2; }
0
b7295db59c6267cf346809316c1c04bd
58bff2fe5f81458f9557d0b4c49b5d2d
GET /users_artist_ratings GET /users_artist_ratings.json
class RatingsController def user_camp @rating = Rating.where(email: current_user.email) json_response(@rating) end
0
d3f933194d7da16fbf98394f885d1fbc
37c96bc23d073abd2d6a2723bb3cd9fb
Set bundle name
public class EclipseLogAppender extends AppenderBase<ILoggingEvent> public void setBundleName(String bundleName) { _bundleName = bundleName; }
1
030fc6d88b79def728917ee1c069b642
227c4f612ad965ed308f55df111d676a
The final component's last suffix, if any. This includes the leading period. For example: ``'.txt'``.
class DatasetIO(ExtensionComponent, metaclass=ABCMeta): def ext(self) -> str: return self.get_metadata_attr('ext', '')
1
1b91b354b05093d88d62649e4cfa7eed
55371250ecb95ef152a9181bedf0c2d1
To be a SNP all alleles must be exactly one base long
class AltAlleleExpression(Expression): def is_snp(self): return self._method("isSNP", TBoolean())
0
358027ecab00f212ddb3673f47fab243
0f909eda7ea29aafe553f62c0aa21688
Save User to Mailchimp
this.isSubmitting = true this.$axios .post(`${process.env.portal_api}/mailchimp_subscribe`, { email_address: email, first_name: firstName, last_name: lastName }) .then(response => { const { title } = response.data if (response.data.st...
1
db3782ebfacb30e7ab30d77d4d8e1a53
250ff86f61e4514a36e32badeabd1f4a
Clean text field by replacing smart quotes and removing extra spaces
def fix_text(txt): return " ".join(txt.replace('"', "'").split())
1
15c4bba0203bc4cb7c27b0995b63ce72
3178307c05138b1a89d8e5e028449176
Generate coupon list for all users
{ List<CouponEntity> coupon = couponRepository.findAllByUser(UsersEntity.getUser(userId)); List<ListOutput> outputs = new ListOutput().fromEntityList(coupon); return output(outputs); }
0
31d9c4893ac96defc2a4cd9c93d4c317
8e7b83f849d3a5ddb8adcaf1bd58b77a
Module for question CNN embedding
def model_CNN(words_nb=32,embed_dim=32,num_classes=53,gamma_reg=0.05,layers=[32,32]): inputs = Input(shape=(embed_dim, words_nb, 1)) reshape = Reshape((embed_dim,words_nb,1))(inputs) conv_0 = Conv2D(64, kernel_size=(embed_dim, 2), padding='same', kernel_initializer='normal', activation='relu')(reshape) ...
1
8ca5e6cde6e99d24fe6a0ee44380ba2f
bab17143f516f1bf902db1bd7ae7aa3a
BEATPORT - create JSON object and return tracks array for beatport search functions returns array of objects
class LastFM function getTracksDataObjects() { if (!$this->tracksData){ $this->queryRecentlyPlayedTracks(); } return $this->tracksData; }
0
ab33fad583530ad6f3b463853549a70d
7c880cb9387018a6552971fdaf8f2a29
Takes in a DNS packet and sets its TC field
public class IpDatagram public void setTos(int tos){ this.tos = tos; }
0
1f398d1ceb2e7c17627e8cec5f5acd5a
00478c50cb6d351fdca85a0d204d339f
ckeditor初始化
{ $html = ''; if($this->ckeditorJs === 0){ $html .= '<script src="__STATIC__/default/ckeditor/ckeditor.js"></script>'; } $html .= "<textarea name='{$name}' id='{$name}' class='form-control'>{$value}</textarea> <script> CKEDITOR.repl...
1
f23356a1da7d8bc21cab2d74cd676e41
6f25781ddd1e9e349c7f619541c93b2e
RTFのブラケットひとつをまるっと交換する(入れ子は対応しない)
int startidx = rtfText.indexOf(startblacket); int endidx = rtfText.indexOf("}", startidx); String pre = rtfText.substring(0, startidx); String post = rtfText.substring(endidx + 1, rtfText.length()); StdLog.debug(pre + replace + post); rtfText = pre + replace + post; }
1
2e8a135ad78df9e651f2add4a15bbf34
d4b99a212f24ea680fe3b2a98bdc1957
\brief Get wakeup flag of VBAT \retval TRUE wakeup flag set \retval FALSE wakeup flag clear
{ DDL_ASSERT(IS_PWC_UNLOCKED()); return ((0UL != READ_REG32(bCM_PWC->PWRC4_b.VBATMON)) ? SET : RESET); }
1
259c17dcb2b535c4b4dd548b81ca6e94
c69572b8476130353a786dc5403e19e3
判断该用户是否在该房间禁言
function is_speakOk( $uid, $luid, $db ) { if ( empty( $uid ) || empty( $luid ) ) { return false; } $res = $db->field( 'ctime' )->where( "uid = $uid and luid=$luid" )->select( 'silencedlist' ); if ( isset( $res[0]['ctime'] ) ) { return strtotime( $res[0]['ctime'] ) + ROOM_SILENCE_TIMEOUT; } else { return ...
1
2f7287348019ba8f406c382720d5100f
45d63c069c41c44277e45861e904aa93
通过id删除文件更新中的文件
void removeFile(@Param(value ="id")Integer id);
1
a4947de52332b028c12f500f29861435
d9e877b61da66e745aa917c90b9946b7
Get phoneConfirmationCodeTime
class SmsModel extends BaseModel public static function getSendCodeTime() { $sendTime = Session::get("SEND_CODE_TIME"); return $sendTime; }
0
4a3165c9e4f26ae666cf996c9e2995ac
0751fe47e296b87d54ac7d3b7e1edc0b
Gets a straight line distance between intersection node and goal node using Euclidean Distance formula
class DUActionServer: def euclidean_distance(self, goal_x, goal_y): return sqrt(pow((goal_x - self.curr_pose_trans_x), 2) + pow((goal_y - self.curr_pose_trans_y), 2))
1
30b987cefb502285902e90d99c581f98
935d5a1ffd715b6e0cc57f9abeb36cb7
아이템을 인벤토리에 추가함
public class Shelf : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler public void AddItem(int number, int count) { GameManager.instance.shelves[shelfNum,number] += count; if(set.Add(number)) { for (int i = 0; i < slotList.Count; i++) { if (slot...
0
a6a6c4553eed21eab08d6521473921e4
db1848506fe43b54c1ccbdfd62483216
由后序和中序序列建一棵树
BiTree *PostCreat(char post[], char in[], int post_target, int in_start, int len) { BiTree *root; int pos = in_start; if (len <= 0) { return NULL; } while (in[pos] != '\0' && in[pos] != post[post_target]) { pos++; } if (in[pos] == '\0') { printf("输入的序列有误!\n"); ...
1
9d1cf5463cdd4e1d1d08f0ab1cf37a3c
973499eed39fce12e1b7e3fd726281af
设定新函数名,并返回新函数
function_setName(f, name); int i; for(i=0; i<env->nbfunction; ++i) { if(function_is(env->functions[i], name)) { env->functions[i] = f; return; } } if(env->nbfunction >= env->functionAlloc) { env -> functionAlloc += FUNCTION_ALLOC_SIZE; env -> functions = realloc(env->functions, sizeof(*(...
0
4c800043acb3436b200d5c0b04eb1370
f59af757ee48fea0a8655f4a2115d1a9
Returns individual CSS file inclusion directive(s) using the markup <link>
function include_css($url) { return '<link href="'.$url.'" rel="stylesheet" type="text/css" />'; }
1
7011f4711ea14bc28ce616c65b9715b9
a3d26dde0a4bc74288ee6dc2d7233003
Test check for null model.
public class ControllerTests @Test(expected = IllegalArgumentException.class) public void testNullModel() { new TextControllerImpl(svgView, null); }
1
41667563df7b1f5c8efc5a119df01297
e82bd0e000b44c74b2733e86c172f12c
Sets this matrix as a non-interacting object (evaluate A to zero).
{ m[0][0] = m[1][1] = m[2][2] = m[3][3] = 1.f; m[0][1] = m[0][2] = m[0][3] = m[1][0] = m[1][2] = m[1][3] = m[2][0] = m[2][1] = m[2][3] = m[3][0] = m[3][1] = m[3][2] = 0.f; }
0
236781188e25055aa0839c63a87efd41
7129ba853a33ef599967eff4cd8d0b0d
Compares the order of the interceptor with the given one it's above, 0 if it's equal
public function compareTo (Object $object) : int;
1
9918619b793d7bd591f77ec22410960e
e9fd5e5b27d0d66c8b0d9b9c805bfea6
Filter items from aggregable.
class Base def from_significant_terms(aggregation, excluded_ids, klass) items = [] aggregation.buckets.each do |bucket| next if excluded_ids.include?(bucket[:key]) item = klass.find_by(id: bucket[:key]) next if item.nil? items << item end items ...
1
99b95685c27e674493b4208b9ee6e3c9
aee91fc68253b6a2b2d8c7a9e095fd5a
取得 承攬商_成員_擁有的工程身分
public class ContractWorkerPartyInfo implements java.io.Serializable{ public java.lang.String getCjdpsszdw() { return this.cjdpsszdw; }
0
c63e97b2c61335606e98172b6002c0d3
8e578834e89d43a38a67a7a21eff95e7
获取创建部门
class NewLoanOrder extends Component createDepartmentPicker() { const dismissKeyboard = require('dismissKeyboard'); dismissKeyboard(); if (Util.checkIsEmptyString(this.props.state.organizationList) || this.props.state.organizationList.length == 0) { Util.showToast(Message...
1
6440a41e8e29564ea4a71b4334fcf491
20bd107b45d9e5122153e3314c95c832
Adds a new value to the specified enumeration class.
namespace Tesla.Content void WriteEnum<T>(String name, T enumeration) where T : struct;
0
0d3b6cf064ca65ecae0b8937a3e18a9e
365b22f823a5ec518c40fbb819067a51
Can't do much except printing the error.
func debugPrintError(err error) { }
1
150bd33dcee9a6856804ee893ec8bc79
083da38270dc56be51b19814c419c4cb
设置讲授课程
public void insertTeachingToClass(String planname, String start,String end,String remarks,String cid){ Subject subject = SecurityUtils.getSubject(); User user = (User) subject.getSession().getAttribute("user"); Teaching teaching = new Teaching(); String id = UUID.randomUUID().toStrin...
1
ed34a435beac1330eb0d57a33f4657e1
48cf7de907a89d76ff7ada5a6387ef4b
判断Nfc功能是否打开,如果没有打开,则开启该功能
public class GeocacheManager public static boolean isNfcEnable(Context context) { NfcAdapter nfcAdapter = NfcAdapter.getDefaultAdapter(context); if (nfcAdapter == null ||!nfcAdapter.isEnabled()) return false; else return true; }
0
0cf9db6af67958259c7e115f5635e113
094847cb1a5f074d1bcf0a3519a7087a
GET api/crypto/decrypt
public static async Task<HttpResponseMessage> Run([HttpTrigger(AuthorizationLevel.Function, "post", Route = null)]HttpRequestMessage req, TraceWriter log) { log.Info("C# HTTP trigger DecipherText"); string requestStr = await req.Content.ReadAsStringAsync(); RequestDat...
0
c9e9368b7eb5287dd0553ef024999272
9eb1149f046114030d0b284aac01a3db
Method that takes the arguments from the queue to give them to the function to be executed by the threads.
def working(): while True: arguments = q.get() do_something_using(arguments) sleep(1) q.task_done()
1
727b6630b053b092d65fa065fd49721f
bbadf75b1ca4e3729a0616e847adb4f0
Returns a value from an @swingCoroutine function. Since they are generators, a normal ``return`` statement can't be used on Jython 2.x.
while True: try: future = gen.convert_yielded(result) except gen.BadYieldError: break else: result = yield future raise gen.Return(result)
1
09ef2b1f42fc525823bff1b1ef9fc242
b2ff6a7ef796a8bd753f10be697b726d
Extends the default thresholds with the ones provided by the user.
class Model: def set_thresholds(self, thresholds): self.thresholds = thresholds
0
cc913d830958cf42f1d9aee15d7fb757
883d2cdb94a1b6254b6949734a5e285c
The code that is executed when the command is triggered.
@Command() void run(ConsoleHandle console, CommandContent content);
1
fb70bd2cb05abc16c97578179bb8fdb5
da4d0c714e2e0b4383e83a8584df146b
update the select form with the given form info
select_form.innerHTML = ''; data.forEach(function (item) { var option = document.createElement('option'); option.innerHTML = item.title; option.value = item.id; select_form.appendChild(option); }) }
1
301459613f0eb099fcad186bc142a257
e4b07fabdfe0c29362313b003b69da43
Setter for trip miles.
class Odometer void tripMiles (float milesDriven){ this->milesDriven = milesDriven; }
1
bafaac88f97ff67b507a73aa1e618009
52e5262c909f7b134f76dcc3df382ad0
获取粒子范围的边界
export class ParticleSystem extends egret.DisplayObject public set emitterBounds(rect:egret.Rectangle) { this._emitterBounds = rect; this.updateRelativeBounds(rect); }
0
fd8aeaffb7af50d8fcfe2e49bf6605d7
41c6252c36ddc10e71238c458423c86f
Same logic as exportLibrary
class AppView exportCurrentLibrary() { console.warn('unimplemented: AppView.exportCurrentLibrary()'); }
0
a69bb98186712de29f68b56aff26ca69
f1f968bcb6413b965d23a0f996e023e6
Parse the AFM file in file object *fh*.
def _load_amiga(f, tags): _read_header(f) amiga_props, glyphs = _read_font_hunk(f) if tags: tagstr = ' '.join(f'{tags.ti_Tag:04x}:{tags.ti_Data:04x}') amiga_props.amiga = f'tags {tagstr}' logging.info('Amiga properties:') for name, value in vars(amiga_props).items(): logging....
0
6caeb86afac750590f4b09ab2d96e54d
773141317288b16e1573528aa777500e
Displays a form to create a new Soldier entity.
class ArmyController extends Controller public function createAction(Request $request) { $em = $this->getDoctrine()->getManager(); $army = new Army(); $army->setUser($this->getUser()); $form = $this->createForm(ArmyType::class, $army); $form->handleRequest($request); ...
0
e0e3c5162a82777eb35335f0100e55e4
a09f0ff315c80880d6b82e3cea4a7b7d
Exec an operation on the component.
public Object operation(ModuleConfModel moduleConf, String genTypeId, Object obj) { return this.component.operation(moduleConf,genTypeId,obj); }
1
fd0f0cc362a3a96e2ab59d8f7ab5b0db
dc97134a64b1fea3469fabe94db572d2
Reset the state of the in memory combiner. This method is called after every time the in memory combiner is run.
super.reset(); results = null; map = null; mapStack.clear(); if (buffer != null) { synchronized (bufferCache) { buffer.setLength(0); bufferCache.push(buffer); buffer = null; } } }
1
798855f016d505d9de13fd48e3bc759a
877ad08b771724c3176b9cdd0783dfce
Mark a Zoho Inventory item as inactive
namespace InventoryApi.Controllers [Produces("application/json")] [Route("api/inventory")] public class InventoryController : Controller [HttpDelete] [Route("deactivate/{id}")] public async Task<IActionResult> Deactivate([FromRoute] Guid id, [FromBody]VersionedRequest request, CancellationTo...
1
b917cd03d87af7968cee8b96cd7b066b
57c5b85935f05ae175aead037dfd1a58
Pause accept new connections.
serverAssert(GlobalLocksAcquired()); listNode *ln; listIter li; client *c; g_pserver->client_pause_type = CLIENT_PAUSE_OFF; g_pserver->client_pause_end_time = 0; listRewind(g_pserver->paused_clients,&li); while ((ln = listNext(&li)) != NULL) { c = (client*)listNodeValue(ln); ...
0
980c7ce0d7db39debe9eae3b71c14f9d
3bea0782cdd5d80910a00ffd889da4e4
Make all views in this activity unclickable.
imageViewLetterA.setClickable(false); imageViewLetterB.setClickable(false); imageViewLetterC.setClickable(false); imageViewLetterD.setClickable(false); textViewAnswerA.setClickable(false); textViewAnswerB.setClickable(false); textViewAnswerC.setClickable(false); ...
1
826132566bac9907f69706f2d576e6b3
6958dcb3286b9942f6ac4aaaef7bf832
Генерация строки аргументов MSTest.exe.
{ CommandLineBuilder builder = new CommandLineBuilder(); builder.AppendSwitchIfNotNull("/project:", _projectName); if (_showOutputInConsole) { builder.AppendSwitch("/console"); } builder.AppendSwitch("/update"); ...
1
f153a58e07d8c64141bfc790a5f2f173
84ce7faf1bc66858110785cac78576b5
Set parameter according to the Cox, Ross and Rubinstein (1979) model
self.CRRA = CRRA self.DiscFac = DiscFac self.DivProcess = DivProcess self.uP = lambda c: CRRAutilityP(c, self.CRRA)
0
cea28268c1b7b3b7ac5fb613a6888304
7ea6bba6a29c82e37f2a8d4a8e5db2d0
函数的功能:定时器封装动画 函数的形参:element移动元素,target移动的目标位置,step移动的步长 函数返回值:无
clearInterval(element.timer); element.timer = setInterval(function(){ for(var attr in obj){ var target = obj[attr]; var current = parseInt(getStyle(element,attr)); var step = (target - current) / 10; step = step >=0 ? Math.ceil(step) : Math.floor(step); ...
0
371d13210dd454a2d0b9ee2daee18ff6
e2e6789fc300aa42bf70312675777904
Newer compiere dbs don't use triggers. So just create drop statements.
{ DB::Statement("DROP TRIGGER IF EXISTS update_item_stock_on_insert ON stock_transactions;"); DB::Statement("DROP TRIGGER IF EXISTS update_item_stock_on_update ON stock_transactions;"); }
1
d18d9c21ba907f48a89edc246c979518
554dd2e65d5d4c6643ebdd2c26d6868b
Updates the output text with the json output of the simulation.
function updateText(){ "use strict"; document.getElementById("userPosition").value = JSON.stringify(drawnItems.toGeoJSON()); }
1
ab878972701247014e830ef37d5afee7
49216d73bca8a5aea1f73741cf2ce502
The bread and butter of the champion info functions, takes a champion's name and returns
def get_champion_id(champion_name): return champion_data['data'][champion_name]['key']
1
586e819bbfe80590bfceef1df4a77d1f
32ba3223c4202b573f7d9591f1e86d43
根据7个维度打分
class GetScore7: def __init__(self, X, model, n,X_train,y_train): self.X = X self.model = model self.result = 0 self.n = n self.k = 5 self.score = np.zeros(shape=[n, n]) self.X_train = X_train self.y_train = y_train self.existSort=[] self.i...
0
4f071f03a4393a169b93fbae36bef287
c1a9540f46c117c90d7b808bf020381f
取得訂單來源清單
public List<String> searchOrderSourceList() { List<String> sourceList = orderDao.searchOrderSourceList(); return sourceList; }
1
ea3198fc488a71f6889c798dd3fd5704
af0cb946c85bf388ad153d284afc8dfc
Updates connections that are stored in the database.
List<Long> updatedId = new ArrayList<>(); List<RemoteConnection> exists = retrieveAll(); for(int i = 0; i < connections.size(); i++) { connections.get(i).setaOrder(i); if(connections.get(i).getId() == 0) { create(connections.get(i)); } else { ...
1
5d23baa79117019fa8c2569c303b3d44
d8c3988b6def26e4cd11dc82df398782
物理プロセッサIDを返却
class Async public static function getProcId() : string { return self::$procId; }
0
79a9b7d743f4b750e7987a35c2640e6f
5d3f7f8019ddc50efe4cbb5c9acc7e85
Testing that it returns the third argument
class MockMethodTest(unittest.TestCase): def test_returns_value(self): expected_return_value = "test" self.expected_method.returns(expected_return_value) return_value = self.mock_method(["original"]) self.assertEqual(return_value, expected_return_value)
0
1d2c052d841cf9c0cd6b6ef27c91ae91
b043755f89e32c473e9628df0199b337
Init, internal use only.
public class CAndroidPagerView extends ViewGroup implements INHandler private void _internal_init() { DecelerateInterpolator di = new DecelerateInterpolator(1.0f); m_scroller = new OverScroller(getContext(), di); m_currentIndex = -1; m_skipScroll = false; m_scrol...
1
1609bd4858befe010f6f758beb9cbdc1
457125dc1e5ace26bdfabb5d4b72b626
判断音近混淆字集中是否包含给定关键字
{ int pos = str.charAt(0)-'a'; if (pos<0 || pos>26) return false; int begin=index[pos].start; if (begin==-1) return false; int end=index[pos].end; return BinarySearchAr...
1
8f08b3f163b66f66acb5c8f49774f972
9575c048515a81411494d2b16ca3900d
查询模板号 time时间段的发券数量
class RoomTemaiStatus extends ActiveRecord{ public function getnumbytime($start_time,$end_time,$temai_id,$key){ return $this->find() ->select('temai_id,date,discount_time_key,temai_num,temai_surplus') ->where('date>=:start_time and date<=:end_time and temai_id=:temai_id...
1
9055826297fc658105849755f64d6fd8
6fa568305ff1ce71b56b5a4fbf1e307b
Returns a list of all possible positions to move to
class State: def getAllPossibleMoves(self): moves = [] for y in range(self.numRows): for x in range(self.numColumns): if self.matrix[y][x] == Marking.Empty: coordinate = {'x': x, 'y': y} moves.append(coordinate) return moves
1
5c2fcb6d3523aaf0acf404d20f3f6cb1
6a1fb27ac2037fb8fc322c63017354d4
Add a room to the world, where "room" is the Room class instance.
try: cur = self.room except AttributeError: pass else: cur.remove(self) self.room = room room.add(self)
0
602e40b7511d7f99ed48a9dee9a37596
31c949ade7083e9c799120b485ffb4ad
Lines 42-63
function UnitNetworkHandler:sync_relock_assets(string_table, sender) if not self._verify_gamestate(self._gamestate_filter.any_ingame) or not self._verify_sender(sender) then return end managers.assets:sync_relock_assets(string_table) end
0
fa17da1fca7e2dc6699158f5c3f6722d
9137991b37f5ea76151c962856801f15
移除服务器的全部人员信息
auto ite = vec_roomlist.begin(); while(ite!=vec_roomlist.end()){ m_MainScene->Slot_RemoveUserItem(*ite); delete *ite; *ite = NULL; ite++; } m_MainScene->repaint(); STRU_ASKROOM_RQ rq; m_tcpClient->SendData((char*)&rq,sizeof(rq)); }
0
d100290f9b971e6b28625d7df0d1ec25
51c6fcb17bc69411a261af2041db9940
Do kyc for the client.
$user = Auth::user(); if ($user) { if($user->is_admin !== 1) { return ['success' => false]; } $userId = (int) $user->id; $record = Shuftipro::where('user_id', $userId)->first(); if (!$record) { $record = new Shuftipro; $record->user_id = $userId; $record->...
1
6c2fe002926fff78b73bfeb5d8bb6798
6dc3fb75ed5c057a860ab33fd9b976ce
Adiciona uma transição pronta
public class GenericFSM public void AddTransition(object st, List<Func<bool>> cond, object next) { _transitions.Add(new StateTransition() {state = (int)st, nextState = (int)next, condition = cond}); }
1
908ca9a399a292d428989ef8668ea060
208212c9ff2e7b3c63594d52a1844d55
This script syncs animations with moveSpeed of the actor, also calls the necessary scripts when actor is done moving.
public class AnimSync : MonoBehaviour void Start () { }
0
92f386e922f62ce46a4181059c395158
8299dc169f63ea585ef204f1e335b532
Returns string explanation for SMS sent result codes.
{ $values = array(); foreach (explode("\n", $response) as $line) { $keyValuePair = explode(":", $line); if (sizeof($keyValuePair) >= 2) { $values[$keyValuePair[0]] = $keyValuePair[1]; } } $retVal = array(); $retVal['furtherI...
1
e4c3303d971baf6d7308ba3cf8c6a21b
f8a6070ca300217bab5e65875aae9209
Delimit when the pulse was received
class SerialCommand(object): def get_pulse_delay(self): return self._current_pd
0
c55a0634d31fe73c056ea0f23cf17fcc
c604b959e34ad71c94ae516ff245e989
Compute the square of the norm of a vector. Squared norm of a vector associated to the inner product at the tangent space at a base point.
get_sqnorm(const double* a_vec) { #if (NDIM == 3) return a_vec[0] * a_vec[0] + a_vec[1] * a_vec[1] + a_vec[2] * a_vec[2]; #elif (NDIM == 2) return a_vec[0] * a_vec[0] + a_vec[1] * a_vec[1]; #endif TBOX_ASSERT(false); return -1.0; }
1
f08878a879eeb270f558c82d94c6b51d
93c13b6745861d17d7ed8924bc84251f
Открытие меню паузы
namespace SaguFramework public static class MenuManager public static void OpenPauseMenu() { isMainMenuOpen = false; SoundPlayer.PlayMenuEffect(); MenuParameters parameters = Parameters.GetPauseMenuParameters(); OpenMenu(parameters); InputReader.RefreshInputMode(); }
1
8e3c16cb97e075cec94e43d74ff6cb10
ce772eccde54c2c54654443dff1fde16
Creates a unique token using HMAC256 algorithm.
class AuthService extends BaseService public function createNewToken() { return hash_hmac('sha256', Str::random(40), $this->getKeyForHashToken()); }
1
59eff6e2dbab9fcba4e64fba26c5991e
cae368921ae57140818539728f03d524
根据时间限制,获取用户参与活动的次数
class Hj_UserInfo extends Base_Widget public function getUserActivityLogCount($params) { $table_to_process = Base_Widget::getDbTable($this->table_activity_log); $fields = Base_common::getSqlFields(array("UserCount"=>"count(user_id)")); if(isset($params['activity_id'])) { ...
0