query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
843cf03fec5a120e8cbafae35b5130dd | 9de5e9ba05c885edc725d0598b132d07 | Expands port regular expression to a list of port names | if self.tagged_ports:
return [x.strip() for x in self.tagged_ports.split(",")]
else:
return [] | 0 |
cef42361815f9edfab8682c57cb4f9da | f81a70b99338053dd6c94e657c404692 | returns a list of teams not assigned to division | global $wpdb;
$team_list = $wpdb->get_results($wpdb->prepare("
SELECT team_id
FROM " . $wpdb->prefix . "wpcomm_team
WHERE division_id = %d
ORDER BY team_id",
... | 0 |
80c84f237c3d5cb9dae1d3b1deeb77a7 | c748bcb7dccc2c566e4969ca792ecf2e | The page InitComplete event handler. | {
base.OnInit (e);
linkCancel.NavigateUrl = Globals.NavigateURL ();
buttonDelete.Attributes.Add ("onClick", "javascript:return confirm('" + Localization.GetString ("DeleteItem") + "');");
} | 0 |
ee5524e740c80b2413f13d5225f6b89e | eba308db718ca28c7b88789924748307 | 独立访客量 | @Service
public class MyBlogService
public void VistorCount(){
Date now = new Date();
String nowDateStr = DateUtil.formatDate(now, "yyyy-MM-dd");
List<VisitorRecord> list = visitorRecordMapper.list(null);
Integer idIndex=null;
for (VisitorRecord record : list) {
if(Da... | 0 |
4e1a892d6632b0aec1c13f794f15c667 | 9eabb7b84eb33fc44b967622c51d9ca0 | 根据value 返回订单状态 | public class OrderUtils
public static final String getStatusStr(int val) {
String status = "";
switch (val) {
case YXConfig.T_ORDER_STATUS_CONFIRM:
status=YXConfig.S_ORDER_STATUS_CONFIRM;
break;
case YXConfig.T_ORDER_STATUS_CREATE:
... | 1 |
4a31798e6a0a7ba575d9bcd90f881a49 | db32942c1865f7d24b65b3d9c0aeb295 | Handle the layout initialization for the scroll area. | this.win_.addEventListener(
'scroll',
throttle(
this.win_,
this.layoutIfVisible_.bind(this, playerImpl),
SCROLL_THROTTLE_MS
)
);
this.layoutIfVisible_(playerImpl);
} | 1 |
64653a0bed28979ad1f9ffeae2e63a2c | 8d0a7550a85439d8cc2f360d7ac92193 | Returns LaTeX editor. | ed = default_text_editor(self, Variable)
def f(x):
return format_ufloat(x, format_beta)
ed.format_func = f
return ed | 0 |
22d6e9b7d44ade3eb244a274854095ee | caa2ec5c57ed80c20422cc88560ac2af | Fired when pen response to your request that change password by PenCommV1.InputPassword method. | class TraderApiPy(TraderApiWrapper):
def OnRspUserPasswordUpdate(self, pUserPasswordUpdate, pRspInfo, nRequestID, bIsLast):
pass | 1 |
c1baa89c061201a21ac64ed82f08b2e2 | d9b6a399ea387f61065425d37e776287 | Define o preço do produto | public Double getPreco(); | 0 |
a3aa46f9cc5006f293ec432bcfd06414 | 7da6786cc7d83c98fdd943a31672052c | Returns if paydirekt express is set active | public function getPaymorrowActive()
{
} | 0 |
d5ec8289277c40593f9f0e511d88b061 | 34a57ea681d03a47e4b26255f4090183 | Kiểm tra số CMTND/CCCD có tồn tại không | namespace BUS
public class UserBUS
public bool KTraSoDienThoaiTonTai(string input)
{
return UserDAO.Instance.LayNguoiDungCoSoDienThoaiTonTai(input);
} | 0 |
8891f3350239abed76d57ee44c72ccd1 | 0c356dc63bc2f789771f5ba635bede51 | 根据门店的营业时间 返回直观的格式 | namespace BAMENG.DAL
public class ShopDAL : AbstractDAL, IShopDAL
public int GetShopTipHours(int shopId)
{
string strSql = "select TipHours from BM_ShopConfig where ShopId=@ShopId";
var param = new[] {
new SqlParameter("@ShopID", shopId)
};
var... | 0 |
927bd287f11e875a572f3ac02590a2b3 | e84ad927abd9e123695cad8daee3294a | Gets the probe provider for jsp related events. | @SuppressWarnings({"StringContatenationInLoop"})
@Service(name="com.sun.enterprise.web.WebContainer")
@Scoped(Singleton.class)
public class WebContainer implements org.glassfish.api.container.Container, PostConstruct, PreDestroy, EventListener
public JspProbeProvider getJspProbeProvider() {
return jspProbeProvi... | 1 |
d86fca6aefeafb6749e056dabad62193 | f617a78f2876b79508deaea1c7ced228 | This will create posts to test comments on. | {
$letters = range('a','z');
$lettersLen = count($letters);
$count = 0;
for ($j = 0, $len = LoadPostData::NB_POSTS; $j < $len; $j++) {
$postRef = LoadPostData::REF_PREFIX.$j;
$post = $this->getReference($postRef);
$nbComments = rand(0, self::MAX_NB... | 0 |
beb033598ecc584f3f430e667bd49051 | 726cd387ede71c5c4a337faecc298693 | 返回数据库 和 文件 日志拼接集合 | class BaoGao(object):
def back_log(self):
filename = os.path.join(self.base_file, '/back')
filename = os.path.join(filename, datetime.now().strftime("%Y-%m-%d"))
if not os.path.exists(filename):
os.makedirs(filename)
try:
shutil.copyfile(os.path.join(self.base_fil... | 0 |
eeeb9e5744ed8aa9fdbd55befbcb12d3 | c08c5489e9ba936500012a758be90c3e | Return the Y-Value for a specified value of X. | export class Bezier{
public solveYValueFromXValue(xVal) {
return this.getPointY(this.solvePositionFromXValue(xVal));
} | 1 |
90cc83aa329563210c5270e152d7467c | 6998ead350dfad7c08413ee44382c203 | Create the Item Action List Slice. | class ActionMixin(ActionDirichletMixin, ActionKargerMixin, object):
def item(cls):
item_id = "%s.item_id" % ACTION_CLASS_NAME
return relationship(ITEM_CLASS_NAME, foreign_keys=item_id) | 0 |
105743a0dcb9bbc8c6d6ccf63fe52325 | bda164a513f97eaab3270f8c5bb7260e | 获取骑手列表 | const params = {url: '', data: {}, method: 'POST'};
params.url = `${environment.baseUrl}user/selectDriver`;
params.data = data;
this.httpUtilService.request(params).then(
(res: any) => {
this.listLoading = false;
if (res.success) {
this.dataSet = res.data.data.data;
... | 1 |
7fd10622132563da4783d73c30eef8f8 | 58e180b4211c3b87da58ce22e06e55b8 | Implementation of RC4 algorithm | void rc4_init(unsigned char *s, unsigned char *key, unsigned long Len) {
int i = 0, j = 0;
char k[256] = {0};
unsigned char tmp = 0;
for (i = 0; i < 256; i++) {
s[i] = i;
k[i] = key[i % Len];
}
for (i = 0; i < 256; i++) {
j = (j + s[i] + k[i]) % 256;
tmp = s[i];
... | 1 |
1348c0a2526e2773ac1202098d82933c | d9fc05f697dd0b436ec43ff193bb5910 | Detects Oculus Runtime and Device Status
Checks for Oculus Runtime and Oculus HMD device status without loading the LibOVRRT
shared library. This may be called before ovr_Initialize() to help decide whether or
not to initialize LibOVR. | namespace OculusWrap
public class OVR64 :OVRBase
[SuppressUnmanagedCodeSecurity]
[DllImport(DllOvrDll, EntryPoint="ovr_Detect", SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
private static extern DetectResult ovr_Detect(int timeoutMilliseconds); | 1 |
a2370941c200fda4f0a2568980b5f343 | 1d9e7687980cbae905018866d2d15bbe | ADC Rd, Rs | namespace Cpu
public class Z80
public void Adc_R(byte reg) {
int adctemp = regs.A + (reg) + ( regs.F & BIT_F_CARRY );
byte lookup = (byte)(((regs.A & 0x88) >> 3) | (((reg) & 0x88)>>2) | ((adctemp & 0x88)>> 1));
regs.A= (byte)(adctemp & 0xff);
regs.F = (byte)(((adcte... | 1 |
bb37ffcce063fa1d70e5a0e3c943df1e | 171396426719092d79127330fb46c75b | helper method for clearing selection (making selection array zero, removing DOM children elements) | function clearSelection() {
if(_self.previous){
var prev = _self.previous.style;
prev.border = '';
prev.width = '';
prev.height = '';
prev.borderTop = '1px solid #000';
prev.borderLeft = '1px solid #000';
}
} | 0 |
dfc0828c9e0f1df8053f2b599418c862 | 1140bba9b971713fdfdb9d61e32b3a04 | 从BI库同步订单数据,仅保留每日数据 | System.out.println("searchIndexFlag" + searchIndexFlag);
Date syncDate = this.getMaxSyncDate("syncTaoBaodata");
if (syncDate == null) {
syncDate = new Date();
}
SimpleDateFormat dateFormat2 = new SimpleDateFormat("yyyy-MM-dd");
Calendar c = Calendar.getInstance();
Date start = new Date();
... | 1 |
86a0c58e505f8e2ad156ed9f21f0611a | 5dce6a7c261cea5fa96f28049489c4f6 | 根据站点id获取模板信息 | @ApiOperation("根据模板id查询站点信息")
public CmsSiteResult findByCmsSiteId(String siteId); | 0 |
4565846791f35b5885af82078c80f945 | d25241732cc278b712744790f6eb2bc6 | Returns true if this object has a selected part, false otherwise. | public class SimObject extends SimReflect
public boolean isSelected() {
return simObject.isSelected();
} | 1 |
9b2d51f379b09e3a99c72429493db875 | aa5c4d09efbd09fb88e7e670108f7da5 | 限制数字为正整数 | function restrictionsDigital(mid) {
$(mid).on('input propertychange',function() {
var isNum = /^[0-9]*$/;
var value = $.trim($(this).val());
if(!isNum.test(value)) {
$(this).val(value.substring(0,value.length-1));
}
});
} | 0 |
b1d5640ff21a97b85317f38298a113ae | e1cff6b916f3ad0d026078381fde7343 | 导出申论考试信息 | @RestController
@RequestMapping("api/wxApi")
@Slf4j
public class ApiEssayWXController
@GetMapping(value = "downloadMockInfo")
public void downLoadMockInfo(long paperId, HttpServletResponse response) {
HttpHeaders headers = new HttpHeaders();
MediaType type = MediaType.parseMediaType("application/json; charset=UTF-... | 1 |
dafff26cee6a4534338fa80d74dbf22d | 2dc266f87000dcf55fbbf7c3174dd166 | Checks the offset between the two selected timezones. | {
var difference = Amsterdam.GetUtcOffset(moment) - UTC.GetUtcOffset(moment);
return difference.Hours;
} | 1 |
bddfad2b73aecedca8f7714d477677d1 | 68a8461dc93aedd5292ea2505568af4d | Function for toggling the show seconds boolean | export class SpaceGraphEditor
public get show_seconds(): boolean {
return PythonInterop.getBoolean(this.interop, `${this.accessor}.show_seconds`)
} | 0 |
21660eafe49b759b0310f02a7f3c0931 | e2789e10a4967f1063c3a2025a3a0036 | @brief Appends a character to the specified position of string | char * appchr(char * str, const char chr) {
size_t len = strlen(str);;
char * ptr = malloc(len+2);
strcpy(ptr,str);
ptr[len] = chr;
ptr[len+1] = '\0';
return ptr;
} | 0 |
32c5f9691c86347e70e8300019913609 | cd76af14122d0e3058e6922b74a16b6f | Verifica se o número de tentativas excedeu o limite de 5 | class DX_Auth extends MX_Controller
function is_max_login_attempts_exceeded()
{
$this->load->model('auth/dx_auth/login_attempts', 'login_attempts');
return ($this->login_attempts->check_attempts($this->input->ip_address())->num_rows() >= 5);
} | 1 |
70843ce430cae587a44a78fcaef5f7bd | 659c6ff13f892dde71dea8060c9b708a | Exit a parse tree produced by miniJavaParser#expression_array_length. | class GuardedListener(ParseTreeListener):
# Enter a parse tree produced by GuardedParser#Impl.
def exitExprArrayElement(self, ctx:GuardedParser.ExprArrayElementContext):
pass | 0 |
e0b65d88d70957cf2e749f7b70f88f2e | d49685f9f76d55d11c4c44ac4527e4f9 | Browse for PK3 File | namespace CodeImp.DoomBuilder.Windows
internal partial class ResourceOptionsForm : DelayedForm
private void browsepk3_Click(object sender, EventArgs e)
{
if(pk3filedialog.ShowDialog(this) == DialogResult.OK)
{
pk3location.Text = pk3filedialog.FileName;
}
} | 1 |
4958684fdd7039126339da5023a6d88b | 3fe422f100b6cad1bad2fb8a648ea1c1 | 滚动至指定位置,默认为中间 | class ChromiumPageScroll(ChromiumScroll):
def to_see(self, loc_or_ele, center=None):
ele = self._driver._ele(loc_or_ele)
self._to_see(ele, center) | 1 |
196f64739127dab75fe9d98e7cd858e4 | a7399537cd78ae62294df66c9560a17a | @brief Enable Brake Pin Noise Filter Function
The target debounce sample time is (debounce sample clock period) * (u32DebounceCnt). | void TPWM_EnableBrakePinInverse(TIMER_T *timer)
{
timer->PWMBNF |= TIMER_PWMBNF_BRKPINV_Msk;
} | 0 |
f440e89a355fb9829c250dcacf977582 | 49fc74b2f9b51b7c462839530d2978b1 | Scope queries to models that are linked to the client token. | {
$scopeIdentifiers = array_map(function (ScopeEntityInterface $scope) {
return $scope->getIdentifier();
}, $scopes);
return $client->getOauthScopes()->andWhere(['identifier' => $scopeIdentifiers])->all();
} | 1 |
2715b955017bb4e9db6620134ff55426 | 609fb65b33a63572d71f3db69f237f47 | 计算p(x|yi) | row=data.shape[0]
marry=0
marryNot=0
yInMarry=0
yInMarryNot=0
for i in range(row):
if data[i,x]==1:
marry=marry+1
if data[i,y]==1:
yInMarry=yInMarry+1
if data[i,x]==0:
marryNot=marryNot+1
if data[i,y]==1:
... | 0 |
a19acaeab5d8cb4b3ae5f9f692169e01 | 76f31b1459220e8d3729303d738b80c0 | 根据病人ID号获取病人的血压值 | var option;
$.ajax({
type: "POST",
dataType: "xml",
timeout: 30000,
url: 'http://'+ serverIP +'/'+serviceName+'/GetLatestDbpByPatientId',
async:false,
data: {PatientId:PatientId,
ItemType:"Bloodpressure",
ItemCode:"Bloodpressure_2"},
beforeSend: function(){},
success:... | 1 |
77e6cd77417966e22ce70be4c826b123 | de67c89e6b03459aa5c4a818ab127685 | Gets a request builder for the CredentialUserRegistrationsSummary collection | string period)
{
return new ReportRootGetYammerDeviceUsageUserCountsRequestBuilder(
this.AppendSegmentToRequestUrl("microsoft.graph.getYammerDeviceUsageUserCounts"),
this.Client,
period);
} | 0 |
198502b3fb58d02285fa9a19c7663d6a | 324f788f58f721397a685bc203464cae | Decode the public key from DER blob. | def rdparse_asn1(decoder):
retval = None
while not decoder.eof():
tag = decoder.peek()
if tag.typ == asn1.Types.Primitive:
tag, retval = decoder.read()
if tag.cls == asn1.Numbers.BitString:
br... | 1 |
311954fb4168117e4a7dde2f77d74766 | c6219897c202cc4a02153cfbba2d5073 | build a Puzzle that is easy to solve. | new_puzzle = pb()
while not new_puzzle.is_solvable():
new_puzzle = pb()
return new_puzzle | 0 |
fd55c7a45831783bca025a808e05d7fb | b06c9bb986d3132b8f7c6cb4965e2949 | Creates a fluent builder object to help you generate an Alter Table script | namespace NuoDb.Data.Client.EntityFramework6
public class NuoDbMigrationSqlGenerator : MigrationSqlGenerator
protected virtual IEnumerable<MigrationStatement> Generate(AlterTableOperation operation)
{
yield break;
} | 0 |
7b7c482e2b104cf61137c54591d03c58 | 875e81c62fc235ba89460ade9727638e | 푸쉬 메세지 보낸다. | Bundle params = new Bundle();
params.putString("message", context.getString(R.string.facebook_message_head)+"\n"+
context.getString(R.string.facebook_message_time).replace("#time", MyTime.getHHMM1())+"\n"+
context.getString(R.string.facebook_message_location).replace("#location", LocationUpdateSe... | 0 |
5043bfdd8816f6c5bc72c1ed220acda6 | ff51d814ff419071acc3e23ad9641b68 | Function that add layers to the parent module that implements nn.Module | class Sequential(Module):
def append_layer(self, module):
self.modules.append(module) | 1 |
4e218cd4acc38ec2458673c01cdcc8a4 | e39f3a9d98ad4b92feaec139e2bc2d99 | Test case for get_metadata_for_product
Retrieve any associated metadata. | {
$material = new Material(10);
$material->fields['related']->addValue(11);
$material->fields['related']->addValue(12);
$interface = new CatalogInterface();
$result = $interface->getItemMetadata($material);
$this->assertEquals(10, $result['id']);
$this->assert... | 1 |
b06d049ed74dfab491d71311d46921c5 | 322837fa43a27ee20952aa40dad50d0a | Asynchronously project each element on a sequence in a new form. | namespace Mendz.Library
IAsyncEnumerable<TOutput> MapAsync(IEnumerable<TInput> input, Func<TOutput> instance); | 1 |
9b4c96d822a307f615eef51a91e2efde | 166c703dba1200309562763eb9b596fb | Funcion para habilitar las funciones de drag and drop | $('img').draggable({
containment: '.panel-tablero',
droppable: 'img',
revert: true,
revertDuration: 500,
grid: [100, 100],
zIndex: 10,
drag: constrainDulceMovement
});
$('img').droppable({
drop: swapDulce
});
enableDulceEvents();
} | 1 |
b407d83a4b9a7107412bf844b1fa9bed | c51ba21f7d5521d709a472663a81f287 | Sets the number of whole years of payment interest detail.
the number of whole years of payment interest detail. | public class InversionVirtual
public void setInterestPaid(String interestPaid) {
this.interestPaid = interestPaid;
} | 0 |
ed8582815039ea43e13bc0c351935716 | f2c3b59cd564be77b1102328a941ef78 | Funcao para encerrar uma compra | {
var json = EnviaRequisicao("/finalizaCompraCliente",
"idCliente=" + ClienteLogado.id +
"&idCartao=" + idCartao +
"&idCompra=" + idCompra +
"&valorCompra=" + valorCompra
);
dynamic respo... | 1 |
43ee469caf210315d9991609682d0784 | 2cdc17679cc9f7e4739056769bed09f5 | Pega o numero do segundo Registrador na instrução | uint32_t rv32i::get_rs2(uint32_t insn) {
return ((insn & 0x01f00000) >> 20);
} | 1 |
a4368d7382486bce51a2e012411309ab | 04fb04c5a2a2a8b5cad427a9337eb28d | Asynchronously flushes whatever is in the buffer to the destination and also flushes the destination. | public Task<TBufferWriter> FlushAsync(TBufferWriter state, CancellationToken token) =>
Task.FromResult(state); | 0 |
f3b6badec660c2d96010f87e88506bb6 | 7dff175e5eeea09f6a6d4a8c98e5f3ae | Returns the rectangle of the scrollbar with as location the Point given. | {
var arrow_button_size = GetArrowButtonSize (control);
var thumb_drag_size = GetThumbDragSize (control);
if (control is VerticalScrollBar)
return new Rectangle (0, arrow_button_size + (int)(thumb_drag_size / 2f), control.ClientRectangle.Width, control.ClientR... | 0 |
f35ec158275c586302e77ec8f35ef05f | 0ad6d29a73e644b881c59f4c982c8311 | Parses a scavenger hunt world from a datfile. | class Witcher1SaveGame(BasicGameSaveGame):
def parseSaveFile(self, filepath: Path):
with filepath.open(mode="rb") as fp:
magic = fp.read(4)
if magic != b"RGMH":
raise ValueError("Invalid TheWitcherSave file!")
version = self.readInt(fp)
if version ... | 0 |
1ae8b719a53ef7ce8577675cf3ff24b6 | 6796c16a94238b8f2aadefcf0abc1bb7 | Filter the query on the nama_table column
Example usage:
<code>
$query->filterByNamaTable('fooValue'); // WHERE nama_table = 'fooValue'
$query->filterByNamaTable('%fooValue%'); // WHERE nama_table LIKE '%fooValue%'
</code>
Accepts wildcards (* and % trigger a LIKE) | abstract class BaseTbpaisQuery extends ModelCriteria
public function filterByNacionalidade($nacionalidade = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($nacionalidade)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $nacionalid... | 0 |
1c2e2ac9ef9166c4e9a996f813816e45 | 312163f36adfc9508781a87f50fec85b | Functie pentru refacerea crc-ului primit in pachetul de la ksender. | {
char CRCFull = (char)0xFFFF;
for (int i = 0; i < length; i++)
{
CRCFull = (char)(CRCFull ^ message[i]);
for (int j = 0; j < 8; j++)
{
if ((CRCFull & 0x0001) == 0)
CRCFull = (char)(CRCFull >> 1);
else
... | 1 |
67ffc0d012cc5b765b3543475b9eadfb | 2e3790524f8e5e9099d3001fd5b6cfca | Work around N++'s auto indentation by delaying the indentation change | class MichelsonIndentationTest : MichelsonFixtureTest()
fun testIndent() {
configureByCode("<caret>")
myFixture.type("\b\n")
myFixture.type("DROP;")
myFixture.checkResult("""
parameter unit;
storage unit;
code {
DROP;
... | 0 |
8058d7cfea04feed28f694330b18b06c | f4b99b8d7e95973370db1a4e489bd5e5 | Si el resultado de la consulta posee solo una "columna", pues devuelve los valores
de manera individual, sino, devuelve la fila completa como un array. | function rs_row($query,$db)
{
$rs = array();
if(isset($GLOBALS["debug"]) && $GLOBALS["debug"]){
$fetch = mysql_query($query) or die (mysql_error()."<br />".$query);
}else{
$fetch = mysql_query($query) or die ("error en la consulta");
}
if(mysql_num_rows($fetch)>0){
$rs = mysql_fetch_assoc($fetch);
}
return... | 0 |
0475a9e0494f4428de4ee3e365f744c3 | 121d9409caffa1215f7247cf02eb9018 | IPv6 Routing table. This table contains an entry for each valid IPv6
unicast route that can be used for packet forwarding determination. | class RoutingTable:
def __init__(self, name): | 0 |
6f6a5ae23e6f7c4923e4f09ee07cd12f | 72ba2861caf508d9be01040108e2e53f | Gets a post by blog id and post id | {
var post = new Post();
using (var conn = this.CreateConnection())
{
if (conn.HasConnection)
{
var sqlQuery = string.Format("SELECT PostID, Title, Description, PostContent, DateCreated, DateModified, Author, IsPublished, Is... | 1 |
890f83686ed252b0c3e0ea688a646e69 | 1966ef59e21efe6d8b86e030ca77dd36 | Converts event to view model, only used if the real process instance is missing. | fun fromProcessInstanceDto(processInstance: ProcessInstanceWithVariablesDto) =
InstanceBean(
id = processInstance.id,
ended = processInstance.ended,
suspended = processInstance.suspended,
businessKey = processInstance.businessKey,
tenantId = processInstance.tenantId,
... | 0 |
1864f2af55b8a22a5d2c19208705926c | 200d4d0a5d277e0449687ff851803630 | Sets whether or not elements that do not match a specific field should
simply be ignored or reported as an error. By default, extra elements
are ignored.
a boolean that when true will allow non-matched attributes to
simply be ignored. | final class AttributeSet extends TopLevelElement
public void ignore() {
_ignore = true;
} | 1 |
723b09d1dfbbc7e8975144a8e3f722fa | c9ba78e251e9aba5dd9c685244c93244 | Validate a Request message
If the config option "withRequestValidation" is set to FALSE it won't validate the Request | {
try
{
message.Validate();
}
catch (OAuthMessageException messageException)
{
errorCode = OAuthConstants.ErrorCode.InvalidRequest;
errorDescription = messageException.Message;
return fals... | 0 |
3f50b0c940a3508b66ce81a7cdf3d661 | 871b8f82d875ba94aaa86546374075a5 | Start job that adds UUIDs to existing collections, items and files. | class IiifItems_Integration_System extends IiifItems_BaseIntegration
private function __addUuids() {
$addUuidElementMigration = new IiifItems_Migration_0_0_1_6();
$addUuidElementMigration->up();
} | 1 |
8408d534571bd89d1d096b8fe941b731 | 1a4a83c383c01f3b6ff3cb0b91f79bfe | Can a user create topics directly within the board | {
if (forum == null)
return false;
if (customer == null)
return false;
if(customer.IsGuest && !AllowGuestsToCreateTopics)
return false;
if (customer.IsForumModerator)
return true;
return t... | 1 |
0e1e742fa191788990fe7d6b19036016 | 7f61448ad6da3ef0f9cb03f40c5be655 | ____________________________________________________________====================================================IZQUIERDA | cases like (1) | 0 |
f818a950d40c3ff7ce3adea6a463077c | e6eda2cbbf146bb76e655e446ba0ed8d | Sets the group reference.
If the group is not fully defined, but only references another
group, then this method sets the fully-qualified name
of the referenced group. | public function setReference($value); | 1 |
ce44ae87f40105f6b0be5f734d5cef6f | b644e1a7d4ce7d720a003679d9dd30f1 | 根据公司名称获取详细信息 | @ResponseBody
public CompanyDetails findCompanyDetailsMethod(String company_name){
CompanyDetails companyDetails = indexService.findCompanyDetails(company_name);
System.out.println(companyDetails);
List<T_JOB_PUBVo> joblist = companyDetails.getJoblist();
for (T_JOB_PUBVo t_JOB_PUBVo : joblist) {
System.o... | 1 |
f913d198df2db9ae5aec203de0351214 | 26204652163081467de35a32c5ad9975 | This is a complete example that deploys vault, uses a
vault client to initialize it, and registers the backend. | sess := session.Must(session.NewSession())
registry := s3crypto.NewCryptoRegistry()
kmsClient := kms.New(sess)
if err := s3crypto.RegisterKMSWrapWithAnyCMK(registry, kmsClient); err != nil {
fmt.Printf("error: %v", err)
return
}
if err := s3crypto.RegisterAESGCMContentCipher(registry); err != nil {
fmt.Prin... | 0 |
d6e5a1b05adf6cdbe1b3eda663d19917 | a68b95bf4e7526b1f1e436a6e53858b3 | Create list of unique words sorted by count in descending order | namespace ConsoleApplication1
class Program
static void Main(string[] args)
{
var vocabulary = GetSortedWords(
"Hello, hello, hello, how low",
"",
"With the lights out, it's less dangerous",
"Here we are now; entertain us",
"I feel stupid and contagious",
"Here we are now... | 0 |
c831131f1d36b33ba2a8c95a9ee7a6a2 | 99bf660a635a5ce1c341c6cadea4992e | Test admin can not register with empty name field | data = {
"username": "hello1",
"password": "world",
"email": "emailemail.com"
}
response = self.client.post(self.register_url, data=data, content_type="application/json")
self.assertEqual(response.status_code, 400) | 0 |
ae91d5d055aa9280c54fb202d0452634 | 682794db261ac141d133662007086f29 | 查看好友 查看某个IM用户的好友信息 | queryObjectIdUser(id, new FindListener<IMUser>() {
@Override
public void done(List<IMUser> list, BmobException e) {
if (e == null) {
if (CommonUtils.isEmpty(list)) {
IMUser imUser = list.get(0);
addFriend... | 0 |
5e6fd660db340279c088e1c525e513fe | 264bc4e7f3baa697d633cdbadc06e6f3 | Algorytm obliczający odległość Levenshteina, czyli miary odmienności napisów | namespace AlphaCode
class Program
public static int LevD(string string1, string string2)
{
if (string1 == null) throw new ArgumentNullException("string1");
if (string2 == null) throw new ArgumentNullException("string2");
int diff;
int[,] m = new int[string1.Le... | 1 |
9457b7501fcb37db5745cf4d169b860e | 917993341d222fad6b237bc9dcc6024e | Creates a dispatch action object for setting the sharing state. | const newSet = {
trash: isBooleanTrue(actions.trash),
combineFeatures: isBooleanTrue(actions.combineFeatures),
uncombineFeatures: isBooleanTrue(actions.uncombineFeatures),
};
return this.ctx.events.actionable(newSet);
} | 0 |
243d293f82caaa378b6ea4f392c654d8 | 66ff9e7b3ffc8c3cb37166bc3d842fba | 插入新的凭证,包括其各个分录 | function insertMkinvoiceList() {
var invoiceAmt = 0;
var kmbh = document.getElementById("invoiceItem").value;
var custName = MkInvoiceShowDs.getCurrent().get("custName");
if (kmbh == null || kmbh == "") {
L5.Msg.alert('提示', "请选择客户");
return false;
}
if (kmbh == "1") {
kmb... | 1 |
71560d587e38b323aa91e4a368666fed | ba05bab3a59de9d54949927529eff70f | gets the ratio of agents of type 1 to the whole grid | namespace CPF_experiment
public class ProblemInstance
public float RatioOfPointsAtSP()
{
bool[,] pointAtSP = new bool[m_vGrid.GetLength(0), m_vGrid[0].GetLength(0)];
int NumOfPointsAtSp = 0;
for (int agentId = 0; agentId < this.GetNumOfAgents(); agentId++)
{
... | 0 |
612c6e12acafc0934567cd43629e0107 | 4f2a6cee4b56567aa1f45906f9e26c01 | Verifica presencia de todos los sustratos para reaccion directa | public function getRequiereDeyma()
{
$Activ1 = $this->getActividad1();
$Activ2 = $this->getActividad2();
$Activ3 = $this->getActividad3();
$Activ4 = $this->getActividad4();
$Activ5 = $this->getActividad5();
$Activ6 = $this->getActividad6();
return ($Activ1 != ... | 0 |
34f1c806f2a3d912c635e520748bf80a | 9007d5c99afbb446c85fd6c5c3f775e8 | Returns a label lookup of counts for a given data source. | public Iterable<L> labelFor(String source, D datum) {
Set<L> labels = Sets.newHashSet();
while (labels.size()<this.k){
labels.add(delegate.labelFor(source, datum));
}
return labels;
} | 0 |
740a45a2440fea35ffc741b3dcd099ab | 671006b887b179011ba92b69b194971a | Check if the return label can be mailed to the customer. | class Man4x_MondialRelay_Model_Carrier_Abstract
extends Mage_Shipping_Model_Carrier_Abstract
implements Mage_Shipping_Model_Carrier_Interface
public function isShippingLabelsAvailable()
{
return true;
} | 0 |
297a02d6e29eb0ba4588e894a9234baa | cb806d8ad9beec5840487d355f207dd4 | Sets the jump delegate. | if (set) {
if (!jumping) {
this.jumping = true;
return true;
}
} else {
this.jumping = false;
}
return false;
} | 0 |
fe3e807ba407ed75b716edfc57971b9d | 76d7e685c5100a8ad486270e82e422f1 | 食品销量榜 | $wx_user_id = I('wx_user_id');
$name = M("twx_wap_user")->where(
array(
"id" => $wx_user_id,
"node_id" => $this->node_id))->select();
$map = array(
"wx_user_id" => $wx_user_id,
"type" => 0,
"batch_id" => $this->ba... | 0 |
97f58247e66ee58e291e3d52cfc3d0f2 | 1f028b2bd726dcd31649ec5e0fa255c5 | Funcion que carga los valores parametrizables desde la BD | class ccontadores_list
function LoadRowValues(&$rs) {
global $conn, $contadores;
$contadores->id->setDbValue($rs->fields('id'));
$contadores->op->setDbValue($rs->fields('op'));
$contadores->zona->setDbValue($rs->fields('zona'));
$contadores->descripcion->setDbValue($rs->fields('descripcion'));
$contadores->... | 1 |
f2ca99fb89a8b0795892a26cc3ffcf94 | 8aad4f913c876b262d76a3802f786780 | Computes the threshold mld with a fixed vertical coordinate | result = (m - self.kappa * self.mMinHod)
if result>0.:
result /= self.m1
result **= self.alpha
result *= self.Ncen(m)
else:
result = 0.
return result | 0 |
007a0dc5ebf9296d8c579aecbadde6ed | 05312a59505bf2ad28727be896a87673 | This function determines the embedding admittance from voltages at the photon steps of the IV curve. Other data is ignored.
returns | c1 = c2 = c3 = c4 = c5 = c6 = c7 = c8 = c9 = 0.0
temp = 0.0
if (uV >= -5891.0 and uV < 0.0):
c0 = 0
c1 = 2.5173462e-2
c2 = -1.1662878e-6
c3 = -1.0833638e-9
c4 = -8.9773540e-13
c5 = -3.7342377e-16
c6 = -8.6632643e-20
c7 = -1.0450598e-23
... | 0 |
5a705e7c4e88b406f310fa1f038d6010 | ef34793ac7f6783fbecc2bda4c5e2f01 | Given the information for the start and end of a reading portion returns a consolidated string detailing
the verse span and a position of the verse span relative to the chapter | @Service
public class MainServiceImpl implements MainService
@Override
public ResponseEntity<Response> getChapter(String book, int chapterNo) {
GetChapterResponse response = new GetChapterResponse();
var futureVerses = bibleTextService.getVerses(book, chapterNo);
response.setVerses(futureVer... | 0 |
861f18f81e42477825d8a9ddc386afbe | 7d6c6b5fe0eab6bf347740320f59cc77 | Print the FCNS tree in-order L-N-R | void k_AVL::printLNR(Node* node)
{
if (node == nullptr)
return;
if (node->left != nullptr)
{
printLNR(node->left);
cout << " ";
}
cout << node->wholePart << "." << node->fraction;
if (node->right != nullptr)
{
cout << " ";
printLNR(node->right);
}
} | 1 |
8de5b5a390184517390c326473e0f687 | 3f59e9b2df62936fc297fc8f707c9bed | 分类列表左右滑动控制 | var ul = document.querySelector('#wrap>ul')
var isMove = false
var startY = 0;
var moveY = 0;
var endY = 0;
var index = 1;
var lastIndex = 1;
ul.addEventListener('touchstart', function(ev){
ev = ev || event;
var touchC = ev.changedTouches[0];
startY = 0;
moveY = 0;
endY = 0;
startY = t... | 1 |
f68e69a57ab9dfff89c2c6cac4c21bea | d1d3051657ddfecec11736f88fa82911 | 出队,返回队头元素。若队列空,则返回null | class MyQueue_2{
public Integer poll(){
if(size==0){
return null;
}
int ret=data[head++];
if(head==data.length){
head=0;
}
size--;
return ret;
} | 1 |
8d0a278dd6efd1b8ab47803e62c1be30 | 0566fefd277331d4aefa52270d36937f | 获取恢复收音设置的可见性 | public class IVISetting
public static boolean getNaviVolumeVisible() {
return getVisible(Audio.NAME, Audio.NaviVolume);
} | 0 |
2d32aba0ae752a5e3f3421bc8caffa12 | 472eb3bbc9dadb3d30c3853233cfa4da | Transforma los valores en un formato estandar antes de generar el json,
por ejemlo los valores de los campos de fechas que pueden ser diferentes
en la presentacion segun el patron configurado en el reporte. | public class ReportUtil
protected static String convertValue(String value, String style) {
return StringFormat.getDataValue(value, style);
} | 1 |
f80a48d3fac86a86a53e21ef8575f8a3 | 569f5f70cae25ee3537b09a1cd6006d0 | Stop Genesis from enqueuing the child theme stylesheet in the usual way. | function remove_cruft_fa_child() {
wp_dequeue_style( 'fa' );
wp_deregister_style( 'fa' );
} | 0 |
e817a1a327edc939cbfed6417cacabbd | 07169d17f39044e4fdd56432581a7ec8 | 商品不介意放倒(平躺)的话,在商品处于第三种方案摆放姿态的情况下,向右旋转90度, 获取商品零点坐标 | namespace AlgorithmDemo.Entity
public class PackPanel
private GoodsZeroPosition GetNormalZeroPosition()
{
GoodsZeroPosition zeroPosition = new GoodsZeroPosition();
zeroPosition.X = PanelZeroPosition.X;
zeroPosition.Y = PanelZeroPosition.Y;
zeroPosition.Z = Pan... | 0 |
82bfc8add24a54f55a04cb91aa99c326 | ee2f9be56c69c391e971f615f96fc21c | make the detection include jar library | public class ProjectsBasicsTest extends JellyTestCase
public void testAddLibraryDependency(){
File libraryJarFile = new File(getDataDir(),libJarName);
assert !isJarOnClasspath(libraryJarFile, sampleName);
addLibraryDependency(sampleName, libraryName);
assert isJarOnClasspath(libraryJarFi... | 1 |
fc8be55d6b78469fa992af3d3db99064 | 26246cf7856ed8b19321cc8894eb8f7f | Check relational integer expression | if (lookahead.code == REL_OP_T){
switch (lookahead.attribute.rel_op){
case EQ: case NE: case GT: case LT:
match(lookahead.code, lookahead.attribute.arr_op);
primary_s_relational_expression();
return;
}
}
syn_printe();
} | 1 |
edebcfcfecdabb05c4ae4fa649766e36 | 1c3fc99e7b63e7ab2bab1b6d9d53f848 | Creates the CD Input Panel. | this.nameTextField = new XBayaTextField();
XBayaLabel nameLabel = new XBayaLabel("Name", this.nameTextField);
this.dataTypeField = new XBayaTextField(this.node.getParameterType().toString());
this.dataTypeField.setEditable(false);
this.dataTypeLabel = new XBayaLabel("Type", this.... | 1 |
37050f5207c320fc4d7924fa071579d8 | b46215ca00b9b2fa7175a6fa294e76dd | Publish the kernel service. | class HandsetDetectionServiceProvider extends ServiceProvider
public function boot()
{
$this->publishes([
__DIR__ . '/../config/handsetdetection.php' => config_path('handsetdetection.php')
]);
} | 0 |
cb9ce7c49a987aa6d90d660623a90315 | 8074b27f6b3db5565079e99117ad4f71 | Sets the merging strategy for the initial states of scoped storages. | function statefulSetUpdateStrategyIoK8sApiAppsV1beta2(options) {
return ({}).merge(options);
} | 0 |
b6ec8fffea7d9dce8a532695539b8cd7 | ca05acfa1eae94f7609ecd2a9938a6f0 | Какую долю пассажиры первого класса составляли среди всех пассажиров?
Ответ приведите в процентах (число в интервале от 0 до 100, знак процента не нужен), округлив до двух знаков. | num = 0
denom = 0
for row in range(len(matrix)):
if matrix[row][1] == pclass and matrix[row][3] == gender:
denom += 1
if matrix[row][0] == '1':
num += 1
print (float (num)/float (denom)) | 0 |
fb83b525704bac70c47ee2b5aad778fc | a3d3ddf992dd8a696456d12ce9d791e1 | Gets the preferred lifetime. | class Session implements SaveHandlerInterface
protected function _getLifetime($value) {
$return = $this->_lifetime;
if (! $this->_overrideLifetime) {
$return = ( int ) $value ['lifetime'];
}
return $return;
} | 1 |
dd1116434fa667915c46e8cce562e59a | a17fa9a7f572caa4da653577a0879811 | Returns a populated Voc and list of filtered (all utterances shorter than MAX_LENGTH) pairs | return [tuple(sorted([a,b],key=lambda x:l.count(x)))
for a,b in combinations(set(l),2)
if a in vocab and b in vocab
and model.similarity(a,b) >= threshold] | 0 |
afaf483af842bc0f87093db476d5707f | 69603658c3dee0b4bd966d4d39299d94 | Too many "{0}" header values: "{1}" | public final class LocalizationMessages
public static String TOO_MANY_HEADER_VALUES(Object arg0, Object arg1) {
return localizer.localize(localizableTOO_MANY_HEADER_VALUES(arg0, arg1));
} | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.