query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
a3468714f8ad6312d09d18c25f3f7340 | 3e6163b4447ec8257487f09dbacf2d6e | returns object of highest priority. | class PriorityCollection
std::pair<const T&, int> GetMax() const
{
const auto& last_item = objects_[std::prev(sorted_.end())->second];
return pair(last_item.data, last_item.priority);
} | 1 |
b26ca65b1095ea180d6296f60b9417c2 | 3901e6f0611be4242a9b676c8429657e | Gets cities by a given zip code. | if (position == null) {
throw new IllegalArgumentException("position is null");
}
Source source = request("POST", position, "near");
try {
CityManager cityManager = (CityManager) unmarshaller.unmarshal(source);
return cityManager.getCities();
}... | 0 |
e4daebd476dea60875fa11b601061d44 | fa3a2141813c6f798d36308e907ff90e | Get the video statistics associated with this call. | public class MtcCall implements MtcCallConstants
public static String Mtc_SessGetAudioStat(int iSessId) {
return MtcCallJNI.Mtc_SessGetAudioStat(iSessId);
} | 0 |
e7164082269bdc7b2f845c9889fea3c1 | 9f8aa59711374df5d6dad618e90ff446 | 查出最高优先级的充值通道, bank_name请保持这个名字跟be_bank_group表里面的group_name一样,否则会取不到 | String sql = "select * from(select r.*,c.BANK_STATUS channel_status from PAY_CHANNEL_BANK_RELATION r left join PAY_COOP_BANK c on r.channel_code=c.bank_code) where channel_status='0'";
log.info(sql);
Connection con = null;
PreparedStatement ps = null;
ResultSet rs = null;
List<... | 0 |
46aa254669de58ff6988a5e719247df4 | 1817107bff2c7438bd53aa3e33e3ab99 | Get a user's character, if it exists | account = models.Account.filter_by(username=username).one()
if character_name is not None:
return models.Hero.filter_by(
account_id=account.id, character_name=character_name).one()
return account.heroes[0] | 1 |
570c0b01735fc91f1e721faa94a579e7 | d1a18bf7f8f07b762aac66eba25f29ff | Function to generate preview of the sequence as it should be performed by the instrument | public void generatePreview(MediaProcessingProgressListener listener); | 1 |
066e0557c72a7293a6ac9f84b4e64e83 | e9e475b48354aad42d291da515e52877 | There's no hierarchy in POP3, so the only type
is HOLDS_MESSAGES (and only one of those exists). | net_pop3_top_response(ActiveEntry *ce)
{
Pop3ConData * cd = (Pop3ConData *)ce->con_data;
if(cd->cur_msg_size == -1 &&
!cd->command_succeeded)
{
char *host, *fmt, *buf;
int size;
XP_Bool prefBool = FALSE;
net_top_command_unimplemented = TRUE;
cd->truncating_cur_msg = FALSE;
fmt = XP_GetString... | 0 |
a756b34c9cd5023dcead8fa0b800dce2 | 9d062580ab12e4d8de0afbaf75dcb8bd | Gets whether the crash happened on this thread. | public class OperationThread<T> extends Thread
public boolean failed() {
return this.uncaughtExceptionThrown;
} | 1 |
afe61731b9d8507478309985ec9e4213 | 1959761807e1b6572626945ba8b22d99 | 删除集群中的某个节点 | JsonResponseModel<DeleteClusterNodePoolResponse> rsp = null;
String rspStr = "";
req.setSkipSign(false);
try {
Type type = new TypeToken<JsonResponseModel<DeleteClusterNodePoolResponse>>() {
}.getType();
rspStr = this.internalRequest(req, "... | 1 |
1f6d7f070aba38ea779a8930d1ab9489 | 336a7952b39037eb6dc08fe3c62665a0 | BuilderDeliv导出Excel | protected void buildExcelDocument(Map<String, Object> model, HSSFWorkbook workbook, HttpServletRequest request, HttpServletResponse response) throws Exception {
String filename = "didi-taxi.xls";
response.setContentType("application/vnd.ms-excel");
response.setHeader("Content-disposition", "... | 1 |
f9c51d29d6a6bac28ec12732e39be174 | b2fcbb1d1435a3963738ccf50f49057f | Unix-specific trace unlock: unlock mutex | GT_STATUS utfUnsafeUnlock(IN GT_MUTEX mtx)
{
return cpssOsMutexUnlock(mtx);
} | 1 |
f0fcfe06f19db0e5b5f25151d17baeb6 | 50dc2b1ba9f50e69270dab8e02962181 | 生成折线图的数据 | List<BaseChartView.DataBean> datas2 = new ArrayList<>();
datas2.add(new BaseChartView.DataBean("2017-09-25 16:17:00", 40f, 40f+30f, 40f+30f+20f, true));
datas2.add(new BaseChartView.DataBean("2017-09-26 16:17:00", 50, 50+38, 50+38+20, true));
datas2.add(new BaseChartView.DataBean("2017-0... | 1 |
c7360f6d17f092429084778d7be81e37 | a2825d917f2e000a203dd0f705f271c4 | criptografa a mensagem usando a cifra de playfair | let message = '';
if (!alphabet || alphabet.length !== 26) {
encode == false;
return false;
}
for (letter of alphabet) {
if (alphabet.indexOf(letter) != alphabet.lastIndexOf(letter)) {
encode == false;
return false;
}
}
if (encode) {
for (let i = 0; ... | 0 |
1be790a34c098e0505365a0283890344 | 99b6b7a34f321dbc567c6d561d37f0a2 | make sure there are no strings like "subscriptions": "[guid]" in the whole content. this is used on arm template files
where it is more common to have a thing like this for certain endpoints.
not parsing individual steps/etc at this time | if (!str.includes('tmp/prisma-tests/integration-test')) return str
const urlRegex = /url\s*=\s*.+/
const outputRegex = /output\s*=\s*.+/
return str
.split('\n')
.map((line) => {
const urlMatch = urlRegex.exec(line)
if (urlMatch) {
return `${line.slice(0, urlMatch.index)}url = "***"`
... | 0 |
8d7489d54080b86d6040923e04d33d22 | 53f959716cd1f7cd6cba6228d252c56a | googleカレンダーにデータを追加する(出欠未回答者にメールを送る日を登録) | async function addEvent(email, interview) {
const auth = await authorize();
const event = createEventObject(email, interview);
const calendar = google.calendar('v3');
calendar.events.insert({
auth,
calendarId: 'primary',
resource: event,
});
} | 1 |
3ad1d898da4ce5e16e206f657e3e9dae | 79023e2c4e4fda0ac39797e8dda29ae2 | Grabs the ID of the test slot for the appointment selected in the datagrid | namespace AppointmentScheduler
public partial class AppointmentForm : Form
private void AppointmentsDGV_CellClick(object sender, DataGridViewCellEventArgs e)
{
AppIndx = e.RowIndex;
TextboxFillFromSelection();
} | 0 |
1fbdae1bda358db762c989902d5502ba | c32c87d36ae3a8fc87292c595f1af8b3 | Traduccion en base al radiobutton seleccionado | def radCall():
radSel=radVar.get()
if radSel == 0: win.configure(background=colors[0])
elif radSel == 1: win.configure(background=colors[1])
elif radSel == 2: win.configure(background=colors[2]) | 1 |
9f053bba5bb784ffe0aeed8bcffb57fe | b283d791f748fb12b574c587b69817aa | 在顺序线性表L中查找第1个值与e满足compare()的元素的位序
若找到,则返回其在L中的位序,否则返回0 | int i=1;
auto p =L.elem;
while( i<= L.length && !(*myCompare) (*p++, e)) ++i;
if(i<=L.length) return i;
else return 0;
} | 1 |
5d324c315e5a00f54129cbbaed574b4a | a87d532fcd1ec4bf13beba7d19098875 | Fill the background solid black | def fill():
DISPLAYSURF.fill((0, 0, 0)) | 1 |
be6d092bd81ef6832efcb8368b9e7fa3 | ed6f36fac9d27be79508431e7de74594 | Increase number in file. | void increase_file_count ()
{
get_file_count();
clear( "count_file" );
ofstream count_file;
count_file.open( "count_file" );
file_count = file_count + 1;
clear( "count_file" );
count_file << file_count;
count_file.close();
} | 1 |
f0157a94ec3d6d91eb347674b6ca6a40 | 10f85df24ef3b4a8910e4f47cb5bd121 | MULTIPLICACAO MATRIZ-VETOR CSR | for ( int i = 0; i < Vect.GetLenght(); ++i){
for (int j = 0 ; j < Vect.GetLenght(); ++j ){
this.getCMat()[j][i] = this.getCMat()[j][i] * Vect.getCVect()[0][j];
}
}
return this.getCMat();
} | 0 |
02cda4a0ded7e13c542df9e8ac541a5d | 001c9c8f57a97b92d4a0e694f21ee423 | Test case for get_users_by_username | class TestRepositoriesApi(unittest.TestCase):
def test_get_v5_users_username_repos(self):
pass | 0 |
f6da35eb7774fb908d3eae697c880072 | 2fb4d57f7b21d406b75781ee97f7da74 | Gets the content of a specified file from a schematic tree. | namespace ApertureLabs.VisualStudio.SDK.Extensions
public static class IVsHierarchyExtensions
private static IList<string> GetNodeFiles(this IVsSccProject2 pscp2, uint itemId)
{
IList<string> sccFiles = new List<string>();
if (pscp2 != null)
{
CALPOLESTR[]... | 0 |
9ff4b22fea46b811a234a099bc1c791f | 79f698e2d943c7977c693d55aa87a1ea | Fetch a specific snapdata item from the session array
removed after read | class Wallet
public function get_snapdata($key) {
$data = $this->ci_session->userdata($this->snap_key_prefix.$key);
$this->ci_session->unset_userdata($this->snap_key_prefix.$key);
return $data;
} | 1 |
2ab3947508128d3fab3e604c84315e31 | 5d871cc3982e6fc20ca0c7afb5247639 | 取出池中可用的对象 | public class ObjectManager implements PoolManager{
public List<Object> getObjectNames(String poolname){
lock.lock();
try{
ObjectPool pool = (ObjectPool) pools.get(poolname);
if (pool != null) {
return pool.getObjectNames();
}
return null;
}f... | 0 |
4226c288b3b1b58607d0975881b084bb | fb5489a84624130830b673a91251301c | A naive function to check for any opening html tags in a string. | class WebformHtmlHelper
public static function containsHtml($string) {
return (preg_match('/(<[a-z][^>]*>|&(?:[a-z]+|#\d+);)/i', $string)) ? TRUE : FALSE;
} | 1 |
7edf92930b5ab0141cac7d8ab282d182 | 864f115a5598694c5e1e86dbe2e81753 | add new entries to the page table when we have discovered that
a page has not yet been allocated (PageLookup returns NULL) | assert(upper_pt != 0);
vmsim_addr_t upper_index = GET_UPPER_INDEX(sim_addr);
vmsim_addr_t upper_pte_addr = upper_pt + (upper_index * sizeof(pt_entry_t));
pt_entry_t upper_pte;
vmsim_read_real(&upper_pte, upper_pte_addr, sizeof(upper_pte));
if (upper_pte == 0) {
upper_pte = allocate_pt();
assert... | 1 |
df8c53afe47361ce4c646eed6d4518d1 | 444248fe61fd9f06d5d7fbd4e067606f | This function returns a unique string that identifies
the engine provided by this factory.
Typically this would be of the form "com.nokia.qt.landmarks.engines.sqlite", with
the appropriate domain and engine name substituted.
@rtype: str | class LandmarkManagerEngine(QObject):
def managerName(self):
return "base" | 0 |
8f07e738eb3c09547b6e84d8ee632cc2 | 7f8660961399f29d8741f6279d89f624 | Update LastUpdated field on changed or created Products | class crm_lead(models.Model):
def onchange_fields_for_product(self):
self.update_products = True | 0 |
4da05a676fc9e79828dff0129630fc79 | be3ab3966f5597354d30274ffae17681 | Write char to UART Bridge. Blocking when no free space in FIFO | void uartWriteChar(uint32_t uart, unsigned char data){
UARTCharPutNonBlocking(uartGetBase(uart),data);
} | 0 |
59e99b686bc94023e55350b65092e2a1 | 32064e14bc71429817092ebf2d74e32d | Returns whether or not the given gender is {@link #GENDER_UNKNOWN}, {@link #GENDER_MALE},
or {@link #GENDER_FEMALE}. | class Gender
public function get(string $name, int $country = NULL): int {} | 0 |
688150d73958e5be1c57a54989a2eda8 | a79e7ef326b2f33de744a5d6855cbe07 | передвижение каретки вправо с учетом выделенного текста | namespace Dt.Core.Mask
public abstract class MaskManager
public bool CursorRight(bool forceSelection)
{
return CursorRight(forceSelection, false);
} | 1 |
c0161aa2c12b10e58526cbfe438cca11 | 8548258573a0e4f871a7cb9be588b1d6 | game servers can set a specific workshop folder before issuing any UGC commands.
This is helpful if you want to support multiple game servers running out of the same install folder | public void setWorkFolder(String workFolder); | 1 |
f35d63f60a5131208e1495b87e9ce8f0 | af1f435744fe7e3875e2bb515da9b634 | Gets the default complex widget to be used for this type.<p> | I_CmsComplexWidget getComplexWidget(I_CmsXmlSchemaType value); | 1 |
99240ea04803a22c1b07efdc1a78256e | f0bda18f12592b78dad98cf3f7754130 | https://docs.mistyrobotics.com/misty-ii/reference/rest/#getvideolist | {
$queryParams = [];
if (!empty($options['page'])) {
$queryParams['page'] = $options['page'];
}
$res = $this->client->getHttpClient()->get($this->apiPath, [
RequestOptions::QUERY => $queryParams,
'headers' => [
'Authorization' => $t... | 1 |
9741b6ab4ce5dc9d30e66a5db28887dc | 4ff84b7c0cadb221984a58194f132db6 | 取得現在選了哪些歌手 | if (this.selectedStyles.length == 0) {
return this.songs;
}
let selectedSongs: any[] = [];
let keepGoing = true;
this.songs.forEach((item) => {
keepGoing = true;
let rowArray: Array<string> = item.vMusicalStyle.split(", ");
rowArray.forEach((r) => {
this.selectedStyle... | 0 |
49f09828185cdafa113863f289cd9518 | febbf1871e92ae7afe7d977137199a54 | 按照被推荐的会员ID查找推荐人 | {
List<ReMemberRelationModel> list = new List<ReMemberRelationModel>();
StringBuilder strSql = new StringBuilder();
strSql.Append("select RecommendMemberID, RecommendMemberName, RecommendMemberCode, BeRecommMemberID, BeRecommMemberName, BeRecommMemberCode ");
strS... | 1 |
97db539e1dcb12b999a2f3fd775b5190 | 56856c58b29c26ccef487e5dd808411e | This API is used to refresh server assets. | export class DefaultApi extends BaseAPI implements DefaultApiInterface
public putReload(options?: any) {
return DefaultApiFp(this.configuration).putReload(options).then((request) => request(this.axios, this.basePath));
} | 1 |
5ea64c1dc0044f15fac88f1ae4f09503 | dca4df9715340457b339a18ace22fa93 | 从指定位置读取一个字节的boolean值 | if (index >= this._size) throw new Error(`index(${index}) is out of size(${this._size})`);
return (this.bytes[parseInt("" + index / 8, 10)] & (1 << (index % 8))) === 0 ? 0 : 1;
} | 0 |
0c9c54c25fe4283eb7836a27f42fa137 | 79a346c621ffd16a713b0d25c4fd0307 | Add ingress rules to security group with source CIDRs from RFC1918 | class EnvironmentBuilder(object):
def security_group_outbound_rules(self, security_group_cfg):
msg = "outbound connection to '{}' from '{}' over ports {} ({})"
for sg_name, rules in security_group_cfg.items():
sg = self.evpc.get_security_group(sg_name)
permissions = []
... | 0 |
3f40ae97f4c004ff5d0c648e45e97446 | d444afc2463e4a7fc965629d6250106f | Called when the execution of an LSystem ends. | namespace LSystemEngine public class LSystem
private void CancelCleanup() {
if (_modeler != null) {
_modeler.ExecutionError();
}
} | 0 |
fc1a30d90658fff10cf41acea29ef42f | 5a0ccd45c432e0dd50e21ea0736364b5 | Test if the sampling method returns appropriate samples for a truncated
univariate and multivariate normal distribution when the truncation limits
are narrow. | def test_gaussian_truncate():
arr = np.zeros((100, 100), float)
arr[50, 50] = 1
num_nonzeros_2 = (np.abs(gabor_filter(arr, 5, 0, 5, truncate=2)[0]) > 0).sum()
assert_equal(num_nonzeros_2, 21**2)
num_nonzeros_5 = (np.abs(gabor_filter(arr, 5, 0, 5, truncate=5)[0]) > 0).sum()
assert_equal(num_nonze... | 0 |
06ddd3521d86961b0fdb0f4795d887de | 7c04fde70c1d4bc395899721c33b52c2 | 获取摇周边的设备及用户信息
https://qydev.weixin.qq.com/wiki/index.php?title=获取设备及用户信息 | {
$result = $this->wechat->httpPost(self::WECHAT_USER_SHAKE_INFO_GET_PREFIX, $data, [
'access_token' => $this->wechat->getAccessToken()
]);
return isset($result['errcode']) && !$result['errcode'] ? $result['data'] : false;
} | 1 |
970be212383b4ffea31a689f0aa7376d | 3f6e364ad2c88fa2ce8aa795bba53a42 | Muestra la etiqueta asociada al atributo $atribute. Por defecto es el
nombre del atributo si la etiqueta no esta seleccionada.
Si no se especifica la loca, se toma la que esta definida por defecto. | $lebels = static::attributLabels();
return isset($lebels[$attr]) ? $lebels[$attr] : ucfirst($attr);
} | 1 |
c333ef881adf19b4e0274cf1d7706ad9 | e5c94225d179fe851b6bb7bf75b88e47 | Show booking form via AJAX | class EM_Booking_Form
public static function booking_form($event = false){
global $EM_Event;
if( !empty($event) ){
echo self::get_form($event);
}else{
echo self::get_form($EM_Event);
}
} | 0 |
600623f660327f5523cbaf2f2fc2cd2f | 061c0f84082ceb93d94f91ed0d855b31 | if channel width is zero, there is no CB | public abstract class Dequantizer extends MultiResImgDataAdapter
implements CBlkWTDataSrcDec
public int getCbULY() {
return src.getCbULY();
} | 0 |
198b8ed27fa02e4c79f6262ad8aa1915 | c0f16beb43ba29473874d203b034a14f | Helper method to wrap test functions in 'before' and 'after' functions | return (target, key, descriptor) => {
initializeTarget(target);
const testSuiteInstance: TestSuite = target.__testSuiteInstance;
testSuiteInstance.beforeEachMethods.push(descriptor.value);
};
} | 0 |
51c5afd8bcab6d8d5bab55299492829c | 896da5dc6ec6415167aefe7a0d3b5d82 | Set the structure in which the neighbourhood information will be
given. | numCells = len(self.cells)
idx, idy, idz = np.unravel_index(np.arange(numCells),
dims = self.extents, order = "F")
if neighbourhood == "Neumann":
neigh_idx = np.vstack((idx-1, idx+1, idx, idx, idx, idx))
neigh_idy = np.vsta... | 1 |
f31c364a76748e5f029e18d2e3a3f9ac | 8ca982fecfc7fae41489c1076e78712d | Restore saved parser state. | class DeerParser(object):
def p_restore(self):
self.pos, self.start = self._p_savepoint_stack.pop() | 1 |
fb661e36f0dd543e070ca51035c528d2 | babd3208f2c11c38c2eff5b98c75d0a8 | 调用接口分析文本 | public class ToInterface
public static void interfaceUtil(String path,String data) {
try {
URL url = new URL(path);
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
PrintWriter out = null;
conn.setRequestMethod("POST");
conn.setReques... | 1 |
78983c86cc1f29e6c9dea4d710ec1833 | 34b7cdd0dc5db4a84fb64049d93c3f16 | Тест изменения продолжительности времени приема | class RequestModelTest extends CDbTestCase
public function testRequestStatusChange()
{
$this->loadFixtures();
$request = new RequestModel();
$request->setScenario(RequestModel::SCENARIO_CALL);
$request->attributes = array(
'client_phone' => '+7 (916) 811-25-64',
'partner_id' => 1,
);
$request->save... | 0 |
e8410dd1a07d4b0237b543e24f90c197 | f1d233cd679f7bb9eed713eb9ddb1aa5 | Whether the command allows using logic keywords like "and:" or "or:"
in the command parameters. | class ApplicationCommand
def directed_only?
true
end | 0 |
591e22a35dbcc354185e88e5259dd76e | 60be11daa77cde2931b111b5d176b676 | ===========================================================================
DESCRIPTION Destroys a Critical Section
PARAMETERS None
RETURN VALUE none.
=========================================================================== | void CriticalSection::Leave ()
{
::LeaveCriticalSection(ConvertCritSec(m_data));
} | 0 |
953c82ea13aa4cf3a33b2a6ac9734894 | 18b6ab775e9090e1f2ed7da9311c2dd3 | Gets the prefered MSAA quality from Settings. | export class Settings
public get ConversionQuality(): number
{
return this.getConfigEntry("ConversionQuality");
} | 0 |
9ac352557dc84a0b6600b48c9bae7937 | 0aec72732e1fb0463325c1a6aaa9c2ac | Performs sorting on measurement unit list. | class SpikeSorter(QtGui.QMainWindow):
def CallMergeUnits_proc(self):
if not self.H5FileLoaded:
return
self.MergeUnitsWidget.list1.clear()
self.MergeUnitsWidget.list2.clear()
unitsList = [k for k in self.CurNode.__members__ if 'Unit' in k]
unitsList.sort()
self... | 1 |
c6aa36861c9f540068a8f1c00ca0c235 | b57ede8d4414f0e7bebef767362f1524 | 【代理点】代理商对代理点变更申请的方法 | @Controller
@RequestMapping(value = "/agent")
public class AgentController extends BaseController
@RequestMapping(value = "/agentModify")
public void agentModify(HttpServletRequest request, HttpServletResponse response, @RequestParam Map<String, String> params) {
Map<String, String> okMap = new HashMap<String, Str... | 1 |
7c0f02d3d3f56a41a058ce64a108249d | 1e48d2af000533e09e30edc7b6398891 | Exibe o menu de acordo com o usuário logado ou não | class HomeController extends Controller
public function index()
{
$user = auth()->user();
if($user->tipo == null || $user->tipo == "user"){
return view('home', ['user'=>$user]);
}else{
return view('home-admin',['user'=>$user]);
}
} | 0 |
c7cc80d666c64f7e06fba2213bb39d7f | 5b1acd5dbac6ec87ff8a66382a088990 | Initializes CppAstParser and Clang. Stores various config paths to be used later | class CppTask(Task):
def __init__(self, task_node, root_folder, job_file):
super().__init__(task_node, root_folder, job_file)
self._compiler_flags = task_node[Tags.COMPILER_FLAGS_TAG]
self._build_type = task_node[Tags.BUILD_TYPE_TAG]
if self._build_type == BuildTags.CMAKE:
se... | 0 |
6d5a274eb632d8daa5680b4a089fbbc1 | c5e5aa16a054f02e7f4188ad00781fa0 | 특정 위치로 부드럽게 이동 | namespace RGVSimulation.Controller
public class RGVMoveController
public void gotoPos(Vector2 position)
{
if (!Vector2.IsClose(position, RGV.pos, RGV.speed))
{
if (RGV.edge is CurveEdge)
{
SimuRotateAround((RGV.edge as CurveEdge).ra... | 1 |
06496ff09c3c87bd3e04d5490b65fe45 | 4f0fcc5ef9b8ecdebd5cc7efbb6ac94d | Returns the status of a call session by ID.
HTTP Method: get
Endpoint: /restapi/{apiVersion}/account/{accountId}/telephony/sessions/{telephonySessionId}
Rate Limit Group: Light
App Permission: CallControl | url = 'http://{host}/201511v3/getStatus?id={id}'.format(host=PSTN_HOST, id=ID)
params = {
'appId': APPID,
'callId': call_id,
}
return get_response(url, params) | 0 |
7daeccba8b59a7c787dffdf53e1c18e3 | 6844492bcc19f8fe4b0f7c886966a713 | Loads scores from the given handle. | void ScoreBuffer::Load()
{
fstream fin;
fin.open(m_path, ios_base::binary | ios_base::in);
if (fin.is_open())
{
fin >> m_nScores;
m_scores = std::vector<ScoreData>(m_nScores);
for (auto it = m_scores.begin(); it != m_scores.end(); it++)
{
fin >> it->m_score;
char t[32];
fin >> t;
it->m_name = t;... | 0 |
4abf1930f5b08acba0b425f74b29ef8a | 6973e65e03a3367d95a374904e7a86a3 | stealed from here: https://github.com/jacketizer/libyuarel/blob/master/yuarel.c#L160 | func isValidYAMLChar(c rune) bool {
switch {
case c == '\u0009':
return true
case c == '\u000A':
return true
case c == '\u000D':
return true
case c >= '\u0020' && c <= '\u007E':
return true
case c == '\u0085':
return true
case c >= '\u00A0' && c <= '\uD7FF':
return true
case c >= '\uE000' && c... | 1 |
e82982cd44e2b16479de6d1d0a4309f0 | e8e188f1addeeac2b24a77defa201674 | SubscriberID uniquely identifies the Client for which the policy is being
set. | class GetServerPolicyResult:
def id(self) -> str:
return pulumi.get(self, "id") | 0 |
5919dff8a2e008707116eb0914bcfcce | 675fb3dfb7ad331cf006985474704f5c | Check if the given node is a Subject node.
otherwise | boolean isSubject(NodeBuilder node); | 1 |
a410e06fe7232b6f0bc235c6bea8bbcf | dccbe1f5d0395b42643fa4e92662adc7 | 以字母开头 | public final class VerifyInfoUtils
public static boolean isLetterStart(final String s) {
return Pattern.matches(REGEX_LETTER_START, s);
} | 1 |
6016fb26777415c9bff5aceb1a1c0795 | 6c1a3655933d37b0f85112431160b5b7 | 唐诗列表 | namespace PersonalWebsite.IService
SongDTO GetTangPoetry(); | 0 |
cd9263d104ebbccd8f494d25ba034866 | a42727f8547b2525f79020c01d3e37ae | Get the model decorator for the model class | def decorator_for(context, klass)
return unless klass.name
"#{context}/#{klass.name.underscore}_decorator".classify.safe_constantize
end | 1 |
e518f44559f0d7cd25cee47cd7c165ec | e934394828a801c304551c1c762782ef | Event handler for when the item selection changes in the flashcard set list box. | {
int selectedIndex = flashcardsSetListBox.SelectedIndex;
flashcardsSetListBox.Items.RemoveAt(selectedIndex);
selectedIndex = (selectedIndex == 0 && flashcardsSetListBox.Items.Count >= 1) ? selectedIndex : --selectedIndex;
if (selectedIndex >= 0)
{
... | 0 |
03c90ddabb01c7d54a9cc061fc46f8d4 | e294d03cda0fec1dab52572423702252 | Calculated the log of the prior values, given parameter values. | RETURN_ARRAYS_INCREMENT();
if (debug) rpt::echo<<"starting NumberInfo::calcLogPrior(prevariable& x)"<<this<<endl;
dvariable val = pMPI->calcLogPDF(x,priorParams,priorConsts);
if (debug) {
if (pMPI->getNumParams()) rpt::echo<<"priorParams = "<<priorParams<<tb;
if (pMPI->getNumConsts()) rp... | 1 |
2e85b9b1f0c07e0e35a3447e0e3ae466 | 5ec4d5bcb5435f08a5fa460bebb30f30 | Client info is ready. Notify ValintaPlayer. | namespace ValintaMusicStreaming
public class VClient : MonoBehaviour
private void OnFinish()
{
VSettings.ClientID = m_advertisingID;
VSettings.AdTrackingLimited = m_limitAdTrackingEnabled;
if (OnClientInfoReady != null)
OnClientInfoReady();
} | 1 |
d47dc4af9db42d4b274e82293abaf73b | a59126b46e1b4927452c8838af0d877f | functia intoarce userul logat pe socketul primit ca parametru | int leave = 0;
int sock = *(int*)socket_desc;
char server_msg[1024], client_msg[1024], username[1024], password[1024];
char * line = NULL;
int returning = 0, valid_login = 0;
size_t len = 0;
ssize_t read;
if(recv(sock, username, sizeof(username)+1, 0) == -1){
perror("receive error\n");
}
FILE *f... | 0 |
df9ae2bff425899230d64064a6f97498 | ce5032cdd3317e968b7cb1c7a9efb8bc | otherの画像と現在の画像を交換する | public class ImageChange : MonoBehaviour
public void Change(int num)
{
images[enabledImage].enabled = false;
images[num].enabled = true;
enabledImage = num;
} | 0 |
831b39e7166f4e559587076031373044 | a9409e4332f330f98d081476940e3b88 | Posterior pose queue destructor. Frees memory allocated.
none.
none. | Pose::~Pose( void ) {
} | 0 |
cbcb79c73171339c517f52be4a90a131 | 94e691f05b16d3b34747b36ba3458aa2 | This is the the base function of the trust-region based inverse compositional algorithm. | {
if (CheckModelFunctions() != SUCCESS)
return MODEL_NOT_PROPERLY_SET;
int error;
const double INFINITE_BOUND = -MINUS_INFINITY_LOCAL;
const double TOLERANCE = 0.0;
const string COLD_START = string("Cold Start");
const string NO_PRINT_OUT = string("Major print level = 0");
const string DERIVATIVE_LEVEL = ... | 0 |
54f85864821e99e3b58ecaa78a529244 | 41b4c4e8703e6a3424f66d40d4a57ffb | Override this method to perform initialization logic before rule validations for GetAllCommand.ExecuteAsync are performed | namespace Peasy
public abstract class ServiceBase<T, TKey> : IService<T, TKey> where T : IDomainObject<TKey>, new()
protected virtual Task<IEnumerable<IRule>> OnInsertCommandGetRulesAsync(T resource, ExecutionContext<T> context)
{
return Task.FromResult(Enumerable.Empty<IRule>());
} | 0 |
1c86a2d503cc47def0e4e348060ccf7c | 91af21b5090c0b04952fb49230248704 | Returns true when the MXY has already been configured. | public class MuleXmlJbiContainerBuilder extends AbstractDigesterConfiguration implements JbiContainerBuilder
public boolean isConfigured() {
return container != null;
} | 1 |
6b5a1c70db1200c664acc789a8fd024f | 7b83d111693f680bb25b9b5eb3ab5a31 | Adds an available action to the form. | $ret = '';
$ret .= '<form class="action" method="post" action="">';
$ret .= get_hidden_inputs();
$ret .= '<input type="hidden" name="action" value="' . $name . '" />';
$ret .= $added;
$ret .= '<input type="submit" value="' . $title . '"';
if (!$enabled) {
$ret .= ' disabled="disabled... | 1 |
a81856df979026c9e226aa788ca94875 | e270a4d729667e140405428ea0d3e572 | Register Input Ports | {
getRegAndBitmask(&clk_port, &clk_bitmask, _pinClock, INPUT);
getRegAndBitmask(&din_port, &din_bitmask, _pinData, INPUT);
getRegAndBitmask(&load_port, &load_bitmask, _pinLoad, INPUT);
} | 1 |
b12ecd14af60357b44e5cf3bae17e182 | 90b795542615e7087daa4993d2cc04c8 | 显示BookmarkFragment并设置title | public class AgentWebFragment extends Fragment implements FragmentKeyDown
public void asBookmark(){
书签数量 = SharedPreferencesUtils.init(getContext()).getInt("书签数量");
书签数量 = 书签数量 + 1;
SharedPreferencesUtils.init(getContext()).putInt("书签数量",书签数量);
网页标题 = mTitleTextView.getText().toString();... | 0 |
b4f1c2d5ecec46f68403944bd6834c11 | 381099207573a77269e04426381fca4c | Delegate processing of value buffer events to a worker thread. | if not self.main_worker:
return
if filtered_copy:
if ev.type[:4] == "pgq.":
return
if len(self.ev_buf) >= self.max_evbuf:
self.flush_events(dst_curs)
self.ev_buf.append(ev) | 0 |
28a8e50d441a5d70fb1b0b0e3c7563e4 | 0c036a9e262fcd193b95422464de8a8c | Testna metoda koja provjerava postojanje artikla. | @Path("/artikli")
public class ArtikalService
@POST
@Path("/")
@Produces(MediaType.APPLICATION_JSON)
public ArrayList<Artikal> traziArtikal(Artikal artikal){
ArtikalDAO dao = (ArtikalDAO) ctx.getAttribute("artikalDAO");
return dao.pretraga(artikal);
} | 0 |
f6e4da43c8ca28b6e73ee51b30c40c1b | 5306aa8169e6c912befaf9ad0ab33590 | Testing if deletion does not leave trash in DB | silvr.init_db()
self.login(self.username, self.password)
self.new_entry('DeleteMe', 'Text', category='Category')
rv = self.app.get('/del/1')
self.logout()
rv = self.app.get('/')
assert "DeleteMe" not in str(rv.data) | 1 |
caf983b9213a1e6c8ab7bae8e42d4570 | 2eaa2b07d17f14317da188f8ea493714 | 既読ユーザー取得処理 | Novel
.joins(:user_check_novels)
.joins(:writer)
.where(
novels: { writer_id: writer_id }, user_check_novels: { user_id: id }
)
end | 1 |
268129c2399c11d7dd9085a09b42cdc1 | a260f6386048a3bc9d4ab3d19dc134e5 | Control panel (admin or admin assistant only)
Export User email addresses in .csv or .tab format. | def generate_email_address_csv(request):
response = csv_export(request,EmailAddress)
return response | 1 |
629db8e54818508b4e55b57c5d9143b4 | 04ca2fc1afbc10010dd56ee7c4fc4561 | Обработка нажатия кнопки создания нового персонажа | {
if (_form2 != null)
{
_form2.CharactersList = CharactersList;
_form2.ShowDialog();
}
else
{
_form2 = new Form2(this) {CharactersList = CharactersList};
_form2.ShowDialog();
}... | 0 |
06464db1630e4bce5ae65f0ae03b66b2 | 0077e82177a2391cdad4dad84f463463 | Returns an instance of the task wrapped in its ::guards(). | s: Self,
f: F,
) -> Result<MappedReentrantMutexGuard<'a, R, G, U>, Self>
where
F: FnOnce(&T) -> Option<&U>,
{
let raw = s.raw;
let data = match f(unsafe { &*s.data }) {
Some(data) => data,
None => return Err(s),
};
mem::forget(s... | 0 |
f29f38520c16f6b822a8f0cbd2064892 | d6735959c567b1fc9268f8db1d9162f6 | récupère la position d'un compte | class PositionDao
public function getPositionByAccount($sys_account_id){
$rows = DB::table($this->TableName)
->where('sys_account_id', $sys_account_id)
->get();
return $rows;
} | 1 |
657cdd42250ed9182308963d195da056 | 33561b87a6248f681cb2c63fef850a93 | Sets the all meta data name that will be used in the compass mapping.
Optional, defaults to not be added to the compass mapping definitions. | @Entity
@Table(name = "apps")
@Cacheable(false)
public class AppBean implements Serializable
public void setMetaData(final String metaData) {
this.metaData = metaData;
} | 0 |
eb01441a599fbe1c820ed782783b15e3 | 17ac83fac9934227cbab6d4bb902d56f | Check that the docstrings from the spec have in some form made it
into the Python docstrings for the generated objects. | def doc_strings(): | 0 |
ddbddb57308470118817b8a61a78c41a | a6de2bef7d0dfe6bb6d2ebc96a15175a | Forces the PS3 to disconnect. | class Player extends pocketPlayer
public function disconnectNow(): void {
} | 0 |
193690bb59978df46cdb84c33865d9be | 389b99a8aeeed504a321287aa283daa4 | 根据名字和员工号获取员工信息表 | public EmpEntity gitEmpBy_empIdANDempName(@Param("empId") Integer empId , @Param("empName")String empName); | 1 |
b6d010f98dc692b767fc0f170310e175 | 300486e5b6228eff66553b03d8e8c2a5 | Lists all Conference entities. | namespace CMS.Controllers
public class ConferencesController : Controller
public ActionResult Index()
{
return View(ConferenceService.FindAll());
} | 1 |
eb43cf41fa270dfb4a52a989239c8f97 | a4c57a272180e7194a8c7aea69f825a9 | We will project the input_fits_cube to the pixel grid of the template_fits_cube_wcs
by matching the World Coordinate System (WCS).
We can process both fits cubes and images.
No CASA module required. | class SpectrumFit(SpectrumFitPtr):
def Cube (self, inImage, outImage, err):
if not PIsA(self):
raise TypeError,"self MUST be a Python Obit SpectrumFit"
if not inImage.ImageIsA():
raise TypeError,"inImage MUST be a Python Obit Image"
if not outImage.ImageIsA():
... | 0 |
a61df9efa52183cefa8847886d2280c4 | 3766d4205572fe594710653af3e275e3 | Run the CFRunloop to get any pending notifications. | TkMacOSXEventsCheckProc(
ClientData clientData,
int flags)
{
NSString *runloopMode = [[NSRunLoop currentRunLoop] currentMode];
if (flags & TCL_WINDOW_EVENTS && !runloopMode) {
NSEvent *currentEvent = nil;
NSEvent *testEvent = nil;
NSModalSession modalSession;
do {
modalSession = TkMacOSXGetModa... | 0 |
6fdd6d14f89664b0702e2b1540d08db1 | ecc3a8ea4767983db2cfa957d1af0c4c | Gets a list of all schedules that have been added to the bridge.
URL /api/<username>/schedules
Method GET
Version 1.0
Permission Whitelist | okhttp3.Call localVarCall = getSchedulesValidateBeforeCall(_callback);
Type localVarReturnType = new TypeToken<List<Schedule>>(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
} | 1 |
652ce8df7064a756279e9d3bff4aca87 | 34cb67a1020d9b2d57d4f7f6f0c60c1a | brand商标动画 | function brand(){
$('.brand a').mouseover(function(){
$(this).animate({'top':'-4px'})
}).mouseout(function(){
$(this).animate({'top':'0'})
})
} | 1 |
c599a1f6f95be0a727ba180f713821b3 | 705ce794f94c22e2be38e2d247dd051e | Are two people friends? Recursive depth-first search. | async function isFriends(firstUserId: number, secondUserId: number) {
return true;
} | 0 |
756e82e95c054dd6737ba22a03f21a3e | a26e8c2cc76ae871138b0314b0b9c89f | Returns the emission probability of a certain state (f0) given the
observation (spec). The "probability" is unnormalized! | T = len(obs)
beta = np.zeros((self.num_states, T))
beta[:, T-1] = 1
for t in range(T-2, -1, -1):
o_t1 = self._get_observation_idx(obs[t+1])
beta[:, t] = self.tp.dot(self.ep[:, o_t1] * beta[:, t+1])
o_0 = self._get_observation_idx(obs[0])
prob = sel... | 0 |
edabd50ca17a60ddad22c02a03301d95 | 1a3a7d4abb567840ed59711eac81150e | ====================================================================
This function swaps the byte order of the passed number.
======================================================================= | uint32_t swap32(uint32_t num)
{
uint32_t b0,b1,b2,b3;
b0 = (num & 0x000000ff) << 24u;
b1 = (num & 0x0000ff00) << 8u;
b2 = (num & 0x00ff0000) >> 8u;
b3 = (num & 0xff000000) >> 24u;
return b0 | b1 | b2 | b3;
} | 1 |
beae9a4e4ae1cf2505f833b7929e3039 | 707027f0bd5821afd14b1c02a866cb59 | Recebe uma lista circular e retorna o número de elementos | int cl_size(CircularList *list)
{
if (list->head == NULL)
return 0;
int counter = 0;
ListNode *node = list->head;
do
{
counter++;
node = node->next;
} while (node != list->head);
return counter;
} | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.