query_id
string
corpus_id
string
query
string
code
string
label
int64
2f4b9cef081e370538091062e42b48da
7b3b7093cb1daf57053981d860b1054d
Changes the max health a health bar can have.
public class UIManager : MonoBehaviour public void SetBossHealth(float maxHealth) { bosshHealthBar.transform.parent.gameObject.SetActive(true); bosshHealthBar.maxValue = maxHealth; bosshHealthBar.value = maxHealth; }
1
9501c2a003ed59c17088ad700b06aa1e
614ac7fdd057417b110a4a816607c840
往期赛程
$group = self::find()->where(['DeleteStatus' => 1])->orderBy('date asc')->andWhere('round < 4')->asArray()->all(); $eight = self::find()->where(['round' => 4,'DeleteStatus' => 1])->orderBy('date asc')->asArray()->all(); $four = self::find()->where(['round' => 5,'DeleteStatus' => 1])->orderBy('da...
1
bdd47bf0b6e75b2c5c9bee0e43ffeed6
65f46791bcf1f2bdfe21ff3539879deb
集中导入今天一天所有的比赛数据
def import_today_matchs(): ...
1
1e48d84ff46c8632601ddac4a1f8779e
550aee52a780f38138590a6e61fe200d
funkce, která vypíše informace o hráči i jeho statistiky
namespace Projekt public class Player public void Getstats() { Console.WriteLine("Height: " + height); Console.WriteLine("Weight: " + weight); Console.WriteLine("Wingpsan:" + wingspan); Console.WriteLine("Takeover: " + takeover); Console.WriteLine...
1
56e3a3b5e2a16031341df546421100da
2d18c0da07e6f6f53cfc66d05aa0576d
计算输出单元的 误差delta
def errorOut(target_b, output_b): error_b = output_b * (1 - output_b) * (target_b - output_b) return error_b
1
119b87fe891c02a6dd882d800e089606
adcc3014424bd1c89e0d3e898d3c6f2d
分公司利润累计
var gendanTitleEls = $('.J_AllProfit', this.el); gendanTitleEls.each((index, item) => { item = $(item); var orderId = item.attr('data-id'), formateEls = $('.J_Formate[data-id='+ orderId +']', this.el), allProfit = 0; formateEls.each((index, el) => { el = $(el); ...
1
28b2d5f318b0f965371caf4f7fc8a910
4b94a9a40f4145f9d847dedfbcb47312
Find the filename for the given dataset type, if it exists.
if not os.path.isdir(self._datadir): os.mkdir(self._datadir, mode=0o700) type_dir = os.path.join(self._datadir, type_) if not os.path.isdir(type_dir): os.mkdir(type_dir, mode=0o700) fn = os.path.join(type_dir, name) + '.yaml' return fn
0
8da9ab6aa1bf0ab22852431912a5ab64
456ad950e4c2df12f519c0738db646b9
Returns a summarised report of delivery reports
namespace MessageMedia.REST.API.Api System.Threading.Tasks.Task<AsyncReportResponse> SubmitDeliveryReportsSummaryAsync (AsyncDeliveryReportsSummaryRequest asyncDeliveryReportsSummaryRequest);
1
2fa20c03b1d2b014e9060ca6475fee42
9df15ed339937bd70936f1b4621629bf
удаляет из него все нечётные значения, а чётные нацело делит на два
def modify_list(lst): result = [] for i in lst: if i % 2 == 0: result.append(int(i / 2)) lst.clear() lst.extend(result)
1
6de7e8507dd81580b3c6c075f70ee8c3
c1c09d1a076ef1cf007731a717dbd259
Parcourt la carte, les Heros n'ayant pas joue leur tour se reposent
namespace CombatScene{public class GameManager_Master : MonoBehaviour IEnumerator begin_hero_turn(){ while(References.CombatHud.Is_Animating()){ yield return new WaitForSeconds (0.5f); } is_it_your_turn = true; References.CombatHud.Announce ("Your Turn !"); Referenc...
0
a44899131a1d12d76c3f9551be742be3
de061387664e918c99515b9614f9aebc
Проверяем, что запрос на добавление нового питомца без фото с указанными параметрами выполняется успешно.
_, auth_key = pf.get_api_key(valid_email, valid_password) status, result = pf.add_new_pet_without_photo(auth_key, name, animal_type, age) assert status == 200 assert result['name'] == name
1
ab75179c4b948041fe5889af152992c5
001e84cc846273558559f0005c86cb76
保存用户到缓存
public class ProfileCache public void saveUserCache(ProfileInfo userCacehInfo) { Gson gson = new Gson(); String userJson = gson.toJson(userCacehInfo); sp.edit().putString(SP_CACHE_USER, userJson).commit(); }
1
5f575f70d53a1ed25d1b42270899630b
7aa7cbf772f5393ed5d2dec29e19ae6e
不包括删除的
class ModelService extends Model public function notdelete(){ $table = $this->table; $model = self::where($table.'.is_deleted','0'); return $model; }
1
2c36dac271c0f2a613f1c061776e1424
e90c8ed797d7f0cffe44a2ee4a8c8de1
Delete triples that are extracted from an article, from the knowledge graph. Triples from the articles must have been extracted beforehand and stored in DB.
public class BigdataStoreManager public void removefromRepository(String s_suj, String s_pred, String s_obj, String s_context) { bigdatastoreRemove.removeTriple(s_suj, s_pred, s_obj, s_context); }
1
0b332241e3d3b008c453d7a8e9b3c683
dfc0f4565ddbd947e21d48fe860d0e8f
读取GPS信号,筛选出有用信号后,格式化再传入_parse_GPGGA。
{ if (!nmea_validate_checksum(rxBuffer, rxBufferSize)) return GPS_FAIL; uint8_t i = 1; READ_FIELD(gps_nmea.data_type, i, rxBuffer, 6); if (strncmp(gps_nmea.data_type, NmeaDataTypeGPGGA, 5) == 0) return parse_GPGGA(i, rxBuffer); else if (strncmp(gps_nmea.data_type, NmeaDataTypeGPRMC, ...
1
c807fbaf02b5018244ce4dfd3f82dcfa
8aa4a219b2faf54e128f992d21eadaaa
带有记忆功能的申请流程
Memorize = gui.cmdEvt.getMemorize() IDorMail = Memorize['user'] passWord = Memorize['pass'] if IDorMail == "": return clipboard = self.getClipboardData() time.sleep(0.2) self.setClipboardData(IDorMail) pyautogui.hotkey('command', 'v') ...
1
80f9faecf311c5aa3ec650e37bafe3f1
1afae8fa773530db2080d7825c4b0aee
ProgrammeUserPostService constructor.
PostsRepositoryInterface $postsRepository, UsersRepositoryInterface $usersRepository, MerchantsRepositoryInterface $merchantsRepository ) { $this->repository = $postsRepository; $this->usersRepository = $usersRepository; $this->merchantsRepository = $merchantsRepo...
1
eb0715451e1d70b69b35fd9482793bb5
3b86e9f48ee0a45faf797c6981d037cb
该模块调用combine方法合并帧,拼成数据报之后发消息给网络层,将数据报提交。
namespace xx public abstract class UVClientPeerWrapperEx : UVClientPeerWrapper public int SendCombine(params xx.IBBuffer[] pkgs) { bbSend.Clear(); bbSend.BeginWritePackage(); var len = pkgs.Length; for (int i = 0; i < len; ++i) { va...
1
871443d282e2e9f8a831785f44ac217e
ceaa89f0be49ea573a4e8c39c03c8cd0
获取聊天图片评论
JkChatMessage getImgMsg(int id);
0
85a768e140ec10584eb51cba8cc9a96f
29fa8d4d7721244321c82c890a3b8004
the actual diamond square algorithm implementation
void diamondSquare::diamondSquareGen(int stepsize, double scale) { int halfstep = stepsize / 2; for (int y = halfstep; y < l + halfstep; y += stepsize) { for (int x = halfstep; x < w + halfstep; x += stepsize) { sampleSquare(x, y, stepsize, randomNumber() * scale); } } for (int y = 0; y < l; y += stepsize...
1
41680f19983e9085a3a8d2f195d99722
0a27fd42a7cf190d6027cb34c5fb7bd2
funcion que calcula el descuento por afiliacion a AFP
if($salary < 1399.13) { return $salary * 0.08; } else if($salary >= 1399.13 && $salary <= 2331.88) { return $salary * 0.09; } else if($salary >= 2331.89 && $salary <= 4663.75) { return $salary * 0.11; } else { ret...
1
b531f3a84eb25ec9c2c524aef2a4d9a6
cc6dca322eea37687d3a2e054dd6abf0
! This virtual function should be reimplemented to return additional state data specific to this area, e.g. current tool window (if applicable). Default implementation returns invalid QVariant.
class Toolbar: def getState(self): pass
1
4779bab8fff0690190e071f078f287be
620e33cf06e56568f120a49d64138c08
Darknet Encoder ======================================================================
return compose( DarknetConv2D_BN_Leaky(32, (3, 3)), MaxPooling2D(), DarknetConv2D_BN_Leaky(64, (3, 3)), MaxPooling2D(), bottleneck_block(128, 64), MaxPooling2D(), bottleneck_block(256, 128), MaxPooling2D(), bottleneck_x2_block(512, 256), ...
1
d231f6f80a79e2374deafdc181449665
e0734912f19f6244bb6e09b404b209f6
Returns whether the user has already entered an operator into the calculator.
public class CalculatorModel public boolean getErrorState() { return errorState; }
0
4a14a1237620c1f7663cea69b010f11f
84f9375a1c0d31a9642fb2c598b6475b
MaintenanceModeManager constructor.
class CheckForMaintenanceMiddleware extends CheckForMaintenanceMode public function __construct(Application $app) { $this->except = config('advanced-maintenance.excluded_routes'); $this->excludedNames = config('advanced-maintenance.excluded_route_names'); $this->excludedIPs = config('advance...
0
beddc32a7710f2f95d1c4a6f0796d65b
986d8109e4774857929d54697bf5cc3a
Read workbook&#39;s names.
int count = workbook.getNumberOfSheets(); List<String> names = new ArrayList<>(count); for (int i = 0; i < count; i++) { names.add(workbook.getSheetName(i)); } return names; }
1
23eb3f2408fdd81fc3614a3cc4afed86
ed41f8ee83a2d565e191b0631a01fbe7
从git记录中提取commit ID
git_root_dir = Path(__file__).parents[1] repo = Repo(git_root_dir) commit_id = repo.head.object.hexsha return commit_id.strip()
1
24e83bf35aaee3e69596accb19c7c523
214b0d386936e8b6bdea3cad092b8f82
Format a unicode string with the given parameters.
def do_format(*args): def wrapped(env, context, value): return env.to_unicode(value) % args
1
b374d327b15ed1cfc62bb2a6b54c64c2
429aac8abb2bac6918db16edfd40a473
Gets the reference comments.
if (idReference == null) { idReference = new ArrayList<IdReference>(); } return this.idReference; }
0
7967fda3bbe9311e5aaf59874241e1dc
dcb41cccd06e3165a331246b4214a798
Returns: str: (short)UUID string from resource instance
class Instance(Entity): def uuid(self): return self._data.get('uuid')
1
e7eda01805c469e6302fb43db6dce966
66ab831304d35ba5280f17baeaf5fab2
Returns a factory used to create builder objects for all command options.
namespace Paradigm.ORM.Data.Cassandra public partial class CqlDatabaseConnector : IDatabaseConnector public ICommandBuilderFactory GetCommandBuilderFactory() { this.ThrowIfNull(); return this.CommandBuilderFactory.Value; }
1
af246331771bfcb355ab1a1f17775a44
ca2b8630582d8b7b827d7029cc626e49
定义游戏的主界面
def into_game(): into = True while into: window.blit(init_background, (0, 0)) for event in pygame.event.get(): if event.type == pygame.QUIT: exit_end() font = pygame.font.SysFont("simHei", 50) fontsurf = font.render("欢迎来到贪吃蛇", True, black) font...
1
926ba06c903a10890cff3a5f75c39cb5
0c46690b32fbddf5b86cc0eae27d27e0
Gets the updates root directory.
{ File archiveFile = UpdateSiteGenerator.getArchiveFile(folder.getPath()); return "https://www.eclipse.org/downloads/download.php?file=/" + archiveFile.getPath().substring(UpdateSiteGenerator.DOWLOAD_ROOT_FOLDER.length()).replace('\\', '/'); }
0
94bab19324377893f0af4552478d0f59
57cf14dfeec76668202c5a347c0ca823
查询用户剩余的免费抽奖次数
ServiceResult updateFreeLotteryTimes(Integer userId,int freeLotteryTimes,int freeLotteryTimesOld);
0
d55f774fc18bd8dee432503506d869db
42e1dabf8940e1b203a4dd5fc5ad3dff
Realiza a verificação da condição "OU EXCLUSIVO" lógica.
switch (item.operador) { case "=": return model.conteudoDominio == item.conteudoDominio; case "MAIOR": return model.conteudoDominio > item.conteudoDominio; case "MENOR": return model.conteudoDominio <...
0
fb81d6366d44501121528340ecf58636
6207baaa8c605a45e6b8fa93075b4b34
Returns how much experience the player has at their current level.
namespace TrollBridge public class Level_Experience : MonoBehaviour public int GetCurrentExperience () { return currentExperience; }
1
b51e6f89ec0df2c108cd2a30dbaab130
30f68e5272d6e8780c8b87ed33d3e317
test if user can login and logout.
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) @TestMethodOrder(MethodOrderer.OrderAnnotation.class) class CloudStorageApplicationTests @Test @Order(1) public void testUserSignupAndLogin() throws InterruptedException{ signUpUser("john", "doe", "jdoe", "test123!"); Thread.sleep(1500); ...
1
a90269df35d0f44726a81b35441a0296
eeecc0557f212a98bc18fe4105c3c041
Return whether or not the OpenShift provider should be treated like a POLLING provider. The purpose of this is to continue to support back-door (no upload service) OpenShift report ingest. Used for development and local test automation. On the masu-worker if the insights local directory exists for the given provider t...
if machine.provider_name != :docker if raise_error raise Errors::SyncedFolderNonDocker, provider: machine.provider_name.to_s end return false end true end
0
d5fdd03c19f040439c25611b91167775
bb3c4c1ccf3ff6fc3699d07281737e31
Retorno de bandera que indica si se ha iniciado sesion
class DAO public static function haySesionRamIniciada(): bool { return isset($_SESSION["id"]); }
1
3d34ce5b2b1bbdfa1eef9d05fa03b71f
6c7b0b5bd6b2e6539ab7e8ce570d49a2
Computes the reverse sphere coordinate.
theta = spherical_coordinates.theta phi = spherical_coordinates.phi return Vector([np.cos(phi) * np.sin(theta), np.sin(phi) * np.sin(theta), np.cos(theta)])
1
520a29d41a3edfdd585a4808a28970b9
ec38f4f00b6940ae6634d9bf8ade646d
农历转换成阳历
@SuppressWarnings("static-access") public class utilCalen{ public static String toLunar(String date) { ChineseCalendar chinaCal = new ChineseCalendar(); calendar.set(Calendar.YEAR, Integer.parseInt(date.substring(0, 4))); calendar.set(Calendar.MONTH, Integer.parseInt(date.substring(5, 7))-1); calendar.set(C...
0
c0e50733228dcaaacbed1a81d3a5f853
db6d9ae9fbec884e3bebb495c10f872a
Set the group ID, see setgid manual for its semantics
class _Inode(object): def gid(self, value): self._gid = value self.__writeData(24, pack("<H", (self._gid & 0xFFFF))) if self._superblock.creatorOS == "LINUX" or self._superblock.creatorOS == "HURD": self.__writeData(122, pack("<H", (self._gid >> 16)))
1
59fe557b11ccc605da1fb85e91465068
48b9ed67e615617de1562d94198fdb7a
Upcase Character
char upperchar(char ch) { if ((ch>='a') && (ch<='z')) { ch='A'+(ch - 'a'); return ch; } else return ch; }
1
3f52f321fc25b1a98cd4fa7f1a79a31f
b4d84153fcd5cb765f8d7b182afbc16f
返回键的抽象方法
abstract class Shape{ abstract function zhou();
0
d1f9a48a38aee8cbc94610fa82fd538e
5a6c56d1c1488eaafe7ceff298ef56b9
Memo의 mno 값이 70~80 사이의 객체들을 조회하고, mno의 역순으로 정렬할 수 있는 쿼리 메소드
JSONObject getMemSelectList();
0
b1a29fcb2435360a7b1e2f0cc5e52319
0f0bb05ef854150a488abeaacb5c7c21
fuzzy c-means
def fuzzy_c_means(df, fuzzy_matrix, n_sample, c, m, max_iter, init_method='random'): n_features = df.shape[-1] fuzzy_matrix = init_fuzzy_matrix(n_sample, c) current_iter = 0 init_cluster_centers = [] cluster_centers = [] max_iter_cluster_labels = [] if init_method == 'multi_normal': ...
1
d73b377f91b1a970e7e71611b79a3906
058ee1bb147541c39542211bbac220cf
triggers don't need permissions
{ if ($request->isEmpty('record')) { throw new \App\Exceptions\NoPermittedToRecord('ERR_NO_PERMISSIONS_FOR_THE_RECORD', 406); } if (!\App\Privilege::isPermitted($request->getModule(), 'DetailView', $request->getInteger('record'))) { throw new \App\Exceptions\NoPermittedToRecord('ERR_NO_PERMISSIONS_FOR_THE_...
0
a5b4e59f18d1edf56c4dd6bbca9c3c99
cf098f3d96998cc0ceb0a0cba2d4b8d5
设置收件人用户ID
@Table(name = "data_orders") public class DataOrders public void setReceiveUserId(Long receiveUserId) { this.receiveUserId = receiveUserId; }
1
a47563163d6220734b4d7c30ffb699f4
f579c0f0701613ca4708ec7dbae0786c
Returns lower-bound from all chance values in the deviation rates String. (details)
public class ExchangeRateTracker public Ratio getLowerBoundRate() { if (lowerBoundRate.get() == null) { throw new StreamPayerException("No lowerBoundRate was detected from the receiver", SendState.RateProbeFailed); } return lowerBoundRate.get(); }
0
34f043d6adb4a4ce87b2cca7ae047183
678abb17f127b203e2cc8f3a8bfaabcb
Devuelve una lista con los certificados contenidos en un almacén de certificados
List<String> listCACertificate() throws IOException;
1
de2af44847f42a46a86cadfbe24e6d9a
599d520531c8cb95b462886dc1812bf6
Tests fetching an event.
$result = $this->sdk->eventList(); if (count($result)) { $this->assertArrayHasKey('event_id', $result[0]); } }
1
89b7ac43afb456226674e338459876fb
e0f82e95cbc7d61a71a2ab44f1cce8b0
Unprojects a geographic coordinate.
x: float, y: float, dst_crs: T.Union[str, object, xr.DataArray] ) -> T.Tuple[float, float]: if isinstance(dst_crs, xr.DataArray): dst_crs = dst_crs.crs return pyproj.Proj(dst_crs)(x, y, inverse=True)
1
2d5e6ad08b7a944468383c3ea314311b
08a04ce63c5936d833e6a61635252f4e
将 多个对象设置为 某种颜色
public class GUIUtil public static void setColor(Color color, JComponent... cs) { JComponent[] arrayOfJComponent; int j = (arrayOfJComponent = cs).length; for (int i = 0; i < j; i++) { JComponent c = arrayOfJComponent[i]; c.setForeground(color); } }
1
a4960dfd5f6f088d7b3b4ffaecf0ece9
c33a523062ff78bc21e821640bcad98c
Set the edge renderer for this view.
public class DefaultEdgeView extends EdgeView public EdgeRenderer getEdgeRenderer() { return (EdgeRenderer) getRenderer(); }
0
9698cdc285afd1836e572afdf4f6e63d
8e72adf9c1dca55fab63dc3d80332333
Handles the Entity PerformWork Event of the LLBLGenProDataSource. Used to trap the errors if exists when the user saves.
namespace SystimeDataAcces.DataAccess public class WorkOrderLoadErrorLogSystime public Boolean SaveWorkOrderError(WorkOrderLoadErrorLog workOrderErrorEntity, String userModify) { if (workOrderErrorEntity != null) { Boolean isUpdate = false; using (Sys...
0
dd81aa17a80402e382c78416ea5d6a6e
fbedd4dad9b957392e50bc7b95c9fe52
创建tar.gz文件
if output_filename == None: output_filename = '{}.tar.gz'.format(source_dir) try: with tarfile.open(output_filename, "w:gz") as tar: tar.add(source_dir, arcname=os.path.basename(source_dir)) except Exception as e: print(e)
1
ac5729cc9610ebb3b7870d8f43c627d2
abc82ffc34bc3ac79feb601956f8f6e5
Everytime the row_key from and to changes, notify the Master server to update
class MainWindow(QMainWindow): def on_masterTableView_selection_changed(self, selected, deselected): if selected.isValid(): self.on_master_selection_changed(selected)
0
4cbac62d29dbb09163d9d2bad5e182bd
cf61d6bc67cf2bc7b5446e03d3ea9ef6
手牌托选,在start和move过程中只改变手牌的颜色,作为选中标记 在end的中通过颜色标记统一进行数据的管理
if(not self.isMidTing and not isGray) then return end local seatHolder = self.seatHolderArray[1] local myHandMj3d = seatHolder.mj3dHodler.HandMj for i = 1, #myHandMj3d do local mj3d = myHandMj3d[i] local pai = mj3d:Pai() local gray = isGray and not self:show_mid_ting_...
1
bcbaeafcc163333a422b986c1f88e51c
0c2472c72a0927e64f68ac936b1cb0ef
函数说明: 读取人民日报标注语料
label=[] text=[] with open(path,"r",encoding="utf-8") as fhandle: line= fhandle.readline() while line : line = fhandle.readline() lines= line.split("\t") if len(lines) != 3: continue label.appe...
1
25f126bba35fe4c85871d34b80dd9daa
36aad60c8150d2b6d496fc79e2752e22
CASes the cellsBusy field from 0 to 1 to acquire lock.
if (isGUIBusyID != null) { var input = getJQElement(isGUIBusyID); if (input.length > 0) { debug("guiBusy() isGUIBusy=" + input.val()); input.val("true"); } } $("body").css("cursor", "wait"); }
0
0b44e4de1639c95719de5502d61ab057
8c23af3cc808a15c3483019a1d53cf2b
Raises the paint event.
namespace System.Windows.Forms [ToolboxItem(true)] [ToolboxItemFilter("System.Windows.Forms")] [DesignTimeVisible(true)] [DesignerCategory("CommonControls")] [Description("A customizable styled combo box.")] [DisplayName(nameof(StyledComboBox))] [DefaultEvent("SelectedIndexChanged")] public class StyledComboBox...
1
51dc17946e51ca1cef0d0cb4a72af51a
2608e19e76d83ea69925f4d0980e4494
creates new user and profile entries for a user and redirects to the newly created profile. Checks that required fields are present and that the password and password_confirm are the same
def createProfileView(request): if request.method == 'POST': form = ContactForm(request.POST) if form.is_valid(): first_name = form.cleaned_data['first_name'] last_name = form.cleaned_data['last_name'] email = form.cleaned_data['email'] password = form...
0
c7abda5ab8e3df861265549bb03132b5
6aff4ed5b5a0c8639989dde18bd7ebe7
# Genera un directorio temporal para la subida de imagenes antes de la creación del Hotel en la BD
if (!is_dir("../" . $image_path)) { mkdir("../" . $image_path); } else { } }
1
3aa969227ada2e22306c851426f792ee
7244dce8d7d2abd0f5b30cc57c9e3c12
decrypts columnar transposition ciphers
def decrypt(n, ciphertext): result = '' for l in ciphertext: try: i = (key.index(l) - n) % 26 result += key[i] except ValueError: result += l return result
0
fc3115bdb7b9c28669a77984df9f0eb0
1998fd50d54e09f2ffcbdce31773495c
Страница с постами авторов на которых подписан пользователь.
class ProfileController extends Controller public function authorIndex($name) { $items = $this->userService::getByNamePostsPaginate($name); return view('pages.author_profile')->with(compact('items')); }
0
f29905bbc55ccd372cad4becd421a43a
a17c18e74cc2954a86e897e29ebc864e
Insert new item balance
void insertBanlanceItem(@Param("balanceItemId") Integer balanceItemId, @Param("balanceItemData") String balanceItemData, @Param("balanceItemMoney") String balanceItemMoney, @Param("balanceItemOperation") String balanceItemOperation, @Param("balanceItemRemark") String balanceItemRemark, @Param("balanceId") Integer balan...
1
1e80679558b2e7dae0d703947583835b
77e4e3eb6b5f378724662e3d8efc473a
设置添加公用参数
public abstract class BaseService private void addPublicParams(HttpServletRequest request, Map<String, Object> paramsObj) { EmployeeDTO employee = (EmployeeDTO) request.getSession().getAttribute("loginEmployee"); if(employee != null) { paramsObj.put("publicEmployeeId", employee.getId()); } if(UserAgentUtils....
1
0f234ea6afa75417f74ceb2308010673
3a33aa2b32a90c67c7e05037527dac8e
Gets the current show item number.
int getShowNum ();
1
2f53d412360cfa23971c46b06de899d2
3029fd3b91caee7f7e0e322b322e9ef5
Return true if it is found
{ retrieveHelper(root, dataItem, dataFound); if (dataFound != NULL) { return true; } else return false; }
1
4ec0ab85898d8369cda508fdecd0191f
165f4487376bac5e0532d0bec784f358
Checks provided password with hash in database. \n Returns True or False
class DataBase: def check_password(self, password: str) -> bool: try: next(self.__cursor.execute(f""" SELECT password FROM users WHERE password='{password}' """)) return True except StopIteration: return False
0
aed08be86972f6f947cfb6f484436502
7b11fe7cfe22d48487c54ac7fcbb42bf
Check that daughter regions are up in .META. and if not, add them.
public class OntologyWithClassHierarchyGraph extends JPanel implements ActionListener, SwoopModelListener, KeyListener private void displayMotherShip() { for (Iterator i = partitions.iterator(); i.hasNext();) { OWLOntology ont = (OWLOntology) i.next(); if (graph.getUserDatum(ont) != null) continue; On...
0
4759a5bd6226c3df3570e4c62e0c555d
0fa2a6ee0f63e7709f26134c0a8db09a
Assign the chosen AudioClip and play the sound.
public class AudioManager : MonoBehaviour public void MomAudioPlay(MomClips choice) { MomSource.clip = MomClip[(int)choice]; MomSource.volume *= MomVolume; MomSource.Play(); }
1
c619b044dd5cfc1e4521943fa7bb86ac
3706f80004eb7949565d6107725d09a7
Método encargado de captar el evento lanzado al presionar el botón de la vista de inserción de PIN.
switch (v.getId()) { case R.id.btnAceptar: if (concepto.getText().toString().equals("") || cantidad.getText().toString().equals("")) { BrioAlertDialog bad = new BrioAlertDialog((AppCompatActivity) getActivity(), ...
0
9c6d83e3bf81352e43fb98eec337e9f6
4320e788c309d71a0520890a3cf069ac
根据adminId修改邮箱和验证情况
@Modifying(clearAutomatically=true) @Query("update Admin set verifyCode=:verifyCode,verifyTime=:verifyTime where adminId=:adminId") int updateVerifyCode(@Param("verifyCode") String verifyCode, @Param("verifyTime") String verifyTime, @Param("adminId") Integer adminId);
0
9bd4a85b931090dc737a43a7801f4516
044b0164a00899e85777b8d25ef30292
Create a default configuration in a passed dictionary.
dct = dct or dict() dct.update(kwargs) def _load_from_dict(metadata: Metadata) -> Configuration: return Configuration(dct) return _load_from_dict
1
c5e2357098769be534eff682013e5d1f
03210ae2f37d314391b63afd9f1156e2
获取需要Mask的UI信息
namespace ArcFaceProSDK4net public partial class ASFFunctions [DllImport(Dll_PATH, CallingConvention = CallingConvention.Cdecl)] public static extern MResult ASFGetMask(IntPtr hEngine, out ASF_MaskInfo maskInfo);
1
18a7b18d08615142efd53558df35cdd4
2163a085bc9aa813373c985943190cbc
根据模型类型得到相应的数据库类型
namespace Server public class MySqlDbPersistence<T, IDType> : IAsyncPersistence<T, IDType> where T : DataItem<IDType> public static string GetDbTypeName(Type t, string paraName) { if (t == null) throw new Exception("unsupported null type by GetDbTypeName: " + paraName); ...
1
e99e58c7ec811d8420c6fb30fd6dc44d
b86041b5cc99e0df17ed65185d8d7dc0
HttpClient returns an instance of http client with specified name.
if name == "" { name = DefaultClientName } c = metrics.DefaultConfig(name) return }
0
3d4a4b6aae7bc7fc3ef7ef81a728cf17
98680fd62b7192d3bd7cd5b1000b17f6
Returns all projects of a specific location
$points = \DB::select( \DB::raw( "SELECT locations.id, points.name, ST_X(points.geom) AS lat, ST_Y(points.geom) AS lon FROM points, location_has_point, locations, projects, project_has_location WHERE points.id = location_has_point.point_id AND ...
0
f8622166010dc20d3828671fdd42fabf
89dfe0c2a27672a75d0040dee46fd1a9
============================================================ <T>判断联系手机验证的数据是否改变。</T> ============================================================
{ var contactChanged = false; if ( record.full_name != oldrecord.full_name ) contactChanged = true; if ( record.email != oldrecord.email ) contactChanged = true; if ( record.contact_name != oldrecord.contact_name ) contactChanged = true; if ( record.operator_id != oldrecord.operator_id ) contactChanged = t...
0
b2d51c6f134150581ce0bcab38732f95
6c44982f0dbb2586b85d4d96d820f8e5
Sets the customer suffix for the order.
public function getCustomerSuffix();
0
7b4175e577c4ce818879cd9491ec7294
3a2617c9320112e5bded08197c63f58a
창고 정보 수정 - 수정한 컬럼 개수를 리턴
@Service("commCd/service/CommCdSvc") public class CommCdSvcImpl implements CommCdSvc @Override public int commCdUpdate(CommCdVO commCdVo) { return commCdDao.commCdUpdate(commCdVo); }
0
bcaad5f3fe00ff0a5648c8a730398565
0e07b6b806aa45f05d831e0d4ec6f5c8
Adds a new contact request button. The user's phone number will be sent as a contact when the button is pressed. Available in private chats only.
export class Keyboard static requestContactButton (text: string): Interfaces.TelegramKeyboardButton { return { text, request_contact: true } }
1
32949804e566a8bc5459f5e1f53dfe12
e5d2968b05189b93149c4ca1c3b57459
Get overdraft limit according to the account type
command = account_type.lower().split('.') if 'demo' in command: if 'ss' in command: return unicode(SSDemoStandardAccountType.min_deposit) elif 'cfh' in command: return unicode(CFHDemoStandardAccountType.min_deposit) else: return unicode(DemoStandardAcc...
0
efbfe584149a5f59ff1c7601525be6ad
5b3e427385cad5e1b22ad87ead4e76f3
Prints the command that can be used to create a tunnel via the command line.
static void show_iptunnel_help(void) { error_exit("usage: iptunnel { add | change | del | show } [NAME]\n" " [mode { ipip | gre | sit }] [remote ADDR] [local ADDR]\n" " [[i|o]seq] [[i|o]key KEY] [[i|o]csum] [ttl TTL]\n" " [tos TOS] [[no]pmtudisc] [dev PHYS_DEV]"); }
1
17ff0ac38a20bbe7b4db88f6a5a0bf28
542fe526bc9cde5d2b0b0a9d1b1260f0
Creates a Keras WideDeep Classifier model.
def _build_keras_model( hparams: kerastuner.HyperParameters, tf_transform_output: tft.TFTransformOutput) -> tf.keras.Model: deep_columns = [ tf.feature_column.numeric_column(key=features.transformed_name(key), shape=()) for key in features.NUM...
1
11515db4d4c39877d54d9ecbb9de9d07
37b5519c2639a6fb267ad6221ed87cdd
It's not the ramped version: it just uses grow or full with 50% chances
if (days == M) return climbed >= N ? 1.0 : 0.0; double& ret = cache[days][climbed]; if (ret != -1) return ret; return ret = climb(days + 1, climbed + 1) * 0.25 + climb(days + 1, climbed + 2) * 0.75; }
0
10d38c749b7002d1726d581525092930
7f876ccaf0d8f048ff30a019a6cfeb29
Returns a random point on the perimeter of a rectangle
{ var mag = rect.size.magnitude * 2f; if (mag <= 0) return rect.center; var line = rect.center + direction.normalized * mag; var corners = new[] { new Vector2(rect.xMin, rect.yMin), new Vector2(rect.xMin, rect.yMax), new Vector2(rect.xMax, rect.yMax), new Vector2(rect.xMax, rect.yMin), ...
0
0c9add3b44a15d6152c8897cc41e6237
4daba8d3a4697944504fa9d6062d4a44
유저아이디로 맵정보를 조회한다.
{ string strUrl = "http://54.180.153.218:7436/api/maps?owner=" + strUserName; WWW www = new WWW(strUrl); yield return www; if (www.error == null) { Debug.Log(www.text); ProcessJson(www.text); } else { Debug.Log("Erro...
1
1872df3db7a844ffc3c29906b8d9a806
7fa4e5e65ff911015f5da5e2b087cced
Tests the behavior of the non standard "drop(Integer)" operation on Sequence and OrderedSet.
SchemaModel model = Util.loadSchemaModel("resources/ReorderTest.xsd"); SchemaImpl schema = (SchemaImpl) model.getSchema(); GlobalElementImpl gei = (GlobalElementImpl) schema.getElements().iterator().next(); LocalComplexTypeImpl lcti = (LocalComplexTypeImpl) gei.getInlineType(); S...
0
665f2f5c25b776142dea28cc747c8539
07e9c397f74263faeb34f7806197a11a
Get a PAGEObjectList by calling a Stored Procedure
{ OdbcParameter[] pas = { new OdbcParameter("@PageIndex", current), new OdbcParameter("@PageSize", pagesize), new OdbcParameter("@Columns", columns), new OdbcParameter("@Tablename", tablename), new OdbcParameter("@Where", where), new OdbcParameter("@Order", order), new OdbcParameter("@OrderType", or...
1
3d0807b2036e49f4b720dc0eab666dc5
95878cf408605d62f5bbed863fd281f1
현재 접속 중인 프로젝트의 팀장인지 체크
class MainController def func_check_party_member() flag = false @one_bobparty.bobparty_members.each do |r| if r.bobpartymember_email != current_user.email flag = false else flag = true break ...
0
a029c4b6aad97f0795da9aa6b386419e
f288c40fee4708a30c2a11ad3d5d9b00
Formats region and orientation with predicted values
if self.objects_labeled: self.predicted_objects = self.predicted_array else: self.predicted_objects, __ = lab_img(self.predicted_array)
0
e8bad92f59025e807c7d2ee6f507078c
69ffa1fc82aaf2169f4543455694d6de
constructor wich queries DB for films
MovieDatabase::MovieDatabase() {}
0
f414ccdc2d4385c4ae39713587fbc95b
ad0c349e4524e259e31a42f1ba72b23d
<p>Uses helper method to test the replication of a single file.</p>
public void testSyncUpTool() throws Exception { setupReplication(); putAndReplicateRows(); mimicSyncUpAfterDelete(); mimicSyncUpAfterPut(); }
0
c56edf01bb8395e82536e0ed74fb497e
524dcd721c498127203f10b3cebd6d67
Getter for <code>warehouse.MealItem.dishId</code>.
public class KbdishGroupDetailInfo extends AlipayObject public String getDetailDishId() { return this.detailDishId; }
0
62d12d4901b2de178f1efefb11e18d98
013703b651072942370aba6dce5266ce
生成标志,并保存到Session
protected Serializable doCreate(Session session) { Serializable sessionId = this.generateSessionId(session); this.assignSessionId(session, sessionId); this.saveSession(session); return sessionId; }
1
b1d727732e40564a4d8a14a6827c5b2f
dfecac54eabae3cebb8abc92409a8ddf
Draws game's answer options onto game surface
MLV_draw_filled_circle( (int)width * (10./100.), (int)height * (45./100.), (int)width * (1./100.), MLV_COLOR_RED ); MLV_draw_text( (int)(width * (9.7/100.)), (int)(height * (44./100.)), "1", MLV_COLOR_WHITE ); MLV_draw_filled_ci...
1
e84dc57cac389b04d487217308069807
d08ec290d97384201c113795e43fc480
ignore partials
if (controller.inherit_views? rescue false) && found_path = controller.find_inherited_template_path("#{controller.controller_path}/_#{partial_path}") partial_path = found_path.sub("/_#{partial_path}", "/#{partial_path}") end with_current_render_of(partial_path) do render_part...
0
907a318c154308937945d7e1cfb93385
5213d430a2112522c2697a8d6e788e5d
Implement the forward checking inference procedure.
def AC3(assignment, csp): inferences = set([]) domains = assignment.varDomains queue = deque() for constraint in csp.binaryConstraints: queue.append((constraint.var1, constraint.var2, constraint)) queue.append((constraint.var2, constraint.var1, constraint)) while len(queue) != 0: head, tail, curr_constraint ...
0