query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
3daba9517313727320eb8294b5c38226 | b0f7a81af4994049671f67dea0f3d1c3 | Function that will send all the locations of a given chunk | {
QSet<Chunk::Chunk*> c;
Map::Entity *entity;
Chunk::Chunk *chunk;
for (int i = 0; i < player->getEntities().size(); i++)
{
entity = _world->getEntity(player->getEntities()[i]);
chunk = _world->getChunkByTile(entity->getX(),entity->getY());
... | 0 |
f847891214e190bc087e3fd291ca74ce | 2e102ed830b23b907ae7c784f436a4aa | Убить окно | {
windowRect = getPositionDialogWindow();
windowRect = GUI.ModalWindow(0, windowRect, DialogWindow, "Упс");
} | 0 |
2b0306ace5d79e2f8873f5ff7195b979 | c6d72104000dbf400105bfdf61a14a8f | Expands the keys that are shared between both files | {
commonKeys = new List<K>();
uniqueKeysInH1 = new List<K>();
uniqueKeysInH2 = new List<K>();
foreach (K h1Key in h1.Keys)
{
if (h2.ContainsKey(h1Key))
{
commonKeys.Add(h1Key);
}
... | 0 |
8c21277761cba2be7a315599df65b88e | 4a463c6fa112abcaf635f7fea3494fe8 | 必要に応じて落下させる | public class FallScript : MonoBehaviour
void Update () {
} | 0 |
08cb35a19c048dfa5fe86f0d362ab2a5 | 96858473c11e7c4e4f3b51ac742dd5c3 | hàm hoán vị 2 đối tượng nhân viên SỬA ỐNG NƯỚC | {
if (id == null)
return false;
else
{
NhanSu s = db.NhanSus.FirstOrDefault(x => x.ID == id);
s.ID = newNS.ID;
s.Hoten = newNS.Hoten;
db.SaveChanges();
return true;
}
... | 0 |
1bf88afaab48c085b93a823034b03a49 | f856889196e1255d671ae54c0cf13d9c | Función principal del ejercicio 4 | a = [1, 2, 3, 4, 5]
b = []
c = [10]
d, e = "ana", "aan"
f, g = "aMoR", "rOmA"
h, i = "ragaa", "raga"
m = [1, 3, 5, 2, 54, 543, 321, 826, 326, 532, 22, 1, 2,3, 4, 5, 5]
x = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]
print("--------------------------------------------------------... | 1 |
a8eebfaf4aa208d3e34c6c0602b739a6 | eb8308efa308050e477983dc047ca36d | 計算新地板的Y座標 | {
return round(((1.9f - C(1)) * ((float)height) / 2.0f)) + ymin;
} | 1 |
e7b98acaa0cdaa4a81a0b93cb346a3f1 | 0f5a84a50fc5e39b3736e1deb4392d84 | 更新资源总配额 | @Service
public class OperationImpl implements Operation
@Override
@Transactional
public void updateResourceLimit(ResourceLimit resourceLimit, String id)
throws HsCloudException {
Integer bwtIn = 0;
Integer bwtOut = 0;
Integer ipConnIn = 0;
Integer ipConnOut = 0;
Integer tcpConnIn = 0;
Integer tcpConnO... | 1 |
eece15aa2d53f98c55dce175a6038b88 | 17cf9b69ba9d633bd759bff3f8fb7f91 | Changes the colors of every character in the current string to the specified set of console colors. | namespace RT.Util.Consoles
public sealed class ConsoleColoredString : IEnumerable<ConsoleColoredChar>
public static ConsoleColoredString Format(ConsoleColoredString format, IFormatProvider provider, params object[] args)
{
if (format == null)
throw new ArgumentNullException(nameo... | 0 |
80294044af39eacae2ce817348817d9b | f15fc3008d039b88efa9e69182f95040 | Requests the details for a specific order from the Warframe Market API. | class Orders:
def get_order(self, wcapi, orderID):
getOrder = wcapi.get("orders/"+str(orderID))
return getOrder | 0 |
43cc4e3ee2046d1fb54560a3c0668f8c | 7993abc2ac01ac1684b1afe9b6684061 | Send to the Reins Script that the RIGHT Hand is free or not | public class ControlPanel : MonoBehaviour
[RPC]
void HandStopRPC (string axis_str)
{
string[] axisArray = axis_str.Split(',');
switch(axisArray[0]){
case "xn":
if(axisArray[1] == "True")
MillingData.cxn = true;
else
MillingData.cxn = false;
break;
case "xp":
if(axisArray[1] == "True")
... | 0 |
ec72f0cf772f81935b88767cf7c5bc07 | 4b35141bc56ffdf9ba669155e8c28e10 | get list of files from reference directory | class ReferenceBuilder(AllBuilder):
def get_all_documents(self, refdir):
documents = []
for doc in os.listdir(refdir):
directory = os.path.join(refdir, doc)
if os.path.exists(os.path.join(directory, 'index.rst')):
n = len(os.listdir(directory))
doc... | 1 |
6e1247cc4add1ec7839758b70b8edc07 | 1b829158a29402ae95fd163cd7ed7897 | To get the widget based on widget type. | {
$widgetName = str_replace($this->getName().$this->getNameSeparator(), '', $widgetName);
return array_key_exists($widgetName, $this->widgets) ? $this->widgets[$widgetName] : false;
} | 0 |
b6b517a0af1446293e89c56a89299254 | 57db5b890d4aa9ba59e7ab06d6c6f354 | Returns the statisticsEnabled field. | @ThreadSafe
@Singleton
public class StatsTables
public boolean isEnabled() {
return lastIsEnabled;
} | 0 |
61f56afcec4ef358694ed2f7fe0c1a0c | ba418825cf70bfd1f0b6a6859bffee34 | Генерація pdf для Trl/Анулювання ліцензії | class sbr_stages extends sbr_meta
public function generatePackageDocs($ok, &$doc_err) {
$is_emp_arb = $this->status == sbr_stages::STATUS_ARBITRAGED && $this->arbitrage['resolved'] && floatval($this->arbitrage['frl_percent']) == 0;
$this->sbr->getUserReqvHistoryData($this->id, 'frl');
if ($ok &&... | 0 |
9df6d3902a9f4a075417faed2b96b852 | c489466e9ef1693918067f84ed188fd6 | Finds the widest cell of the given column and returns its width. This is used internally
to assess the character width that should be used to print a column. | int CGridCore::GetMaxValueWidth(int iCol)
{
int nRows = GetRows();
if (nRows <= 0) {
return 0;
}
CDC* pdc = GetDC();
CFont* pOldFont;
pOldFont = pdc->SelectObject(&m_font);
ASSERT(pOldFont);
CSize size;
int cxMax = 0;
for (int iRow = 0; iRow < nRows; ++iRow) {
size = MeasureFullCellSize(pdc, iRow, iCol);
... | 1 |
5ac6acb9d72a1806ba0827eba83428d1 | afb26991c5510f8784809df6fc30209e | Saves @thumbnail to it's appropriate file. Note that @thumbnail must have
it's URI, mtime, and size metadata set before this function is called. Any
additional metadata can be saved using the %NULL-terminated
variable-arguments list. If an error occurs while saving the thumbnail, a
failure thumbnail will be automatical... | func SaveThumbnail(name string, imagePath string, thumbnailPath string) {
log.Println("name= ", name)
log.Println("imagePath= ", imagePath)
log.Println("thumbnailPath= ", thumbnailPath)
file, err := os.Open(imagePath)
defer file.Close()
if err != nil {
log.Println(err)
return
}
out, err := os.OpenF... | 0 |
85b9334931f340fb472539724a8d7297 | 1fb856e5c96188f2359f40819c706f27 | Clears all chunks from the dirty list. | namespace OctoAwesome.Chunking
void Flush(); | 1 |
4978fb21ee57cf715ab9494291ea2ba2 | 0c29ec998b8eccc17a9dde3375db3685 | Calcula la circunferencia del círculo | class Circle (GeometricClass):
def circumference_circle (self):
return (2*self.radius*math.pi) | 1 |
5029729a6b86a659d800593141239f19 | 4953bbcab36baaae50ce34f31b8c25ea | Setea el volumen del audio al nivel deseado antes de iniciar. | public class Options : MonoBehaviour
public void SetVolume(float volume)
{
audioMixer.SetFloat("volume",volume);
audiovolume = volume;
} | 1 |
1ded55e36a690f30383cc29a939e31e7 | 2e913b82bfb4abcc8679186a97eb9e2c | Checks to see if this application is already running.
<p> | public boolean isRunning() throws ContainerException; | 1 |
7b0cd643fba1b57f04d593db60e002a6 | 5db0a82232a9d8b3e98565e2ffb1ff1f | Test if logged user who already joined
the group is redirected. | class CoreViewsTestNoLogin(TestCase):
def test_index_groups_out(self):
response = self.client.get(reverse('core_admin_index_groups'))
self.assertRedirects(response, reverse('user_login')) | 0 |
fdbea58f210fb69b64173cc1cc00dd53 | 893b1f6cef80c3241ad986dfefd9d150 | rates the risk of stations based on their actual effect on the monthly maximum and on their daily maximum
variance (actualy standard deviation) | for month in range(1, 13):
variances = prepare_data(obs_var, station, month, diagnostics=diagnostics, winsorize=winsorize)
if len(variances.compressed()) >= MIN_VARIANCES:
average_variance = utils.average(variances)
variance_spread = utils.spread(variances)
else:
... | 0 |
4e31d918181d74324f37f41e38f7e79d | ba9854a93a86241a6f91694ac2866b23 | Get status since datetime | class Unit(model.ModelEntity):
def workload_status_since(self):
return pyrfc3339.parse(self.safe_data['workload-status']['since']) | 1 |
da3b9abc361c8cfb91241a61afedb4be | 3ae46352927440c2cee289fc924398c3 | Gets the value of the loyaltyPref property.
<p>
This accessor method returns a reference to the live list,
not a snapshot. Therefore any modification you make to the
returned list will be present inside the JAXB object.
This is why there is not a <CODE>set</CODE> method for the loyaltyPref property.
<p>
For example, to... | {
if (!false) {
throw new \InvalidArgumentException(sprintf('The LoyaltyPref property can only contain items of anyType, "%s" given', is_object($item) ? get_class($item) : gettype($item)), __LINE__);
}
$this->LoyaltyPref[] = $item;
return $this;
} | 0 |
c1acd261549fa662cd495a96855fb5ab | eb68b95f68185c07531d608b41b1a6c7 | Get message timer. | if ($this->timeout == 0) {
$this->timeout = ApiPremiumMessagesFeature::get('timeout');
}
return $this->timeout;
} | 1 |
c10ee58a26a034d2d67224d193b9ee63 | 5f04c5a93245136088c088739723f173 | 4) Conversión escala de 100 -> escala 5 | int[] return_emgData_tam08 = {0, 0, 0, 0, 0, 0, 0, 0};
for(int i = 0; i < 8; i++){
if(emgData_tam08[i] != 0 && emgData_Max_tam08[i] != 0){
Double valueRen = ((double) emgData_tam08[i] / emgData_Max_tam08[i]) * 10;
return_emgData_tam08[i] = valueRen.intValue()... | 0 |
a834df77c8ada299ffe777eb0325cecf | b991689be2427f26f298f34fc2db69a4 | <p>
Returns whether the client has enabled fips mode for accessing S3 Control. | boolean allowReadFSSFPfl( CFSecAuthorization Authorization ); | 0 |
32e5710e50905298f9816d4f52123394 | 87090cf460a8be09c03af70294fccb69 | Sets the irp id. | @XmlRootElement(name = "irpDataList")
@XmlAccessorType(XmlAccessType.FIELD)
public class IssueResolutionPlanDataList
public void setIrpID(String irpID) {
this.irpID = irpID;
} | 1 |
7a3ce29b33769a027e31058954af2fb7 | 3eda0fe8ed1b48d8813689c535bf64ed | Setter for default chart X scale. | public class HeatMap extends SeparateChart
public HeatMap setXScroller(String xScroller) {
if (!isChain) {
js.append(jsBase);
isChain = true;
}
js.append(String.format(Locale.US, ".xScroller(%s)", wrapQuotes(xScroller)));
if (isRendered) {
onChangeList... | 0 |
3a044d4dd4ddb6f1a5397b651b2253f7 | 632eb8496f81727363268278af0f7b5f | Test Assertion helper that will try the SELECT query a few times in case we need to wait for consistency | with patch("django.db.utils.ConnectionHandler.__getitem__") as gi:
gi.side_effect = [OperationalError] * 5 + [True]
call_command("wait_for_db")
self.assertEquals(gi.call_count, 6) | 1 |
83f3db609e0dcfc2c92a9e779f478425 | 2c3322957b0d07fa327bf9c78bf727ad | 角色选择,返回角色对象 | public class RoleMgr : Singleton<RoleMgr>
public GameObject LoadRole(string name, RoleType type)
{
string path = string.Empty;
switch (type)
{
case RoleType.MainPlayer:
path = "Player";
break;
case RoleType.Monster:
path... | 1 |
a90ddaeb8a44d65a4c6832cbabc5a631 | 0f248aa67eaceee0ab37fda8720724f3 | Get a list of NED tiles required to cover a spatial extent | mercator = get_projection()
wkt_format = 'POLYGON(({x1} {y1}, {x1} {y2}, {x2} {y2}, {x2} {y1}, {x1} {y1}))'
w, e, s, n = xxyy_extent
nw, se = ModestMaps.Geo.Location(n, w), ModestMaps.Geo.Location(s, e)
ul, lr = [mercator.locationCoordinate(loc).zoomTo(zoom).container() for loc in (nw, se)]
rows... | 1 |
cbfa43815b841214ff9281e024952b99 | 3f40c29bd2f0de197855bf328adc3820 | Fucntion to convert longitude from decimal to degree minute seconds format | def dms(deg):
m=int((deg%1)*60)
s=round((deg%1-m/60.)*3600,3)
return int(deg),m,s | 1 |
b48a0a11bc9e04dac927eb49f3cdc61d | ec374487ab6482824b5313d9f2bae2b2 | GET: CourseModules | {
var model = new CourseModel
{
courseLinkTexts = await db.coursesLinkTexts.ToListAsync(),
catagories = await db.catagories.ToListAsync(),
};
return View(model);
} | 0 |
57c3300911ab2a4eb67e8f5de529276d | 0bb6a3b04b27fb8f24ac4b86e9000817 | Loads the map assets like tileset and background music. | export class Map
load_map_assets(force_load: boolean, on_complete?: () => void) {
const promises = [];
let load_tilemap_promise_resolve;
promises.push(new Promise(resolve => (load_tilemap_promise_resolve = resolve)));
this.game.load
.tilemap(this.key_name, this.tileset_json_u... | 1 |
a7d9de3c4c07ea536e25ee45d81bb822 | 2b0637b9b69d2fdd06117a04fdbabcb5 | Draws the texture-mapped earth and moon. | {
device.BlendState = BlendState.AlphaBlend;
texturedEffect.CurrentTechnique = texturedEffect.Techniques["Textured"];
texturedEffect.Parameters["World"].SetValue(Matrix.CreateRotationX(this.Theta + (float)Math.PI / 2.0f) *
... | 1 |
8a8adb08b7ce70279362ba13048378d8 | e071d1849681620bce40a95f63cb9803 | вывод статистики посещений поисковых ботов | class yf_user_profile extends yf_module
public function show_visits_stats()
{
if (empty(main()->USER_ID)) {
return _error_need_login();
}
$_GET['id'] ? $_id = (int) ($_GET['id']) : $_id = main()->USER_ID;
$sql = 'SELECT * FROM ' . db('log_user_action') . " WHERE action_na... | 0 |
d78fa845468cc64adbb8b3a4f577dc76 | 9ae20d6186b31834f2e6137e291679b5 | Reduce the level of optionality by one considering contained Nullable type | namespace FallDave.Trifles
public static class OptExtensions
public static IOpt<T> FlattenOpt<T>(this IOpt<Opt<T>> source)
{
Checker.NotNull(source, "source");
return Opt.Defer<T>(() => source.FlattenFixOpt());
} | 1 |
aa83290136caea635fadae9a7df16705 | 4d31e39dc3ed5d382afa7908aa8d85b4 | return a list of ALL positions ordered by date
returns a list of tuples (id, timestamp, owner, title, location, company, description) | def get_all_posts():
return [post for post in Post.select().orderBy('date')] | 0 |
e1d2d129c84237223e6d96f9703f7a81 | 57cf487aa3902c8ac5583b21e8540963 | 生成模板图片02 | class Picture
public static function setTemplate12($storeInfo, $goodsInfo, $goodsImage, $codeImg, $num, $length)
{
$backImg = imagecreatetruecolor(600, 1067);
$grey = imagecolorallocate($backImg, 238, 238, 238);
imagefill($backImg, 0, 0, $grey);
$goodsImg = imagecreatefromstring(file_get_contents($goodsImage))... | 0 |
d162cc00fd35377dbfc61fa9714e50d5 | 8891ae05b7e4da2034813df7299c3ef8 | Rechercher les jeux enregistrés pour le théme passé en paramètre. | function rechercheParTheme($linkpdo, $theme){
$requete='SELECT * FROM serie WHERE themeserie=\''.$theme.'\'';
$result=pg_exec($linkpdo,$requete);
$donnees = pg_fetch_all($result);
return $donnees;
} | 1 |
b7a5b9ea0980ade6eb7dd5d0251cffdb | 2cb3bcfaf7bf73a2ffb970f0a103e357 | Get a random HTTP method. | public function getRandom(); | 0 |
dcde40edb248bfea13b082bb38830a5b | fd5ea129a5e1ab39e23ed6d06014e196 | initialize pins as output | void setup() {
pinMode(1, OUTPUT);
pinMode(2, OUTPUT);
pinMode(3, OUTPUT);
} | 1 |
b1a312629f76607a1ea82c2af6895b74 | 12138dc56a6237d3416461ba0a1a098f | devuelve las fichas de los jugadores | class Dealer():
def regresa_jugadores(self):
return list(self.apuestas_jugadores.keys()) | 0 |
4ce14bafaf7d64940c1cbcceedf466b8 | 378e80d27c857de678fbc0787c8493f3 | Adds new partners to list of known partners. | {
SqlParameter[] parameters = new SqlParameter[]
{
new SqlParameter("@Name", partnersInfo.Name),
new SqlParameter("@Logo", partnersInfo.Logo)
};
partnersInfo.ID = (int) SqlClientUtility.ExecuteScalar(connectionStringName, CommandType.StoredProcedure, "Partners_Insert", parameters);
} | 1 |
948a262b610b9413dbd89b0fd01840a6 | 5ff448a42501a6aab61a0144da34f068 | 判断最小高度函数 | function getminH(dom){
var minH = parseInt($(dom[0]).css('height')),
index = 0;
for(var i = 1; i < dom.length; i++){
var ranH = parseInt($(dom[i]).css('height'));
if(minH > ranH){
minH = ranH;
index = i;
}
}
return index;
} | 1 |
83c1ad14aba0ae899875b5853446b01f | 9efeefd8626df1b96e72712bc624814a | Prevent the realm instance from leaking | class MainActivity : AppCompatActivity(), HomeFragment.HomeFragmentListener,
DrinkCupSizeDialog.DrinkCupSizeDialogListener,
OnIntakeLongClickListener, WaterTrackerFragment.WaterTrackerFragmentListener,
LoginFormFragment.LoginFormFragmentListener, RecordEntryFragment.RecordEntryFragmentListener,
WorkoutD... | 1 |
6ac47bdb4049637f0a876ddc7592260f | 45ca60bfd57a899ec64d1b3b8e8ef0c5 | Метод, генерирующий клавиатуру поисковика. | keyboard_base = types.ReplyKeyboardMarkup(True)
with open('recipes.json', 'r', encoding='utf-8') as keyboard:
keyboards = json.load(keyboard)
for key in list(keyboards)[start:end]:
keyboard_base.add(key)
keyboard_base.row('Вернуться к выбору категории')
return keyboard_base | 1 |
f270618f8644bd824462fc74761e10ed | 2329c43ac56dbf465827764e1e23a383 | This will return the result of the last rule, if any. | class Rule(object):
def result(self):
return self.res | 1 |
0943438efa435f06d41e04c32d695f8e | 7f61448ad6da3ef0f9cb03f40c5be655 | Direct Form I | cases like (1) | 0 |
261795fe04a5ce06ff4c80dea7f013a6 | 168ceccbcc78787c6c5358f51c666a5d | get the squared modulus of the number | namespace NSoft.NFramework.Numerics
public double GetModulusSquared() {
return Re * Re + Im * Im;
} | 1 |
683fae311d54333016ec16b040684ed1 | 583ee9cc337ae904f934638ad7f364bb | PermissionRepository constructor. | class ItemPermissionRepository
public function __construct(ItemPermission $model)
{
$this->model = $model;
} | 0 |
1c85591d72596eb76e0048efd87cb044 | 5e76048f36db42db01bf74dab118c1c7 | 判断两条记录是否同宿 | public class FindUtils
public static boolean isSleeptogether(Record recordA,Record recordB){
return isIntersect(recordA, recordB)&&recordA.getrzfh().equals(recordB.getrzfh());
} | 1 |
d6132d8128bfa2b4cc8902845807a568 | 9710530e65ae9ddb8bb5333067957c8a | 大きさの変更確認 | {
if (e.KeyData == Keys.Enter)
{
if (textbox[2].Text.Length >= 3)
{
if (textbox[2].Text[1] == '=')
{
if (textbox[2].Text[0] == '+')
{
try
... | 1 |
5585eff2b8ebf46b4a9c47b3e221abb4 | 353041b2f450437ae4a33c00b7e1523d | Filters the queryset with the advanced search (everything is anded) | def advanced_search(request):
pass | 0 |
4a420a9dc673fe2a040996b1c23e551b | f41c241d911c66dde52a33907e04cb16 | Describes type of argument: in, out, in/out or return value
of procedure. Particular values you can find in DatabaseMetadata; | class Argument(object):
def argument_type(self):
return "field" | 0 |
d27098d97df615476be346b4f2160e6b | 94eb25de6df0e53dc44a10635e064a05 | The code that runs during plugin activation.
This action is documented in includes/class-woocommerce-print-products-activator.php | class Schema
public static function activate() {
add_option('wc_products_per_page', get_option('posts_per_page'));
} | 1 |
47e198b105d0e4bcd63f462ef5db714e | b006004bef4aea713e62659597f68ff8 | Dequeue LDPC encode operations from ACC100 device. | short wptr;
wptr = enc_read_ethreg( EWRPTL );
wptr = wptr | (enc_read_ethreg( EWRPTH )<<8);
wptr--;
enc_write_conreg( ETXNDL, (char)wptr );
enc_write_conreg( ETXNDH, (char)(wptr>>8) );
char econ1 = enc_read_ethreg( ECON1 );
enc_write_conreg( ECON1, econ1 | 0b00001000 );
if ( block ){
while ( 0 !=... | 0 |
f079f7faa5b03d03944f2ff548b03a4a | 846ce5ee170f773019a2c05bcb2df1e1 | Helper for converting a color to rbg | function _G.rgba2( colors )
local colors2 = {}
colors[4] = colors[4] or 255
colors2[1] = colors[1]/255
colors2[2] = colors[2]/255
colors2[3] = colors[3]/255
colors2[4] = colors[4]/255
return colors2
end | 0 |
dc63696a816603675aa9686ad4def62d | 275db950d145d776864b40147b803103 | format = kk:mm | if a.to_i <= 60
if a.to_i <= 10
a = "0" + a.to_s
"00:00:#{a}"
else
"00:00:#{a.to_s}"
end
elsif ((a.to_i/60) <= 60) && ((a.to_i/60) >= 1)
b = a.to_i/60
c = a.to_i%60
if b <= 10
b = "0" + b.to_s
end
if c <= 10
c = "0" + c.to_s
end
"00:#{b}:#{c}"
else
d = a.to_i/3600
b = a.to_... | 0 |
0f45c25642c43bfd1e066bdaf34a4788 | dc81bbcbcb96c8e0089826eae4bea269 | Отображение основной страницы админа, с данными о сервере | class PanelController extends Controller
public function index()
{
$server = Server::get();
return view('panel.index')->with('servers', $server);
} | 1 |
a4325a1b8789a2c55fd56a3373541681 | 86ceda045151f11814ad87885766911b | 정수 N개로 이루어진 수열 A와 정수 X가 주어진다.
이때, A에서 X보다 작은 수를 모두 출력하는 프로그램을 작성하시오. | public class For_2741_bufferedWriter
public static void main(String[] args) throws NumberFormatException, IOException {
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
BufferedWriter bw=new BufferedWriter(new OutputStreamWriter(System.out));
int N=Integer.parseInt(br.readLine());
br.clos... | 0 |
c4177e8e2491e80a62259f5996b20154 | 35399f32a38cf1aac314d3f26d1320fb | Generate randomArrays until the array is solvable | const configuration_number = this.randomIntFromInterval(0, this.solvable_puzzles.length - 1);
const configuration = this.solvable_puzzles[configuration_number];
let conf_position = 0;
for (let i = 0; i <= 3; i++) {
this.current_matrix.push([]);
for (let j = 0; j <= 3; j++) {
const tu... | 0 |
717d5638d37168dd7573f407a35a403d | 5a5aad38c3aaafe1c561c17bc19e9a0a | DInputを初期化 | XDL_Input::XDL_Input(void)
{
XDL_KEYBOARD = XDL_Keyboard::GetInstance();
XDL_MOUSE = XDL_Mouse::GetInstance();
} | 0 |
30f1f4b08d32e273828e0ebabbed6979 | c5772ce0fed187fe762d01bd8e883326 | 提取二进制a 中最右边的一个1的二进制数
加入传进来的数是10 则为 00000110
取最右一个1 则为00000010 = 2 | class Solution:
# 返回[a,b] 其中ab是出现一次的两个数字
def IsBit(self,num,indexBit):
num = num >> indexBit
return (num&1) | 0 |
0a9c63803d5fd41eb256bddbfbc7fe09 | 5695e45a397011e278d5316ca9339fdc | 获取approve_user主键ID | public class FormPurchase implements Serializable
public Long getApproverId() {
return approverId;
} | 1 |
faa840fc0d24dda633e9d155c5d72f3a | a8facf6796ca4e3fc0e71e11aa7d0dd6 | Simple example which get the timestamp of the first measurement in the log file. | public class Main
public static void getFirstInsertion() {
logger.info("==0. GetFirstInsertion==");
String count_query = "SELECT * FROM "+measurement+" ORDER BY time ASC LIMIT 1";
QueryResult queryResult = influxDB.query(new Query(count_query, dbName));
first_insertion = queryResult.getR... | 1 |
b647141cf1e8873c39b19eaee0b90b3b | 757bf5e822c233de1f05622a195fa469 | 把向量置空 | export class csmVector<T>
public clear(): void {
this._ptr.length = 0;
this._size = 0;
} | 1 |
ae0b1686763df3651561af02460990c1 | 360cd6b79b19faa78f3034ed73de6c84 | Converts to float.
<locDE><para />Konvertiert zu Float.</locDE> | namespace Mirelle.Emitter
public partial class Emitter
public void EmitConvertToFloat()
{
GetMethodProcessor().Emit(OpCodes.Conv_R8);
} | 1 |
d27c928041ac0783d95fd10aef99dcfb | afe3b193d622a2de5b7a6ada3277dc2d | Adds an entity for the specified list item. | namespace FistCore.Core
[Serializable]
public sealed class EntityCollection<TEntity, TTable> : IEntityCollection, IList<TEntity>, ICollection<TEntity>, IEnumerable<TEntity>
where TEntity : class, IEntity, new()
where TTable : IDbTable, new()
public void Add(TEntity item)
{
Va... | 1 |
5bf8ba2c16941885ea40bcffe0e37c74 | cd657b1e3d616fe6fba2784b7cf7e608 | Generates the steady state modulation using a simple squre wave | {
for (int i = 0; i < delay; i++)
{
yield return 0d;
}
while (true)
{
yield return amplitude;
}
} | 0 |
c06eb40f201a997529c53a609d41a15d | 0bd2ec27b1598b2f5def52fde5b4f5b2 | retorno do valor da posição solicitada, ou nulo. | public class ListSimpleLinked<T> implements ListTAD<T>
@Override
public T get(int pos) {
if ((pos < 0) || (pos >= count)) {
throw new IndexOutOfBoundsException();
}
Node aux = first;
int c = 0;
while (c < pos) {
aux = aux.next;
c++;
... | 0 |
a19cde92c1098a0fd69de0efbc12399f | cf76a0a769b81001f1360ce1241d660b | 填充数据并进行rs编码 | bit: Uint8ClampedArray,
rb: RsBlock[]
): { [n: number]: Uint8ClampedArray } {
const block: { [n: number]: Uint8ClampedArray } = []
let rs_count = 0
let pos = 0
for (let i = 0, ln = rb.length; i < ln; i++) {
for (let j = 0; j < rb[i][0]; j++) {
block[rs_count] = new Uint8ClampedArray(rb[i][2])
... | 0 |
371c5980dcbfb0db3bc1f028959523ac | 035ab935f880d70c310b59aefd4f0211 | 去除多余的星号 | static void nostar(register char *cp)
{
register char *dp=cp;
do
{
if(*cp!='*')
*dp++ = *cp;
}
while(*cp++);
} | 1 |
7345601ba7283a44bb65d306dd88f154 | 0e2bbb0f4a467fa0a549280fc759227c | Close the list of months or years. | function hide_months()
{
var direction = vis.selectAll(".months").remove();
} | 1 |
09a296aa799d2d3907829db60f761287 | bea6d0351901bb1121c724d28774117b | 파일에 저장되는 정수값을 설정한다. | public class SolutiondepthSum
public void SetInteger(int value); | 0 |
6c035ee94c010a5b2d6fafb2b36e9b3b | 26e49e38dd61117920ac2aca559245fd | 收到消息解码 ( pomelo 内置规范接口 ) 收到http请求后将请求体转化成pomleo的格式 | var request Request
err = json.NewDecoder(bytes.NewReader(msg.Data)).Decode(request)
if err != nil {
return
}
return request, err
} | 1 |
76750284479e23e719a093fa816e2886 | 647e9cc436e847073c63effd326c019b | Adds the number to the List, if it dosen´t already exists. | public class IndexEntry
public void add(int num)
{
if (!numsList.contains(num))
numsList.add(num);
} | 1 |
4bfc4a5ce51bf365d60b6d429002fc99 | 20b0ea27e1b302c509fbb3b2fc63554e | Arrange a series of clips in a horizontal row. | def horizontal_stack(data):
return [{
'type' : 'horizontal_stack',
'data' : data
}] | 1 |
b877003557be791267ed7c5502b83aaa | 2a58f002512fb940c20177ea59c32e49 | Update the FW result in the dict. | class FirmwareUpdate:
def report_result(self):
pass | 0 |
c1f6a29897f20a4092f81b157fd607cc | d23cde68f444d6ddda9ae358ad568a75 | Checks whether the agent has collected/claimed all the collect blocks. | public class WorldModel extends GridWorldModel{
synchronized public boolean isAllGoldsCollected(){
return (goldsInDepotA + goldsInDepotB - simultanouslyPickedGold) >= initialNbGolds;
} | 1 |
f2a07302cb86d0d3ec7228505523e073 | 43c5fa0ceaa6a912170796935d76a2bd | Get Map of all NamespaceDescriptors for a given namespace. | @JsonSerialize(using = ProfilesSerializer.class)
@JsonDeserialize(using = ProfilesDeserializer.class)
public class Profiles
public List<Profile> getProfiles(String namespace) {
return this.getProfiles(NAMESPACES.valueOf(namespace.toLowerCase()));
} | 0 |
2f3f29da2c0cba1f20665fa153cd015a | 92eb4650871d2a3a0155b7c62a9906e7 | Returns list of tile coordinates that can be targeted from a given facing the weapon list | class Game:
# A Game Object will have a player_id, game_id, and the game represented as a json
def get_positions_of_attack_pattern(self, unit_id, direction, position = None):
unit = self.get_unit(unit_id)
attack_pattern = unit.attack
if direction == 'RIGHT':
attack_pattern = self... | 1 |
c98ef829bbc70d0552e8d9e5b5565436 | 9211427111fcbabd80f32af93f330380 | 设置 多货件数. | public class PdaPullbackgoodsDto implements Serializable
public void setPullbackQty(Integer pullbackQty) {
this.pullbackQty = pullbackQty;
} | 1 |
8f4df0e7ab94dba33de7ef41a222a21e | 621a88e8922e9b547bcbb193fa153f1c | Inserta una vacante favorita | return db.execute('INSERT INTO sugerencias (recomendacion) VALUES (?)',
[this.recomendacion]
);
} | 0 |
37b26406fc61905abd8da9bfaa5b1f4b | 0540f5e8646d4f5dcfee87aee1fb5fd2 | Returns True if all elements in the series contain properly formatted LatLong values,
otherwise returns False | dd = import_or_none('dask.dataframe')
ks = import_or_none('databricks.koalas')
if dd and isinstance(series, dd.Series):
series = series.compute()
if ks and isinstance(series, ks.Series):
series = series.to_pandas()
bracket_type = list
else:
bracket_type = tuple
if... | 1 |
91f842e0dc59b194404d6a0836ebba20 | da23b0d15b520fe009344a942f444bef | Separate objects after inter-object collision | {
ActorData objectToSeparateData = worldObjectToSeparate.data;
if (!resolveSeparation(objectToSeparateData))
{
Debug.Log("separation failed");
return false;
}
currentScene.deactivateWorldObject(worldObjectToSeparate.gameObject);
return true;
... | 1 |
6d9602259b83933b814f6eb64e66fd79 | e5f97cbc1fa0079981065b08225a0f56 | @brief Get ASCII representation of stored system time | const char *UTimeFormat(utime_t time)
{
sysclock_t clock;
UTimeToSysClock(time, &clock);
sprintf(TimeFormatBuffer, "20%02d-%d-%d %d:%d:%d", clock.year, clock.month, clock.day,
clock.hour, clock.minute, clock.second);
return TimeFormatBuffer;
} | 1 |
2b6d086fa0fd9a7fbb2ad04188cee76a | f7bdfe2c6f1adcbfb3ad36ed59194ab6 | Action triggered when click sort by last name | sortByLastName() {
let component = this;
let studentCompetencyData = component.get('studentCompetencyData');
component.set('studentCompetencyData', studentCompetencyData.sortBy('lastName'));
component.set('sortByLastnameEnabled', true);
component.set('sortByFirstnameEnabled', false);
} | 1 |
1a72223b5b6741e799c429e3ba1a2bea | d5642b05d7b0b640154e5199bb89a939 | Get cells from a worksheet with the following column headers:
"equivalentClass"
"subClassOf"
"propertyDomain"
"propertyRange"
"Definition"
"DefinitionReference_index"
Where "DefinitionReference_index" points to worksheet2 column headers:
"ReferenceName"
"ReferenceLink" | public class NationalRefinementsModelMaker
private void createNACENAFHierarchy() throws Exception {
InputStream sourceFile = new FileInputStream(NAF_EXCEL_FILE);
Sheet items = WorkbookFactory.create(sourceFile).getSheetAt(0);
try {sourceFile.close();} catch(Exception ignored) {}
Resource table = model.createRes... | 0 |
15eaac4d86d67b1b183e407afe756228 | fd6cf27848f9ad86149213c99ea53bbe | Returns a enumerable with two values. | namespace Nvelope
public static class ListExtensions
public static IEnumerable<T> And<T>(this T source, T other)
{
yield return source;
yield return other;
} | 1 |
bd3c40b7c927c76ca6eb1db0ab1eed5d | 11e22577b63d32fdcca1e265fc28db45 | Accessor for whether the keys are embedded. | public class PlatformInfo
public boolean isPrimaryKeyEmbedded()
{
return _primaryKeyEmbedded;
} | 1 |
e2744da4db2efb60dfdb7293432823c6 | 5cd80ec30ba2860781cc5c5f8c2678f3 | Instead of configuring everything inline (see commented out section below) we are going to use
a combination of Linq and reflection to process our mapping configuration from our view models. | namespace MusCat
public partial class App : System.Windows.Application
private void InitializeMappings()
{
Mapper.Initialize(cfg =>
{
cfg.AddCollectionMappers();
cfg.AddProfile<Application.InfrastructureProfile>();
cfg.CreateMap<Perform... | 0 |
172a4b53721c78da5ce8bb4f1eb95c1a | b934a5a1d1fb11e9ea784ec4338a0dc5 | 按显示顺序获取打印页面的字段列表 | class logisticsmanager_print_express{
private function _dataToField($data) {
$arrData = explode(';', $data);
$field = array();
foreach($arrData as $val) {
if(strpos($val, 'report_field:') !== false || strpos($val, 'report_barcode:') !== false) {
$tmpData = explode(','... | 1 |
a5c5de4145b17fd4141592f9422fa784 | 5901bbbb03b0c0f5029ffd467da57b85 | 查找是否是保留字 | bool isReservedWord(string value,string data[]){
for(int i=0;i<WORDS_SIZE;i++){
if(data[i]==value) return true;
}
return false;
} | 1 |
7b592acdbeafdcc93120c21d39a0cf82 | a72e7d37bde02d6d5cc19fdd740b0ac7 | Returns the instdDrctPty | class Customer
public function getIcDph()
{
return $this->ic_dph;
} | 0 |
f4c9f450621ef6eab737df078a13e90e | 2ab843424eb3801f8533c8070a12d38a | Converts the EnhancedPath into a Path2D.Double. | ArrayList<Point2D> pointList = new ArrayList<Point2D>(32);
final PathIterator PATH_ITERATOR = SHAPE.getPathIterator(null);
int lastMoveToIndex = -1;
while (!PATH_ITERATOR.isDone()) {
final double[] COORDINATES = new double[6];
switch (PATH_ITERATOR.currentSegment(... | 0 |
f1fc0e524d2d741308e68ac21e47b2ca | 6e0bef4ed64452656865cce328c4f136 | Various pre defined period types. | Duration threeMinutes = Duration.ofMinutes(3);
Duration threeMinutess = Duration.of(3, ChronoUnit.MINUTES);
Period tenDays = Period.ofDays(10);
Period threeWeeks = Period.ofWeeks(3);
Period twoYearsSixMonthsOneDay = Period.of(2, 6, 1);
} | 1 |
1669a5f05b49153d958d293397cc3298 | 81eba03f166f5c992ef4bfa021c6d500 | Appelé par OpenComCommand, vérifie si le port est ouvert | {
try
{
port.Open();
return true;
}
catch
{
return false;
}
} | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.