query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
4038fc693a52b068d7be3ba73b353d13 | b0dd571e6c317d0d8a88bd22d70327b2 | Handles the Click event of the BtnFileClose control. | namespace ZoomAndPageLayout
public partial class MainWindow : Window
private void CloseFile_Click(object sender, RoutedEventArgs e)
{
PdfControl.Document.Close();
} | 1 |
fbce60a711d7187b72c8477d746fda40 | 2b968e3a670b9d1d744f58b3a7b7496f | Prints the time of given time zone. | void print_datetime_zone(struct tm *dt) {
printf("%4d-%02d-%02d %02d:%02d:%02d %c%02ld\n", dt->tm_year+1900, dt->tm_mon+1, dt->tm_mday, dt->tm_hour, dt->tm_min, dt->tm_sec, dt->tm_gmtoff<0?'-':'+', dt->tm_gmtoff/3600);
} | 1 |
3350252aeea2711650d1723d79867ab2 | 20fabaa6dbb2f0c3d7c8155a4103b71c | Найти контакт в книге и напечатать его | for contact in self.book:
if contact.phone == number:
self.book.remove(contact)
print(f'Контакт {contact.name} {contact.family_name} удалён из книги \n') | 0 |
aa9b26de4f2a14496e472478ceeab7cf | 9d021e8b111ca6bbaf297aad68274db5 | 根据密钥key进行初始化长度为256的S盒 | namespace IceKey
class IceKey
private void spBoxInit()
{
uint i;
for (i = 0; i < 1024; i++)
{
uint col = (i >> 1) & 0xff;
uint row = (i & 0x1) | ((i & 0x200) >> 8);
uint x;
x = gf_exp7(col ^ sXor[0,row], sMod... | 0 |
b7ee5b9afcfdc0af87486032facb5a5c | 3b53232c12e888d45abc24696395dacc | ユーザーのデータを配列に格納するメソッド | {
$data = (array) $data;
$data = filter_array($data, ['user_id', 'user_auth', 'login', 'password', 'name', 'email', 'email_accept', 'email_code', 'image', 'user_created', 'user_updated', 'user_status']);
$data = array_keys_changer($data, ['user_id' => 'id', 'user_auth' => 'auth', 'user_created' => 'created', 'us... | 1 |
8b175a1e130f65c6e1d561f879362bac | 50d5a1e831deb692cbcf2841b67c828a | salva no database as informações do arquivo e sua url | class ArquivosController
def create
@arquivo = Arquivo.new(params[:arquivo])
if @arquivo.save
redirect_to(@arquivo, notice: 'Arquivo criado com sucesso.')
else
render action: "new"
end
end | 1 |
01ea785ec698a39690672cf19a523b81 | 8f7eed630b8411c5b5d7b5c82aa41adf | 标识符:TTMS_SCU_Seat_UI_C2S
函数功能:根据输入符号获取座位状态。
参数说明:statusChar为字符型,表示设置座位的输入符号。
返 回 值:seat_status_t类型,表示座位的状态。 | if(status == 0)
{
return 'O';
}
if(status == 1)
{
return 'X';
}
if(status == 9)
{
return 'V';
}
} | 0 |
e9e72f783724cbbe59e6638c9aad17f4 | 6f9fa5314edeae9e6349923d7e871643 | обновляет (стирает) связи м/у словами | class AutoLink
function refresh()
{
$db = DataBase::getInstance();
$db->query("DELETE FROM autolink");
$this->expression = array();
} | 1 |
3771b3dd5ace8f88a4a87c10fbff0fd1 | 1fc1f597e91b09d9f713c97a79608ed4 | Returns a hash of the contents of this item. | class Item
def to_s
to_hash.to_s
end | 0 |
09548721a93cb9f3866e67b41ecc5e04 | 3ae2f59d95f912af8c64c4f6e1d01521 | solve_code_img | code_len = self.l_en.get_shape()[1]
if code.shape[1] != code_len:
print("The length of provided codes should be equal to the network's")
return None
else:
if hasattr(self, 'sess'):
l_in_shape = self.l_in.get_shape().as_list()
l_... | 1 |
1c94f24f957c77cada196c67ebf05c62 | f669bbd3374485214f761093d50666bd | test tab indent of 8 spaces per tab
the '&& isBar' line will be indented with 2 tab widths or 16 spaces | let out = run("123 \t1\n123 1\n123 \n123 ", &["-t4"]);
assert_eq!(out.as_slice(), b"123\t\t1\n123 1\n123 \n123 ");
} | 0 |
05ad8f47865f0d8e28f1ffa365de00fc | ef285539983d860c51ac86639bf380eb | 地区发表时间线,表示获取某个地区发表的微博信息<br/>
具体参数见<a href="http://open.t.qq.com/resource.php?i=1,1#7_72">腾讯微博<strong>地区发表时间线</strong>api</a> | RequestListener listener) {
WeiboParameters params = buildTimeLineParamsBase(since_id, max_id, count, page);
params.put("uid", uid);
params.put("base_app", base_app ? 1 : 0);
requestAsync(SERVER_URL_PRIX + "/user_timeline.json", params, HTTPMETHOD_GET, listener);
} | 0 |
99ec8bea49d9bb6e775bd76f063106db | 99d88d30ca12d44255a56bb0d02d9817 | Generate the metadata for the repo against a specified layout. | class VDSGenerator(object):
def create_virtual_layout(self, source_meta):
raise NotImplementedError("Must be implemented in child class") | 0 |
2f6faf8ad282c18efc6d056c27ce8dda | 516ddb064c06087dd44db7ae54e8726c | Oyuncuyu sıfırla | function yenidenOyna() {
for (var i = 1; i < 8; i++) {
user1hole.pop();
user2hole.pop();
}
for (var i = 1; i < 7; i++) {
var hole1 = new Hole(4, "user1hole" + i.toString());
var hole2 = new Hole(4, "user2hole" + i.toString());
user1hole.push(hole1);
user2hole.push(hole2);
}
treasure1 =... | 1 |
0bd0077ba1d0a75e6aa4031366dd0c74 | 19ccd65f119d39e86becc3a501e548ca | Get all restql associated for user. | class RestModel extends ActiveRecord
public function getRelatedRests()
{
return $this->hasMany(RelatedRestModel::class, ['rest_model_id' => 'id']);
} | 0 |
c4b3c5d4cd6bd94cfa6fee220038832f | 7d263b1e34dc5d65f683dbd0f3450032 | 緯度・経度から平面直角座標に変換する | {
var x = src[0];
var y = src[1];
var z = src[2];
var x2 = x * x;
var y2 = y * y;
var z2 = z * z;
if ( x != 0 || y != 0 ) {
dst.latitude = Math.atan( z / Math.sqrt( x2 + y2 ) ) / GeoMath.DEGREE;
dst.longitude = Math.atan2( y, x ) / Geo... | 0 |
8484866e55e0144e3ffd5c60e15d8a37 | 9c53047be963f4e1c474b25c237de57b | @brief 현재 랩터가 죽어도 되는지 안되는지를 리턴값을 통해 알려준다. | namespace DroneInterface
bool RealDrone::IsDead(void) {
std::scoped_lock lock(m_mutex_B);
return m_isDead;
} | 1 |
1a9d246b6a4fb88c120a1deda8a73083 | ced6e53161ef8c1103aa49fe66ea5db4 | Get base directory of the repository, as an absolute path.
Search upwards in the directory tree from the main script until a
directory with a subdirectory named ".hg" is found.
Abort if the repo base cannot be found. | class WikiStorage(object):
def _find_repo_path(self, path):
while not os.path.isdir(os.path.join(path, ".hg")):
old_path, path = path, os.path.dirname(path)
if path == old_path:
return None
return path | 1 |
48d2017593a3814e9f4f78698e413a31 | 81c69099f39c443ae038e2d52476d618 | 自动处理Alert规则,添加一项规则 | class App(object):
def rules_of_alert_auto_handle(self):
return self._rules_of_alert_auto_handle | 0 |
427e08a72c1af701267449770240c32f | 8c63209840c6625c957271671fc2097b | Gets the value of the vehicle property.
possible object is
{@link VehicleType } | public String getVehicle(); | 1 |
c45e2b8c3b6b4e8f5638831288f7465d | d01896a17c8f48d11fce06c5b0ce1c2d | 点击我看行或者我看不行后的显示效果 | function hiboy() {
var zan_num = parseInt($('.zan span')[1].innerText);
if(zan_num === 0 ) {
$('.li_img').css('display', 'none');
}else {
$('.li_img').css('display', 'block');
}
} | 0 |
73e7f14216df8110cd5f9df9d82a3925 | eae883464652606570b1c67420b92c49 | Get all NodeServers from MongoDB | getAllNodeServers(callback) {
return NodeServerModel.find({}, null, {sort: {'profileNum': 1}}, callback)
} | 1 |
928b19c905f2da631affdb814b5c5113 | 99b3f0e9c410afcd013aa8d739cf0c87 | Returns true if the file exists on either the disk or in the assembly | {
if (HasTemplateOnFileSystem(templateName))
{
return true;
}
return HasTemplateOnAssemblies(templateName);
} | 1 |
9575639ee03a5cd87e5d2efe1377dff9 | df7e3ccd62a64fc07cf3f5616e49de97 | Подставить в исходную систему все уравнения связей | class System(object):
def try_eliminate(self):
self.equations = {i: sy.simplify(sy.together(eq))
for i, eq in self.equations.items()} | 0 |
f406dcfef0f4e6ceb5d46399b6bec540 | 84aca42d4406663d5d6b632ab7b354f0 | Проверяет ставил ли пользователь свою ставку на этом
аукционе | namespace Auction.BusinessLogic.Services
public class TradeService : ITradeService
private bool IsUserAlreadyHaveMaxBet(int tradeId, string userId)
{
return Database.Trades.FindTrades(t => t.Id == tradeId && t.LastRateUserId.Equals(userId)).Any();
} | 1 |
273d7a2b41dfac0ebfb64cae79aeee25 | ef618523edc04b698ebdfee152b354f1 | @brief Parse Ansi Template (Dialing Directory) | static int p_dialinfo( TStateMachine* pSm )
{
TDialParam* pDialParam;
TDialParam* pTrav;
if( g_Tok == DIAL_INFO_TOK )
{
g_Tok = yylex();
if( p_dial_param( &pDialParam ) )
{
if ( pSm->dialParams == NULL )
{
pSm->dialParams = pDialParam;
}
else
{
if( pSm->dialParams->... | 1 |
2b2497dc3b89ddb16a903a4aa5cfd481 | 9e0c49de840a47455938e7837f087e2a | Adds a new {@code Policy} to the {@code Siasa} that we are building. | boolean addPolicy(Policy policy); | 1 |
35266330d78260952cbb6e0bc15027ba | 6bfa4ce1089167299c2a146d1b5b9cb9 | Mendapatkan array satu dimensi yang berisi nilai elemen
matriks pada kolom tertentu. | public class Matrix
public double[] getColumn(int col){
return this.matrix[col];
} | 1 |
552ad2e8f07b90acfbf40d13b24c7e9e | 90f2730aa0b12a4d6f82a8cadba5df7b | Sets the color space used for filling operations. | namespace pdftron.PDF
public class GState
public void SetStrokeColorSpace(ColorSpace cs)
{
PDFNetException.REX(PDFNetPINVOKE.TRN_GStateSetStrokeColorSpace(mp_state, cs.mp_cs));
} | 0 |
106168fac91198d83b022e61e2cad477 | 47ac257b9758d3ce38b2e56a1e7caf61 | Runs when the program is executed as __main__ (ie not imported) | def main():
entries = []
run_main_gui(entries) | 1 |
375d0bde4d20a1915ada470373297b6f | b7fb4611c8028e1a515ef6011b314d29 | 检查TextView的任意方向图标是否有不为空的 | if (view instanceof TextView){
if (!TextUtils.isEmpty(((TextView) view).getText())){
return true;
}
}
return false;
} | 0 |
e83fc62047538f5b3d41d80833f94153 | 021c41b110c761c5eeb96ffdfe5705d5 | Indicates whether the cell's row will be unshared when the cell is double-clicked. | namespace System.Windows.Forms
[TypeConverter(typeof(DataGridViewCellConverter))]
public abstract class DataGridViewCell : DataGridViewElement, ICloneable, IDisposable
protected virtual bool LeaveUnsharesRow(int rowIndex, bool throughMouseClick)
{
return false;
} | 1 |
c7a1e9e7ce3d6bc048e7b314e337ce41 | bb1360c050f7207327e5ba84419d2a10 | compute the log normalising constant from all cached models | class galaxy_model_3d(mixture_of_gaussians):
def get_ln_prior(self):
lnp = 0.
for fi in self.fis:
try:
eigs = numpy.linalg.eigvalsh(fi)
except:
print "eigs did not converge"
return -numpy.Inf
if numpy.any(eigs <= 0.):
return -numpy.Inf
lnp -= numpy.log(numpy.max(eigs) / numpy.min(eigs)) ... | 0 |
4b21334ac259ff5fcc071436c4b3addc | 47429cd2c118ec0f420d8ea7ea60a68a | contructor que inicializa la clase, recibe la cantidad de memoria
con la que se quiera inicializar la memoria.
se quiere empezar a trabajar. | RAM::RAM() {
this->_memory.push_back(* new MemoryZone(1000, 0, 0));
this->freeMemory = 1000;
this->allocMemory = 0;
} | 0 |
e0576573a79299b8d1845286436c1c1c | d95e76659802adec325dee046ecf872b | Register optional packages on runtime, which should be enabled/disabled
from configuration. | class Application
protected function bootPackages()
{
foreach ($this->get('packages')->all() as $package) {
$package->boot($this);
}
} | 0 |
659db82b647fc8e87ac797bc48df54dd | 281b6613dfbdbcc68752c501c70f52a6 | Add new sub-command for argument parsing. | if self._subcommands is None:
self._subcommands = self.add_subparsers(help='commands')
return self._subcommands.add_parser(name, description=help, help=help, **kwargs) | 1 |
182b59be55bacee495d3e5017710de18 | b46dbe82e336cdb57d5140b2e76ef06a | Add a label in a specific language. | namespace VDS.RDF.Ontology
public class OntologyResource
public bool AddLabel(string label, string lang)
{
return AddLiteralProperty(OntologyHelper.PropertyLabel, _graph.CreateLiteralNode(label, lang), true);
} | 1 |
da361d2f27dfa9d2ab46bc199857c0e0 | ea2d6b243ea3b52d54a4c3a032970091 | Se obtiene la lista de equipos filtrados | class ListaEquiposAreaView(ListAPIView):
def get_queryset(self):
area = self.kwargs['pk']
return Equipo.objects.filter(area=area, estado=Equipo.ACTIVO) | 1 |
175ac501c751a1598c5b1d2224886d00 | 3b3743e2d7190aa63d26b588c07e780f | Создание игрового поля, создание счётчика очков | function init_game() {
difficult = +document.getElementById("difficult").value;
let r_count = ROWS * difficult;
let c_count = COLUMNS * difficult;
let w_count = WALL_CNT * difficult * difficult;
game_field = [r_count][c_count];
game_objects = [];
player = new GameObject('o', 0, 0);
exit = new GameObject... | 0 |
1064545042e3bc186a68744dde557f2b | 58c6e50000f6881a977ef930fe00805b | Convert a remote host name to a packed integer IPV4 address. | {
int x = 0;
unsigned char buff[sizeof(struct in_addr)];
x = inet_pton(AF_INET, host, buff);
if (x <= 0) {
xgethostbyname(host);
}
return;
} | 1 |
1bcfd885248d726d35a97a4ff679272d | 3c4615e7bf969f7a17bbfd8c36b31a45 | Возвращает список неактивных скриптов | namespace BlazorLib.refit
[Get($"/api/{HttpListenerActionsConstains.GET_ALL_SCRIPTS}")]
public Task<ApiResponse<ScriptsResponseModel>> GetAllScripts(); | 0 |
f726db3eeffbebe93fc5cfc78d925d96 | af5c185f4123809900a60de3ed3eb568 | Получаем кол-во превью новостей на странице конкретной категории | class News_model extends Model
private function first_page_cats_query_count()
{
$count = DB::query_result(
"SELECT COUNT(DISTINCT c.id) FROM {news_category} AS c"
.($this->diafan->configmodules('where_access_cat') ? " LEFT JOIN {access} AS a ON a.element_id=c.id AND a.module_name='news' AND a.element_type='cat'"... | 0 |
ab5b3f0ab4644113011896dfccbea6e7 | 52474a4631e9bbff32ae3f2e462e4b8f | Returns Purchase Order Numbers that are in the sendlog
NOTE checks that Purchase Order exists in po_head | class InvoiceSalesOrderAdapter:
def get_po_number(self):
for invoice_row in self.invoice.rows.filter(tenant__isnull=False):
if invoice_row.tenant.reference:
return invoice_row.tenant.reference[:35] | 0 |
37b7ca9c7f039646137e38a583a72ada | 1f96627a2a9b51e680f8cfdefb40ab22 | Executes several XPath queries. | class AmazonDom
public function xpathQuery($query, $node = null)
{
return $this->getXpath()->query($query, $node);
} | 0 |
42fd616831345d147010dc4d7a067e56 | bf8c42ba1c74e558e13253ef530f8726 | 通过vguid获取推送信息详情 | namespace DaZhongManagementSystem.Areas.WeChatPush.Controllers.AgreementOperation.BusinessLogic
public class AgreementLogic
public v_Business_ProtocolOperations_Information GetAgreementDetailByVguid(Guid vguid)
{
return _agreementServer.GetAgreementDetailByVguid(vguid);
} | 1 |
8adce12a2284fac96123c60233e76a61 | 11154f4db3ac5d5c49d6f71f8f3d0956 | Sets the value of the featureId property. | @Entity
@Table(name = "pmprs_feature" )
public class PmprsFeature extends CommonEntity implements Serializable
public void setParentFeatureId(int newVal)
{
setParentFeatureId(new Integer(newVal));
} | 0 |
150687437ace500d022bde42607f8a91 | ead132d0be09d8e5a0d63e04594ee417 | getter for cache_item_size | int AgItem::GetSize() {
return m_size;
} | 0 |
104d5fb9e207998d5cf84bb6ec6bee9c | 2b4e186da876ad9db6e7cfb151c7bc9a | 购买投资,资金池减少 | {
$con = $this->getConnection();
$con->beginTransaction();
$user_product = $this->user_product;
$user_capital = new User_capital();
$user_capital->user_product_id = $user_product->id;
$user_capital->type = $this->amount > 0 ? User_capital::IN : User_capital::OUT;
$user_capital->capital_before ... | 1 |
992860eabd9c8bfff3224aec90657efc | be2ff0127f15770e17f32dbf0927fb16 | computes alpha from concentrations/emissions and returns the linear fit to specified r parameters
Note this only works on timeseries where the concentration remains significantly different to the pre-industrial value | def get_parameters(t1: float, r1: float, t2: float, r2: float) -> Tuple[float, float]:
t1 += 273.15
t2 += 273.15
beta = (log(r1) - log(r2)) / (1 / t1 - 1 / t2)
r25 = r1 / exp(beta * (1 / t1 - 1 / T25))
return r25, beta | 0 |
20fc0c811a3dfafb40b3e3d0e5dda6ab | 3ac4ddce3e248ea25b5fb16f397086e1 | This is the general class for cars that we will use to describe both our car
and the surrounding cars on the road | class Car:
def __init__(self, screen, lane, initial_velocity = 0.5, initial_acceleration = 0.0001):
self.direction = random.choice(Directions.directions)
self.position = self.gen_pos_lane(lane, self.direction)
self.velocity = pg.math.Vector2(self.direction[0] * initial_velocity, self.direction... | 1 |
f36e62c9b45e45ed4c029516bcbb532b | c2b255e0ba8855609ede4ac53b982382 | Iterates through the 'content' property values. This Iteartor
may be used to remove all such values. | axis2_bool_t AXIS2_CALL
adb_ContentBean_get_property2(
adb_ContentBean_t* _ContentBean,
const axutil_env_t *env)
{
return adb_ContentBean_get_collection(_ContentBean,
env);
} | 0 |
57d8901a92135b0d9effa34584f60d9b | 7a2ec0def274683ca456c5c754d1004f | Transforms global/world into local coordinates. | class Lattice:
def itransform(self, world_coords: Union[Sequence[int], Sequence[Sequence[int]]]) -> np.ndarray:
world_coords = np.atleast_1d(world_coords)
return np.inner(world_coords, self._vectors_inv) | 1 |
92995b370b9113008a04154042176725 | 40c122adab946b35b794dca57c1588db | Only pass on selection events that select an Item type | class ParamTreeView(qt.QTreeView):
def selectionCommand(self, index, event=None):
if index.flags() & qt.Qt.ItemIsSelectable:
return super(ParamTreeView, self).selectionCommand(index, event)
else:
return qt.QItemSelectionModel.NoUpdate | 1 |
1cb97367bc666f1a8eca9d4a2abe3a5b | 47b42901f92e89cac1c13d8bd3ce029a | Adds the comment for the factory | class Comment extends Factory
public function definition()
{
return [
'company_id' => $this->company->id,
'post_id' => Post::enabled()->get()->random(1)->pluck('id')->first(),
'description' => $this->faker->text(100),
];
} | 1 |
4d7c432e22f52760653430eb819f84a0 | 1e4f904a776fd87c8d35098e0fa82faa | 能过获取历史记录计算出评价值 | @Service
public class UserScoreRemoteService implements IUserScoreRemoteService
private int getHHHistoryContributionValue(long hhId) {
int recommendCount = candidateRemoteService.countRecommendByDayLimit(hhId, getConfigValue(PlatformConfigType.DAY_RECOMMEND_CONTRIBUTION_LIMIT));
int recommendScore = rec... | 1 |
15f34c403f2338277e7008260f859475 | 9be0a8e336b75511dbb2ea34bbe1a4cb | funcion que muestra un mensaje de confirmacion idicando que se actualizo los datos correctamente (mensaje tipo retorno) | $response = array();
$response['success'] = $exito;
$response['aaData'] = $datos;
echo json_encode($response);
exit;
} | 0 |
6b9e2d80cc0389fc9fb6631e30a28855 | 928f2f9d01b3b9e783bd77b1a9cc1010 | Método para agregar enumeradores | namespace Marcianos
public partial class frmMarcianos : Form
private void cargaEnemigos()
{
this.listaEnemigos.Add("meteoro");
this.listaEnemigos.Add("miniMeteoroA");
this.listaEnemigos.Add("miniMeteoroB");
this.listaEnemigos.Add("tie");
this.lista... | 0 |
e31ce3c06bc8c7b581c39df302220746 | 8f21499863cebcce74901baf9f97ca98 | e.g. 7712555c_ce62_454a_9e18_9ff0217b8941 from docker-7712555c_ce62_454a_9e18_9ff0217b8941.scope | type tTest struct {
u string
expd bool
}
var (
tests = []tTest{
{"58657d7b-f442-411a-a630-d79d46150692", true},
{"25281c42-832c-4982-8bc9-de9d660c956c", true},
{"ea20bcf8-fb71-41a3-8c31-c68b8d4361d9", true},
{"133f8fe0-b67b-468e-97c5-72194d6070cf", true},
{"c21efa44-a56f-42e3-9de6-b512c63f375... | 0 |
654f92ee078a0a677ec599d0e3c48a5c | b1be696adf8d05302e40c5585c690a05 | Fade in Book Search Results | public class HomeScreen extends BasePresenterActivity<HomeView, HomePresenter> implements HomeView
private void fadeToolbarIn() {
TransitionManager.beginDelayedTransition(tbMainScreenSearch, FadeInToolbarTransition.createTransition());
LinearLayout.LayoutParams searchLayoutParams = (LinearLayout.LayoutP... | 0 |
a7c7d6d344c358d8460b73c743f393fb | 7f1b32394d34cea5f361c4ae78124a0f | 插入新节点,且保持平衡 | public class Node implements Serializable{
private void insertBalancing(bplus_Tree bplus_tree) {
validate(this, bplus_tree);
if (children.size() > bplus_tree.getM()) {
Node left = new Node(false);
Node right = new Node(false);
int leftSize = (bplus_tree.getM() + 1) / ... | 1 |
27aa4c4310b2a4f5b4171b7b3e44c22d | fde5c06352f74b704513b40267c0e736 | Sets the subscription finder. Used in tests. | class DefaultManager implements ManagerInterface, DcaAwareInterface, InsertTagsAwareInterface
public function setSourceFinder(SourceFinder $sourceFinder): void
{
$this->sourceFinder = $sourceFinder;
} | 0 |
de50858d14eb5bdd2fec09d1e0b35e57 | cc507fe4dff28ebb10eeb0d175acdb3a | グレゴリオ暦からグリニッジ恒星時を算出する | SolarEquationVariables solarEquationVariables = getSolarEquationVariables(day, longitude);
final double latitudeRad = Math.toRadians(latitude);
final double omega = Math.acos((Math.sin(Math.toRadians(SUN_ALTITUDE_SUNRISE_SUNSET)) - Math
.sin(latitudeRad) * Math.sin(solarEquationV... | 0 |
25fc6abd4b0784cfcd604006bac2c3b4 | e1219178d8fcf319ff766d67062b9a50 | Gets a string that can easily be used with scripts by displaying pertinent contents
on a single line, separated by spaces. | getScript() {
return this.__lines.join("\n");
} | 0 |
dc710c60a3cdc9cc321b2714edf7c4d5 | ac5cee5d48fa85c8b26d784cb76172a1 | 获得常用联系人门诊卡解绑的Sql | namespace EyouSoft.DAL.CRM
public class DBirthday : DALBase, IDAL.CRM.IBirthday
private void GetYgSql(int days, int companyId, MSearchBirthday seach, ref string tableName, ref string where, ref string fields)
{
var strFields = new StringBuilder();
var strWhere = new StringBuilder();
... | 0 |
b3de3fab9939f785580a7f12e8879681 | a6cec6736bf6107d59b9cf35f2b88a92 | 가맹직원조회하는 컨트로러입니다. | def shopmanDetailCV(request):
userAuth = request.user.userAuth_id
if userAuth in ["S0001M", "S0001C", "S0001A"]:
shopInfo = SysShop.objects.for_company(
companyId=request.user.orgShopId.companyId,
).get(
shopId__exact=request.POST.get("shopId")
)
staff... | 1 |
806b22c3a3dc4cd8f483937283e267b1 | 16a6f59a57861d0d752de023f9cb4eae | 柜台积分额度变更 | public class BINOLBSCNT07_Action extends BaseAction implements ModelDriven<BINOLBSCNT07_Form>{
public void pointChange() throws Exception {
Map<String, Object> resultMap = new HashMap<String, Object>();
try {
Map<String, Object> paramMap = commonParam();
binOLBSCNT07_BL.tran_pointChange(paramMap);
resultMa... | 1 |
76e596d1df788698a40bc59129a658fe | 0e97d7dfbe55b2f52a315b5e9fd662d6 | 立体模式切换 | void KeyScan_ChangeTVMode(void)
{
UINT32 i, uiWindowEn;
PDISP_OBJ pDispObj;
DISPDEV_PARAM DispDev;
DISPCTRL_PARAM DispCtrl;
pDispObj = disp_getDisplayObject(DISP_1);
pDispObj->dispCtrl(DISPCTRL_GET_ALL_LYR_EN, &DispCtrl);
uiWindowEn = DispCtrl.SEL.GET_ALL_LYR_EN.DispLyr;
... | 0 |
90dace02355164f751a3c829ae82550a | b74b803c8e8fffb06f7e2fbfa84a0cac | Trabaja con un archivo de Excel proporcionado por el usuario. | class Excel
public function importFromFile($file) {
} | 1 |
cc00a5ccd6f679439c2e177fbf559689 | 57fee3c15e881ffae307c32a19481e75 | Called to notify the source that the user has changed the source text in the editor. | namespace ActiproSoftware.ProductSamples.SyntaxEditorSamples.QuickStart.GettingStarted11 public class SimpleParameterInfoProvider : ParameterInfoProviderBase, IEditorDocumentTextChangeEventSink, IEditorViewSelectionChangeEventSink
void IEditorDocumentTextChangeEventSink.NotifyDocumentTextChanging(SyntaxEditor editor, ... | 1 |
13c17804c98440537eced10f0107e48d | 99a0a0820aa25f47d927b516086d816e | Writes unsigned 32-bit value to array at specified offset. | {
fixed (byte* ptr = &array[offset])
*(ushort*)ptr = value;
return offset + sizeof(ushort);
} | 0 |
4cabd462a33b32f2ca2cdcde5e60c921 | 52435f86b83a09dc3b27278e26345dcd | 获取连接状态改变监听接口 | public class TcpClientNode
public void setConnectionStateListener(ConnectionStateListener connectionStateListener){
this.connectionStateListener = connectionStateListener;
} | 0 |
c2d97a923676c4c5df21407e2385dea4 | d2fd115ebfb7d1d32fae0294b5e748bf | Default policy arns for the Task role. | class DefaultRoleWithPolicyArgs:
def role_arn(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "role_arn") | 0 |
f71959b1e740ae21510a10341f050c3e | c41b1b6194bfcbf3529779ed8f07df12 | 获取用户基本信息 优先返回本地数据 | open class WanAndroidRemoteDataSource(private val iActionEvent: IUIActionEvent?)
: RemoteExtendDataSource<WanAndroidApiService>(
iActionEvent = iActionEvent,
apiServiceClass = WanAndroidApiService::class.java
)
suspend fun getUserInfoFromLocal(): UserEntity? {
return UserInfo.getUserInfor()
} | 1 |
d5ce1e2dfa83172f2f738381602abd4d | ff6c281955f52f05efd830d5349a313f | creates string of instance variable names (e.g. '(inst_variable_1, inst_variable_2, inst_variable_3)' | class NormParams
def signature
instance_variables.sort.map { |v|
name = v[1..-1]
"#{name}#{instance_variable_get(v)}"
}.join
end | 0 |
b85e23f16a5055fd655e912ec778a447 | 463f65bf1e4d24ae77bb64a28698e26a | Respond to a RemoveCropBiomass event | {
if (CropDataChanged != null)
{
CropDataChanged(this, e);
}
} | 0 |
e65dd763e7e956c7c98b467f8b863d99 | 6e8008d61efa1efd125169aaa1f68fe3 | Whether model supports past covariates | class NBeatsNet(NNModel):
def has_exog(self):
return self.data.exo_dim > 0 | 1 |
4701561bdb7bbc097663ef567ed597e6 | dbf653b49221d1161f7d904fcac7db9b | 保存多条新通知列表数据 | {
DataTable tbl = EtNet_BLL.LoginInfoManager.getList("");
EtNet_Models.AnnouncementInfo announcement = EtNet_BLL.AnnouncementInfoManager.GetModel(id);
EtNet_Models.Information model = new EtNet_Models.Information();
model.associationid = id;
model.con... | 1 |
2026118a14c635a5e85cca7dbb3a41b7 | 5384639340c8afa49b6521c6fdfc2c8c | Place a new bet and store it in my bet field
return true if the guy had enough money to bet | class Player
def placeBet(amount)
if(@money - amount >= 0)
@curBet = amount
@money -= amount
return true
else
return false
end
end | 1 |
78bd02815ab3322e5b8ad86620228de7 | 52d5734c2b8a904550018e77fe171872 | Mark the device as unitialized | class GenericSerialControllerDummy(GenericSerialController):
def finalize(self):
self.logger.debug('Finalizing Dummy Generic Serial Controller device')
self._is_initialized = False | 1 |
bd62d38a5b96a0f9fd8337ce15ff0bf5 | 21640305ece2bb2f0588dadc319e8711 | Pausa a reprodução da musica atual. | public class main
protected void pausa() {
MidiPlayer.getInstance().pause();
} | 1 |
8ae36515d2752937e67d946950f30ce4 | f1e4ba856d846c158126c00888a601eb | Test if mutation was verified successfully | func TestMutationNoChange(t *testing.T) {
resp := testValidation(t, requestValid)
require.True(t, resp.Response.Allowed)
require.Nil(t, resp.Response.Patch)
} | 1 |
6c370d065c08ea9ef900c7fdf24390f5 | 7891a669625974d1b7654c31d90795df | Adds a system package. | public class AntClassLoader extends ClassLoader implements BuildListener
public void addSystemPackageRoot(String packageRoot) {
systemPackages.addElement(packageRoot + ".");
} | 1 |
664843bdc431eb159483411725436e82 | ffef7aa857dcdbf934b6e79ae32dc30a | Use this function to log a message with SDL_LOG_PRIORITY_VERBOSE. | va_list args;
if (!verbose)
return;
va_start(args, fmt);
vlog(fmt, args);
va_end(args);
} | 0 |
652f9743288aa87f6fabb76c50de1fd6 | af75bba716fcc761f671b43d81c32fab | Should throw exception as only one query sequence/pssm is allowed | class HSPFragmentCases(SearchTestBaseClass):
def test_init_wrong_seqtypes(self):
wrong_query = Seq("ATGC")
wrong_hit = Seq("ATGC")
self.assertRaises(
TypeError, HSPFragment, "hit_id", "query_id", wrong_hit, wrong_query
) | 0 |
8c1dd789d0bf643cd8baedc183a5057f | 9d579311e81392d10ef35b5e806ce11b | Normalize aligns multiple point series on a common time step, consolidates points samples if necessary. | var firstAlign = [].concat(first);
var secondAlign = [].concat(second);
var firstAlignLarger = firstAlign.length > secondAlign.length;
var alignDiff = firstAlignLarger ? firstAlign.length / secondAlign.length : secondAlign.length / firstAlign.length;
var largestAlign = firstAlignLarger ? firstAlign ... | 1 |
a2e98160f4113ed8e768ed67c3b413f2 | 1ca5559777a7e282c0af835be59c0d85 | 读取etcd中的秒杀产品信息 | @Controller
@RequestMapping("/gds_master_api")
public class GdsMasterApiController
@RequestMapping("getSecKillProductList")
@ResponseBody
public JSONObject getSecKillProductList(String data) {
return gdsMasterService.getSecKillProductList(data);
} | 0 |
fe7bc06920bf5ab93961ad349a131a74 | 22da4f37f159282b9f6d422c459b6804 | 批量获取任务信息并返回map | public List<TaskInfo> listTasks(Map<String, Object> map); | 0 |
2d97fa68299433ca43ffecfd8001dda2 | e58de5179f1cc5ddf190f80cd5828d7d | 该函数表示,返回从命令行输入的IP地址 | def get_ip_address():
try:
return argv[1]
except IndexError:
return '127.0.0.1' | 1 |
6aa0dcc4c9e817cbc36f141eaf99df66 | f129c32b18230ad0ff5ea76c907df6f0 | Creates a new adapter for an object of class '{@link org.eclipse.hyades.models.internal.probekit.DocumentRoot <em>Document Root</em>}'.
<!-- begin-user-doc -->
This default implementation returns null so that we can easily ignore cases;
it's useful to ignore a case when inheritance will catch all the cases anyway.
<!--... | public Adapter createRemoveobjectinstanceTypeAdapter() {
if (removeobjectinstanceTypeItemProvider == null) {
removeobjectinstanceTypeItemProvider = new RemoveobjectinstanceTypeItemProvider(this);
}
return removeobjectinstanceTypeItemProvider;
} | 0 |
a0f5f5555077ec9cbd3f490758367973 | a35de7b2697960db8556114b569b5b86 | Restore backed up IAM environment variables. | for key in self._saved_environment:
if self._saved_environment[key] is None:
try:
del os.environ[key]
except KeyError:
pass
else:
os.environ[key] = self._saved_environment[key] | 1 |
92b23a9b1229bd04748ef19a8e8abe0e | 770efb43318f2209ce7d539c3cfcea21 | It converts a file into one rescaled by 1e3.
This is useful to convert between Jy -> mJy or m/s into km/s
for plotting purposes (e.g. to use with aplpy).
Usage:
fig = aplpy.FITSFigure(convert_into_mili(file_in_Jy), figsize=(4,4))
fig.show_colorscale(vmin=0, vmax=160, cmap='inferno')
fig.add_colorbar()
fig.colorbar.set_... | def cube2fits(filelist): | 0 |
dcdff74457ae0625424cd2d6438adc91 | 838db323e7fa8a70e739f9d30befb85c | Displays user's stats if game is over as well as a play again button to play again | compgameOver = True
while compgameOver == True:
gameScreen.blit(endscreenbg, (0,0))
button("TRY AGAIN", 50,400,150,50, deepgreen, green, action = "blitztryagain")
if closed:
return
button("MAIN MENU", 325,400,150,50, deepblue, skyblue, action = "menu")
if clos... | 1 |
2a0046594b2ab1d5d70464521c6c24dc | bfb55cfaf3d5e350399771a78f672884 | 处理相同家乡的人的数据 | answer1 = []
temp = []
i = 0
while i < count:
if data.loc[i]['City'] == 'Beijing':
temp.append(data.loc[i]['ID'])
temp.append(data.loc[i]['Name'])
aver_Grade = (data.loc[i]['C1'] + data.loc[i]['C2'] + data.loc[i]['C3'] + data.loc[i]['C4'] + data.l... | 1 |
face509f3db55a7fead45e8883b360a0 | 116210d476a30c96aa00f740c4ee2c6d | This method used to verify list of Columns and their visibility(Hidden/Visible). | public class NavigatorPageObject extends AbstractMcsTestSuite
public void clickChangeVisibleColumns(){
McsElement.getElementByXpath(driver,
"//div[contains(@class, 'x-tab-panel-body-noborder x-tab-panel-body-top') and not (contains(@class, 'hide-display'))]//button[contains(@class, 'icon-grid-columns')]")
.clic... | 0 |
c1010ea8aca813b946a620b974c719b8 | ff3cac67e4c3ea7bc9e2b781bb8b262e | Recursive indexing of controllers in the given folder. | {
if (!is_array($dirs))
$dirs = array($dirs);
$controllers = array();
foreach ($dirs as $dir)
$controllers = array_merge($controllers, Dispatcher::getControllersInDirectory($dir));
return $controllers;
} | 0 |
b20dcce36917e0aaa0248792fcc60c51 | 61d21c0febb268a87959261a9f29fc3c | set given position to holding cameras | function cameraGUI() {
camera.position.x = cameraPosition.positionX;
camera.position.y = cameraPosition.positionY;
camera.position.z = cameraPosition.positionZ;
} | 1 |
ab3689e64dd40237a05e51751f7b0a12 | 2371c868f17085f0246d0c77bfeb2589 | Смена режима Средний бал | {
oneGamerRate = 5;
bankOne -= 5;
twoGamerRate = 10;
bankTwo -= 10;
twoGamer = 3;
firstRate = true;
oneHodFirst = false;
} | 0 |
07daed59fdfe63facc301b0abf9a731d | 2ccd1fb14305770456af638da94d8c66 | The erb template variables for generating Hadoop xml configuration files in $HADDOP_HOME/conf/ | conf = ConfigGen(JOB_TEMPLATE)
env = jinja2.Environment(loader=jinja2.FileSystemLoader(HERE), trim_blocks=True, lstrip_blocks=True)
inputs = []
input_base = 'agave://' + self.storage_system + '/' + self.system_homedir + '/'
wf_path = input_base + os.path.join(self.home_dir, task.... | 0 |
02664714eedece10f59fbbcb2953130a | 873dacd5fa2abc9e00b233ea834c88c5 | Choosing the audibility of sounds from the game.
Wybór słyszalności dźwieków z gry. | if (Input.GetKeyDown(KeyCode.Alpha1)) {
sounds[0].Play();
}
if (Input.GetKeyDown(KeyCode.Alpha2)) {
sounds[1].Play();
}
} | 0 |
dacd8f8810acddf18c6dade35ddb9848 | 64ab2a1b816f3f0182d769c667ca0769 | Where 1440 = minutes per day | class HealthStaffUser_GenerateContactTracingReportController:
def __init__(self):
self.INFECTION_TIME = 14 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.