query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
95742ae802d8d8430b1325abf4f5cfed | 293a4c86731e0471070ee85154cad34c | 创建初始操作时间 | namespace Harry.Data.Handler
public class OperationTimeHandler : IDataHandler
public void OnInserting(object entity)
{
if (entity is IHasCreationTime obj && obj.CreationTime == default(DateTime))
{
obj.CreationTime = DateTime.Now;
}
} | 1 |
4fcde3115a722af244e193f4dfdc6d95 | 2a0c2120b7449da1ee977f7fe9b4357e | Release an object referenced by its key. Its reference counter is decremented. | CallingConvention = CallingConvention.Cdecl),
SuppressUnmanagedCodeSecurity, SecuritySafeCritical]
public extern static int dec_ref(hid_t obj_id); | 1 |
48861fc7b878420329025b582b6e66e1 | 5c578d0850fa5d420af69f17da4bb9df | [SearchOf.dtoSearch] Getter | public class GetTextSearchAction extends ActionSupport implements ServletResponseAware{
public List<SearchDTO> getDtoList() {
return dtoList;
} | 1 |
6dc940e328e5be472b4bfdf0689d9add | 2fd05e64d20edf2f6830fa2afec074ec | ============ PURE DNS FILTERING ============ | class Firewall:
def matches_dns_rules(self, dns_domain_name, rules_domain_name, QDCOUNT, QTYPE, QCLASS):
return self.dns_match(dns_domain_name, rules_domain_name) and QDCOUNT == 1 and (QTYPE == 1 or QTYPE == 28) and (QCLASS == 1) | 1 |
19610d2329a2902f98bc2000f57d2e06 | 1c7fae27e30fc69ca8e8078e3a2ee29a | 心情删除 | if($_GET['action']=='del'){
D('mood')->mood_del();
}else{
$where=D('mood')->mywhere();
$mood=D("mood");
$moods=$mood->field('*')->where($where['where'])->limit($page->limit)->r_select(array("user","user_name","user_id","user_id"),array("comment","comment_id","app_id",array("comment","",""," app_type=7")... | 1 |
2666e6bffa130eb9c2f4b444f3c650fb | 81a59862cd9c5cc576828160c52b3ae6 | обновляем или создаём план выпуска в базе | {
check_token();
$link = db_open();
$pid = asql($link, @$_REQUEST['plan_id']);
$group = asql($link, @$_REQUEST['plan_group']);
$name = asql($link, @$_REQUEST['plan_name']);
$min = asql($link, @$_REQUEST['plan_min']);
$max = asql($link, @$_REQUEST['plan_max']);
$percent = asql($link, @$_REQUES... | 1 |
d3084e29d32378d59691ae226fc60905 | 20f267edecdb4470462eadae510dc9a6 | 把每条用电量化为小数集合的方法 | fee.setLvyueFee((Integer.parseInt(fee.getLvyueFee()) / 100) + "元");
fee.setYunyingManagerFee((Integer.parseInt(fee.getYunyingManagerFee()) / 100) + "元");
fee.setSystemUseFee((Integer.parseInt(fee.getSystemUseFee()) / 100) + "元");
fee.setSystemMaintenanceFee((Integer.parseInt(fee.getSyste... | 0 |
0546e7a9db2dbeb0995fb37cf72d91a5 | 1ad5d1cd31e01c399c134a78d5db0335 | Get a DataFrame of the dates that are an early close. | table_name = outer.TableName(outer.DIVIDENDS, ticker)
requests_handler = bootstrap.get_handler()
df = requests_handler.get_df(table_name, force_update)
start_date = bootstrap.get_start_date()
return df.loc[start_date:] | 0 |
8b5636f54f24f4365e54f88d41c35215 | f0e5f76dd7da333e1f1426a56f0ea743 | Output the code lines of current script | fprintf(script->output, "{ \n");
for (int i = 0; i < script->length; ++i)
{
assert(i < script->length);
Gen_inst(script);
}
} | 1 |
9137d3c21920b109faf581dd2c81cb32 | 26c405d83726af3e907ffb7c0aba7272 | Test case for get_namespaced_custom_object_scale | public class CustomObjectsApi
public Object patchNamespacedCustomObjectScale(
String group, String version, String namespace, String plural, String name, Object body)
throws ApiException {
ApiResponse<Object> resp =
patchNamespacedCustomObjectScaleWithHttpInfo(group, version, namespace, plural, ... | 0 |
8bd065c99cd1f065d6aa746af3ef34ab | 1bae45b34db40162eae89f0bbf9959d6 | 支付账号收益 | {
$payAccount = $this->getPayAccountBySn($trade_sn);
if($payAccount){
$money = $payAccount->money;
$user = $payAccount->user;
$user->amount = $user->amount + $money;
$user->save();
} else {
return false;
}
} | 1 |
d36b051946421719575f4791f583c457 | 1339711e8a917e26df0c8aba5cb9cb41 | \
Loads a model from the given url.
model_url - URL of the model
opener - callable function that can load the desired url. | namespace TriLibCore.Samples
public class AssetViewerBase : AbstractInputSystem
protected void LoadModelFromURL(UnityWebRequest request, string fileExtension, GameObject wrapperGameObject = null, object customData = null, Action<AssetLoaderContext> onMaterialsLoad = null)
{
HideModelUrlDialog();... | 1 |
fb41e0a98729d94cf430a5498056c1dc | 79925983a155310f38368dd4faf0d5e8 | M�todo que muestra los aparatados en los cuales hay tutoriales de cierta
pertenencia (Nuestros o Terceros). | $v = [];
$tutor = session()->get('usu');
foreach ($tutor as $t) {
$dni = $t['dni'];
}
$v = \DB::table('tutores')
->where('tutores.usuarios_dni', $dni)
->join('matriculados', 'matriculados.cursos_id_curso', '=', 'tutores.cursos_id_curso'... | 0 |
714db6d79c19f6868d7254f71dededcc | 3d31a9c057c73f8818921f5be1d324c7 | Initialize fan control with no callbacks. | {
FAN2_I2CdriverInit( I2C0_Start, 0, 0, I2C0_Write, I2C0_Read);
FAN2_sendCommand(_FAN2_CONTROL_REGISTER_1, _FAN2_CMD1_DEFAULT);
FAN2_sendCommand(_FAN2_CONTROL_REGISTER_2, _FAN2_CMD2_DEFAULT);
FAN2_sendCommand(_FAN2_CONTROL_REGISTER_3, _FAN2_CMD3_DEFAULT | _FAN2_CMD3_INSTANT_RAMP);
FAN2_setupLUT(LUTS... | 1 |
4dd87de318f1ee4807317621b8b2871a | 0d969cf5ef8399f18133e6acb5f45cbb | Fire the attempt event with the arguments. | namespace Fallout_Terminal.Model
public class TerminalModel
private void NotifyAttemptsChanged(AttemptsChangedEventArgs args)
{
AttemptsChanged?.Invoke(this, args);
} | 1 |
1bf21ff2f5e3d0d8c8abc2e2ba08410a | 2c754c299db8f2fdf02ac1ed5dfd90d6 | Проверка на отсутствие данных в модели | bool TAbstractModel::isNull() const
{
return data()->isNull();
} | 1 |
e27cbe67878b7903a9cbd1b1a7f3dbdf | 071607b1d6fa2cfa05a9d8e4f3d0b9d9 | Change a login name | class SimpleUserService implements UserService
@Override
public User changeLogin(User user, String newLogin) throws UserWithLoginExistsException {
final Optional<User> optionalUser = userDao.findUserByLogin(newLogin);
if (optionalUser.isPresent()) {
logger.error(String.format(USER_WITH_L... | 1 |
240c81ee36db72628add4208cfb96b54 | cf4537689dadbced048dd0f2375f4b34 | Method to fetch the price from mongo DB | class Buying extends React.Component
getCurrentPrice(dogId, fn) {
buyDogMeta.getCurrentPrice(dogId, function(error, result){
if (!error){
var price = result.toString()
fn(price);
}
});
} | 0 |
b04a56647c2dc768cb05993a4ec4ca07 | 17021b4d2fe4585c95fca1ec8e73c5ab | Return an index value for a given button event code
returns 0 on non-button event. | switch (sdlScanCode) {
case SDL_SCANCODE_BACKSPACE:
return 0x0;
case SDL_SCANCODE_RETURN:
return 0x1;
case SDL_SCANCODE_LEFT:
return 0x3a;
case SDL_SCANCODE_RIGHT:
return 0x3b;
case SDL_SCANCODE_F7:
return 0x3;
case SDL_SCANCODE_F8:
return 0x... | 1 |
e2292b7deae26c19823d0ff58f9ec4ef | fd5edf646d858fb94cdd5025d7b55620 | Время в минутах от последнего сканирования до текущего времени | namespace Lab3_Battery
public class Battery
private void GetTime()
{
const string command = "/c powercfg /q";
Process cmd = new Process
{
StartInfo =
{
UseShellExecute = false,
RedirectStandardOutput ... | 0 |
2dfee3a8a698d7053f09c4809a890a25 | 86ae279266bb57afa2ac2720e7d7348d | https://www.urionlinejudge.com.br/judge/en/problems/view/1065 | {
int n = Int32.Parse(Console.ReadLine());
var tokens = Console.ReadLine().Split(" ").Select(x => Int32.Parse(x)).ToList();
for (int i = 0; i < tokens.Count(); i++)
{
if (tokens.Sum() - 2 * tokens[i] == 0)
{
Cons... | 1 |
693ccad4c5fd75676a28fc3361fe40eb | 8838553cf62f1ee059c3afe1516bb397 | Gets text describing a NMActiveConnectionState enum value. | {
switch(state)
{
case NM_ACTIVE_CONNECTION_STATE_UNKNOWN:
return "NM_ACTIVE_CONNECTION_STATE_UNKNOWN";
case NM_ACTIVE_CONNECTION_STATE_ACTIVATING:
return "NM_ACTIVE_CONNECTION_STATE_ACTIVATING";
case NM_ACTIVE_CONNECTION_STATE_ACTIVATED:
return "NM_AC... | 1 |
f4187cd3a19e649be1bf9ba0f4aa3af4 | 3aa8d1ab886994776e9b607b76e37fda | loads props automatically if log4j.properties is present in | public class Main
protected void initLog4j() {
if(getResource("log4j.properties") != null
|| getResource("log4j.xml") != null)
return;
Logger logger = getDefaultLogger();
logger.setLevel(Level.INFO);
PatternLayout layout = new PatternLayout("%d{ISO8601} %t [%-5p] %m%n");
logger.addAppender(new ConsoleApp... | 0 |
838be55039e05803ee6372c531bae0f6 | 03f24647b4c60008183e369ed41296d2 | Endpoint para remoção de um triângulo na API | class PontosController extends Controller
public function destroy(Request $request, Ponto $ponto)
{
$id = $ponto->timeline->id;
$ponto->delete();
return redirect('/timelines/'.$id);
} | 0 |
494ef9b0a498523639ab258b7fa1483f | 432fc8e159298023a24e30c325abbfdd | Calculate a list of distances and their derivatives
Takes a set of cartesian geometries then calculate selected distances and their
cartesian gradients given a list of atom pairs. | def calculate_distance_matrix(atomlist):
distlist = []
for atom in atomlist:
atomdict = {}
for partner in atomlist:
if not str(int(partner[0][1])) in atomdict.keys():
atomdict[str(int(partner[0][1]))] = []
atomdict[str(int(partner[0][1]))].append(np.li... | 0 |
68e8cc8b78898cf0c33ae43c49c60830 | 2abcc1cc1b4e69e21e499910683db5ca | This matcher validates all or part of an API response against a schema. If
the response violates the schema, it shows which parts of the response
failed to match our expectations.
be matchers (like `an_instance_of(String)`) or concrete values (like
`10`). | def output(text_or_regexp)
GenSpec::Matchers::OutputMatcher.new(text_or_regexp)
end | 0 |
b8365220d444753c0796a32f655c3acc | 9f6478ab7d366ef5df762b149d2825d3 | Update the orbital speed according to the slider's value | {
if(speed == -1)
{
MovingBall.GetMovingBall.UpdateBallSpeed(slider.value);
}
else
{
slider.value = speed;
}
value.text = slider.value.ToString();
} | 1 |
4efff5c37aad4aa643f81a74d19943a6 | c03111ab7396b619bbeddf7fb41e3b14 | 把课程表写入数据库 | if class_set == None or len(class_set) == 0:
init()
bf = Buffer()
bf.is_Sc_result = 1
tmp = original_Teaching.objects.filter(mcno__cno__cno=course, tno__username=teacher_username)[0]
bf.course = tmp.mcno
if Classrooms_id.get(place_name) == None:
room = Cla... | 1 |
d8b30d9c1e2aadc839cd8f4ea122c944 | 14f723fc9fd68ab6c5d83a02d54ee1de | タイトル名格納メソッド | public class MeiboShohonJuminJouhouShuukei
public void setKei3Title(RString kei3Title) {
this.kei3Title = kei3Title;
} | 1 |
013bd67911ba6b8756b981565b2f2ce1 | 1a4e88b0aab6a1cdfc3986281f7274ab | Takes first element in list 'opened'
and push it back onto closed | class globalOptimal():
def closedPush(self,node):
index=node.index
self.closed[index]=node | 0 |
8f3181f66cf44480f25d021ff831d3af | 802fa6da39df0dfc0f1ddb2d335876c0 | Store the original file | class MediaUploader
private function storeOriginal()
{
$this->file->move( storage_path().'/app', $this->filename );
$this->saved_images[] = $this->filename;
} | 1 |
74a69aa27422ed42127563df4ef47987 | 762a4c16f94e25f3138e3c9cd421cdb5 | Выключение доступности полей ФИО | function hidePreviousLastName() {
$('label.label_rcfamiliyaold').css('display', 'none');
$('input#data\\[new\\]\\[rcfamiliyaold\\]').removeClass('required').attr('disabled', true);
} | 1 |
ed33801e49f6adee490c9941d70147d0 | 6248fa8a5ac38f5b1e9ad8d5bebf4510 | Controls movement for blue crocs : fall down the lianas | namespace Mob
public class AIMovement : MonoBehaviour
void Fall()
{
float killingAngle = ShipManager.FinalRotation;
float boatAngleClamped = (Mathf.Clamp(Mathf.Abs(boatAngle), killingAngle, 90.0f) - killingAngle) / ((90.0f - killingAngle) / Mathf.Abs(MovementSpeed));
Move... | 1 |
c0f4259deddc7c7d81b8a34f81ad924b | 303bc9fdf67ec87570f7c1bcb092fe2b | Returns the id of all regions within the selected country. | class LocationController extends AbstractActionController
public function regionsAction ()
{
$rows = array();
$result = array();
$i = 0;
$result['total'] = 0;
$result['rows'] = null;
$result['success'] = false;
$id = $this->params()->fromRoute('id');
if (!empty($id)){
... | 1 |
b852a8f6f4a231f589bdb05e7e6f5ce8 | cc06a6904992e3b8e8e53f63772f88c9 | Joins a tribe by its name. | {
final int index = _teams.indexOf(teamName);
if (index == -1)
{
return;
}
addOrSet(_teams.indexOf(teamName), null, false, _FlagNPC, player.getX(), player.getY(), player.getZ());
} | 0 |
1233ed098393cf95afd835deeed91f1c | 2821f79b40209829fcda0c7bd1952827 | Methode zur Auswahl und anschließendem Erstellen des Arrays
Nimmt das Fach und die Notenart an | {
$lbreturn = false;
if (is_array($parrFelder)) {
$this->_arrFelder = $parrFelder;
$lbreturn = true;
}
$this->checkRight();
return $lbreturn;
} | 0 |
e4aeb221b6f28c37ed6604903c33e5e6 | ac5dbe9371d1bc926940cc79e63ad742 | Repaints questionLabel and answerPanel with next question's content | public class QuestionsScreen extends BaseScreen
private void renderQuestion() {
questionLabel.setText(questionnaire.getQuestion(questionIndex));
List<Answer> answers = questionnaire.getOptions(questionIndex);
for (int i = 0; i < answers.size(); i++) {
Answer answer = answers.get(i);
AnswerPanel answerPanel ... | 1 |
db9ff8cd716c1146bb38f79d7224fa17 | 4a51b8c09468686e949d06f54a6baaae | Propagate the wavefront through the Lyot coronagraph. | def propagate( E0, lam, z, ps ):
(nx,ny) = E0.shape
dfx,dfy = (1/(nx*ps), 1/(ny*ps))
fx = np.arange(-(nx//2), (nx//2), 1) *dfx
fy = np.arange(-(ny//2), (ny//2), 1) *dfy
Fx,Fy = np.meshgrid(fx,fy)
H = np.exp(1j*2*np.pi/lam*z*np.sqrt(1 - (lam**2)*(Fx**2 + Fy**2)))
return ifft... | 0 |
c5f4c2a2b9536aae73998193a127a123 | de4d739b70759da57273597624d572a6 | main test method that sets up the test environment and launches the tests | public class IPDRepeatabilityTest
public static void main(String args[]) throws IOException{
IPDRepeatabilityTest rep = new IPDRepeatabilityTest();
rep.setup();
rep.testRepeatability();
} | 1 |
0df03becab749debbf6e2a1372fd3414 | 6fc73fc7545b65c29048814ae9a049d6 | 打开两个时间面板 | var str = tag.panel[1].txt.entity.innerHTML.split('#');
var txt = new Element('DIV');
var time = new Element('input');
time.entity.type = 'text';
var cls=($.BrowserVersion=='Firefox')?'df_text_fire':'df_text';
time.entity.className = cls;
time.entity.id = tag.name.split('_')[0]+'_time';
time.entity.maxLength = ... | 0 |
7104e9126e41733cf558c91f9f073c1f | a32a9c4c1ecc5af57c1d2070819df69a | Remove the line from the autoexecbuffer and update environment | if (buf->b_ml.ml_mfp != NULL)
{
bufref_T bufref;
set_bufref(&bufref, buf);
apply_autocmds(EVENT_BUFUNLOAD, buf->b_fname, buf->b_fname,
FALSE, buf);
if (!bufref_valid(&bufref))
break;
} | 0 |
da53f114a88403a5124a1c40b4ed3818 | d3a7ee73c4d26dd22babc457a4c6661f | Loads the skin. | public class SettingsLayer extends Layer
private void loadTextures()
{
skin = new Skin(Gdx.files.internal(UI_FILE));
} | 1 |
135fa1a473a357eff652c443015efe5a | 3200c613760466d049705c60cc381103 | 根据id删除销售机会 | @Controller
@RequestMapping("sale_chance")
public class SaleChanceController extends BaseController
@PostMapping("delete")
@ResponseBody
@RequirePermission(code = "101003")
public ResultInfo deleteSaleChance(Integer[] ids){
saleChanceService.deleteSaleChance(ids);
return success();
} | 1 |
f97ead8f28d2bea3dfdf334b5b4592d1 | 90ee4a431e68a0a1f82142d4e96d9b25 | Called whenever a DashboardCollection is created. | this.sync = sync;
this.components = {};
this.pages = {};
this.themeColors = require(path.join(config.dashboard.path, 'themes.json'));
autoBind(this);
} | 1 |
2c29f46864cc6d039504f4ab8ba69804 | 4368115385325717a9921a0d756f6b7d | !
Sets the cursor to the shape identified by \a shape.
See \l Qt::CursorShape for the list of cursor shapes.
\sa shape() | {
if (S60->mouseInteractionEnabled)
qt_symbian_hide_pointer_sprite();
cursorSprite = cursor;
if (S60->mouseInteractionEnabled)
qt_symbian_show_pointer_sprite();
} | 0 |
dae3c37a9f08e7494f72d21b8699650c | 5244b793e04abbb3add96521243b70a7 | Test the registry view to get one entry | def test_view_entry(dbtransaction, app, new_entry, auth_env):
new_entry_id = new_entry.id
response = app.get('/entry/{}'.format(new_entry_id))
assert response.status_code == 200 | 1 |
83ceae584c01ff2f2311bf52cf43c5f1 | fd8213300f17bd0d22145d4a9b98c897 | 关于方法的描述:分页获取题库列表及题库中各题型的数量 | class exam_exam
public function getQuestionrowsList($page,$number = 20,$args = 1)
{
$page = $page > 0?$page:1;
$r = array();
$data = array('DISTINCT questionrows.*',array('questionrows','quest2knows'),$args,false,'questionrows.qrid DESC',array(intval($page-1)*$number,$number));
$sql = $this->pdosql->makeSelect... | 1 |
eb5f36e0b613b47f8b74adf2f0d1117a | f43e3a2c60264f7cd46692b44611c847 | Prevents a user from creating a trip with a start date that has already passed | namespace CP.API.Validations
public class StartDateValidation:ValidationAttribute
protected override ValidationResult IsValid(object value, ValidationContext validationContext)
{
if (Convert.ToDateTime(value) < DateTime.Now)
{
return new ValidationResult(base.ErrorMes... | 1 |
da8366d00a63359d531cccf83e99556d | 26ca9d09ab0600688097ebd3f4d3de15 | Save info stat data to local file. | class Scenario(Container):
def save_info(self) -> None:
dst = self.relpath(path=Container.INFO)
SERVICE.fs.write(self.info, dst, fmt="yaml") | 1 |
5781b73501481991cf1f2e6cc329c9b0 | 0ac7587005ca45864603dc845aca15b9 | Populate encrypter so that two consecutive ECB blocks of all As are
created. Then lower size of repeated As until two consecutive blocks are no
longer found. That gives the prefix length.
This could technically fail if the random bits were consecutive... but the
odds of that happening are extremely low. | fn guess_ecb_blk_and_sec(enc: &mut UnknownEncrypter) -> Option<(usize, usize)> {
let len_init = enc.encrypt(&[]).unwrap().len();
let len_prev = len_init;
for i in 1..=256 {
let input = vec![b'A'; i];
let len_cur = enc.encrypt(&input).unwrap().len();
if len_pre... | 1 |
3cfc852ce988a93cac2e56b9740e8e77 | 2ec727b34fe5e7d4db3e021a93357b62 | Set a particular payload byte | public class ActivePayloads implements IUasDatalinkValue
public void setPayloadActive(final int identifier) {
payloads = payloads.setBit(identifier);
} | 0 |
2f6457aac664643ea94e3e4e5ed02fd1 | f0d373e52a6e59c6f4dcc50019f19176 | Отображение формы изменения общей информации о конкурсе | $prize = 0;
$time_diff = 0;
$id = $this->checkMaxTournamentId($id);
if ($id == -1) {
return redirect('/tournament');
}
$count_stages = DB::table('tournament_grids')
->where('tournament_id', $id)
->max('stage_id');
$data = array(... | 0 |
2ae67f0a479b90a92f5b8fa94a84e7c3 | 1b6d3a13531e727548178fde551509b5 | Consruieste panelul de joc | setTitle("Piškvorky");
setDefaultCloseOperation(EXIT_ON_CLOSE);
setResizable(false);
setVisible(true);
mainPanel = new JPanel();
infoPanel = new JPanel(new BorderLayout());
gridPanel = new JPanel();
login = new JLabel("Zadej přihlašovací jméno: ");
... | 1 |
a40e34746afd6050441c1e4377063c64 | 26cc150ad66746581d1bb5a8e7828a76 | Devuelve si 2 nodos pertenecen o no al mismo conjunto. | class ConjuntoDisj
static bool areUnited(ConjuntoDisj* union1, ConjuntoDisj* union2) {
return union1->Find() == union2->Find();
} | 1 |
cee8a2374296232f3867c91dca7a2c97 | 0cd190ff9300339b608666dbcd1b8e99 | regresa un valor en entero de la experiencia que aporta | {
double experience = Math.Round(Math.Pow(this.m_niveau, 3), MidpointRounding.AwayFromZero);
return (int)experience;
} | 1 |
5a2f482903ba39b6e890c98a38f8b9ac | f971e1ad839204f382418604be882850 | Crea i parametri di paginazione per le ricerche sintetiche. | public class ConsultaMassivaCapitoloEntrataPrevisioneModel extends CapitoloEntrataPrevisioneModel
private RicercaSinteticaCapitoloEPrev creaUtilityRicercaSinteticaCapitoloEPrev() {
RicercaSinteticaCapitoloEPrev utility = new RicercaSinteticaCapitoloEPrev();
utility.setAnnoEsercizio(getAnnoEsercizioInt());
utility... | 0 |
21df09b3a40c11dd63b4289a42297e42 | 44423e30eead1e10926cb5bbe705fefd | Change la carte pour les stats | {
switch(carte_type)
{
case PANNE_ESSENCE:
partie -> autre_joueur -> en_panne_dessence = 1;
if(!partie -> autre_joueur -> prioritaire)
partie -> autre_joueur -> est_arrete = 1;
break;
case CREVE:
partie -> autre_joueur -> est_creve = 1;... | 0 |
ff2ab3e8dd587922eb98584ae2a5387d | 5592c7f445edfc446c3a4c22f7093cf7 | findes all bus lines that pass between two stations | namespace WindowsFormsApplication3
public partial class Dijask : Form
public void bus_trans2(int from, int to)
{
try
{
for (int i = 0; i < bus_conn.Tables[0].Rows.Count; i++)
{
if ((int)bus_conn.Tables[0].Rows[i]... | 1 |
bdec2cb124e8e29258f47df23d6e782c | a04a52f95edbf67dcc81334c4bf51240 | Ensure the parameter of the contract matches with provided the reference object | namespace Jawilliam.CDF.CSharp.Awareness
public partial class CrefParameterServiceProvider : ISignatureEqualityCriterion<SyntaxNodeOrToken?, CrefParameterSyntax, CrefParameterSyntax>
partial void SignatureEqualityMatchBefore(CrefParameterSyntax original, CrefParameterSyntax modified, MatchingContext<SyntaxNodeOrTok... | 1 |
6709cff4ca7251c498e77278af920c11 | cb40347f0b88eb7ba00b8355476acb95 | Обновить лиды в Амо по которым мы получили оплату | class MoneyController extends Controller
public function actionAllForPeriodUpdate()
{
$startTime = microtime(true);
$money = new Money();
$amo = new Amo(\Yii::$app->params);
$_SESSION['update_leads'] = isset($_SESSION['update_leads']) ? $_SESSION['update_leads'] : [];
if (emp... | 1 |
1e8ea3de259c8aff90566dd72225e0df | 995f267059e373f41bde6757d816898b | 获取当前登录用户的审批流信息 | namespace ZX.DAL
public class ApprovalDAL : DBBase<Approval>
public List<Approval_UserModel> GetCurrentApprovalUser(int FK_ApprovalId)
{
string sql = @"SELECT [Id]
,[FK_ApprovalId]
,[FK_UserId]
,[FlowName]
... | 0 |
e01edb96345f5ad4e0721551ca21568b | 058393856017ed83050a22b25a4daa5f | Create the function dictionaries used to calculate time, radius, and velocity. Note this function only needs
to be called once. | class Star(object):
def calculate_structure(self):
try:
self._radii = []
self._MrArray = []
self._LrArray = []
self._PrArray = []
self._TrArray = []
self._rhoArray = []
self._mGrad = []
self._lGrad = []
self._pGrad = []
self._tGrad = []
self._tGradSwitch = 1e4
lastM = self._Ms
... | 0 |
307c2ab885352f9e89c2d2718d48c8c0 | f9acd129650a7ad13ef64555568bcb90 | GET: Bairros | {
BancoServicioClient psc = new BancoServicioClient();
ViewBag.listBancos = psc.findAll();
return View();
} | 0 |
f5b2352cf1eec87b8a86aa3d8f47ef1a | fe040e96ef936994f057c76b4196f9b7 | sets the percent chance to block an attack | public class GenePool{
public void setChanceHitByFire(double chance) {
hitByFire = chance;
} | 0 |
b6214c2543eb47ffbaa895facdd7f683 | a80216739a46a61b12b6964ed219749d | Soustrait un nombre d'heures à la date | {
if(!$Date) $Date = tdate_now() ;
$S1 = tdate_t2h($Date) ;
$S2 = $S1 - $Secs ;
return tdate_h2t($S2) ;
} | 0 |
f7f05f29ddd0e612b22a04e0adf50774 | 87154456f5e3fbe4d81069e9e1839024 | 获取oauth2 access_token,并设置实例变量 | print('from server')
rq = requests.get('https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid='+self.APPID+'&secret='+self.SECRET)
dc=json.loads(rq.text)
self.access_token = dc.get("access_token")
self.time=int(time.time()) | 1 |
172213559faf1e51a115d88388e683d6 | 2a354b92483fb6826f6588230715969e | Test the AsyncWaitOperator with an ill-written async function under unordered mode and
processing time. | public class AsyncWaitOperatorTest extends TestLogger
@Test
public void testProcessingTimeRepeatedCompleteUnorderedWithRetry() throws Exception {
testProcessingTimeWithRetry(
AsyncDataStream.OutputMode.UNORDERED,
new IllWrittenOddInputEmptyResultAsyncFunction());
} | 1 |
711026e184bf88a6235a63c8b9737f67 | 73d7387ece767d743117ede79c2b35a4 | 根据流程实例ID,流程定义ID,节点ID,获取审批意见信息。 | @GET
@Path("/platform/approve/adjustinstance/{approveObjectId}/{processInstanceId}")
public Response getApproveAdjustInstance(@PathParam("approveObjectId") String approveObjectId, @PathParam("processInstanceId") String processInstanceId); | 0 |
f5b72a43d4c622ab243b4f0bbd0efe02 | 8d8cc9e54607d4f96f6338d9498d4004 | Пытается определить MIME тип указанного файла | public class SomeMimeTypes
public static String guessMimeType(File f) {
try {
String result = tika.detect(f);
return result == null ? "" : result;
} catch (Exception ex) {
return "";
}
} | 1 |
01f592001a986f906528834c1cdf0e0d | 026edee3087afee058a38775d96c0e93 | Returns the value of the '<em><b>Label</b></em>' attribute. <!--
begin-user-doc --> <!-- end-user-doc --> <!-- begin-model-doc --> The
label of the gauge. <!-- end-model-doc --> | Lines getLabel(); | 1 |
4d5c101e506e394be01e69e9055f78af | 87f10d968617efb3c16c8fe2032e902a | This function creates the statements to create integer or float variables in
a function instructions list. | ArrayList<String> inputvars = new ArrayList<String>();
for (Function f : Allfunctions) {
if (f.getFunType() == Type.Input){
String datatype = f.getOutput_datatype();
if(datatype.equals("boolean"))
inputvars.add("B"+f.getFunID()+"_0 : boolean;... | 0 |
786512132d6264b3d3e464fe05e50fc3 | 77e0648dfce43807873ebe42178f64c1 | Constructs Markov chains by iteratively applying HMC transitions. | noise = self.noise
Wmix = self.Wmix
unnormalized_posterior_log_prob = lambda *args: self.joint_log_prob(noise, Wmix,*args)
if initial_state == None:
print('generating initial state')
beta_init = 1.2*tf.ones([self.n_latent,self.dim_input], dtype = tf.float32)
... | 1 |
ce3967ec358071a0c30511772e97a11c | e4391ba6c833a038c1ac9701b6ca0831 | Will wait for SIGTERM or SIGINT | class WaitingService(BasicService):
def run(self):
self.wait_for_sigterm() | 1 |
6223a7ef07d809243cae849f17c5e08d | 729fb18551c4c7c27f918cff3ed28bb7 | <p>处理线程池溢出异常</p> | ExecutorService pool = new ThreadPoolExecutor(2,2,0L, TimeUnit.SECONDS, new LinkedBlockingQueue<>(10)){
@Override
protected void afterExecute(Runnable r, Throwable t) {
System.out.println("方法2:捕获异常");
if(r instanceof FutureTask) {
try {... | 0 |
abfe5f250866f7ed63d97612f8f3552a | 39edb075410c8bd5897b66508ab4772f | ROR Acc | class Cpu:
def ROR(self):
c = self.registers['P'][0]
if self.ad_type == "IMP":
bit_0 = self.A & 1
value = (self.A >> 1) % 128 + (c << 7)
self.A = value
else:
bit_0 = self.cur_value & 1
value = (self.cur_value >> 1) % 128 + (c << 7)
... | 1 |
0fbb2a464845ca9ab37d723ec7aff80e | 2fac00e81c4a322b583a622595f49eb9 | Untuk menghitung income player | address P;
ACUAN A;
BANGUNAN * B;
Inisialisasi(&A);
P = First(Pe -> bangunanPlayer);
while (P != Nil) {
B = &(T->TI[Info(P)].B);
B -> Jpas += CariDariAcuan(A, B -> Jenis, B -> Level, 'A');
if (B -> Jpas > CariDariAcuan(A, B -> Jenis, B -> Level, 'M')) {
B -> J... | 1 |
9768f42d9e1c0ca8aa68efcf34e147a7 | 6383fc106f47001827feefc15f734575 | Read a file of genome locations to process. The file may be in BED, Picard,
or GATK interval format. | public class IntervalUtils
public static List<GenomeLoc> intervalFileToList(final GenomeLocParser glParser, final String file_name) {
File inputFile = new File(file_name);
List<GenomeLoc> ret = new ArrayList<GenomeLoc>();
if ( file_name.toUpperCase().endsWith(".BED") ) {
throw new Re... | 1 |
8f8c2ed9e3b16646871e82ce96044952 | 7a00752d2c5e2ce344a46e8c204597df | Condição para indicar se o saldo é positivo ou negativo usando as cores branca e vermelho | {
return $this->colorFilter(
$this->moneyFilter((float) $value, $currency),
($value < 0) ? 'red' : 'green'
);
} | 0 |
2861b95c8b6e0f854468f2ccf26028a8 | cbb9fc558e0002479558b9d4580f38e2 | Handle special case of empty tree, otherwise mutate random term | offset = rand(terms.count)
count = 0
terms.each do |term|
return term if(offset == count)
count += 1
end
raise "internal error"
end | 0 |
769392416418abab3fd7abfb7be98b91 | af8f54db6308bafc6ac482c119fc3edf | Импорт классификатора из файла модели. | model_parameters = cls._import_model_parameters(save_path=save_path)
network_parameters = cls._import_network_parameters(save_path=save_path)
return cls(model_name=model_parameters['model_name'], network_name=model_parameters['network_name'],
network_parameters=network_paramet... | 1 |
12c414b66281b576c38d4677f5b96d39 | c226f5bfd2b7a637cb146fa6e556082f | Return the read-only name property. | public String getName() {
return propertyName;
} | 1 |
828e74987f5f5d08d7437a4b2f4aeb66 | 65e3f5494ed48a69758514aabf5ab625 | Set current path to Home in case of relative file path | void FilePanel::gotoHome()
{
setArchiveMode(false);
setCurrentDir(QDir::homePath());
setCurrentIndex(0);
} | 1 |
7acfeb7964c94096bf66a36a55fefab9 | f0b56fa21c0c06170558911b6d6554bf | get custom lint rules. | class Linter
getLinters() {
let linters = [];
this.linterNames.forEach(name => {
if (name) {
linters.push(name);
}
});
return linters;
} | 0 |
2bbf67467aa6fce2d419483e4ca8afa3 | 503af3bf202fa0cf8e512db1ecb421b5 | 將交易訊號轉換成股票擁有狀況 | orders_df = trades_df.copy()
orders_df.loc[orders_df['Trade'] > 0 ,'Order'] = 'BUY'
orders_df.loc[orders_df['Trade'] < 0 ,'Order'] = 'SELL'
orders_df.loc[orders_df['Trade'] == 0 ,'Order'] = 'HOLD'
orders_df['Shares'] = abs(orders_df.iloc[:,0].values)
orders_df['Symbol'] =... | 1 |
7104e0a787b5d23f3ea2395fdf963100 | c897cbfe7e56fa55361f8fd111309948 | 배열을 이용한 점심메뉴 고르기 | public class Cat
void feed() {
int choice = 0;
System.out.println(name+"에게 밥을 줍니다");
do {
System.out.println("아래의 목록중 선택하시오: ");
System.out.println("1. 사료를 줍니다.");
System.out.println("2. 과일을 줍니다.");
System.out.println("0. 돌아갑니다.");
Scanner sc = new Scanner(System.in);
choice = sc.nextInt();
... | 0 |
91b795fe1b30fbabc592087c78704423 | 25ebce7214038dbec0acffa93e96b221 | Von-Neumann entropy of density matrix | H = box_hamiltonian(highest_level, hbar, mass, length)
rho = box_thermal_state(highest_level, beta, hbar, mass, length)
return np.trace(H * rho) | 0 |
59ed67f6c15819cb6b441c527f4b7564 | d53113eb832cd183bdf8749a25fc6cd8 | Detect the presence of an option on a particular element. | public function hasOption($name); | 1 |
573d4554040a3ba11dcd11e27fea418d | 66ba8779c09985ee9d88752a9af9e576 | Удаление элемента из двунаправленного списка | {
if (elem->next != NULL)
{
_del_elem(instance, elem->next);
}
if(instance->onFreeing != NULL)
{
instance->onFreeing(elem);
}
free(elem);
} | 0 |
c96265d6123ad44aabc163aa5f27d4d4 | 5d8de37486413aa08dacac27ecd8aee7 | Assert the Discussions Tab displayed | WebDriverWait(self.driver, 5).until(
expected_conditions.visibility_of_element_located(
(By.TAG_NAME, 'facets-overview')))
WebDriverWait(self.driver, 5).until(
expected_conditions.visibility_of_element_located(
(By.TAG_NAME, 'facets-dive'))) | 0 |
1fe4258e2016e21d0787a2c853159000 | ac182dcb085c2bf302ef23fb019a743e | GetAllSeoPositionItemsQuery constructor. | {
$this
->setSearchQueries($searchQueries)
->setResultType($resultType)
->setPreviewItemResponseShape($previewItemResponseShape)
->setSortBy($sortBy)
->setLanguage($language)
->setDeduplication($deduplication)
->setPageSize(... | 0 |
9bdd977e46f4e3d270063c9f5557cdac | 98e07f768760a80e4f89c6d520bb1979 | Perform a binary search on the CurrentPosition vector for the Destination | {
float posX = transform.position.x;
float tillLeft = Mathf.Abs(_leftPos.x - posX);
float tillRight = Mathf.Abs(_rightPos.x - posX);
if (tillLeft >= tillRight)
{
movingDir = -1f;
_currentDestination = _leftPos;
}
else
{
... | 0 |
4bcc5a02ead10bae62e42c8b225177a8 | 2f1656173d999b2d43c9d9b6d57db880 | Visit a parse tree produced by langParser#andExpression. | class CypherVisitor(ParseTreeVisitor):
# Visit a parse tree produced by CypherParser#oC_Cypher.
def visitOC_AndExpression(self, ctx:CypherParser.OC_AndExpressionContext):
return self.visitChildren(ctx) | 0 |
14166de1d15a3d35e065a1e35accba09 | daee9fcb411b5ebed27c400fee1e4812 | Initialize topology state. | void topology_init(cpu_t *cpu)
{
processor_topology_t *topo = (processor_topology_t *)malloc(sizeof(processor_topology_t));
topologyData[cpu->coreId] = topo;
uint32_t tmp;
uint32_t apicId;
if(leaf0BSupported)
cpu_id_special(0x0B, 0x00, &tmp, &tmp, &tmp, &apicId);
else
{
cpu_id_special(0x01, 0x00, &tmp, &apic... | 1 |
1554b0b645aad05d174a927cfc474317 | c424b3641bdc7874607b90c54ff670a2 | Convert the current time unit to seconds (as an object). | public function toSeconds($precision = null, $mode = null)
{
return new Second($this->inSeconds($precision, $mode));
} | 1 |
5a0b06dfb757411cd7f2f063a668188a | ee69b3ee615265a3a90a4f1543ba859c | Called when the no match (sliding the tiles back to their original place) animation
finishes. | {
if(tile.GetComponent<SpriteRenderer>().sprite == matchedSprite)
{ return; }
if (matchFound)
{
GameManager.matchGoal--;
matchFound = false;
StopCoroutine(TileManager.Instance.FindMatchedTiles());
}
} | 0 |
d9816ef7a7ff7975fdfc53f0c843dac8 | 22f042dc1bb1d209a3c247a83e937b61 | Gets the second window handle. | class SplitterWindow(_core.Window):
def GetWindow2(*args, **kwargs):
return _windows_.SplitterWindow_GetWindow2(*args, **kwargs) | 1 |
5daeacb1ed6cf64a233ce2e847c15faa | 71da62f09769d7064a4ca732e9c95605 | The user is always considered to be online if s/he accesses via the web. | isOnline(player) {
return true;
} | 1 |
b015b1ff85faeda69a875e3f22151529 | 6495398e7a278e5b3317e5da3416b9ac | 这是一个函数demo | func Testdemo() {
fmt.Println("test demo")
} | 1 |
bb174e813414bc9b820609ea8bc2c7c1 | 7a837d5b2d32b22ae5e1721b2eb8e1b1 | Returns the value of the '<em><b>ANCO</b></em>' attribute.
<!-- begin-user-doc -->
<p>
If the meaning of the '<em>ANCO</em>' attribute isn't clear,
there really should be more of a description here...
</p>
<!-- end-user-doc -->
extendedMetaData="kind='element' name='AN_CO' namespace='##targetNamespace'" | boolean isAcc(); | 0 |
3bf16b81b5859e694abe7764dbf6b6f9 | b922afac65ee36d41ddf75417b847a89 | @brief This function switches the peripheral from P/E mode for Code Flash or Data Flash to Read mode.
FLASH_TYPE_DATA_FLASH. | static ssp_err_t enter_pe_df_mode(flash_hp_instance_ctrl_t * const p_ctrl)
{
ssp_err_t err = SSP_SUCCESS;
R_FACI_Type * p_faci_reg = (R_FACI_Type *) p_ctrl->p_reg;
volatile uint32_t wait_cnt = FLASH_FRDY_CMD_TIMEOUT;
if (gp_flash_parameters->bgo_enabled_df == true)
{
if (SSP_INVALID_VECTOR !... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.