query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
679677469ae31b9f511ec4b880d7705e | 4d2784c31ac95bdc8d80123f521b6db8 | desenha uma pilha na tela | void print_pilha(Pilha *p){
for(Celula *i = p->topo; i!=NULL; i = i->prox){
printf("%d\n", i->dado);
}
} | 1 |
6224dcc2df4639752cb7ffc6a4baaa00 | 6c23ae1824d24a606ff70ccce07a32e6 | Get the Relation Factory interface for the schema. | KdmRelationsFactory getKdmRelationsFactory(); | 1 |
60d4c497c46bc80afd88533799360504 | b8b1d331b782a357dff858c026520e61 | 更新video动态sql语句, | if ($fields == '') $fields = '*';
$sql = "select ".$fields." from ".DB_PREFIX."video where id = ".$video_id;
$video = $GLOBALS['db']->getRow($sql);
if ($video == false){
$sql = "select ".$fields." from ".DB_PREFIX."video_history where id = ".$video_id;
$video = $GLOBALS['db']->getRow($sq... | 0 |
8c8f90638359cc74180cbb0183adc3c1 | fbb67e8d49782690df53cdae1efbea5b | 建筑是否解锁(科技馆配置) | local result = false
local funcData = self._buildFunctionData
if funcData then
if funcData.unlocktype == 1 then
if gameUser.getLevel() >= funcData.unlockparam then
result = true
end
elseif funcData.unlocktype == 2 then
if gameUser.getInstan... | 1 |
4915acace7aeaa3a1774affeedc4518c | c615af9ae2ae255e75f0701b63fef1c5 | Creates a new client connection to the agent server. | namespace DevChallenge
IConnection Login(string username, string password, string agentname, int agentrevision = 0); | 1 |
3adfb27ab8958b8e3c27d545e9b910c7 | d33686982b9d01a22cdd4a18cff6cc02 | 用于生成hash数据结构的field。统一都用keyvalue_propertyName的形式。 | public Field field(String name, Object value) {
String string = indexValue(name, value);
return new StringField(name, string, STORE);
} | 0 |
ada25ce2dc8e72632c7d9519f14b6360 | 69fb931edffccdb4429711c28b7769f6 | Returns the list of classes to rename, must be an even list: the binary FQCN
of class to replace followed by the new FQCN.
The list can be empty but must not be null. | public Collection<Class> getUpdatedClasses(); | 0 |
726efb82ed633f7de98a7cf4f2c5c86e | 0372a9a45121daf01001d8e0c3a99247 | Show job process in view | {
$job = Job::find($id);
$user = Auth::user();
$jobUserCount = JobUser::where('user_id', '=', $user->id)->where('job_id', '=', $job->id)->count();
$userJoined = (bool) $jobUserCount;
$job->participantsText = $this->getParticipantsText(count($job->users));
return View::make('client.jobDetail')->with('... | 0 |
3401921f980c0f5cb538066fa60e9ee3 | 2eafe856ffda1ba9249e6e0b0b855fd1 | Encodes a video frame asynchronously. | namespace PepperSharp
public class VideoEncoder : Resource
public Task<PPError> EncodeAsync(PPResource videoFrame,
bool forceKeyframe, MessageLoop messageLoop = null)
=> EncodeAsyncCore(videoFrame, forceKeyframe, messageLoop); | 1 |
588f14d8010ead9bf49760e986836b47 | ddc133601ef1dd7bbabba90d75072f75 | Returns dict of instances and state | class SibInteractor:
def get_instances(self):
qres = self.local_storage.query(q_instances)
return qres | 0 |
192e2f3fa908147373b08a5eac96859e | 887b23ba054f33061f64275a186e715a | get the end index by adding the size to the beginning and taking the remainder with the capacity | int LoopTaskManager::calcEndingIdx() const
{
return begin + ((end - begin + step-1) / step) * step;
} | 0 |
5afe54b074ba3f8cf11ea1c0fbaf8fb7 | 181ac65931a9a523ccffcf013e6f504f | 顾客满意度分项统计详情 | {
$result = [];
$userModel = new \app\admin\model\User();
$perUserIds = $userModel->getUserByPer('bi', 'customer', 'read');
$userIds = $perUserIds;
if (empty($userIds)) return [];
$userList = db('admin_user')->field(['id', 'realname'])->whereIn('id', $userIds)->s... | 1 |
08261dedbf7855105b41deb8ce471bdd | faad3ae35259fcb28527c2961d194a91 | レスポンスがHTTPレスポンスとして完結しているかを判断する | class HttpResponse
isOk(): boolean {
let xhr = this.xhr_;
return xhr.readyState == 4 && (xhr.status >= 200 && xhr.status <= 207);
} | 1 |
b12572123beaff0b946b32085eeff0de | 67cbcd4d4be0b0f4cee7eeef4f7176eb | POST: Convenio/Create | namespace WMS.FrontEnd.Controllers
public class ConcecionariaController : Controller
[HttpPost]
[ValidateAntiForgeryToken]
public ActionResult Create(Concecionaria model)
{
try
{
if (!ModelState.IsValid)
return View(model);
... | 0 |
a477833be3b3c9a7e6b424ffa3e812ab | a0c6855bf0af570423f2733b19ea8e83 | 给生物pCreature装备该仙剑,返回TRUE表示装备成功 | class fuben(SaoDangFb):
def equip(self, gid, eid, etype):
self.action(c='general', m='equip', gid=gid, eid=eid, etype=etype) | 0 |
7d9916fc5622af5f0c5a5c09a8a1f977 | dbfe9e55422c3a558cf5da68385c69e7 | Write a function that determines if the average of page total likes is
higher for paid posts. The function should return a boolean (True / False). | def better_than_average(class_points, your_points):
return your_points > sum(class_points)/len(class_points) | 0 |
8d3183324f18d866fc4ee2373ddb8678 | ab38f30d56639e1cbfcafce71e5afaaf | FCP World Wide Node Name (WWNN) of the adapter.
If an error occured while retrieving info
for this adapter, this will not be returned. | class FcpConfigAdapterInfo(NetAppObject):
def node_name(self):
return self._node_name | 0 |
9bb0ea3f16ac551181d598fd0674affa | 4fa0f5a35d1e3048a7190db56c752c56 | 判断当前语句是否为赋值 | boolean isAssignOp(); | 1 |
9bacaa519c84b4e962f3965a9dd1308f | 1fe578651d6a194c2a773287e17b90e2 | Small utility function that updates the local dirty state and
notifies the grid of the value change. | namespace TS.Sys.Platform.Widgets.Refer.GridRefer
public class DataGridViewDataControlEditingControl : TextBox, IDataGridViewEditingControl
private void NotifyDataGridViewOfValueChange()
{
valueChanged = true;
EditingControlDataGridView.NotifyCurrentCellDirty(true);
} | 1 |
fed53e894aeb9cc6bfd817c2c3572b4f | 5a723562fa68e7974ebaa17d8704cb71 | Sets this entity's crouching/sneaking state.
{@code false} to stop crouching | boolean isSneaking(); | 0 |
a22c896519ac54c588b38eb2a4e6d152 | b9c96f6bb56aee48f5fe45b61f28a74d | @brief Compiles the shader parts and assembles them into a usable shader on the OpenGL context | void SGL_Shader::compileShaders(SGL_OpenGLManager &oglm, SHADER_TYPE shaderType, const GLchar *vertexSource, const GLchar *fragmentSource, const GLchar *geometrySource) noexcept
{
GLuint sVertex, sFragment, sGeometry;
sVertex = oglm.createShader(GL_VERTEX_SHADER);
oglm.shaderSource(sVertex, 1, &vertexSource... | 1 |
9856160714cf577a1989ef968baa6401 | 5dac15015962493494342bd95a1e0ca7 | Убеждается в наличии серии и производит добавление в случае отсутствия | {
if ($rawprice->getUnknownProducer()){
if ($rawprice->getUnknownProducer()->getProducer() && $rawprice->getGoodname()){
$good = $this->entityManager->getRepository(Goods::class)
->findOneBy([
'producer' => $rawprice->ge... | 1 |
58d523abb5fb64d221c9802ffaacc9f5 | 53c223c12331326c3fe5b77d38ce5937 | = DESCRIPTION
Returns array of protein members for this
gene member (if member is of type "ENSEMBLGENE") | class Member
def get_longest_peptide_member
answer = nil
raise "Member is not a gene!" unless self.source_name == "ENSEMBLGENE"
self.get_all_peptide_members.each do |peptide|
next unless peptide.sequence
answer = peptide if answer.nil? or answer.seq.length <= pep... | 0 |
a2ce6d5d130f102daa82da10cef88b4e | 7613f650b2d05d26e680e2b9c80bd2a6 | Returns the default positional arguments for this factory. | required_args = [
p
for p in signature(func).parameters.values()
if p.kind in (Parameter.POSITIONAL_ONLY, Parameter.POSITIONAL_OR_KEYWORD)
and p.default is Parameter.empty
]
return [MagicMock()] * len(required_args) | 0 |
08c8485e9f8eae9201c33906d93536fc | 44e9a3ac742e17582903229c441e1455 | Sets the target density selected index. | {
Init();
var selected_size_index_prop = mTypeGameView.GetProperty("selectedSizeIndex",
BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
selected_size_index_prop.SetValue(mGameViewWindow, index, null);
} | 1 |
a7a1be61443a4b6f4aac8e675117153f | e71a88767e96ec1aa05775b2e1bc8d24 | Presets numbers in a given puzzle to cells | allowed_nums = [1,2,3,4,5,6,7,8,9]
i = 0
while i < 81:
self.puzzle[i//9][i%9] = int(puzzle_str[i])
i += 1 | 1 |
05a10b344d91cff58002b5bc74fb1cde | ab7350a4230b985dd7ec9dbf1917bb50 | u'''选择应用发布和登录图标 | fun LoginActivity.initIcon(){
val iconPass = resources.getDrawable(R.drawable.icon_pass)
iconPass.setBounds(0, 0, 50, 50)
login_user_password.setCompoundDrawables(iconPass, null, null, null)
val iconAccount = resources.getDrawable(R.drawable.icon_account)
iconAccount.setBounds(0,... | 0 |
87bcb10b1c534757ee8f38b26520e164 | 592b77d6f83f12f4269aa2d66f349929 | Cancels a registration to receive notification when the system is suspended or resumed. | namespace SA.Android.App public static class AN_NotificationManager
public static void Unschedule(int Identifier) {
AN_Java.Bridge.CallStatic(AN_NOTIFICATIONS_MANAGER, "Unschedule", Identifier);
} | 0 |
25deb7880dc8ff8a49e16069ce7e8dc3 | 119fc0da1a1da11fabcfabb072c6235e | 根据订单号集合,是否打印发票来获取订单信息。 | namespace ERP.Service.Implement
public partial class Service
public List<GoodsOrderInvoiceInfo> GetOrder(List<string> orderNos, bool isPrintInvoice)
{
if (orderNos.Count <= 0)
{
return null;
}
var goodsOrderInvoiceInfo = _goodsOrderWrite.GetGoo... | 1 |
8912da4af8b00085d01faacbe1be603d | cd100c66992f2866df8b8b28e9304b94 | Performs any uncaching operations neccessary when a model's data is changed to ensure
consitency across the application. | {
if (_frontModel == null || _backModel == null)
{
return;
}
RenderOptions.SetCacheInvalidationThresholdMinimum(_frontModel, CacheInvalidationThresholdMinimum);
RenderOptions.SetCacheInvalidationThresholdMinimum(_backModel, CacheInvalidationThresholdMinimum);
} | 0 |
1836dcaf9afec33c437f5107c572661f | 17de23c2be596c052ccbae3c06a303cf | Get particles in position to explode. | public class Bomb
public List<Point> getExplosionArray() {
List<Point> explosionArray = new ArrayList<Point>();
if (radius > 0)
explosionArray.add(position);
for (int i = 1; i < radius; i++) {
if (canExplodeTo(new Point(position.x + i, position.y))) {
explosionArray.add(new Point(position.x + i, p... | 1 |
f7779bf837538b211700d1626314511b | 9d46b89e2caf57e2b0fff941155878f6 | Make a list of all columns in the sudoku. | cols = []
for x in range(9):
cols.append(self.column(x))
return tuple(cols) | 1 |
af450cd4951d8377c0b4a0b7799bfb5f | 36bc590f3c5b08bd79ae59af1ef8e76d | 根据种子生成KeySpec | byte[] bs = new byte[8];
byte[] bytes = secret.getBytes(IOUtils.UTF8);
for (int i = 0; i < bytes.length && i < bs.length; i++) {
bs[i] = bytes[i];
}
return new SecretKeySpec(bs, ALGORITHM);
} | 1 |
e53296d2bb485f61864da9a8627ece04 | 255c434796a08bdb3e08df6af04101ef | 地图可移动 | export default class Map
_bindMapDrag() {
this.mapView.on('drag', (e) => {
if (this.mapView.x + e.dx < 0 && this.mapView.x + e.dx > this.stageWith - this.mapWith) {
this.mapView.x += e.dx;
}
if (this.mapView.y + e.dy < 0 && this.mapView.y + e.dy > this.stageHe... | 1 |
28078aa60e71285c170bb5c3e59c07d2 | 2fe27404159a099e74ad854c7b124a2c | Metoda wyrzuca z listy wciśniętych przycisków, ten który przestał być wciśnięty. | class Asteroids extends Game implements KeyListener{
public void keyReleased(KeyEvent e) {
movements.remove(movements.indexOf(e.getKeyCode()));
} | 1 |
ad3f1690a802033679de970394144c5c | 64ff1187a45685775ad4657fb70594c6 | Function that expresses the effects of the alloying elements on
on the kinetics of bainite transformation | C = comp.get('C', 0)
Mn = comp.get('Mn', 0)
Si = comp.get('Si', 0)
Ni = comp.get('Ni', 0)
Cr = comp.get('Cr', 0)
Mo = comp.get('Mo', 0)
return np.exp(-4.25 + 4.12*C + 4.36*Mn + 0.44*Si + 1.71*Ni + 3.33*Cr + 5.19*np.sqrt(Mo)) | 1 |
09d294c59c732fbd15bb46f827ef7bc9 | b0e8a2a930d44050f4974a7d0d671b06 | Only bootstrap if theming is enabled | function lazyboot_preprocess_page(&$variables) {
$value = theme_get_setting('lazyboot_content_only');
$variables['lazyboot_content_only'] = empty($value);
} | 0 |
b0222421cb21bcfb13514f9a95cd59c2 | b82a3727c40b8f0dd3d5a33797668293 | Gets the element that is currently capturing the specified touch. | {
var screen = app.Ultraviolet.GetUI().GetScreens().Peek();
if (screen == null)
return null;
var view = screen.View as PresentationFoundationView;
if (view == null)
return null;
return view.ElementWithFocus as T;
... | 0 |
874e8ed515e7d635e0c146a0ef3b13bf | e398e12ab9dbfe50231d63a0a3f7ead5 | Agrega un byte a la salida | try {
os.writeByte(c);
os.flush();
} catch (IOException ex) {
ex.printStackTrace();
}
} | 1 |
f78d92480d292f98059f46d6de097999 | 00b79cdde070d2dc1c08fe0aa0f84710 | Installs flattened initializers to the corresponding flattened
global variable. | def flatten_struct_init(decl, env):
typ = get_type(decl.name, env)
fields = typ.type.decls
inits = []
if decl.init is None:
return inits
if not isinstance(decl.init, InitList):
inits.append(Assignment("=", ID(decl.name), decl.init, decl.coord))
return inits
for i, init i... | 0 |
132d4fa2dc8b8ad430777884e1e7fc02 | e10be003334f95e8b002f2f20c6ca153 | Getter for <code>bot.GPT_GUIDE_SERVICE_PRICE_LIST_ITEM.PRICE_TYPE</code>. | @javax.annotation.Generated(
value = {
"http://www.jooq.org",
"jOOQ version:3.5.0"
},
comments = "This class is generated by jOOQ"
)
@java.lang.SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class GptGuideServicePriceListItemRecord extends org.jooq.impl.UpdatableRecordImpl<dshumsky.jooq.generated.ta... | 1 |
c9ae9b7953687a2f71660c0eabe4cda0 | b1017607064ef704ea6ac8a0ab8d7011 | 前往阅读排行榜页面 | public class DjFragment extends BaseFragment
private void gotoDjTopActivity() {
Intent intent = new Intent(mContext, DjRankActivity.class);
startActivity(intent);
} | 1 |
e626a8d227b745cbe8533c23676ec304 | a5475efc2b1fabd78560be7192e75386 | 判断是否新增成功 | {
if ($result && empty($_REQUEST['id']) && $this->request->isPost()) {
$this->success('添加成功!', 'javascript:history.back()');
}
} | 1 |
04d28bb574833520afb6738bceac7416 | bbc0df63ab7cbe0f2a535840fee964ec | Метод проверки смс кода для номера телефона | function verify_message_code($phone, $code){
return S($phone.'_code') == $code;
} | 1 |
2e0697571db6a3a66c9630d74c5e90d5 | b194feb313627d84740adbc6b6cad94a | Check if current user is a payment approver for the given payer | async function validatePaymentOwnership ({ payment_id, client_id }, db) {
} | 0 |
8a0028790eb2b001ef50d774d2f881b7 | e4e41d9cba5876f6800b60b145c1c620 | метод средних прямоугольников | public class Main
void CalcSimps() {
In = (h / 3) * (arrStep[0][1] + arrStep[(int) n][1] + 4 * yNechet() + 2 * yChet());
} | 0 |
0cf03571f8b7da73d2bfb83123d4aae0 | 670f6a953facdf1fa1515149de734293 | Specifies whether the certificate revocation list is checked during authentication. The default is 'true'. | namespace Cassandra
public class SSLOptions
public SSLOptions SetCertificateRevocationCheck(bool flag)
{
_checkCertificateRevocation = flag;
return this;
} | 1 |
094596ff8987d88192937ad04862e59d | 7d6089be02d5280331986a2501235b63 | Test the function which returns the central 80% of the field | double Latitude(0.0);
double CenterLatitude(0.0);
double Longitude(0.0);
double CenterLongitude(0.0);
double expectReturn(0.0);
EXPECT_NEAR(expectReturn, sut->CalculateXYRangeFromCenter(Latitude, Longitude, CenterLatitude, CenterLongitude), 0.000001);
} | 0 |
33bdd4c0a81cac55c5c272aab8a8598d | 59266c7ebba254b26550e2a64d33f9f6 | r"""Maintain source-IP based persistence on primary and backup virtual servers.<br/>Default value: DISABLED<br/>Possible values = ENABLED, DISABLED. | try :
return self._srcippersistency
except Exception as e:
raise e | 0 |
6208d5fcd7a5f29cdc8e63c8fb2470c9 | 11d760422efd3458e8f782342333d56a | heavy chain object getter
Returns | class HetMol():
def get_parent(self):
return self.__parent | 0 |
a4500cb6511ebefc2b7e6e9aa4f4e130 | ffac0d5478f11f09f2a0c699ffa14824 | This adds a property descriptor for the Update Type feature.
<!-- begin-user-doc -->
<!-- end-user-doc --> | public class TriggerItemProvider extends ConstraintItemProvider
protected void addUpdatePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Trigger_upda... | 1 |
db99679e75edf81569bb25660ab362a8 | fb49dcd3e27387c68748d87de9defb73 | Function that determines the amount of fuel taken by each crab to get to a position desired | fuel = math.floor(int(fuel) / 3) - 2
if fuel <= 0:
return 0
else:
return (fuel + fuel_calc(fuel)) | 0 |
dbed3c8592d73598d87081d04e89f56e | 46ec7c375babc99f8bda2a1c4df8b8bb | 검색레이어 열린 상태에서 바디 클릭 시 레이어 닫힘 | function list_close() {
$('#yeogiListPopup').fadeOut(200);
$(window).unbind("touchmove");
} | 0 |
1351e1c8206269aa81e4b5fd5a196721 | 2a0bd6406db60a22ab46e62f5494cc89 | 同步Web监测数据 | sql_monweb = "select id,MonUrl,RstCode,Gid,(select group_concat(id) from alarms where Ipid=monweb.id and IsBeOk=0) as Alarms_Ids from monweb where Enable = 1"
global dict_monweb
dict_monweb = Sync_Db('id',sql_monweb) | 1 |
3f5feafaa3d58992d378959066cde1a9 | 12ea44e7fe96607a2d2111995de2d25d | 获取司机字段描述 | public class FocusSignBillEntity extends BaseEntity{
public String getDriverCode() {
return driverCode;
} | 0 |
ffe93aaff78ccf71acff6a120878877f | 0ce89f08df4748970df7febc8ecc6887 | Retrieves the original file of the given diff with CGIT | def download_orig_file(*args, **kwargs):
return _download_diff_file(False, *args, **kwargs) | 1 |
9075bfb0383f40c429ca3b391c190cb2 | acb0485febf1551c25f9f34830eed8b8 | This method defines directories according to the directory format defined in the DEFINITIONS_FILE file. | class ShapeletOperations_DMH(object):
def make_directories(self,filename):
self.sim_dir = filename.partition('.')[0]
try:
os.makedirs(self.sim_dir)
except OSError, e:
if e.errno != errno.EEXIST:
raise
os.chdir(self.sim_dir)
self.group_dir =... | 0 |
dfd14cf69b141e29353896d66c5b42b4 | b49edce793bdb3902e89260b507df1c6 | Outputs the instance representing all its values joined together | function toString() {
return this.toValues().join(``)
} | 1 |
e9b5e53fcdcc22526f462b8d50abb91e | fc5e74eca2db0eddccff6ec27dfab4c6 | 受け取ったHTMLをテキスト形式に変換する
(クラス base_static_text からのコピー) | {
$str = preg_replace("/<sty(.*)\\/style>|<scr(.*)\\/script>|<!--(.*)-->/isU", "", $str);
$alltext = "";
$start = 1;
for ($i = 0; $i < strlen($str); $i++) {
if ($start == 0 && $str[$i] == ">") {
$start = 1;
} else if ($start == 1) {
if ($str[$i] == "<") {
... | 1 |
d3b6ed4c8a30bd23752915c4bbe277b7 | d04f9862c63e41e6806dec7b2ffe64e8 | Mock helper function for oxr rates support without a valid API key for testing | class ExchangeRatesTest(TestCase):
def test_exchange_rates_someday(self, mock_get):
exchange_rates(dt.date(2019, 10, 12))
self.assertEqual(
mock_get.call_args[0],
(
"https://cdn.jsdelivr.net/gh/fawazahmed0/currency-api@1/2019-10-12/currencies/chf.json",
... | 0 |
3cdf4dfaacb389dc8493f6c15e038b5a | 31c916a91c4db9b096f893413f7d15a7 | Test that a cube still works if there are negative-strides. | auto& engine = get_test_engine();
auto input = engine.allocate_memory({ data_types::f32, format::bfyx, { 1, 8, 1, 1 } });
auto begin = engine.allocate_memory({ ov::PartialShape{ 5 }, data_types::i32, format::bfzyx });
auto end = engine.allocate_memory({ ov::PartialShape{ 5 }, data_types:... | 0 |
64ea5c869b4cc21530ca12079b0449d3 | 50cad98f0e89b3e1d20d6c2617343b96 | アプリケーションを閉じることが可能であるかどうかを返します.<br>
デフォルトでは常にtrueを返します。 | boolean onMayClose(); | 1 |
31d80cfdb7fa7274efa66daaf33168ce | b30d12b1b00e205d331333f2cf15396f | Get the ip address of the server. | public function GetServerIp (); | 1 |
c45dd5e0ad11f44cc40e9f7796669269 | c2ed596a932ffe6c295a115d4d383c42 | Sets the starting position to the minimum values of x and y, so that we
can correctly access the array of Fragments later on. | public void setStartingPosition(double[] startingPosition); | 0 |
3409a1fc59dd17882fb3cf05732e4d78 | 092a4e84a5bab2ef13dc32c902b504a2 | jump unless character selected | void SCR_CMD_1A()
{
++gScriptPtr;
if ( *gScriptPtr != gCurrentCharacterId )
{
SCR_CMD_01_Jump();
}
else
{
++gScriptPtr;
}
} | 1 |
2ff6b7227a257dd57191f8e0ac08e5d5 | 9fade2ff10d40a645b6164a0787a6679 | <p>Generates the Cocke-Younger-Kasami recognition matrix derived from the specified grammar.<p>
<p>The algorithm has been derived from [A. Pettorossi "Automata Theory and Formal Languages (3rd edition)", par. 3.15.1]<p> | {
finalNumber = itemNumbers.size();
int finalIndex = 0;
boolean isTedious[] = new boolean[finalNumber];
int sameIndex[] = new int[finalNumber];
for(int i = 0; i < isTedious.length; i++)
{
isTedious[i] = false;
sameIndex[i] = -1;
}
for(int i = 0; i < itemNumbers.size()-1; i++)
{
for(int j = i... | 0 |
ff5ad5fef3274c2ef4f493fa13a4f368 | 6c5ee9c0f10fbf7a5b46d783a1c8f1bc | 更新一个MenuGroup | boolean update(Menu menu); | 0 |
b2b4672420c30698f66308d612721e1d | 0bc62f347aec161c424b6863b77931e1 | If dbcontext is the same, it is considered the same | {
var savedDatabase = new DatabaseSchema(DatabaseDefinition.GetDatabaseXmlDefinition(DatabaseDefinition.DatabaseVersion));
var codedDatabase = new DatabaseSchema(GetDatabaseDefinitionXml());
return savedDatabase == codedDatabase;
} | 0 |
6fa1f84f221c225be508db26ce1c7ba2 | e149223a4c249c435574a81ef63218af | one의 two승을 구해준다. | class Dice:
def two(self):
return self._occ_num(2)*2 | 0 |
aebc142ca3eef69cf4e0174f3bf177ea | 098be899c2b77616eabd6a0172e5d1f3 | ParseCSVGetRows returns the number of rows in a given file. | file, err := os.Open(name)
if err != nil {
panic(err)
}
defer file.Close()
all, err := csv.NewReader(file).ReadAll()
if err != nil {
panic(err)
}
if len(all) == 1 {
return all[0]
}
size := 0
for _, line := range all {
size += len(line)
}
result := make([]string, 0, size)
for _, line := range all {... | 0 |
4dc839aab7fb5250475ef88dc86cccdf | 864c50714b5413b9343501a9e52807fc | MAD-based z score | if ctrl_mat is not None:
medians = ctrl_mat.median(axis=1)
median_devs = abs(ctrl_mat.subtract(medians, axis=0))
else:
medians = mat.median(axis=1)
median_devs = abs(mat.subtract(medians, axis=0))
sub = mat.subtract(medians, axis='index')
mads = median_devs.median(axis=1)... | 1 |
791bac1b927e369fa165d19c7199786c | edfa7dbdc0880a17edecbf4f233b5ee9 | updates the game state to reflect scrolling left by one column | if (column > 0) {
row++;
column = 0;
}
} | 0 |
805f329b743de0abaf084db0fce3d960 | 3dc6a325cd727b1d0e5befea8f53c103 | Function: compute curvature based on proposed steering angle
Input: steering angle
Output: curvature | def curvature_rad(d_2):
r_cvt = .18 * d_2
return r_cvt | 0 |
45aed775fbe74bd281391e2b690b5016 | 725b57fcb40c90a755a7abfda08bfca0 | Exit a parse tree produced by {@link TSqlParser#create_or_alter_trigger}.
@param ctx the parse tree | void exitCreateTriggerStatement(SQLParser.CreateTriggerStatementContext ctx); | 1 |
0b1445dcd4c7d5dd6cce1fdd3f6be2ed | 539501e658b816c07c3d8244e05653a8 | Verifier s'il y a un alignement de 4 dans la grille | public class Main
public static boolean alignementGagnant() {
for (int i = 0; i < 3 ; i++){
if (plateau[i][0] == plateau[i][1] && plateau[i][0] == plateau[i][2] && plateau[i][0]!= ' '){
return true;
}
}
for (int i = 0; i < 3 ; i++){
if (plateau... | 0 |
c9b097a306149740d423ea755c017c92 | 4fbc1ceaa2ec0bbdb7e8870baec75475 | Sets the month text size in SP. | int textSize = 0;
if (Utils.getScreenHeight(view.getContext()) < 800) {
textSize = (int) view.getResources().getDimension(
R.dimen.text_size_18);
} else {
textSize = (int) view.getResources().getDimension(
R.dimen.text_size_20);
}
mProvince.TEXT_SIZE = textSize;
mCity.TEXT_SIZE = textSize;
... | 0 |
a19abc5ef2c942c374e59f65f1ac08f5 | f7248772eb9ea54a7451a6e42c072548 | Trims leading and trailing spaces on the email address when it's changed. | namespace Community.Models
[MetadataType(typeof(UserprofileMetadata))]
public partial class Userprofile
partial void OnEmailAddressChanged()
{
if (!string.IsNullOrEmpty(EmailAddress))
{
EmailAddress = EmailAddress.Trim();
}
} | 1 |
b497bce10a265a770776a05d1ca8117f | 04203d34bbf296d4628595882a4bbb17 | Only scale the Y axis | QCPAxis *x, *y;
x = ui->graphWidget->axisRect()->axis(QCPAxis::atBottom);
y = ui->graphWidget->axisRect()->axis(QCPAxis::atLeft);
x->setScaleRatio(y, 1.0);
ui->graphWidget->replot();
} | 0 |
30a52c0cdd15d25f2f02824f0339c13c | 44c55350ce2017b5734910d8d562c3a0 | Maximum system utilization in HI-mode. | volatile uint32_t* paddr;
uint64_t st;
paddr = bcm2835_st + BCM2835_ST_CHI / 4;
st = bcm2835_peri_read(paddr);
st <<= 32;
paddr = bcm2835_st + BCM2835_ST_CLO / 4;
st += bcm2835_peri_read(paddr);
return st;
} | 0 |
b286b9ce541ace8d602ecf036b26d015 | bcd7d2f8051352328c3a6bccf03f9989 | 判断区块的内容是否仅为没有else的if语句 | if (content.contains("<<if")) {
return true;
} else {
return false;
}
} | 0 |
7382a6ef3336d5400b9b0659eb5e2539 | 03afe4eb56fe2daeaf63940b92ff2c70 | 将url指向的图片提纯为一个颜色 | class KyanToolKit(object):
def imageToColor(url: str, scale=200, mode='rgb'):
from PIL import Image
import colorsys
if url:
response = urllib.request.urlopen(url)
img_buffer = io.BytesIO(response.read())
img = Image.open(img_buffer)
img = img.conve... | 1 |
311a59547d3e0fbdf24c8b358ad7234a | bde8fe9b28af280b2478f8d45b84996f | load data from a file, allow user to specify load all or specific columns. | fin=open(fn,'r')
cols=fin.readline()
fin.close()
cols= np.char.strip( np.array(cols.split('|'))[use_cols] )
arr=np.loadtxt(fn,dtype='str',comments='(',delimiter='|',skiprows=2,usecols=use_cols)
data={}
for i,col in enumerate(cols):
if col in str_cols: data[col]= np.char.strip( arr[:,i].astype(str) )
else: da... | 1 |
da7f5105953dd0a043f604d6004fc11b | 1dd2c045630b5b148f13d72e47b81d6f | @brief Backward the current wma stream | uint32_t Mp3Process_StreamForward(void)
{
return 0;
} | 0 |
21b90dfa9c7d1d0d39197ba536ba6dc0 | 76a3dd6ed7fe11b2ae7c620480e22c0c | # this creates a button for and object
# the label of the button is the name of the object
# the button selects the objects | local howManyButtons = 0
local objsToHaveButtons = {}
if move == true then
objsToHaveButtons = getAllObjectsInMemory()
else
objsToHaveButtons = getAllObjects()
end
for _, obj in ipairs(objsToHaveButtons) do
if obj ~= self then
local dummyIndex = howManyButtons
... | 0 |
49592cc449d8376abc3cf11b566b2d33 | 76b75b9fd960a78d2331213b1a4b747a | 新增用药史 | @ResponseBody
public Object add(PatientMedicalUsageStep patientMedicalUsageStep) {
if (patientMedicalUsageStep.getPatientInfoId() == null) {
log.error("patientInfoId is null");
return new Tip(500, "服务器异常!");
}
patientMedicalUsageStepService.insert(patientMedicalUs... | 1 |
0f69a8256063f88d4b55abce9939422a | d8b04d234e08163a47ed5af4783676bc | 更改码头的位置 | {
$planter_id = intval(session('planter_id'));
$user_id = intval(session('user_id'));
$ton = $params['ton'];
$toff = $params['toff'];
$planter_obj = new PlanterModel($planter_id);
$planter_info = $planter_obj->getPlanterInfo('planter_id = ' . $planter_id, 'planter_id');
if (!$planter_info || !$planter_ob... | 0 |
95de64357820e16b968fdeaaab22e7fd | ae4154db49af4ee5898d77323ef294b0 | Down move is yesterday_low - today_low | if (data_ohlc_yesterday[:close] - data_ohlc_today[:open])/(data_ohlc_yesterday[:high]-data_ohlc_yesterday[:low]).to_f > rate
return true
else
return false
end
end | 0 |
3b8263b4e89f86b71450173ebc7f4cd2 | eb8fb4457b0e61c245df89dc18a7a5bd | Controle om te kijken of een instantie van dit object enkel nulls en de standaardwaarden voor de datums bevat. Maw, of dit object "leeg" is. | public class KTLDatum extends GeneralNodeACEnergyDatum
public boolean isValid() {
return (getWatts() != null || getWattHourReading() != null);
} | 0 |
1d5b664c62556e8b51d3f9a38d62ed4f | 37a3008685e8308cf339dc188f35c925 | Adds input numbers | function addToInputFromKeyboard() {
var valueToAdd = "";
if (event.keyCode == 48 || event.keyCode == 96) {
valueToAdd = "0";
}
else if (event.keyCode == 49 || event.keyCode == 97) {
valueToAdd = "1";
}
else if (event.keyCode == 50 || event.keyCode == 98) {
valueToAdd = "2";
}
else if (event.... | 1 |
6fa6f96647d2e6defdc7537c1b9b4dea | 461256627bbeb44f595d29ab0ea3195a | Query driver to get implementation limits.
Note that we have to limit/clamp against Mesa's internal limits too. | &mut self,
required_major: u32,
required_minor: u32,
) -> crate::Result<(u32, u32)> {
let tok = self.query_glx_version(required_major, required_minor)?;
let repl = self.resolve_request(tok)?;
Ok((repl.major_version, repl.minor_version))
} | 0 |
9f86364ced27d59740f6d25d5611f0a7 | 82ced49de8b3cb6b94fb2e572232c23d | # Fit Cox model for each signature | {
require(survival)
cox.univariate.results <- list()
for (id in rownames(mat))
{
cur.df <- data.frame(Expression = as.numeric(mat[id,]),survtable)
Mod <- coxph(formula,data=cur.df)
cox.univariate.results[[id]] <- Mod
}
cox.univariate.results
} | 1 |
bb2263b03c64255fd8a3eda0d95ad98b | 309dc978a06af9445ce8b4ddb6b93b95 | 获取区域类型。1:公共区域 ;2:楼栋 ;3:层 ;4:户 ;5:房间 ;6:楼层公区 ;7:别墅 ;99:其他 | public class AgentPubFun
public static String getAreaType(String cManageCom, String cBranchType) {
String tSql = "";
SQLwithBindVariables sqlbv=new SQLwithBindVariables();
if (cBranchType.equals("4")) {
tSql = "Select trim(code2) From LDCodeRela Where trim(RelaType) = 'comtoareatype' and trim(code1) = '"
... | 1 |
9184d5b3ebaf863be1098485f1c29a85 | 8419aab2e6c5d113558e5db9d27ec804 | Получение списка всех отелей. | namespace Web.Template.Application.Lookup.Services
public class GeographyService : IGeographyService
public List<Resort> GetResorts()
{
return this.resortRepository.GetAll().ToList();
} | 0 |
06240935364240b61a9bc7e4ae8a2ee1 | 888ac3794d0344b6478eee336e115e43 | Returns the currently configured EC2 private key file. | class EC2InstanceConnectKey(object):
def get_priv_key_file(self):
return self.tempf.name | 1 |
f64a8492975ff9745d422e945fd34775 | 82862d673c0667ab69cf58d63f96449b | tab control, content control, (switch content of a div between location list and semantic layer) | function tab_switch(new_tab, new_content, adjust_anchor) {
adjust_anchor = adjust_anchor || false;
document.getElementById('content-box-cal').style.display = 'none';
document.getElementById('content-box-revs').style.display = 'none';
document.getElementById('content-box-prop').style.display = 'none';
docu... | 1 |
f4c22889299298150f819c38b3edf025 | 8a5ab7e869d8afc58f2628e697b7fd47 | Turn animation on and off.
The prior value of the animate flag is returned. | void Object::SetAnimate(bool animateState)
{
_animate = animateState;
} | 0 |
9f33a0b2cf53d64e97ff1c3aa87d823e | 86f2fac9501404ca3301fea3c645699d | рассчитать ежедневный доход | appData.moneyPerDay = Math.round((appData.budget / 30) * 100) / 100;
alert('Ваш бюджет на 1 день (30 дней в месяце): ' + appData.moneyPerDay + ' руб.');
console.log('Ваш бюджет на 1 день: ' + appData.moneyPerDay + ' руб.');
} | 1 |
7b1d7d8fb24265c451cb34e95306809c | 922b5d2987fc6cf8cdfbea30cd234e89 | Returns the HIDDEN attribute for the specified file or directory
If hidden files are not supported, the function should
return JAVACALL_FALSE
JAVACALL_FALSE file is not hidden or
feature is not supported
<tt>JAVACALL_FAIL</tt> if an error occured | {
unsigned int rv;
SHELLSTATE ssf;
SHGetSetSettings(&ssf, SSF_SHOWALLOBJECTS | SSF_SHOWSUPERHIDDEN, FALSE);
if (ssf.fShowAllObjects){
if (ssf.fShowSuperHidden){
rv = 0;
} else {
rv = FILE_ATTRIBUTE_HIDDEN | FILE_ATTRIBUTE_SYSTEM;
}
} else {
rv = FILE_ATTRIBUTE_HIDDEN;
}
return rv;
} | 0 |
9e08ab606411b013de9d94accd5bc685 | a25b78ed135b01995e3387454f6cb6cf | Generates a Fortran deallocate statement | class DeallocateGen(BaseGen):
def __init__(self, parent, content):
reader = FortranStringReader("deallocate(dummy)")
reader.set_format(FortranFormat(True, False))
myline = reader.next()
self._decl = fparser1.statements.Deallocate(parent.root, myline)
if isinstance(content, str)... | 1 |
6e135f0f5ed99492673810af51d0e0c1 | a7aa3abc9192c00f6f3265320c82c66a | Store the delivery address on an order | {
$em = $this->getDoctrine()->getManager();
$user = $this->container->get('security.context')->getToken()->getUser();
$address = new Address();
$form = $this->createForm(new AddressType($em), $address);
$form->handleRequest($request);
if ($form->isValid()) {
... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.