query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
ccea9ecba30b64eb40fedd0d71eb96c2 | 2d55de9814663f29a96e0893dae7adce | GET: Endereco/Create | {
if (!User.Identity.IsAuthenticated)
{
return RedirectToAction("Index", "Home");
}
return View(db.Enderecoes.ToList());
} | 0 |
ab8205ebf7fac1e0662104cd771d0281 | 97f976c354e250a6e8e496c5d80b9370 | Emission du signal quand importer un résultat de simulation est choisi dans le menu | def selectionresultat():
global indicA,indicJ,indicL
if calculestat()!="error":
choixzone()
affichageposition()
affichagestat()
affichagestatzone()
lablouperreussi.destroy()
valid.destroy()
boutontableur() | 0 |
605d0da1dd15d8958dabd737a6f7da12 | cfa0bb7f140c0429fd0194dca9c9b882 | Find any non-builtin and non-nested function call to pull the callee
as part of the import. | class FunctionCallsPass(SafeASTTraversal, ASTUtilsMixIn):
def __init__(self, ast):
SafeASTTraversal.__init__(self, ast)
self.postorder() | 0 |
a030d0b6b1abb94724651aeb835d1e88 | b71a921c3366a098150fe09ec966fa9b | 删除歌手信息 | {
string sql = "delete from Music where SingerID='" + model.SingerID + "'";
db.Exec(sql);
} | 0 |
266d1ee11934379a2df573962b9447c7 | debe2300f46b7c2011310dbff213fbbc | 加载分省扣量数据 | function loadBase() {
queryQzzJyqkSjtj();
loadQylyrsSjtj();
loadXtyffxtjData();
} | 0 |
05ea869b9d8d0afe6e6a3a5026f40e69 | 3623076ca244cd705b60651dcbc477d9 | save pathconf info for NFSv3 mount | static int
ufsfifo_pathconf(ap)
struct vop_pathconf_args *ap;
{
switch (ap->a_name) {
case _PC_ACL_EXTENDED:
case _PC_ACL_NFS4:
case _PC_ACL_PATH_MAX:
case _PC_MAC_PRESENT:
return (ufs_pathconf(ap));
default:
return (fifo_specops.vop_pathconf(ap));
}
} | 0 |
35894f06822bb6888ecd3c5e4c1d9016 | 1de722cbd5e113c41be9dfa8935cd8cf | Returns the payload of status response. | class Status implements ResponseInterface
public function getBody()
{
} | 1 |
7047ad3f603ccf75474f5d543a1ad98c | c368b1d4bf395e522383616f7cffc166 | 10進数を36進数に変換 | {
System.Text.StringBuilder s = new System.Text.StringBuilder();
if (number == 0)
{
s.Append("0");
}
else
{
if (number < 0)
{
s.Append("-");
number = -n... | 1 |
2144cf674f4119ce7e87d85ffc8bef0d | 1f135068f03676e032d63625e7dfe9a2 | 测试方法,并行调用,检查最终结果 | namespace AutoCSer.Example.TcpInterfaceServer
class ClientAwaiter : IClientAwaiterServer
[AutoCSer.Metadata.TestMethod]
internal static bool TestCase()
{
return TestCaseAsync().Result;
} | 0 |
ed667657175b1bf4d6660bad18a02260 | 7a3fa51c628b083b84401da12f148bcc | Gets connector from dpurl. | public CompConnector getConnector(); | 0 |
4a945125100e5274b108df34060422fe | 7ca78201ddab66176453f23c97d79c35 | 计算产品采购成本 | @Component
public class RepairOrderCostCaculator
public void calculate(SalesOrderDTO salesOrderDTO, Map<Long, Inventory> inventoryMap, Map<Long, ProductLocalInfoDTO> productLocalInfoDTOMap) {
if (salesOrderDTO == null) {
return;
}
salesOrderDTO.setTotalCostPrice(0d);
SalesOrderItemDTO[] salesOrder... | 1 |
efa87a72ed994212d71cd1a3a4d45056 | ffeadf8674f42af1ae27595c1d61d174 | Unsets the value of the '{@link org.oasisopen.names.tc.opendocument.xmlns.presentation.SettingsType#getFullScreen <em>Full Screen</em>}' attribute.
<!-- begin-user-doc -->
<!-- end-user-doc --> | void unsetFullName(); | 0 |
28f4543b375d1270581d7d5cc57ef622 | 6bd9ff806dec400e8303a6268925e4ba | Frequency constructor. | class StringFrequency
function __construct() {
$this->sSourceAddress = '/tmp';
$this->bResourceIsDir = false;
$this->aLines = array();
$this->aSentences = array();
$this->aWordFrequencies = array();
$this->sExclusionList = 'exclusionlists/el-1.txt';
$this->sFilter = '';
$this->iWordCount = 1;
$this->a... | 1 |
ac6619211fba36511079f729836f3b04 | bcda35d11fcdb6ae1afdd6e25b1ae320 | calculate the inertia term: y = current_pos + current_vel*h.(explicit Euler prediction) | df::Vector df::Object::predictPosition() {
Vector new_pos = position + getVelocity();
return new_pos;
} | 1 |
0fc70de003fbe90f474b1a774c2db524 | b745ddc2e068933c4f2d1292404eb13c | Generator that creates SVG paths (as strings) from the current stroke | return (
'newpath {centre_x_pts} {centre_y_pts} {radius_pts} 0 360 arc\n'
'closepath\n'
'{line_width_pts} setlinewidth\n'
'stroke\n'.format(centre_x_pts=self.centre_x_pts,
centre_y_pts=self.centre_y_pts,
... | 1 |
21059ba599d4d6d2bf6af256d2dd3f4b | 2233f4ae5fe7ebbe02d27d52cfd939ce | Private Method, executes an Actual command from VBoxManage.exe. | class VirshDomain:
def _execute(self, command):
output = ""
exitcode = -1
try:
proc = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=False)
out, err = proc.communicate()
exitcode = proc.returncode
... | 0 |
039384a0d1c8dd69997b3e0339e31d76 | ccccc53eeb8bcbaa3fb842af70fdf093 | APP数据库中 没有用户信息,即登录不成功 | public class LoginActivity extends BaseActivity implements LoginContract.IViewContract
@Override
public void getUserInfoFailure() {
ll_login.setVisibility(View.GONE);
} | 1 |
5b1a8fc1fe38889e3097eb027e97bed6 | 36ece5ae3dd0500dd3db60dd615f8385 | Vemos varias operaciones que podemos realizar con LINQ | Auto[] autos=new Auto[4];
autos[0]=new Auto("Fiat","Palio","Negro");
autos[1]=new Auto("Ford","Fiesta","Rojo");
autos[2]=new Auto("Renault","Kangoo","Azul");
autos[3]=new Auto("Citroen","C4","Blanco");
for(Auto auto:autos) System.out.println(auto);
List lista=new ... | 0 |
9c327439444f1239e80f4c69d31a29da | ec2dd94336da609b437fe02017286bee | This function takes in a list of integers and returns a dictionary of the five number summary
values are rounded to 2 decimal places | try:
items_length, sum_of_items = 0, 0
for item in items:
sum_of_items += item
items_length += 1
for i in range(items_length):
for j in range(1,items_length):
if items[j-1] > items[j]:
(items[j-1], items[j]) = (i... | 1 |
03151203b01ccba7b61ade09771f9bb4 | 064bfede853fafea49cba3af4766400a | This method returns the latest <em>zman krias shema</em> (time to recite <em>Shema</em> in the morning) based
on the opinion that the day starts at <em>{@link #getAlos16Point1Degrees() alos 16.1°}</em> and ends at
{@link #getSeaLevelSunset() sea level sunset}. This is the opinion of the <a href=
"https://hebrewbook... | public class ComplexZmanimCalendar extends ZmanimCalendar
public Date getBainHasmashosRT13Point5MinutesBefore7Point083Degrees() {
return getTimeOffset(getSunsetOffsetByDegrees(ZENITH_7_POINT_083), -13.5 * MINUTE_MILLIS);
} | 0 |
207783ff5ddb31fd8a94a509426cd30e | 256730d8d004d0fed0c576b580b9e0ba | check activeMQ connection status | try:
cl.is_alive()
except Exception, err:
msg = "Can't connect to '{0}'"
print(msg.format(rabbitmq_url))
exit(1)
return True | 0 |
43dc1e66fd55b682c43f67b634a2e6f5 | c721bb1279f19bd74f89dd310b39e024 | hàm lấy danh sách phiếu chi tiêu | {
try
{
var query = from itemCTCTDB in db.CHDB_ChiTietCatTams
orderby itemCTCTDB.CreateDate descending
select new
{
In = false,
... | 1 |
219865a4e4b03110c0e209b0962508a9 | 8fcc50d05dfab231436f22aa2bf7f102 | Compute Decibels relative to full scale . | class AudioProcessingHelper:
def db2lin(cls, log_spec: np.ndarray) -> np.ndarray:
return np.power(10.0, log_spec / 20) | 0 |
b3bcbe73c2b04cc2339e0d00751227cf | 9b909b09a1a1f5faeac11a0da76a3316 | Clears the screen with a white color | def clear_screen():
screen.fill(THECOLORS["white"]) | 1 |
b2aafefa5ae32eeda328cb6003261b33 | 25b79b107e2aa90d6953d191bd09294e | Procedimiento que hace que el hilo principal del programa se quede parado durante 10ms (0.01 segundos) | {
for(volatile int i = 0; i < 1000; i++);
} | 0 |
d80bc77577cf92245adc24a53fea9385 | 7171fedfa5ceb26efd6e540466634378 | Specifies the amount of time it will take for the popup to appear. | public class Tooltip extends Basic<Tooltip> implements Component
public Tooltip showDelay(Integer showDelay) {
this.showDelay = showDelay;
return this;
} | 1 |
4c49d08c3c9cef056dc485ca3096c0a8 | 4a789c90e20f7d0e61dfc07e2bbfec91 | https://github.com/EpicGames/UnrealEngine/blob/6c20d9831a968ad3cb156442bebb41a883e62152/Engine/Source/Runtime/CoreUObject/Private/UObject/PropertyTag.cpp#L80-L169 | {
#if WITH_EDITOR
FGuid PropertyGuid = FStructureEditorUtils::GetGuidFromPropertyName(Name);
return FStructureEditorUtils::GetVariableDisplayName(this, PropertyGuid);
#endif
const int32 GuidStrLen = 32;
const int32 MinimalPostfixlen = GuidStrLen + 3;
const FString OriginalName = Name.ToString();
if (OriginalName... | 1 |
2bdb5d8bcdee4430c4fba99091a1541e | 9ee072aa1e77a25c5355deb76e06546e | Construct an Note out of the pieces we have. | public final class Note implements Durational, Pitched, Notation.Connectable
public static Note of(Pitch.Base pitchName, Pitch.Accidental accidental, int octave, Duration duration) {
return of(Pitch.of(pitchName, accidental, octave), duration, null);
} | 1 |
44d76dc5d8f396ee08f836815515931f | f81d2c95182f80fffd7c393add1d4b69 | 是否需要过滤,这里为true,需要过滤 | @Component
public class CustomZuulFilter extends ZuulFilter
@Override
public boolean shouldFilter() {
return true;
} | 1 |
a44d14c9670814c92bff3232be1cb85e | 6a455aff609432d00feccbf58af6bb3a | Accessor for 'service_provider' field. | try :
return self._serviceproviderid
except Exception as e:
raise e | 0 |
675676172d3504ade445f91d0be2c336 | da2ea338e38d0c1fdbb1da9005519c22 | Get the density (and optionally uncertainty) at the requested point(s). | class DensityProfile(ABC):
def mass(self, r):
if np.isscalar(r):
M, dM = quad(self._r2density, np.finfo(dtype=float).eps, r)
return M
M = []
for _r in r:
_M, _dM = quad(self._r2density, np.finfo(dtype=float).eps, _r)
M.append(_M)
return np.... | 0 |
dd098b4d1337911f2b13d684e5733761 | 039623a156fb191adbb6874ea43dbe75 | Descripción corta: devuelve el id del usuario logeado en el sistema
Descripción larga: | class RegistryHelper
function getIdUsuario()
{
$registry = &$_SESSION['registry'];
return $registry->getEntry('ID_USER');
} | 1 |
43fcb3cc0cbf7c37fddc8eacbc5cca9e | af2b0d350cdf651e784888aa1001aa1b | plot the cells spatial firing, each detected place field has different color | diameter = 21.44/1000;
area = np.pi*(diameter/2)**2;
s = area*4/np.pi
s = s*72/0.0254*1000
sc = ax.scatter(X, Y, s, c, **kwargs)
ax.set_xlim(-0.1,0.1)
ax.set_ylim(-0.06,0.06)
plt.colorbar(sc, ax = ax, orientation = 'vertical')
ax.set_aspect('equal')
ax.set_axis_off()
vmin... | 1 |
3d73ef6b0e0cd2adef645e6934d8a9c3 | e14bc255893919d0937bce1a611d7cab | Creates an HTML list where each element corresponds to an
image or video output
Returns:
HTML formatted string with the list with elements | class ListWidget(Widget):
def format_output(self, rendered_widgets):
return ''.join(rendered_widgets) | 0 |
360785efec4434e845c1052598e05456 | 5a5bac97789fcc32769a410339dbd0cd | 定義以學生與學期查詢班級課表 | List<TimeTableDTO> queryTimeTable(String studentId); | 0 |
0e528ba54a72649ff32a83bc981ab808 | 6840f9773c4c1493441a763074703882 | wap文章精听详情 | class ProductController extends BaseController
public function washDetail() {
$id = intval(\Request::input('id'));
$cacheKey = sprintf(config('cache.ARTICLE.DETAIL'), $id);
$detail = redisGet($cacheKey);
if (false === $detail) {
$filter = [
'content_type' => self::CONTENT_TYPE,
'article_id_arr' =... | 0 |
6bbfd7c4e46d6f6fac92feaf4bfa6c92 | 224c16fab97fefccc9bbc507b5d30e75 | True if the elevator has nothing to do. | bool MinAccel::getStatus(void) {
return T.size() == 0;
} | 1 |
0e82c38bb5468d10ef6fdec065f73c2e | de1a9aa5b8ffdd11b80fc7f9b2fa2367 | Notify the wall panel that a supplement tile was drawn | const UINT wTab, const UINT wTileNo)
{
ASSERT(wTab < this->wNumTabs);
this->pwTabTileNo[wTab] = wTileNo;
} | 0 |
14f0c2c83cd46d9dac5957d1e2961ada | c85bd82d8a67e23ebdca6f5635b10fba | Clicks on the premium button | class PremiumPage(Base):
def click_login_premium(self):
self.click_element(Page_en.premium_login_xpath) | 1 |
4802d66a79526cf84187c5300b245aa8 | d98bd744c4b91367fc6b5321e3a74d03 | Редактирование защищенных данных пользователя (пароль, телефон и т.п) | foreach($_POST as $key => $val){
if($key == "x" || $key == "y") continue;
if($key == "password"){
$val=trim($val);
if(!empty($val)){
$val = md5($val);
}else{
continue;
}
}else{
$val=clear($val);
... | 1 |
5e9a979e6f5974fd23561df0ec7745c9 | 3ac1748e087aee358911a268aa4ee0e8 | 递归替换菜单名称 | function menuStripping(menuOld,menu,mem,type) {
let memParents = Menu.findMemParentsAndSelf(menu, mem,type);
if(Comm.getLength(memParents) > 0){
for (let j = Comm.getLength(memParents) - 1; j >= 0; j--) {
let rp_item = Comm.getItem(memParents, j);
if(Comm.equa... | 0 |
2727e3f80972aa6bc08f78712bc38ad0 | e192732696d08d26d09d1a9dd90c2003 | @brief Demo Program for ADXL345. | int main(void)
{
int16_t x_acc;
int16_t y_acc;
int16_t z_acc;
int16_t x_gyro;
int16_t y_gyro;
int16_t z_gyro;
int delta;
HAL_Init();
SystemClock_Config();
MX_GPIO_Init();
MX_DMA_Init();
MX_ADC1_Init();
MX_I2C1_Init();
MX_I2C2_Init();
MX_SPI2_Init();
MX_TIM... | 0 |
3aab1441decff645ebebbb5a9082ead6 | dcd4b005af1935cbfb339e64db67cbdd | Generates the TF-IDF weight for every word in the text | class calculator(object):
def GetTF(self, corpus):
WordsSum = len(corpus)
tf = {}
for word in corpus:
wordtf = corpus.count(word) / WordsSum
tf[word] = pow(wordtf, self.m)
return tf | 0 |
e4134a6facf12850af31212869ea3c1c | 60eb4603b49cb2dc94cc05e31aad9967 | look for next/prev product code | enum_move_prg_pointer_retcode retcode;
unsigned int ui_top_of_list_passed;
TipoUnionParamWalkReg u;
memset(&u,0,sizeof(u));
retcode=enum_move_prg_pointer_retcode_ok;
ui_top_of_list_passed=0;
if ((op!=enum_walk_reg_file_list_next)&&(op!=enum_walk_reg_file_list_prev)){
retcode=enum_move_prg_pointer_retcode... | 1 |
a16c1db0fda3ea8fce223035ce8eb331 | 46f4acb4df2bc06949d9c1f0fc9dd289 | a function to translate a dna sequence in 3 forward frames | seq1 = ''
seq2 = ''
seq3 = ''
for frame in range(3):
prot = ''
for i in range(frame, len(seq), 3):
codon = seq[i:i + 3]
if codon in codon_table:
prot = prot + codon_table[codon]
else:
prot = prot + 'O'
if frame =... | 1 |
49ccc11b16462795c996cf89bfe157a7 | 4e763a4cf5e755222dabd28808b02693 | 将某一关卡字符串变为二维数组 | public class Util
public static int[][] strTo2d(String source, String outerdelim, String innerdelim) {
String s = source.trim().replaceAll("[^" + outerdelim + "]", "");
int[][] result = new int[s.length() + 1][];
int count = 0;
for (String line : source.split("[" + outerdelim + "]")) {
... | 1 |
2d98957d2a5c9c2210857bd28da577bd | f1fd289202067c808dbb80850de0b35f | Create a new ServiceController instance.
... | class Controller extends AbstractController implements Repositoryable, Modellable, Dashboardable
public function __construct(AjaxResponse $response)
{
$this
->setResponse($response)
->bindServices()
->init();
} | 0 |
922c3e170759a16077810ae65b08f284 | 10634620ff664b143af7a016786f0fe2 | Perform the build on a source file with a target destination. By
default simply performs a copy of the source file. Subclasses may
override to implement processing of some kind | namespace Mage
public class FileContentProcessor : FileProcessingBase
protected virtual void ProcessFile(string sourceFile, string sourcePath, string destPath, Dictionary<string, string> context)
{
} | 1 |
e560d69874234587e115ea7d6c7128b1 | 70eb76594ee410b1a204bfd0ab8588d1 | 通过名字设置ONNX节点的权重 | for key, value in weights.items():
if module_name.endswith(key):
return value
else:
return DEFAULT_WEIGHT | 0 |
b09eed1c08f33bc96fe531006e2544db | 3e7d7dabfc5039513387bc2f0ddb5225 | net_protocol_route_get_iface_unimplemented() - default handler for <proto>_route_get_iface() | static void my_cb_notimplemented(struct qman_portal *qm, struct qman_fq *fq,
const struct qm_mr_entry *msg)
{
} | 0 |
a6ab5470aa118e9eea5559c7d06dc328 | e0e79372d380933d629e7dfc0dd42f09 | 部署nginx | fmt.Println("Configure nginx...")
module := "--add-module=" + nginxDir + "/tmp"
configure := "cd " + nginxDir + "/tmp/nginx-* && " +
"./configure --prefix=" + nginxDir + "/nginx " +
"--with-openssl=" + nginxDir + "/tmp" + "/openssl-OpenSSL_1_1_1d " +
"--with-stream " +
"--with-ld-opt=-Wl,-rpath," + os.Getenv... | 1 |
c478485386f6fdbaadecab0b25a14fec | c786b35acaa165229b1387093a703aa6 | Método que elimina una imagen de la habitación | @SuppressWarnings("serial")
@Entity
@Table(name="ruta")
public class Ruta implements java.io.Serializable{
public Boolean eliminarImagen(String nombre){
return true;
} | 0 |
313e1695a6d59b9d883c1e172681a4d7 | 6e60bfba6f4de13dc400b4a2aa02fcbd | Executes business logic to determine if an instance of the application should prompt the user to solicit user ratings.
If it determines it should, the dialog to solicit ratings will be displayed. | public class AppRate
public static void showRateDialogIfMeetsConditions(final Activity activity) {
if (shouldShowRateDialog()) {
if (activity instanceof FragmentActivity) {
showRateDialog((FragmentActivity) activity);
} else {
showRateDialog(activity);
... | 1 |
f8a9b33b7abfd11abed60b654b60bae1 | 29efd39de0eddc07d315d85e10d2dcc4 | Initialize network with the given mac address and http port | mymac[5] = options[OPTION_DEVICE_ID].value;
if(!ether.begin(ETHER_BUFFER_SIZE, mymac, PIN_ETHER_CS)) return 0;
ether.hisport = http_port;
if (options[OPTION_USE_DHCP].value) {
if (!ether.dhcpSetup("opensprinkler")) return 0;
}
else {
byte staticip[] = {
options[OPTION_STATIC_IP1].value,
... | 1 |
29e0b70a362d8fc93ddeb4ac4734a8c7 | 4db93037f6fc72de5c3c78b8ebb5d448 | 年度绩效公式新增 | public class PerformanceReportAction extends BaseFilesAction
public String showPerformanceKPISummaryAddPage() throws Exception{
String yearmonth=CommonUtils.getCurrentYearLastMonStrMonStr();
request.setAttribute("yearmonth", yearmonth);
SysUser sysUser=getSysUser();
DepartMent departMent=getBaseDepartMentServic... | 0 |
be7e02fd8ae7edce6b2f0e3159f1482c | 81b33862ac00f0612bf02520cf7a33e4 | Returns the number of cameras on the device that support video recording | public class Pv
public static native int CameraCount(); | 1 |
c2603e74b376e37c5d6fa9ac45048e85 | 1f8b71b3693b141023dda259f5eaff51 | presents instruction to start task
via pressing space bar. | def task1(prime_stimulus):
prime_sentence = actr.define_chunks(prime_stimulus)[0]
actr.set_buffer_chunk('visual', prime_sentence)
actr.goal_focus('wait-for-screen')
actr.run(10) | 0 |
0949d8004cd5ee729ca714aea328f81e | bf714e5bd5d030490bab274a82646ade | differentiate based on the register;
we map the 16-bit registers to their 32-bit
containers (e.g., AX -> EAX) | switch (register_name) {
case RegAL:
case RegBL:
case RegCL:
case RegDL:
case RegAH:
case RegBH:
case RegCH:
case RegDH:
case RegDIL:
case RegSIL:
case RegBPL:
case RegSPL:
case RegR8B:
case RegR9B:
case RegR10B:
case RegR11B:
case RegR12B:
case RegR13B:
case RegR14B:
case RegR... | 1 |
69fbd4b0220c5233206079f8f2e8f28a | bd7044e920fa9ac3edc23d6644218c8a | @brief Erstellt die Metadaten des Vorgangs und übergibt diese an den FileHandler | if (HookRegistry::call('MinutesFileManager::handleWrite', array(&$contents, &$fileId, &$result))) return $result;
$minutesFileDao =& DAORegistry::getDAO('MinutesFileDAO');
$typePath = $this->typeToPath($type);
$dir = $this->filesDir . $typePath . '/';
if (!$fileId) {
$minutesFile =& $minutesFileDao->getGen... | 0 |
9a9a5f41af3572ce99a43b0b63995663 | 74568bf754e02a1581e4801bfc404de5 | 思路:几个加热器放在不同位置的房子处,每个加热器有相同的覆盖范围。已知房子位置和加热器位置,求加热器的最小覆盖半径,可以让所有房子取暖。
由此将此问题简化为求每个房子与最近加热器的最小距离,要满足所有的房子,那么结果就是这么多个最小距离的最大值。 | public class findRadius
public int result(int [] houses,int [] heaters){
int res=0;
int n=heaters.length;
Arrays.sort(heaters);
for(int house:houses){
int left=0;
int right=n;
while (left < right) {
int mid=left+(right-left)/2;
... | 1 |
e96ff2269306a64db6340e8b2027deb7 | f41ea22daf99538e6b0cedee975312c6 | Write tasks in JSON strings to the storage file. | void saveTasksToFile() throws FileNotFoundException, IOException; | 0 |
70b82e303989f47afbf7517d30027613 | 5202a1812ad9a7beb25a0f92d49693b9 | Configures Exception Type Analysis | void SetExceptions() {
u32int temp2;
SetCallStack(8)
temp2 = (u32int) & DivBy0Exception;
IDTS[0].Offset1 = temp2 & 0xFFFF;
IDTS[0].Selector = 0x8;
IDTS[0].Zero = 0;
IDTS[0].W=0;
IDTS[0].MB3=3;
IDTS[0].D=1;
IDTS[0].Zero2 = 0;
IDTS[0].DPL = 0;
IDTS[0].P = 1;
temp2 = temp2 & 0xFFFF0000;
IDTS... | 1 |
b525ec0890f37d76ac6e64578a0e3ee2 | 5dc2a0ae22d9653b1c2977f327c40396 | Get The billing version. Valid values: `0` (original billing) and `1` (new billing) | public class User extends AbstractModel{
public String getBillingType() {
return this.BillingType;
} | 0 |
c18d722bd8530a61ba0799b52ccd8bbf | ac5305acf65f715b3a79dfb8cce3060f | @brief Returns charge pump UP offset current. | static int get_const_charge_voltage(struct smb347_charger *smb)
{
int ret, intval;
unsigned int v;
if (!smb347_is_ps_online(smb))
return -ENODATA;
ret = regmap_read(smb->regmap, STAT_A, &v);
if (ret < 0)
return ret;
v &= STAT_A_FLOAT_VOLTAGE_MASK;
if (v > 0x3d)
v = 0x3d;
intval = 3500000 + v * 20000;
ret... | 0 |
f5963da5e50db8994d389a1ceffcf204 | 73e8d5703cb10e89598fd9b2124580ac | Return UNIX style GECOS info | def _get_users_full_name_gecos() -> Optional[str]:
try:
return pwd.getpwuid(os.getuid()).pw_gecos.split(",", 1)[0]
except KeyError:
return None | 1 |
f3fba8f15fbe883908de545cfda42da7 | c033994fcff8e6a03c0b785f21abaf4c | This is the function that runs when an item from the list of objects/types
is clicked. It loads the available options into the #inputOptions div | function selectInput(e) {
var name = e.target.innerHTML;
var type = e.target.getAttribute('data-type');
if ($("#selectionType").html() != "predicate") {
updateInputOptionEntity($("#selectionName").html(), $("#selectionType").html());
}
var form = "";
form += "<h1 id=\"selectionType\">" +... | 1 |
f57f379550edff7eb47af112ae39541d | bd66e6ae32271c50d37b31adf836c78b | 接收前端发送过来的数据并发送到ssh执行通道 | comReturn = comm.local()
if comReturn: return comReturn
if not ws: return 'False'
get = ws.receive()
if not get: return
get = json.loads(get)
import ssh_terminal
sp = ssh_terminal.ssh_host_admin()
if 'host' in get:
ssh_info = {}
ssh_info['host'] = get['host'].strip()
... | 1 |
b204bff6cf3167fb2333119cdd8d8513 | d16df185e9feb46d2ba9b433fd079bf3 | 按列表索引删除门类类别 | state.mattersList.classifications.splice(classIndex, 1)
state.mattersList.classifications.forEach((classification, classIndex) => {
classification.matters.forEach(matter => {
matter.classIndex = classIndex
matter.matterSons.forEach(matterSon => {
matterSon.classIndex = classIndex
})
}... | 1 |
5302adaccea0083f6bdfbd1d069e1d75 | ae966863cbe11cb524a5211a7aacf1b0 | Sets the next page item text | namespace Extensions.Pager
public class PagerOptionsBuilder
public PagerOptionsBuilder SetNextPageTitle(string nextPageTitle)
{
PagerOptions.NextPageTitle = nextPageTitle;
return this;
} | 1 |
70097ffec017693e33a1f9e886b9578e | e150700ec064f2f4953297e9c8986add | GET: Candidatos | {
ViewBag.DatosC = ManejoCandidata.Buscar(word,true, m);
ViewBag.DatosM = ManejoMunicipio.getAll(true);
ViewBag.word = word;
return View();
} | 1 |
d81d21833ecb8b960c6d17fd147f9117 | 20e266b2ae6b633eab37f6090e1e1987 | Input is a string
Output is a string with capital first letter | first_letter = raw_string[0].upper()
str_list = list(raw_string)
str_list[0] = first_letter
raw_string = "".join(str_list)
return raw_string | 1 |
6d743f34d61853262bb21eb2c18779d0 | cd2f2794b4d340ec58bd2fd0e1212e67 | 给单测注入属性 | class TestUtil
public function injectRedis(PHPUnit_Framework_MockObject_MockObject $MockedRedis, $Object, $property = 'Redis') {
$this->inject($MockedRedis, $Object, $property);
} | 1 |
aceb2027cc66b397cb5e9aedf23f45d9 | add221ea8a8c0ae1964b61668cf30af0 | https://dom.spec.whatwg.org/#dom-childnode-after | insertBefore<T extends Node>(
node: T,
child: Node | null,
): T {
throw new UnexpectedCallError('Not supported "insertBefore" method');
} | 0 |
a9c96f50fb318c418253c0cc79c2fa05 | e64669d343e64cc631cfaa9df5b75a8e | Called when a list is started by the reader. Returns true to continue reading,
otherwise returns false. May raise an exception. | class GridElementDiv(avg.DivNode, EventDispatcher):
def start_listening(self):
pass | 0 |
c009efc958f1a8a7d6ace596e77bb845 | 7e4a2fe03557c88a2c3aaf84969e3eeb | Prevent XP from going over / under limits | namespace Genesys_Character_Builder
public partial class frmGenesys : Form
private void UpdateXP()
{
myCharacter.RemainXP = myCharacter.TotalXP - myCharacter.UsedXP;
lblXPTotal.Text = myCharacter.TotalXP.ToString();
lblXPRemaining.Text = myCharacter.RemainXP.ToString();
... | 0 |
bc6c37fbbcf58531f860998e2d29228d | 3a2cb82bbcc8940c376f52eebf9f503e | Return True if self is not a zero polynomial, otherwise False. | class Poly(object):
def iszero(self):
return self.car.coef == 0 | 0 |
7b4d6374636cb1ef03dc9b3ca9a604b2 | 5df7fd2445c54fb49a792099c0c33f3f | rebin an array. image will be rebinned with the size xshape, yshape
test:
a = np.arange(24).reshape((4,6))
img_rebin(a, 2, 3) | newname = histogram.GetName()+'_rebinned'
newplot = histogram.Rebin(len(bins_array)-1, newname, bins_array)
newplot.SetDirectory(0)
return newplot | 0 |
9f3a60e399ff51b1445b464eb63e0fd2 | 30946670bfcba9a6189805acf502ee6e | Returns the meta object for the containment reference '{@link org.xtext.example.mydsl.go.ForClause#getCondition <em>Condition</em>}'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | EReference getCondition_Ref(); | 1 |
ff90c8cde34d3ff8def72150ce164480 | 7e057b3d75f078fd4ff82dcba34cd59b | 获取GlobalSSH覆盖的地区列表 (回调) | mEcRegionListApi = new EcRegionListApi();
mEcRegionListApi.httpApiResponse = businessResponse;
Map<String, Object> params = new HashMap<String, Object>();
try {
params = Utils.transformJsonToMap(mEcRegionListApi.request.toJson());
} catch (JSONException e) {
... | 1 |
8803bdcf7886e2ff760e973a29ba8508 | 31bd57cfa44cdf13c9d9b62f5c9632fa | Execute the Planet (and Rocket) simulation.
Optional parameters:
* **rocket** Reference to a Rocket object - sets the initial view | function cycle() {
if (checkVisible(canvas)) {
ctx.clearRect(0, 0, canvas.width, canvas.height);
drawRocket(ctx, rocket1.position.x, rocket1.position.y, settings.time);
drawRocket(ctx, rocket2.position.x, rocket2.position.y, settings.time);
earth.draw(earth.position.x, earth.position.y);
... | 1 |
930eeabbf6b6aa1c3112ee6b8c3e8624 | 61fb5b7d820d07178319a2595c6c01ca | Get a Product Option Returns a single *Variant Option*. Optional parameters can be passed in. | class MagentoService extends \SoapClient
public function catalogProductCustomOptionInfo($sessionId, $optionId, $store)
{
return $this->__soapCall('catalogProductCustomOptionInfo', array($sessionId, $optionId, $store));
} | 1 |
dd185fb8b656af490a2512d43110e5ad | f414a05248bc19b88285f8f9c4191a37 | The function Not supported. | int SecureInetSocket::accept()
{
return -ENOTSUP;
} | 1 |
1c84829e55df3376243f2dab0f9e4321 | e76e737120e210671cde8cde31f08866 | Set the recurring price | class AbstractPaymentCreditRequestDto extends AbstractPaymentRequestDto
public function setRecurringAmount($recurringAmount) {
$this->existRecurringChargeParam();
$this->payNowIdParam->getAccountParam()->getRecurringChargeParam()->setAmount($recurringAmount);
} | 1 |
8a785f7aa037925f336f8c6db6ad550c | 5e759b58cc9528985343d835d636f699 | 放置各种类型的监测测点 | status_prefix = u'端口存活性(0:DOWN,1:UP):端口'
status_var_name = 'tcp_' + str(tcpinfo.port) + '_status'
monitoritem_add(status_prefix, tcpinfo, status_var_name)
responsetime_prefix = u'响应时间检查(单位:毫秒):端口'
responsetime_var_name = 'tcp_' + str(tcpinfo.port) + '_responsetime'
if tcpinfo.responsetime != Non... | 1 |
716215d0797d9dbf728bab8704ca3e3f | 96c92d2c7e7cbb47b8580e3b35d76906 | 采集内容并存入数据库 | public class SqliteUnitl
public static void CollectInsert(Context context , String data,String Num , int fail ,String Optype){
DBOpenHelper mOpenHelper = new DBOpenHelper(context);
SQLiteDatabase database = mOpenHelper.getWritableDatabase();
ContentValues values = new ContentValues();
values.put("CollectNum", N... | 1 |
fe1597f1210fdb0d94f289f3d65ce9d3 | e4d8c4c787424e0db8559d009799e8cb | Return the shape of the tensor (excluding batch size) returned by
this data source.
# Return value
A shape tuple (length of each dimension in the tensor). | impl<'a, 'b: 'a, 'c: 'a, T: Float + 'b + 'c> Tensor<T>
pub fn shape(&self) -> Tensor<T> {
::ops::shape(self)
} | 0 |
4113139776625147ffa7c57769dffe67 | 709f1fb16e42ba018368c2cb9d974b45 | 添加2个女孩 | {
struct student *temp_head = boy_head;
for (temp_head; temp_head->next != NULL; temp_head = temp_head->next)
{
;
}
temp_head->next = girl_head;
} | 0 |
a0ffd7eca79684929effe2c60637a81c | 9323992a53f453d380d330ddb74e520e | Add a new level to the game. Creates the level based on type, add and connects. | {
grid.RegisterNeighbourFlaggedCallback(AddWaypoint);
grid.Generate(size, type, seed, false);
if (currentLevel != null)
{
List<Vector2> coinLocations = new List<Vector2>(currentLevel.GetCoinLocations(1));
List<Vector2> objectLocatio... | 1 |
6e685e59daab98a63dccdc9873b7805d | 25d2369d7240898b83c498cd9ec01dd6 | Clears specific LoggingFilters and stops their suppression of Exceptions in Log4j. | Enumeration<Appender> allAppenders= Logger.getRootLogger().getAllAppenders();
Appender appender;
while (allAppenders.hasMoreElements()) {
appender=allAppenders.nextElement();
ExpressionFilter exp = ((ExpressionFilter) appender.getFilter());
exp.setExpression(e... | 1 |
11d3ec9d45e70934b46eb53bf1dc6b45 | f55f2caf240fcef52b9cb8a23c1f2949 | Check Item on Purchase Order Detail by Purchase Order ID & Item ID | class PurchaseOrderServices
public function ItemOnPODetail($params)
{
return $this->purchaseOrderDetail::where($params)->first() == null ? true : $this->purchaseOrderDetail::where($params)->first();
} | 1 |
eb2381ba4ceff933e7420b763ae2812e | ab42a2993428f79f2a68141f1b3dcab8 | rajoute une victoire au joueur | class Challenger
public function addVictory()
{
$this->victories += 1;
} | 1 |
6ee5665ae4c0fde727424ef96ac26c1f | 213cee1565a73050405f327ca6065389 | ajax检测静态文件是否重名 | if(request()->isAjax()){
$file = mb_convert_encoding(urldecode(input('file')),'GB2312','UTF-8');
$filename=input('filename');
$newfile = mb_convert_encoding(dirname($file).DS.$filename,'GB2312','UTF-8');
if(file_exists($newfile)){
return json(['cod... | 1 |
f208516539e67e8e0832720cc1ceeea8 | f0bf9326099be4bfe815458f7b0333c0 | Find the difference between two orientations (quaternions). | namespace Voidless
public static class VQuaternion
public static Quaternion Delta(Quaternion a, Quaternion b)
{
return a * Quaternion.Inverse(b);
} | 1 |
f2d4a85629cdc68a6762bd7a1a585cc1 | 0276c5fd74f7da3284368376adde7c8c | Converts a vanity number into a normalized E164 number. | internal sealed class PhoneNumberFormatter
abstract fun toE164Format(input: String): String | 1 |
6eb1e0d96f22570e80960992a5eee9a6 | a76cd0a4bd08ba51da722a67eac343dd | Turns off the notification panel | public class TickerCanvasView
extends GameCanvas
implements Runnable
protected void hideNotify() {
animate = false;
} | 0 |
ec6791dcd4d18b7a03127f6272046f91 | b513d252571c2b431a55bd03be7d9111 | Sends 'q' to the ffmpeg binary to gracefully stop the process.
Forcefully terminates it if it takes more than 10s. | class OMXDriver(object):
def terminate(self,reason):
self.terminate_reason=reason
if self._process != None:
self._process.send('q') | 0 |
e55dbc89baf1df80edb424d348715cb7 | 32499deed3cdd9b5015184ed603fa435 | Show the wxGlade user manual | void DREAM3D_UI::on_actionShowIndex_triggered()
{
QUrl helpURL = DREAM3DHelpUrlGenerator::generateHTMLUrl("index");
DREAM3DUserManualDialog::LaunchHelpDialog(helpURL);
} | 0 |
06fb4f7bc72bc4b993eb936e007777a9 | 1936e4ab96821f33fe794143fe5abfb8 | 同步items | class AuthAccountController extends Controller
public function actionSyncItems($auth_account_id){
$obj = AuthAccount::findOne($auth_account_id);
$obj->syncItems();
} | 1 |
1287648dabd937144a44d55653ca2bc2 | 4e929ee9a9ea9d989568332b73e6bebe | Quand on clique sur une miniature, met à jour le projet actif pour le carousel | {
int index_click = MyTiledMap.Children.IndexOf(e.OriginalSource as UIElement);
if ( index_click < List_ImageTile.Count())
{
memory = List_ImageTile[index_click].source;
memoire = List_ImageTile[index_click].nombre;
}
} | 0 |
a8d16ec82309190b4ef3ef4f54c105b9 | a9aa8995eccd6583b556813a6f063b52 | To be used during testing. Reduce the internal shapes of matrices to the given dimension.
This will make computations faster but also incorrect. | def fit_to_size(matrix, shape):
res = np.zeros(shape)
slices = [slice(0,min(dim,shape[e])) for e, dim in enumerate(matrix.shape)]
res[slices] = matrix[slices]
return res | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.