query_id
string
corpus_id
string
query
string
code
string
label
int64
318b4c5cca348aec51ac020ca01044da
63557ed1c6addac4742be99a6e045e92
vrati vsetky podmienky
class AdminModel extends CI_Model public function getWords() { $query = $this->db->query("SELECT * FROM Slagalica"); $niz = array(); foreach($query->result() as $row) { array_push($niz,$row->rec); } return $n...
0
05d8e3c3b6947d3d9759f872a6c27c4d
46213b158be6e5d0ce0c6ddba7023143
wczytaj ustawienia strefy noc/dzien z EE lub ustaw defaulty
{ on_push_default_clicked(); string pname = path.options + "good_germanium.txt" ; ifstream plik(pname.c_str()); if(!plik) { cout << "Cant open file " << pname << endl; return ; } try{ bool flag ; flag = (bool) Nfile_helper::find_in_file(plik, "increment_20MeV_...
0
3953813387ca8c6a2cd34284d83bc105
7404c74558803a09535ae84a6777c1ba
Funcion que determina si un estacionamiento esta disponible las horas seleccionadas de forma consecutiva
class Espacio extends Model public function disponibleDiasYHorarios(DateTime $fechallegada, DateTime $fechapartida){ $llegadaMinutos = $fechallegada->format('H') * 60 + $fechallegada->format('i'); $partidaMinutos = $fechapartida->format('H') * 60 + $fechapartida->format('i'); $diasYHorarios = DiasYHorariosD...
1
661848b033baa6007df9f8a0585fad88
b1d766255795318726f0bb5d2b8e63f0
Sets nb videos.
public class AccountGrabber implements Subject public void setVideoCount(int videoCount) { this.videoCount = videoCount; notifyObserver(); }
1
599f606d8114a4d4548bb9cca7326518
2ca645fdbaac35c1bc17f8fdde0edfb7
Update external state and tell MP that the current media item ended.
class MediaManager(Manager): def media_end(self) -> Optional[int]: if self.media_state: return self.media_state.media_end
0
e915a24384dfd8723fbd5328ff9b9bf3
f346ccab42451b26e1eb7a63c132fbf4
根据身份证号查询客人信息
HttpServletResponse response) throws ServletException, IOException { Map<String, Object> map = cipService .getCheckInPersonInfoByIdCard(check_in_person_ID_card); System.out.println(map); JSONObject obj = new JSONObject(map); response.getWriter().print(callback + "(" + obj + ")"); }
1
34c21eaf86c05e216b49d3f9f51cd3e7
d690af8a7e3fde25051524eabd2f4f7a
尝试检查注册到该节点的服务可用情况,返回是否需要刷新服务表
local prefix = create_service_upstream_prefix(service.service_name, service.upstream) local res, err = etcd.get(prefix) return not err and res.body.kvs and tab_nkeys(res.body.kvs) > 0 end
1
73a13d1c9cc4f976e832c40292b40ab5
59dabc63c7e2ba9b86997137ce2b9992
对指定的字节流进行加密,并以字节流返回
{ int until = input.Length; if (bytesToUse < until && bytesToUse > 0) { until = bytesToUse; } byte[] output = new byte[until]; for (int i = 0; i < until; i++) { vector = Tools.exclusive_or(vector,...
1
42b7c617bbc8822f0ab4f4dd476dffec
75e263da7d7bfd7bad928bb34a88c4d5
and indexes all entries currently in the mail file.
@MailStoreAnnotation(store = "p1.mailstore.OnFile", log = true) public class MailSystem public List<Message> getAllMessages() throws Exception { Stream<Message> all = Stream.empty(); List<List<Message>> list = administrative.values().stream().map(p -> p.listMail()).collect(Collectors.toList()); for (List<Message>...
0
2a76821cc1f7736e0ce4287cf7eb4050
8a75a76cb57776ea1fd787b4c354cd1a
Hook for canonicalising a URI if we want to.
public function routeCanonical($var = null);
1
30f58e3ded84043d3848450401d0516a
bf7bc72233e6b82194d790556c570519
Checks if passed in string value is undefined, null or empty and shows warning
function checkUndefined(str) { if (str == undefined) return true; }
0
51f7b832791150b2ba9f9060de242335
269e426584d84502828d8722ab2a7f5a
@brief Initialize Blood Pressure service and create DB in ATT.
static uint8_t bmss_init(struct prf_task_env* env, uint16_t* start_hdl, uint16_t app_task, uint8_t sec_lvl, struct bmss_db_cfg* params) { uint8_t status = ATT_ERR_NO_ERROR; const uint32_t db_cfg_flag = 0x3F; const struct attm_desc bms_att_db[BMS_IDX_NB] = { [BMS_IDX_S...
1
4ec74bdfdd490bb15289e43baa840eac
7f61448ad6da3ef0f9cb03f40c5be655
# From http://stackoverflow.com/a/24569739
cases like (1)
0
75d37a1efa0d52438da207618424128a
e612999b0e7a5dc5533e1a35bd3db0e4
Enter a parse tree produced by {@link DDLParser#drop_statement}.
public class PostgreSQLParserBaseListener implements PostgreSQLParserListener @Override public void exitDrop_stmt(PostgreSQLParser.Drop_stmtContext ctx) { }
0
59a275413b8a40404d886f5d190421b5
68434b35fc16dd4bb8468e63fedb8c24
<p>指定されたインスタンス名と属性を持つインタフェースを、当該ポートが持つPortProfile内の PortInterfaceProfileから削除します。</p> また、該当するインタフェースが見つからない場合はfalseを返します。
public boolean hasRemoveInterface(IRemoveInterface removeInterfaceToCheck);
0
cf7f45e8df992812e7b5b0f3a4799ee4
c22c9b7fd064b3d8d7367f8b6e854ad3
veritabanından verileri okuyup tabloya yazdırıyoruz
namespace KutuphaneOtomasyonu public partial class ktp_emanet_liste : Form void veri_cek() { List<EntityEmanetler> kitap = emanet_iade.EmanetlerYukle(); dataGridView1.DataSource = kitap; }
1
815a9374bc9a4419dff873e832713b50
7f8a8155377f07d62e6421f51d57b2ef
初始化的时候让.Gallery-imgObject高度随着宽度变化
var boxHeight = $(".show-left").height(); var boxWidth = $(".show-left").width(); var imgHeight = $(".show-left>img").height(); var imgWidth = $(".show-left>img").width(); if (imgHeight > boxHeig...
0
106301014c1a3e366cfad619e163d3f7
e6a0ea7c9f8dbaa77a0c2ca82a1e11e1
Junta os protocolo no Docflow. Se os protocolos são digitais e foram validados sem erros, realiza a juntada no Docflow e adiciona mensagem de erro no dto caso haja falha no consumo deste serviço na api do Docflow
List<DocumentoId> salvar(List<DocumentoTemporarioId> documentosTemporarios);
0
ba69e2251824ffd68f242340636ad34a
6e6a9fe114b841ce23d1b2514099d74e
Remove the client by removing client_socket from sockets and clients
int retVal; pthread_mutex_lock(&clientsMut); retVal = removeClient(clientSock); pthread_mutex_unlock(&clientsMut); return retVal; }
1
005647e17741e11c313ecdda754d9305
77dbd30b1d33e83c2be13b0d73bc3871
Возвращает коллекцию со всеми пресетами
{ $presets = array(); $env = Environment::get(); if ($this->isThemeCustomizable()) { $directory = $env->getPath( DIRNAME_THEMES.'/'.$this->getThemeHandle( ).'/'.DIRNAME_CSS.'/'.DIRNAME_STYLE_CUSTOMIZER_PRESETS, $this->getPackageHand...
1
43e6a55787f2530cb0e9950d67a0e057
7c000776a38f9d83ed9b64a184c21349
自然対話のappIdの取得
public class MainActivity extends AppCompatActivity implements ISpeechRecognitionServerEvents private String getLuisAppId() { return this.getString(R.string.luisAppID); }
1
0da310310173a6dbd4828bb3a3ef87b7
2374ce7ad639ae167b8315cc525a4f75
Returns a component with all the program options available for the user to set
class Config: def program_options(self): return self._data.get('program_options', {}).copy()
1
a0aff954713430e884953edb1e70154c
3a47a3408e712c65cb3bf2368e73326f
3C根据用户名跟状态查询申请件信息
public List<Gh_applyVO> findByState(int sid);
0
d02fe11ac6c66f597dbdae56df3f9cad
e0975864a5aec0927a02abf8cff513ab
take an object from a char
{ CHAR_DATA *ch; if ( ( ch = obj->carried_by ) == NULL ) { bug( "Obj_from_char: null ch.", 0 ); return; } if ( obj->wear_loc != WEAR_NONE ) unequip_char( ch, obj ); if ( ch->carrying == obj ) { ch->carrying = obj->next_content; } else { OBJ...
1
d3b427099e2bd01829f6f7a81f6043d3
d7100a4f79edaa7d888bb244cb5f54fa
Handler for Menu-Button-Link-onBlur events:
function __ekFlexMenu_static_menuButtonMouseOutEventHandler(e) { var ev = ekFlexMenu.private_getEvent(e); if (ev) { var el = ekFlexMenu.private_getEventElement(ev); if (el && ("undefined" != el.id)) { var menuObj = ekFlexMenu.getMenuObj(el.id); if (menuObj) { menuObj.hoverButton(el.id, false); menuO...
0
6e144ff9fd19327d532e091796a61cdf
219a61982cbbeb4c4032e238ee01f372
英数字もしくはJIS X 0208漢字のデータが現れる位置を調べる
CKetaXInt CNativeW::GetKetaOfChar( const wchar_t* pData, int nDataLen, int nIdx ) { if( nIdx >= nDataLen ) return CKetaXInt(0); if (IsUTF16High(pData[nIdx])) { return CKetaXInt(2); } if (IsUTF16Low(pData[nIdx])) { if (nIdx > 0 && IsUTF16High(pData[nIdx - 1])) { return CKetaXInt(0); } if( IsBinaryOnSu...
0
a847d7e5adf4eb54c55a269317d0c102
bcc715a28b939b0e24316f5cb32d8e90
For the selected companym, get EPSs in the latest four quarters
def quarterly_earnings(stock): stock = yf.Ticker(str(stock)) return stock.quarterly_earnings
1
0cb57037b8e5202469caa4c1b86585ce
c4b4a7a2e7dbb0974d7c7035d9fc0740
Shows "video not playable/available" modal
export default class HTMLVideo extends Video onError(): void { const error: VideoError = { message: i18n.get('notFoundVideo', this.config), }; this.emit(Events.VIDEO_ERROR, error); }
0
2e0c22c35b7d6039705c442146dafb26
d39b487d4d71c10a899e2cff832f19b5
해당면을 시계방향으로 돌림
class form : Form void counterclockwise() { clockwise(); clockwise(); clockwise(); }
0
471deab9908ae455480f28d29d7ce3a2
90c365c8f24d2de38e761f79b36b4c11
Sets the number of modbus slaves initialized by the library before it starts running.
public class Replication public void setConnectedSlaves(int connectedSlaves){ this.connectedSlaves = connectedSlaves; }
0
83383059bec2c3e8f2c11997ea8cdeac
fe25e3f96adcbc3211477f54cefeb934
Add a derivative preference to a given item
namespace Taste.Recommender.SlopeOne void UpdateItemPref(Object itemID, double prefDelta, bool remove);
1
17e6e933e19d18d921575a44d5dcea75
204367d91389bf1f4478fd7b9d75258b
histogram equilization for a single channel , input is numpy array of image
class HistEqualization: def __init__(self):
0
502f862447d67438d539d6d52fd3ec88
f3b2ada541849d18b14a700adaa426fe
Get Blockage status of the EIP resource. true: blocked; false: not blocked
public Boolean isBlocked();
1
7b484293093786301ca851d783b1ab45
c4e9da10a88dedb8a00343507127ff7b
The function displays the confusion matrix cm as an image.
plt.figure(figsize=(10,10)) if if_log: im = plt.imshow(cm, interpolation='nearest', cmap=plt.cm.Blues, norm=LogNorm()) add_colorbar(im, label='log prob.') else: im = plt.imshow(cm, interpolation='nearest', cmap=plt.cm.Blues) add_colorbar(im, label='prob.') plt.ylabel('Tru...
1
b28184ba82829fd8a138b21f42d5a60e
62f4bd41813ac53feb865daf4ec885c1
Método responsável por confirmar presença de um membro em um jogo.
public class Party public bool isExists(Player player) { return members.Contains(player); }
1
8873bdabdd9c4d8d9263dc70e5f4b88c
abc40f388c3209692a5a2e7c839b8465
Initializes writing for fields.
namespace Serialization void BeginWriteFields(int count);
1
49da4fbb119ab62515920713184fbbdc
e520aa5ddb8c6fa0c9809b690c1b9756
Check that the current version is greater than the minimum version
function ensureMinVersion( minVersion: string, explanation: string ): void { const currentVersion = version(); if (semver.lt(currentVersion, minVersion)) { throw new Error(explanation); } }
1
4a700964285a30eca2e154dd21a45dc1
95daaff95c9f1548c7999c873e5eec84
doPost method is uses for insert and update figures. If ID of the figure = 0, call insert method and response ID from data base, which is uses to set ID to figure at map.
public void doPostAction();
0
c5bdf79ae0da0b94aa84b07b90c5317b
01f9c32f6b7aceb772968d760374ff9b
分页查找运营商
public PageUtil pageQuery(OperatorInfo entity, int pageNum, int pageSize){ int size = dao.getPageCount(entity); int offset = pageNum > 1 ? (pageNum - 1) * pageSize : 0; List<OperatorInfo> result = dao.pageQuery(entity, offset, pageSize); PageUtil paginator = new PageUtil(pageSize, si...
1
b42c01436c9f12ca87961cf450e425d5
f2010462106b9e6501e9d4a44b7ea359
Helper to check login, clear cache later and commit transaction
const data = await this.performTimeConsumingTask(); if (data !== null) { this.checkLogined(); } }
0
7d88654d2ac7f639b8e6ffb190f970eb
8c44cb7a1dffa9a904b11b68d8573e17
Show the current slots remainings.
class DropsController extends Controller public function show($id) { return redirect('slots'); }
0
c10bddbb68e10148e8f38c952739d3f1
2b1c8a47873c9fbce8c36941f6e4510c
Return the 0-based index of a numname in a list of names, or if numname is an integer or a numeric string (or bytes object), the number converted to a 0-based index. Raise an exception if the name is not in the list or the numeric index is out of range for an index to names.
def numnameindex(names, numname, numbase=1): [index] = numnameindices(names, numname, numbase=numbase) return index
1
7606e67d5af65aaebc0084aaf2dd639a
31a97449e3d95e8891317d721ce43692
Returns a dictionary containing the database items that match the location specified
client = MongoClient(MONGO_URI) db = client['airqo_netmanager'] query = {} projection = {'_id': 0, 'loc_ref': 1, 'location_name': 1, 'mobility': 1, 'latitude': 1, 'longitude': 1, 'country': 1, 'region': 1, 'district': 1, 'county': 1, 'subcounty': 1, 'parish': 1, 'de...
0
982394b9215102fd963a0c15eb446736
3b175f186907c88eb461e6883664fc7d
验证买家分批订单明细的有效性
Map<String, Object> retMap = new HashMap<String, Object>(); if(null == saleDetailList || saleDetailList.size() == 0){ retMap.put("ERRORCODE", "WSE9993"); retMap.put("ERRORMSG", "参数SaleDetail是必须的。"); return retMap; } String tradeType = ConvertUtil.getSt...
1
1408d8ecb1dfd3d352ab06fc19037245
039a33814b4992b2c36001b9eff2b287
Sets the drawable that will be drawn adjacent to every child in the list. This will be drawn using the same height as the normal divider ({@link #setDivider(Drawable)}) or if it does not have an intrinsic height, the height set by {@link #setDividerHeight(Int32)}.
public class TabWidget extends LinearLayout implements View.OnFocusChangeListener public void setDividerDrawable(int resId) { mDividerDrawable = getResources().getDrawable(resId); requestLayout(); invalidate(); }
1
5074a8c4514b1e652ba7040cefdba3c5
0d9a1e4bf0f1e5e33b80b011e01c1ca5
Method to check whether the two given schemas are compatible.
public class AvroSchemaUtils public static boolean canProject(Schema prevSchema, Schema newSchema) { return canProject(prevSchema, newSchema, Collections.emptySet()); }
1
8a37ebb8b95ee0208416bf5c66806c4a
0e7de358aa60e99bfa551891e7048080
Supprimer la table direction
class CreateSliderMoteurBrushlessTable extends Migration public function down() { Schema::drop('slider_moteur_brushless'); }
0
6bfc8e7b3b197c8e654d03c3a9b63e50
874e70dc284d81c0dd63e9cef18437c1
Test the generated vector field datasymbols are created correctly. These are straight subclasses of the equivalent field datasymbols.
def test_local_datasymbols(): sym_table = SymbolTable() assert [] == sym_table.local_datasymbols sym_table.add(DataSymbol("var1", REAL_TYPE)) array_type = ArrayType(REAL_TYPE, [ArrayType.Extent.ATTRIBUTE]) sym_table.add(DataSymbol("var2", array_type)) sym_table.add(DataSymbol("var3", REAL_TYPE))...
0
57d91fc922007904d37f517fad7d07fe
4f0d2273c0a64d5b0400e247f0068fdb
Send contents of {@link ByteBuffer} to remote address
default Mono<Void> send(ByteBuf buf) { return send(Mono.just(buf)); }
0
95a3c9ee797b00076ef6ffb51f23a33c
c29a4e190f27e0b41b325496a8f44a30
closes the main menu
public class MenuController : MonoBehaviour public void closeConnectionMenu() { connectionMenu.SetActive(false); mainMenu.SetActive(true); }
0
1b40ae07a3a1a142c60d8ea3cedbf3ad
d05a3ac5cc0f5e83a2454534d268b21c
Not found in first layer but found in second.
class TestInventoryAllocator(unittest.TestCase): def test_happy_case_found_later(self): orders = {'mango': 2} warehouses = [{ NAME: 'owd', INVENTORY: { 'apple': 1 } }, { NAME: 'dm', INVENTORY: { 'mango': ...
1
eede5a5c412bf74a4f349d89960110b6
9fefc27ced15bc44ff204ef568a99701
生成器,枚举某一个细胞附近所有的坐标
for coord in self.generate_col(): yield coord for coord in self.generate_row(): yield coord
0
6796e349facf57a2ba6cf6184579462b
6413293fa0dd07a6bed69f7a520b8782
将收藏项目的状态包装到Item中
class CollectAdapter(data: ArrayList<CollectResponse>) : BaseDelegateMultiAdapter<CollectResponse, BaseViewHolder>(data){ override fun getItemType(data: List<CollectResponse>, position: Int): Int { return if (TextUtils.isEmpty(data[position].envelopePic)) Ariticle else Project }
0
111e3d1b0a4506abd2e3140236c73e75
0cfa5b9610a5f4fb564b937655ddecbc
Closes the checkout window.
class CheckoutUI(baseWinClass.SuperWindow): def _checkout(self): self.load_close_button.setText('Load Selected Scene AND Close') self.load_button.setText('Load Selected Scene') self.load_close_button.setEnabled(True) self.load_button.setEnabled(True) self.list_widg.clearFocus() ...
1
d3b935300fb55fbc9694cfaae68e67cf
c378c97d2b7eed50be1911049d800f13
向node发送停止运行某个规则的请求
{ try { $condition = Yii::$app->request->post('condition', null); ApiProductsEngine::stopRule($condition); } catch (\Exception $why) { return ['code' => 401, 'message' => $why->getMessage()]; } }
1
e690c92de0e39c40a2aad35e1a8b9936
b53e8a57a57bc4f051350cd6ff1f1a7c
获取数据集当前版本文件数量
namespace EarthView namespace World namespace Spatial3D namespace Dataset public class EffectDataSet : EarthView.World.Spatial.GeoDataset.Ifeatureclass public override ulong GetDataVersion() { ulong ret=EarthView_World_Spatial3D_Dataset_CEffectDataSet_getDataVersion_ev_uint64(this.NativeObject); ...
0
1a2d407340b0b8c178cd4d24bdfe4ea6
587587165f52049a83080227b9d81516
Gets the error_recovery_level of this IscsiNegotiableSessionSettings. The level of error recovery negotiated between the initiator and the target.
class CertificateProperties(object): def recovery_level(self): return self._attributes.recovery_level if self._attributes else None
0
d6f2dc4744829e0ab4386f55bfd860f4
fe93f909eae17027ca930e5f089e10df
when user presses any button the game returns to menu
public class Button_ctr : MonoBehaviour public void Back() { GetComponent<GameManager>().menu.SetActive(false); GetComponent<GameManager>().player.GetComponent<player_ctr>().enabled = true; Time.timeScale = 1.0f; }
0
8dfb7397ff57020490c906193d9516b1
bcb148eff91ccdf9602bc54280475d16
Sets an Exclusive lock for the given lockCategory with the Identifier provided. An Exclusive lock means only 1 entity can access the object while the lock is set.
namespace GoNorth.Controllers.Api [ApiController] [Authorize] [Route("/api/[controller]/[action]")] public class LockServiceApiController : ControllerBase [ProducesResponseType(typeof(LockResponse), StatusCodes.Status200OK)] [HttpPost] [ValidateAntiForgeryToken] public async T...
1
aa9411fad1a8cb0c5adc1338d73eed59
f0ed69fcadda07a05a1ba4b1240ff592
Guarda el usuario en nuestra base de datos y nos devuelve su ID.
if ($this->pass == $this->pass1) { $this->insert(['firstName' => $this->firstName, 'lastName' => $this->lastName, 'birthDate' => $this->birthDate, 'email' => $this->email, 'pass' => $this->pass, 'interfaceLanguage' => $this->interfaceLanguage, 'userType' => $this->userType]); } else { ...
0
2b8aac01afbfb105ed20ef855707b261
5f35ffc1589eaf047a35b75250d433fd
函数:获取动作状态
local function GetActStatus() return g_ActStatus end
1
9040ad88849ec5e30a6ddfb5f1eb9a8c
bff6705b23a0266499dcd24375f8ce12
Gets the number of spline segments.
public class ModelParameters public int getNrSegments() { return nrSegments; }
1
17f6dcbba637d5962054da9efdc094a7
6d189e82c69f686c3938fdb52a9a2c40
根据提供的正则表达式将源字符串分割成List
String[] split(String regex, int limit)
0
2b9e384dffb066206cb79aaf73cc137f
da619526f76993e8fedac7df33cd1f13
Returns a string representation of the number of Entry Points present in the Call Graph.
class BaseFormatter(object): def get_descendant_entry_points_count(self, call): return str(len(self.call_graph.get_descendant_entry_points(call)))
1
f214a30bccecddad4c1e55e929c46124
9d42f31ef997aecd651cc7ae3785f349
Returns the name of the computation problem associated with the task.
public String getSolverName();
0
6bc8367fd4f2e58432eb2b5fbe22fc3e
3b92677dc5476398850c63d7c307a401
GET: api/schedule
[Produces("application/json")] [Authorize(Roles = "MedicalScheduleWeb")] [MapToApiVersion("1.0")] [ProducesResponseType(typeof(List<Schedule>), 200)] public IActionResult GetSchedule() { return Ok(_context.Schedule); }
1
392bfe083c06bbfcfaf81f5dcb1f6467
f84152b4fd9d8bb068da6439b603c91f
This signifies the number of LCK frames transmitted. Returns: number
class PacketAnalyzerFlowCounters(object): def frame_length(self): return self._frame_length
0
1fe5d76c9bb94e66db2a9f8f9bdeacc3
4b0bc0a438e2f7481d1c1f5ecdbd44c1
Loads satellites and transponders from satellites.xml file
{ quint8 constellationNumber = reply->request().attribute( QNetworkRequest::User, QVariant(static_cast<quint8>(GnssConstellation::ConstellationUnknown))).toInt(); GnssConstellation constellation = static_cast<GnssConstellation>(constellationNumber); QStringList stringListTle ...
0
4c4b38e5e0184d7f51cd082dff8e0900
2bcd65891434f21b1184065aaa309cc1
Callback when rabbitMQ connection lost. Try to reconnect
class IrcBotFactory(protocol.ClientFactory): def clientConnectionLost(self, connector, reason): connector.connect()
0
633b2fba6c5f26d85a91e03ae3f82b3c
854ebf96ae90652471d87fe89cf0e6bd
## ----------------------------- ## #Metodo Comprobacion del monto de la orden de compra
class ShoppingCart function check_order_amount() { $db = dbconnect::dataconnect()->getdb(); $sql_l = "select OrderAmount from ".DATATABLE."_order_client where ClientID=".$_SESSION['cc']['cid']." and ClientCompany = ".$_SESSION['cc']['ccompany']." limit 0,1"; $result = $db->get_var($sql_l); if(empty($re...
1
6b233221da9b346a127e70d908af739b
fe8084862f7d37a59d2103fbf5798050
this function calculates n!/(n-r)!
a=n h=1 f=1 while (n>a-r): f=f*n n=n-1 while (r>1): h=h*r r=r-1 k=f/h return(int(k))
1
2a26c3202aa34b426f40301ba3bf9dd6
fd0f67db9b37846c1e5d46706f59cf33
调整检索条件的开始索引,以避免请求的开始索引大于总件数。 同时通过返回值来判断后续检索是否应该继续。 总件数 分页响应
if(total>0){ int pageNum = (this.total+this.count-1)/this.count; this.posStart = (pageNum-1)*this.count; return true; } return false; }
1
4ba1bbc6ac96c456d85ebf9daa838af9
5e60ba2dcd7469d772787979b80b687a
перебор элементов списка с конца
int[] massive = {1, 2, 3, 4}; for (int i = massive.length - 1 ; i >= 0; i--) { System.out.println(massive[i]); } }
1
73e66938472bf48bfecfa0c0645f9433
8c895cbb9ad40384d1cb1971a93cd84b
uses a polynomial function to further normalize the pearsons correlation matrix
def unflatten(corrmat_vect): y = corrmat_vect.shape[0] x = quadratic1(0.5, -0.5, -y) x = int(np.max(x)) idx = np.triu_indices(x, 1) corr_mat = np.zeros((x, x)) corr_mat[idx] = corrmat_vect corr_mat = corr_mat + corr_mat.T return corr_mat
0
a3090bba872c65dcb69568e7fee3d586
8f16834f63ed4c694f364da79974e520
Get :math:`h(x)`, the hidden network for :math:`q(z|h(x))`. Returns: Module: The hidden network.
class QNetwork(nn.Module): def __init__(self, state_size, action_size, seed, hidden_units=[64,32]): super(QNetwork, self).__init__() self.seed = torch.manual_seed(seed) self.fc = nn.ModuleList([nn.Linear(hidden_units[i], hidden_units[i+1]) for i in range(len(hidden_units)-1)])
0
3315301394353725a8b69307d9871e70
ace64b385dfc8d067aa4c1baa1f888e4
Get trace id from span context.
tracing_id = self._context.get("tracing_id") if tracing_id is None: msg = "missing required context key: tracing_id" raise ParquetReportProcessorError(msg) return tracing_id
1
2dde8cdd5d2a509c4a469cb877f93794
1babcf9663874debca4e0c0fbd366706
list of faces after changing ace to low
tempstorage = [] for suit, value in list(self.playercards): if value == 11: value = 'Jack' elif value == 12: value = 'Queen' elif value == 13: value = 'King' elif value == 1: value = 'ACE' ...
0
f771d4abaa3c13de56b50d4a9c5fae04
a973cc5b54e3eac47d380d2d8519fea8
Updates a list of key value pairs. key value pairs; pair with null value, will be deleted
public function setItems(array $keyValuePairs, array $options = array());
1
f7c36bad1f4872930fbbdff319c34934
a66120ea851d79be2ee2d5653787665e
Returns a list of states (represented as a string of possible tic-tac-toe moves) that immediately follow from the parent sequence.
if state[-1] is not None: return [] else: col = state.index(None) return [row for row in range(self.N) if not self._conflicted(state, row, col)]
0
e9899816a86305a4e41cbc73ca09dc85
b9d26eb218c837904c430c9187d62d58
Returns a list of Thread objects for the relationship.
class RelationshipSearchResults: def get_relationships(self): return
0
33f7fbe18261a0ccfbe3ade04ac34b19
6c77bb27e449dc22a88c1313b2d53db8
Increment the number of rows read.
void incrementReadCount(long readCount);
1
a8b0b0015962d27fd79dc7659d3df5ce
88f4f148725d4573c8c6eb1b885027a2
日付単位でログファイルを作成する。
global $logdir,$suf,$logfile,$f_log,$r_day; $fp = @fopen($f_log, "a") or die($f_log."が開けません"); fputs($fp, "$prefix\n"); fclose($fp); $log_arr = file($f_log); $cnt_log = sizeof($log_arr); if($cnt_log >= $r_day){ $newline = $cnt_log - $r_day; while(list($i, $no)=each($log_arr)){ if($i < $newli...
0
7ff1a52057b382543dc19c47e76096df
444dd26a9baba4bf2ece0b2563007528
获得指定TopicId对应的seedid
List<String> getTopicAppid(Integer topicId);
0
f71508277ee1cbfcacd358ed40bbfe85
2bdf75c8c8ede1198ba1e0ab0ec08726
Transforms a local date into timestamp in secs.
{ var univ = date.ToUniversalTime(); var diff = univ - Epoch; return diff.TotalSeconds; }
1
7ee412a76aba8f2c849143e55490af03
ff0a42da72f436ba0c7dd48654484c4a
Contact a client.
class ContactController extends Controller public function create($id) { $client = Client::find($id); return view('templates.contacts.new', compact('client')); }
0
8391b4535ea878fa95c748dd5ae6aad5
649465f1e70721d2f8afcacfc19fe252
Obtiene todas las imágenes asociadas a una noticia mediante el id de noticia
$picturesList = glob(ROOT.'/resources/images/news/{' .$id.'-*.jpg,'.$id.'-*.png,'.$id.'-*.JPG,'.$id.'-*.PNG,'.$id.'-*.gif, '.$id.'-*.GIF,'.$id.'-*.jpeg,'.$id.'-*.JPEG,'.$id.'-*.bmp,'.$id.'-*.BMP}', GLOB_BRACE); $countPictures = count($picturesList); f...
1
b614096bf383db1d78e74d9c5746135c
13a8331929b4fe34f0dae80a7288b5ad
数据读取完毕后,返回给客户端回复一个消息
public void channelReadComplete(ChannelHandlerContext ctx) throws Exception { ctx.writeAndFlush(Unpooled.copiedBuffer("收到消息", CharsetUtil.UTF_8)); }
1
2a2a66111daec81dfa1bd65f49119146
f307f554e833877def8e5615d74c7db4
Moves an existing powerup to a new spot on the map and updates its power
void BrkTr_Active_PowerUps::remove_PowerUp(Break::PowerUp_ID param) { mPowerUp_name.erase(param); mTimers.erase(param); mVisual_Remaining_times.erase(param); mVisual_Total_times.erase(param); mIDs.erase(std::remove_if(mIDs.begin(), mIDs.end(), [&](Break::PowerUp_ID obj) { if (obj == param) return true; els...
0
b663390f4a2747d8a7ce2c3063bb6a7a
d2cb473fca3f9055b2ede7fe3d7a2660
Updates destination image to extract edges via Canny edge detection.
processed_img = cv2.cvtColor(sc_grab, cv2.COLOR_BGR2GRAY) processed_img = cv2.Canny(processed_img, threshold1=125, threshold2=200) return processed_img
1
67daf9394cbfd75415c855d206ed9be6
283f43267c8b94a0e04dcad3d66a43da
Gets the arguments for starting a business service with environment information
Arguments params = new Arguments(); params.addArgument(MANUFACTURER_PARAM, DEFAULT_MANUFACTURER); params.addArgument(ORGANISM_PARAM, DEFAULT_ORGANISM); params.addArgument(getHostNameParam(), getDefaultHostName()); params.addArgument(getJndiPortParam(), getDefaultJndiPort()); ...
1
069feb9e3217c54a4b6720db2ec19d35
be67201f1ce3b5dd5f6c2f6f2c0ac35a
Mark the given tile coordinates as a collision tile.
void TopdownMap::MakeTileHard(int x, int y) { m_tileSystem->MakeTileHard(x, y); }
1
a8a1c80c74b53a87705a5799bd927800
ddbbb82391c8ffd840bb4bfbc9f14bd5
利用可能なメッセージダイジェストアルゴリズムを調べる
{ if (empty(static::$allowedAlgorithms)) { return static::getSupportedAlgorithms(); } return static::$allowedAlgorithms; }
1
9332ac8aa23967e2f093fe09c62167a3
d5592147bc202bad856167b1cc2f3be7
Get the abbreviation for this artifact.
public String getAbbr();
1
1fb96a6880001734bb53d79bf99ccb67
3e06c9c1b4cd8375e7095033a2d099d1
check wheather the parsing is in process
public class InterpreterFrame public boolean isParsingBlock() { return parsingBlock > 0; }
1
385dcca805e16501ced671e59bde7d54
37120afafbce8be39e1c48e3b3d3f3de
Вывод хеша
void print_hash(unsigned char* h){ int i; for(i=0;i<MD5_DIGEST_LENGTH;i++){ printf("%.2x", h[i]); } printf("\n"); }
1
a4ebebd367a7b3398bf13dadace00031
261bf214177c2ab83fd510494e978db7
Returns BuildPipelineForm containing the build pipeline to display.
class ZenStoreInterface(ABC): def list_builds( self, build_filter_model: PipelineBuildFilterModel ) -> Page[PipelineBuildResponseModel]:
0
e317a5d156d27048f4acf0b6bd1df6ad
6f4db822e7cb11cc22ceba78765e3b5b
Creates the EZKO forms folder (if doesn't exist) and returns path to that folder
class in4ml{ public static function GetPathForms(){ return self::GetPathLocal() . 'forms/'; }
0
4fdb95c52e5edb18b6fd9597578c8703
c9e1fd4608db229cd9c0f729768609e3
Fill dest with neighbor nodes from the grid
if isinstance(destgrid,list): Xres=destgrid[0] Yres=destgrid[1] lon_dest,lat_dest=destgridcustom(Xres,Yres) elif isinstance(destgrid,str): if destgrid is 'giss_model_e_r_NA': lat_dest=np.array([22, 26, 30, 34, 38, 42, 46, 50, 54, 58, 62, 66, 70]) lon_dest=...
0
de97e3654a97c058a3c18494f3ab02c2
7d2c5e980f29a1636c58e3ac3527c2aa
This method was generated by MyBatis Generator. This method returns the value of the database column t_transfer_order.BANK_CODE_VALUE
public abstract class BaseBsPublicservicessnFinal implements Serializable public java.lang.String getBanktypeno () { return banktypeno; }
0
e974b6739ba763d6bc7dae114a02f8ef
d79ef3feb48fd0d219cbec5633f2a875
点击窗口的时候,发送closeApp信号,程序终止。
class Example3(QMainWindow): def mousePressEvent(self, event): self.c.closeApp.emit()
1