query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
0b722d583579fff914f91ffaf0175a7b | 63d0de317dc59e3c638618e2b7029d8d | funcion para mostrar el textarea de respuesta | function mostrarDatos(){
var datosAlmacenados= JSON.parse(localStorage.getItem("mensaje"));
let posicionar = document.getElementById("testingRespuesta")
let i = (datosAlmacenados.length - 1)
let contenedor = document.createElement("div")
contenedor.setAttribute("id", "contenedor")
let mensajeExi... | 0 |
b8af28db582a4f1ec50105a2737d24a4 | 2aa5fc2f1baf28fca7986d0d57b2f276 | Is always false. | class Common extends Record\DataType
public function is()
{
return false;
} | 1 |
6c83b18da522de2f533674cb6d0f5601 | 0c4a4c6095f2402f4242157e6898def8 | Informs if a player has lost all their pieces. | public class GameLogicController implements LogicController
private boolean haveAllPlayersLost() {
boolean allPlayersLost = true;
for (Player player : gamestate.getPlayers()) {
allPlayersLost &= player.hasLost();
}
return allPlayersLost;
} | 0 |
005f04a3634cf006c14d908e0bad21f9 | 2a90497d4349749c8221e6e6eb7716bb | Generates the content of a {@code let} statement. For HTML and attribute let statements, the
generated instructions inside the node are wrapped in a function which will be optionally
passed to another template and invoked in the correct location. All other kinds of let/param
statements are generated as a simple variabl... | StringBuilder code,
SyntaxSymbol compoundStatNode,
int nestLevel,
CompileOption option) {
code.append(common.indent(nestLevel))
.append("{").append(Keywords.newLine);
SyntaxSymbol param = compoundStatNode.findSymbolInDescendants("*", "*", SymbolNames.ControlStat.LOCAL_VAR_DECL, "*");
varDeclCodeGen.gen... | 0 |
7a0b93576e16e395cb02e01eb86871b1 | e4ef561ad83fc2044c22606a71b0776a | Average all given values in the list | def avg(listValues):
return sum(listValues, 0.0) / len(listValues) | 1 |
6b5391b2dc4dc7c44d27b6b619bc4b70 | cf5e382140f84d9f6ae3c2b8b6bd6e73 | 将rgb转化为十六进制 | var hex = addZero(parseInt(rgb[0]).toString(16), 2) + addZero(parseInt(rgb[1]).toString(16), 2) + addZero(parseInt(rgb[2]).toString(16), 2);
return hex;
} | 1 |
a3117b2a365b5f58bbb1946346f6ab21 | 2b6f872d4906a0d67dcde952b28abcf7 | 모든 블럭들의 그림자 여부 설정 | function blockActiveObj(cdm)
{
var visible_1 = cdm.visible_1;
var visible_2 = cdm.visible_2;
infProject.scene.block.click.wall = visible_1;
infProject.scene.block.hover.wall = visible_1;
infProject.scene.block.click.point = visible_1;
infProject.scene.block.hover.point = visible_1;
infProject.scene.block.click.w... | 0 |
de909d2c45fc573346a9164cd72021b7 | 02052177ebca4c336b2604f12cf0b115 | Calculates the extent a shape is concave or convex | vertex = []
for i in range(-1,len(poly)-1):
dif1 = ((poly[i][0] - poly[i-1][0]),(poly[i][1] - poly[i-1][1]))
dif2 = ((poly[i+1][0] - poly[i][0]),(poly[i+1][1] - poly[i][1]))
inner_product = (dif1[0] * dif2[0]) + (dif1[1] * dif2[1])
dif1_length = sqrt(dif1[0] ** 2 + dif1[1] ** 2)
... | 1 |
8b87f9b39282385a995415ac0d6e8df9 | 6a43a79d4d622d9e59edb669886686d6 | Resets the RNN state to a zero-vector | class TimeRNN:
def reset_state(self):
self.h = None | 0 |
402530d6e91456b0ac0982e4673d3e5b | 33d9f42611e3a8804ed73e106a0d283a | 后台值班记录列表视图 | {
if (Request.HttpMethod == "POST")
{
Response<List<JBRecord>> response = new Response<List<JBRecord>>();
List<object> list = new List<object>();
if (data != null)
{
Request<JBQuery> request = new Request... | 1 |
9b4a8752040d30794abfc22b238499a9 | 33cc63d6478e58be499c97578ff206d8 | 联通弱联网支付回调。 | public Map<String, String> KLTDFHD(HttpServletRequest request, HttpServletResponse response) throws IOException {
log.info("开联通代付异步来了!");
Map<String, String> remap=new HashMap<>();
try {
String orderno=request.getParameter("merchantOrderId");
String orderStatus=request.getParameter("order... | 1 |
4845d72126084db8d186696cb20ba261 | 80769dde13ce109ac3a22a4132c524de | Sending user's information to log in. | def send(network,PORT):
msg = ("User %s logged in on computer %s" % (getpass.getuser(),socket.gethostname())).encode()
sock.sendto(msg, (network,PORT)) | 1 |
3a001f49abbe63a8f37a900e321a77ce | 3ff9ebffb48b7d9f69ff8e0e4f21df42 | Executes the command given by ilCtrl. | class ilPersonalChatSettingsFormGUI extends ilPropertyFormGUI
public function executeCommand()
{
switch($this->ctrl->getCmd())
{
case 'saveChatOptions':
$this->saveChatOptions();
break;
case 'showChatOptions':
default:
$this->showChatOptions();
break;
}
} | 1 |
3aa53b349c52fefa9eb24ddac5f9a3f9 | dad8ae3b06500a22efb9cacd4f14be72 | helper function to get "X-Auth-Token" from headers | if "X-Auth-Token" in self.session.headers and \
self.session.headers["X-Auth-Token"] is not None:
return self.session.headers["X-Auth-Token"]
return None | 1 |
23514592fcaa1a290cb69ebbc0e6f293 | b58f9f350c6f1b5394472606815f5ce2 | 分析明天会涨停 | Now_data=json.loads(data)
now_price = Now_data[-1].split(',')[2]
for line in Now_data:
if(float(line.split(',')[2])>float(now_price)):
return "0"
else:
continue
return "1" | 0 |
c4db5846f9dfe162ff58d16b59230c16 | 5fbebe239de19c1145f46e9ad4e736c8 | Gibt einen booleschen Wert zurueck, der darueber Auskunft gibt, ob die finanziellen Mittel vorhanden sind, einen neuen Roboter zu erwerben. | public class BluetoothCommunication
public boolean isRobotReady() {
return robotReady;
} | 0 |
93c144e9ed8df7d17e1aebcbee31a706 | 96b80ada7514e510edd2146035303b59 | initializeReplicaStatuses initializes the ReplicaStatuses for replica. | values := make([]ListReplicatedCachesLifecycleStateEnum, 0)
for _, v := range mappingListReplicatedCachesLifecycleState {
values = append(values, v)
}
return values
} | 0 |
e3bf2d1dc2baa167ff64f7ad54ff5ab2 | 451068f7ae47081cc7378b8aff7de947 | Initialize a CRC32C-computing context. | class CRC32(Checksum):
def __init__(self, crc: int = 0):
self._crc = crc | 0 |
900392b10dbdf59d93430ba051af56e6 | 6dfc4d102761698bc129bc43e671c135 | help text | {
fprintf(stderr, " ---------------------------------------------------------------\n" \
" Help for output plugin..: "OUTPUT_PLUGIN_NAME"\n" \
" ---------------------------------------------------------------\n" \
" The following parameters can be passed to this plugin:\n\n" \
" [-w | --www ]...........: f... | 1 |
1d404512ff59791e63dad9d7e6c663e5 | 0a8c22b39446ad00e0ee83a0cc99df69 | Send email to user with newly reset password | {
MailMessage mail = new MailMessage();
mail.From = new MailAddress(sender);
mail.To.Add(new MailAddress(email));
mail.Subject = "Password reset from DocketPlace";
string serverPath = HttpContext.Current.Server.MapPath("/email/");
string body = File.ReadAllText(serve... | 1 |
82598ecc2337d943b0068b0bcf018b8d | b528037c1930681f8741e7cb570e68c5 | Method to handle cart Action - multiple add products | $this->language->load('app/app');
if ($this->request->server['REQUEST_METHOD'] == 'POST') {
$str = str_replace(""", "\"", $this->request->post['param']);
$param = json_decode($str, true);
$customerId = $param['customerId'];
$products = $param['products'];
if (!empty($products)) {
$this->load... | 1 |
072866bfef0f53b6a66bc79bb32fa06b | 6912d7e6e85b4e19549b8e60a2b7a8a6 | 检测是否为最高品质任务 | local id = 6005
local isOpen, openStr = self:checkLvlLimit(id)
if isOpen == false then
return 2, openStr
end
local sysData = tab.shareActivity[id]
local heroId = sysData["task_para"][1]
local heroModel = self._modelMgr:getModel("HeroModel")
if heroId ~= 0 then
local heroData = heroModel:checkHero(heroId)
... | 0 |
590216c5294a86f85942129434cbd233 | 3d4c3ef93d05d4d191dc0e090abc4f4a | Muestra el mensaje de la excepción con la ruta y la razon por la cual fallo al cargar | public final class TrazaUtil
public static String mostrarMensajeHTML(Exception e) {
StackTraceElement[] stackTraceElement = null;
StringBuilder trace = new StringBuilder();
try {
trace.append("Error: <b>");
trace.append(e.getMessage());
trace.append("</b><br/>... | 1 |
3206670826daf251b2b8e57ba248461b | 7514049bac0ddcdcd094c9033d1aae23 | 按季度分类 | public class TimeUtil
public static List<Date[]> getQuarter (Date startDate, Date endDate, boolean sort) {
List<Date[]> quarterResult = new ArrayList<>();
Calendar sc = Calendar.getInstance();
sc.setTime(startDate);
int sy = sc.get(Calendar.YEAR);
Calendar ec = Calendar.getInstan... | 1 |
80c64528e9c46b7aba3d52764c23d148 | dcb90d46ca585d16b0afcced9a71d629 | This is a no-op version used for "uninteresting" components.
These components will not be referenced by color conversion. | pub(crate) fn map_color(color: Color) -> Color {
color
} | 1 |
590d6bc89336b4a5e9ddedc6871931a0 | 01e51412132f9b912bda0a91a9225492 | Handle song continue system real-time event.
This should only occur in real-time MIDI data, in Standard MIDI Files it must be embedded
in an escape sequence meta event.
Takes no arguments. | class MidiFileWriter(BaseMidiFileWriter, NullMidiEventHandler):
def song_continue(self):
self.event_slice(tobytestr([ESCAPE_SEQUENCE, 1, SONG_CONTINUE])) | 1 |
db29c0bebe05884dadb9ce6076d96831 | decbea18d2036737c1967f64294ef092 | 마지막 자리수에서 1을 증가시킨다. 23 > 24, -22 > -21, 0.03 > 0.04 | class CHugeInt
CHugeInt & operator++ () {
string tmp = "1";
num = addString(num, tmp);
return *this;
} | 0 |
d5e805dc2d5abdfe9879d300077e1d70 | 569885394909e93ed031e8d5b46f4a33 | Continuously request a new login token every 30 seconds | this.refreshInterval = setInterval(
() => this.props.dispatch(refreshAuthToken()),
60 * 60 * 1000
);
} | 0 |
72632e13d896d36b1fd16e86673843d0 | 25385beccd8bcbe2ac459a2805a1c3ea | Save temporary filelist | class FilesystemManagerTest extends ControllerUnitTest
public function storeFileList()
{
$this->oldFiles = $this->getService('filesystem')->listContents(self::FILESYSTEM . '://');
} | 1 |
ead911ceb9f0536ac1238d4d3d18a8c5 | 215071d1c43be32b61816b890c00db7b | Function for handling tan_inverse | double result = tan(args[0]->ev.floval);
*returntype = TYPE_FLO;
returnval->floval = result;
} | 0 |
78dbf6aaffd97c1694b2fb34e37f6078 | 4e21f9a6bc03ae663fff60b7fdf1f1df | <br>description : 商户请求平台后,解析平台响应给商户的html格式的数据,并验证平台签名 | HttpServletResponse resp) throws EbizException {
SortedMap<String,Object> map = (SortedMap)req.getAttribute("postData");
if(map == null){
map = WeChatPayUtil.parsReprot(req);
}
WeChatPayUtil.checkWXMD5sign(map, appKey);
return WeChatPayUtil.converWechatResult(map);
} | 1 |
54baefa5199dd2e484757eb3ebb5bf21 | 2f7e871d09aaa495b22e2f1a7a051ff5 | Handle value unbound events. | public partial class CustomerList : Spring.Web.UI.Page
private void Page_DataUnbound(object sender, EventArgs e)
{
} | 1 |
ce89b0ce0b856716ed04fbc887cfa2d0 | ff72b5ac155b860948fd230de9cea235 | 多次写入 | public void moreInsert() throws IOException {
DecimalFormat format = new DecimalFormat();
format.applyPattern("0000");
tname = TableName.valueOf("MyNamespace:students");
HTable htable = (HTable) connection.getTable(tname);
htable.setAutoFlush(false);
for (int i = 1; i... | 1 |
bd3317496147c4e8905e6001c3ae6e78 | b503d13df95dceb7b235eee6583a03b2 | <para>
Composes <paramref name="self" /> <c>Specification</c> with <see cref="ContainsSpecification" /> negation:
</para>
<para>
Checks if string not contains another string (case sensitive).
</para> | public class Dimension extends FilterSource<String>
public Filter ncontains (String value)
{
return expr("!@", value);
} | 1 |
8ed08618bb2a9df39efb2248b6baa5ac | e847ee02b30ae2e0ed229fbd3f43083c | High level IL for this medium level IL. | class BasicBlock:
def is_medium_level_il(self) -> bool:
return core.BNIsMediumLevelILBasicBlock(self.handle) | 0 |
a98340a4e06d122b2f886250777229ee | c7d808868894bdb0459b2021916c7f05 | omitting any lines that begin with #: | class VCF
def each_header(&blk)
fh.rewind
fh.each_line do |ln|
next unless ln =~ /^#/
blk.call ln
end
end | 0 |
25cb6d4863646a616a1a10a7e7c2d314 | b311f300f99b0f99f3b8c4fe1cfdeb8a | Calculates a match between the tags collection and the properties of the OpenLR location reference. | {
if (Location == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Location");
}
if (Tags == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Tags");
}
} | 0 |
8b6be111f03eb4c1d18f3113eb95b536 | 307a916fc2dc4cd6e13daa158eb2dc55 | Stops the running of the VI by trying to set the value of an internal contol
named 'stop' to true, does not close FrontPanel. | namespace AsymtekFMG5Engine
public class MachineCommands
public void Stop()
{
RequestStop.Value = 1;
} | 1 |
0227ced368fde083413a43819cf52b7a | 3f87857866d8377beedb5e0cd347beb0 | 使用ffmpeg命令进行视频剪切 | inputDirectory := getParam("请输入视频目录:")+ string(os.PathSeparator)
if inputDirectory == "" {
panic(errors.New("视频目录不能为空!" ))
}
fileNames :=getvideoFile(inputDirectory)
fmt.Println("该目录视频列表如下:")
for i:=0; i<len(fileNames); i++ {
fmt.Println(strconv.Itoa(i) + ":\t" + fileNames[i])
}
var videoFileName string
fo... | 1 |
627a73fba9535e4fbc0aa06f81a9806a | b028346b8cfb0eaff580f19e8789aa10 | 根据小区id查询小区下的全部单元 | List<ManageUnit> list = new ArrayList<ManageUnit>() ;
try {
list=manageUnitDao.getUnitByEstateId(id);
} catch (DaoException e) {
logger.debug("ManageUnitServiceImpl findByExample():按VO对象条件查询所有ManageUnit发生错误!", e);
e.printStackTrace();
}
return list;
} | 1 |
3b3a2726321e5446df2c957e1c95f627 | e3946566efa5bbd2f2f4a7d6f9e22c22 | Replace the Subject line with something nondescript. | def anonymise_mime_message(msg: MIMEMessage) -> MIMEMessage:
msg.replace_header("Subject", "The subject has been removed for anonymity")
if msg.get("Thread-Topic") is not None:
msg.replace_header("Thread-Topic",
"The topic has been removed for anonymity")
for part in msg.w... | 1 |
53e97459cbc577ccffa657b0768c66e2 | 60142fc7852163cd4f5b022d73fe5888 | Adds import declarations to the compilation unit cu. | {
var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
Contract.ThrowIfNull(root);
return await AddImportsFromSyntaxesAsync(document, root.GetAnnotatedNodesAndTokens(annotation).Select(t => t.FullSpan), options, cancellationToken).ConfigureAw... | 1 |
d6d541286f8134ab02ff28d7fd3e9bf0 | 3107c7854ce04e7974e1ef19e7f8e1fe | Returns iterator of Singly Linked List. | class LList(object):
def __iter__(self):
def llist_iter():
node = self.sentinel
while node.next != self.sentinel:
node = node.next
yield node
return llist_iter() | 1 |
0c41e9aadd79b65e1461ff9f0448232d | a3f999a36a8538bcc185a790f92fbeb8 | 批量查询:根据id批量查询name | @GetMapping("/names")
public List<String> queryNamesByIds(@RequestParam("ids") List<Long> ids); | 1 |
904156a61bf4e0a0d7c8bc0459e0b82a | fbf6a8a0f9f68c06bee0ee718afb7fa6 | Recebe e cuida das teclas usadas pelo usuario no menu sair | for e in events:
if e.type == KEYDOWN and e.key == K_ESCAPE:
self.manager.go_to(Menu(self.levelno))
if e.type == KEYDOWN and e.key == K_s:
self.sound_play = sound_switch(self.sound, self.sound_play) | 1 |
0b07b62b3bd655b731c0689aec479716 | 184b125a4a995ccd9c715ad73c42d06a | Get URL to request the geocode data for the specific coordinates | @Controller
@Scope("singleton")
public class Geocoder implements Serializable
public String encode(final String address) {
return "http://maps.googleapis.com/maps/api/geocode/" + output + "?address=" + urlEncode(address) + "&components=country:CO&sensor=false";
} | 0 |
61e21bbeb22af47ff03dbd2cf211341d | c9d094d3bef5e00f3fbb5fad3bb6ac56 | Build TestSuite to group tests based on labeling | const failures = testCases.reduce((sum, testCase) => sum + (testCase.category === CATEGORY.FAILURE ? 1 : 0), 0)
const time = testCases.reduce((sum, testCase) => sum + testCase.time, 0)
this.addTestSuite(
new ApexTestSuite(
{
id: className,
name: className,
failure... | 1 |
85eb6bcdabe0394c86bb0c09c6f6c34a | 79d9b28c0f5abb748cd74a2c83783f97 | Set the value of Axe | public class AxeM : MonoBehaviour
void Start () {
} | 0 |
7bf02422e3ab59a2cfdf453df79402fa | fbf82b1f031e7c2f19b68b2ffd43b0cc | <p>
Sets the Content-Language HTTP header which describes the natural language(s) of the intended
audience for the enclosed entity.
</p> | class HeaderMap:
def content_language(self, content_language):
self._content_language = content_language | 1 |
c51523a204d13b0a3f48e7ff59a4e3d2 | 6c98d62c12a5cb04389aaa4d5c7da293 | 开启远程调试功能 | public class DebugConfigXML : MonoBehaviour
public void IsRemoteDebugFun(bool value)
{
SystemSettingHelper.systemSetting.DebugSetting.IsRemoteMode = value;
IsRemoteDebug.isOn = value;
SystemSettingHelper.SaveSystemSetting();
} | 1 |
04770a08b3c814b999effb2f529298e6 | 2ccb0ecc2704ad61c15768142c48bf28 | Get timetableId | class BookingEntity
public function getScheduleId()
{
return $this->iScheduleId;
} | 0 |
35711c8168c9d1e5cf3ace9b5de183f7 | 68eb736e8f9834f758f045e2d835e229 | ===========================================================================
DESCRIPTION
tristates the GPIO TLMM as per the signal value used for the given GPIO.
DEPENDENCIES
None.
RETURN VALUE
None
=========================================================================== | {
u32 reg;
u8 pin;
u16 offset;
if (gpio_pin >= WM_IO_PB_00)
{
pin = gpio_pin - WM_IO_PB_00;
offset = TLS_IO_AB_OFFSET;
}
else
{
pin = gpio_pin;
offset = 0;
}
switch(mode)
{
case WM_GPIO_IRQ_TRIG_RISING_EDGE:
reg = tls_reg_read32(HR_GPIO_IS + of... | 0 |
fe662b8c102cb23acadb599d84de4eca | a42e5770003c76793ad6a2675f5f26fc | 恢复计时器函数 | {
Tick tick = null;
if (tickDict.ContainsKey(tid))
{
tick = tickDict[tid];
}
else if (deltaTickDic.ContainsKey(tid))
{
tick = deltaTickDic[tid];
}
if (tick == null)
{
... | 1 |
dfa6beee4c670a702b04a01293769226 | 50d6db5c029384e0936375c5f1dcc2a1 | Get first triangular number with given number of factors | {
int t = 1;
map<long,long> f = trial_factor(n);
for (map<long,long>::iterator i = f.begin(); i != f.end(); i++)
t *= i->second + 1;
return t;
} | 0 |
d40b37d7e01249a51b8eee1120238e59 | 840827fef0210416ebbaf55d0a93ff65 | Metodo para ver un puerto activo con Nmap | try:
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((host,port))
print('[+] %d open' % port)
s.close()
except:
print('[-] %d close' %port) | 0 |
e3a62673456c793c5297822f83b02b6b | 137dd1ffcd1bb96adb474a737ce3be3c | 获取某个异常类型的最大编号 | namespace thesis.bll
public class FaultCaseBaseBll
public int GetMaxID()
{
return dal.GetMaxID();
} | 1 |
ff8e916a167f13294b150282d2b13685 | c5cdf944bfea629059f409230c638f00 | перевод в относительные единицы | namespace GfxlibWrapper
public static class UnitConverter
static public double GetInFromUnits(double param, Units units)
{
switch (units)
{
case Units.Cm: return param / INCH;
case Units.Mm: return param / (INCH * 10);
default: return p... | 0 |
1a01b0cf0347bbc7b8964bf1150b5013 | 52f0cdc6e2b4d4b261482a030b4c7f9f | Check the new block against the latest block in the chain before adding it | public class BlockService
public void addBlock(Block newBlock) {
if (isValidNewBlock(newBlock, getLatestBlock())) {
blockChain.add(newBlock);
R.setViewNumber(newBlock.getVN());
R.endConsensus();
}
} | 1 |
25a24d1e16fb8a17a04f920320aa9433 | 5073acd4d0cc9f32efbf10e5bd52d12d | metodo para definir o numero de derrotas | for (int i = 0; i < clasificacio.size(); i++) {
if (clasificacio.get(i).getNom().equals(nomEquip)) {
clasificacio.get(i).setDerrotes(clasificacio.get(i).getDerrotes() + 1);
}
}
} | 1 |
cf1c6b7377e27a568aab7432a79d5d00 | b82a59053c94917e33bf35741efcf05e | Handler of the button to decrement the number of breathing cycles | {
_copyValue--;
lblValue.Text = _copyValue.ToString();
if (_copyValue < 2)
pbBtnDown.Enabled = false;
pbBtnUp.Enabled = false;
} | 1 |
033dbfcc4d5d6cfdb1de3b93077ffea3 | c082f61281ab4e50ae6d13f0c9abd3ae | Set the Issuer's Signature on the Certificate. | class ValidationData
public function setIssuer($issuer)
{
$this->items['iss'] = (string) $issuer;
} | 0 |
9b541a1a1c0cba4d23461e9a60f8260c | 53e08b3bbadb63133f83abd73ecc6af2 | Reset all the call counts. | namespace Azos.Time
public class Event : ApplicationComponent, Collections.INamed, IExternallyParameterized, IConfigurable, ILocalizedTimeProvider
public void ResetCallCount()
{
m_CallCount = 0;
} | 1 |
9ed6f8af882d401bae488936c4063a1f | 45d514a5e93bc2c15a54b6b07f400f5a | Function to Reverse given string | function stringRev(str)
{
let revStr='';
for(let i=str.length-1;i>=0;i--)
{
revStr +=str[i];
}
return revStr;
} | 1 |
7137eb65f8cd6c7837591cdf3c6b30df | 63eb08ce8801b67a013f18b1636ecca4 | 设置toolbar返回按键图片 | public class BaseActivity extends SwipeBackActivity
protected void setReturnButton(ImageView btnReturn) {
btnReturnIcon = new DrawerArrowDrawable(this);
btnReturnIcon.setColor(ContextCompat.getColor(this,R.color.white));
btnReturnIcon.setProgress(1f);
this.btnReturn = btnReturn;
... | 1 |
a6639ec135fd17579f4f80d8b82c1016 | b317fd516c0a8dbe6c2c6175406a4e09 | Set up the {{ cookiecutter.name }} component. | async def async_setup(hass, config):
hass.data.setdefault(DOMAIN, {})
return True | 1 |
63685b9c7b3914d2fd2b0bcc785a975e | 11f6273b9b03f9ef8d271386b1d71936 | Method to set props to attributes and cache the values. | class RadiusMessage(object):
def _setAttrs(self, attrs):
self._attrs = attrs
self._attr_hash = {}
for (attr_id,attr_value) in self.attrs:
self._attr_hash[attr_id] = attr_value
self.updateAuth() | 1 |
fbf350c1dc90611e44126b200ee2b5ba | fe2da240d59c9f49368abce9e58bd6c6 | List unread forum threads in a group. | class ThreadModel extends Model
public function findForForum(int $forumID)
{
return $this->where('forum_id', $forumID)
->paginate(20);
} | 0 |
faf26eabdc903ab7a75b57d72d213462 | 1b4b5a90008a0d75b88f1dfd32f2554b | 新增数据字典分组 | function insertDictGroup(data = {}) {
return request({
url: '/api/m-sys-dict-group-insert',
method: 'post',
data
})
} | 1 |
3a6f53ef5563df8169db9e995cd55dec | ead588c2b6fe52b9273095e1e90249f1 | Changes the video stream. | namespace SecretNest.RemoteHub
void ChangeStream(Stream newInputStream, Stream newOuputStream); | 0 |
98ab144265d9600fa9574a2dd79723ce | e3bc661a6f59754631548c51f566217d | Chuẩn hóa z-score | def zScore(dataset):
transpose_dataset = [list(t) for t in zip(*dataset)]
mean_transpose_dataset = [sum(row) / len(row) for row in transpose_dataset]
for row in range(len(transpose_dataset)):
feature_deviance = [((feature - mean_transpose_dataset[row]) ** 2) for feature in
... | 1 |
afedd59eb97c0df95f0459fae9abd556 | 7f61448ad6da3ef0f9cb03f40c5be655 | https://www.codewars.com/kata/5174a4c0f2769dd8b1000003 | cases like (1) | 0 |
f63fb1626713d11d468b066901eb4ff7 | 42283528235f706a5ae5f43b9f69dce3 | функция для получения текущей привязки товара к регионам | $adminru = get_admin_ru_id();
if ($adminru['ru_id'] > 0) {
$ru_id = " and wg.user_id = '" .$adminru['ru_id']. "'";
}
$sql = "select wg.w_id, wg.region_id, wg.region_number, wg.warehouse_price, wg.warehouse_promote_price, rw.region_name from " .$GLOBALS['ecs']->table('warehouse_goods'). " as wg left join " .$GLOB... | 1 |
22532e5fda342f1599b01c52e2fb6154 | 152ddd384b047adda7e81e164f877c4c | Test reload search databases. | def test_reload_after_redirect(): | 0 |
860b47e0d9df96d2058ba5c377672cf1 | b1c7eb8bfdbd3397162981686154e16b | Returns the visit count for this node. | def count_visit(node):
if not node.visit:
return 0
return sum(map(count_visit, node.sons)) + 1 | 1 |
b322b43fc1a8e92f90c3446ffd7d8877 | 665ffe39b3d4a92213c1cd86926b74a5 | 회원의 xrp 거래 정보 삭제 | int ret = 0;
String sql = "DELETE FROM trade WHERE user_id = ?";
Connection conn = null;
PreparedStatement pstmt = null;
try {
conn = C3p0ConnectionFactory.getConnection();
pstmt = conn.prepareStatement(sql);
pstmt.setInt(1, id);
re... | 1 |
a8f6c539986d56d263bebdbc0381194b | a560bfe58d0d74085f5cb9176faf86d3 | 返回上个原生页面 | return new Promise((resolve, reject) => {
if (window.cordova) {
window.MrModel.backToNative(function (success) {
resolve(success)
}, function (error) {
reject(error)
})
} else {
reject(new Error('no cordova'))
}
})
} | 1 |
eb87f63c9794d0d89e0a1e04f3388162 | a9b952c49281eb4870d520bd5b80716a | Returns the localized version of the country name for the given language id. | class NameGetterComponent extends Object
function getLanguageName($languageId) {
} | 0 |
bdea172f3fcd3cdd1356ed112dd1ea29 | 82f22656fe1bd9156b1d07a0c0b8ce25 | Pops up the menu or dropdown list of @combo_box, the popup window
will be grabbed so only @device and its associated pointer/keyboard
are the only #GdkDevices able to send events to it. | function devicepopup ()
{
if (typeof (plhandler) !== 'undefined' && plhandler !== null)
plhandler.DevicePopup();
} | 0 |
915abdb83b166e8f60c1341d92a5fe4f | 6e5c6e0eaae6af2b324f2de99028f008 | Si al menos una sesion existe la funcion regresara true. | function sesionAbierta (){
if(isset($_COOKIE["id"])) return true;
else return false;
} | 1 |
8189e3ae0c5abca3253f56fe211f14a5 | ee4a56f6a6cac0bbcb96dbf638e5437a | 根据主键获取学期状态 | public CsState getCsStateById(Long id); | 1 |
c0774e8579596542b98d187d864d24d3 | 30fd8678dded803cb88401ea939c0756 | 才艺发送结果回调,会弹出相应提示 | public class InputResource
private static void sendResult(final boolean result, final Handler handler,
final Context context) {
Log.i(TAG, "result is "+result);
if (handler == null || context == null) {
return;
}
handler.post(new Runnable() {
public void run(... | 1 |
e7d0891699b538835e64a01830cef728 | f56d1d39d6d64fd7698d30e0d62497c8 | 根据PID获取数据字典数据(优先缓存) | function loadDataDicByPidExtend(pid, subId, fn) {
if (pid) {
$.ajax({
url: "/sysdatadic/getCacheDataDicListByPid",
type: "get",
dataType: "json",
data: {
pid: pid
},
success: function (result) {
if (resul... | 1 |
6436ea6d513b437b690eea0b0cd32fa3 | 55e1cbbd72a40dd1601a7cb86b88b31b | Move a message from the trash. | resource_name = 'message_trash'
if params is None:
params = {}
resource_args = {
'message_id' : message_id,
}
response = self.do_request('post', resource_name, params=params, resource_args=resource_args)
if response.status_code == 200:
... | 0 |
4839f451675f99fad9620b52301ff0b7 | f3398b8df93c8c33db41cfb1f0144c20 | Sets the 32-bit integer flag value. | class SR(_Register):
def I(self, val):
self._set_bit_value(2, val) | 0 |
3d3d0eaf90bb812490540045f03a6920 | ca0c3d0a0d9d931777ef4553470b82a7 | Tests if getting ledger balance is successful. | {
$this->createTransaction();
$count = $this->database->table('ledger')->where(['provider' => 'stripe', 'transactionable_id' => 2, 'transactionable_type' => 'Groundwork\Order'])->count();
$this->assertEquals(1, $count);
} | 0 |
8ded7e70f9553339eb4d3d9b1c139669 | b26eb47c1aee09fa68d5e5f367fd04f5 | make parent process wait for a child to terminate | void command::abt_Wait(command::abt_proc& parent) {
if (parent.pid != 0) {
int wait_flags = 0;
int wait_status = 0;
int rc = -1;
do {
rc = waitpid(parent.pid,&wait_status,wait_flags);
} while (rc==-1 && errno==EINTR);
if (rc == parent.pid) {
pa... | 1 |
03eee720c8d454401e21fd88a1b33dda | 74b18771a398bb9c4d3d48f7edfa8bb4 | Apply "partially-refunded" value. | class V1RefundBuilder
public function refundedMoney(?V1Money $value): self
{
$this->instance->setRefundedMoney($value);
return $this;
} | 0 |
05b1323461e602bc16d099a09fff8613 | 9ac97b41894c705f9efa7839cb13d2a4 | Augmenter les droits d'un utilisateur | function modifDroit($idUser, $idDroit) {
$dbLink = connnectDB();
$query = "UPDATE user SET id_droit=$idDroit WHERE id=$idUser;";
if(!($dbResult = mysqli_query($dbLink, $query)))
{
echo 'Erreur dans requête<br />';
echo 'Erreur : ' . mysqli_error($dbLink) . '<br/>';
echo 'Requête ... | 1 |
889d9656d62371decc9ee6efc20a145b | 8e9d551ae120971d08f24bcd6832e357 | --------------------------detail----------------- | def detail_factor():
for i in range(len(purchases)):
print(colored('code number : ', 'yellow', attrs=['reverse', 'blink']),purchases[i]['code number'])
print(colored('name : ', 'green', attrs=['reverse', 'blink']),purchases[i]['name'])
print(colored('weight : ', 'yellow', attrs... | 1 |
30e1f071b3eb4ac73c92eebdf09ab1f3 | 0a2c51e3dfae9a5db1d7040859fdffdc | =======================================================================================================
메인UI 오픈 버튼 클릭시 호출 | public class RootButton : MonoBehaviour
public void OnClick()
{
Game.UIModule.Open(UIName.Main, true);
} | 1 |
bc9f79db571e251ca19474193faf0072 | 546aaf496ca8230490d405e75fcfb05a | Getter method for bad_cunsr_percent | class Distraint
public function getUnseizablePercentage()
{
return $this->unseizablePercentage;
} | 0 |
77649aa3ed3c09ecb459efe77f143b7e | 01e3c615c3802206d03c7f8104db5b7a | This adds a property descriptor for the Ambient Intensity feature.
<!-- begin-user-doc -->
<!-- end-user-doc --> | Object object) {
itemPropertyDescriptors.add(createItemPropertyDescriptor(
((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(),
getString(
"_UI_LambdaRestApiPropsBuilder_apigateway_defaultIntegrationWithIntegration_software_amazon_awscdk_services_apigateway_Inte... | 0 |
43fc49cbef112a7aef4d4b75c863dc41 | e6cc9ee38036deba9d4943b161bb3099 | Constructs the loss for R2D2TorchPolicy. | class DQNModel(BaseQModel):
def _build_loss(self, results, features, labels):
reward, action, done = labels['reward'], labels['action'], labels['done']
target_q_values = tf.reduce_max(self._target_results.q, axis=1)
action_selector = standard_ops.one_hot(indices=action[:-1], depth=self.num_actio... | 0 |
2b98ea7273e15bd73ce2af124a1a63e4 | ef7d9bb8245bd785498e0f9209a93585 | Returns revenue aggregated by month | class StatisticsDatabase(AbstractDatabase):
def get_monthly_revenue(self):
query = f"""SELECT month({BookingDatabase.FROM}) as month_number,
sum(round((unix_timestamp({BookingDatabase.TO}) - unix_timestamp({BookingDatabase.FROM})) / (60 * 60)) * {CarDatabase.COST_PER_HOUR}) as monthly_revenue
... | 1 |
c2ceec716ce865a43641a70f24da9b08 | ddf072251f3425cd324e1cbd083b2bab | Hide The Progress Bar and Show Result List | namespace TestCaseManagerApp.Views
public partial class TestCasesInitialView : System.Windows.Controls.UserControl, IContent
private void HideProgressBar()
{
this.progressBar.Visibility = System.Windows.Visibility.Hidden;
this.mainGrid.Visibility = System.Windows.Visibility.Visible;
... | 1 |
aebe50789a11bf4468b7bcdbcc5fb68d | 7dcf4c95811fc4f05792242541d10f79 | To set a particular backend as busy | public void rBusy(Rengine engine, int which) {
EditBus.send( new RBusyMessage( which == 1)) ;
} | 1 |
1e4e70d7fb0362caff142c3e5ba57d51 | 1418f5b2aa8e6991456cb313c329aa72 | Update timestamp in RFC3339 text format. | if not datetime:
return None
else:
datetime = datetime.astimezone(utc)
return datetime.strftime(rfc3339_datetime_format) | 1 |
d2f600a5778d83c70d1d7adbaec39538 | 67f870c834f2ad0d1431fd0b10baee45 | 设置本地的警告数据已处理 | class WarnInfoController extends BaseController
public function Deal_with()
{
$where['wm_id'] = I('get.wm_id/d', 0);
$data['war_status'] = '1';
$WarningMessage = D('WarningMessage');
$res = $WarningMessage->where($where)->save($data);
$this->success(U('/Admin/Scy/WarnInfo/ind... | 1 |
62b4b3fe3d7d1075ca87cc209b8a553b | 068853f5a64fc04e47c8cde1ac6ab240 | Funcao que imprime todo o vetor de struct | void vetor_print(char* v){
int i;
for (i = 0; i < TAM_VETOR; i++){
printf((i == 0) ? "{" : "");
printf("%c", v[i]);
}
printf("}\n");
} | 0 |
fa5ced1b984181d8c7f6751da4ddc92c | 900c65886028dfb80d371d025d932013 | Get the python object equivalent to the current value of this property | abstract class Property_Controller_Value_Type
public function getPropertyValueObject()
{
$pluralName = Core_Inflection::getPlural($this->_modelName);
return $this->_property->$pluralName;
} | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.