query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
b74ae858cdcec684f329453dc64c333d | 40cc7274a4edd3617ff7008083e44a8b | Method to schedule the dispatch for the respective time step when the dispatch schedule is changed in the respective form.
Uses the scheduling emitter to propagate the dispatch scheduling to the respective context | self.settings['dispatchMode'] = target_mode
if target_mode == self.TIME_SLICE_MODE:
for service in self.active_services:
service.time_slice_begin_time = datetime.datetime.now(tz=get_current_timezone())
for service in self.waiting_services:
service.... | 0 |
77e47f6d4cc4fb912291944ef319f4f1 | 37d1886380f26cffb760519c2669dc5c | @brief Flash alignment for the flash start address. | {
if ((flashaddr % 4))
return 0;
if (flashaddr < DATA_FLASH_BASE)
return 0;
if (flashaddr >= FMC_APROM_END)
return 0;
ca_log_crit("Flash Address invalid");
return 1;
} | 1 |
62023e4743b53de125a0296678030de9 | 7ec3c5feb7ca0c0a0731ddc138f12c47 | Gets the instance of the implementation of IConfiguration. | namespace Rye
public static class ServiceCollectionExtensions
public static IConfiguration GetConfiguration(this IServiceCollection serviceCollection)
{
return serviceCollection.GetSingletonInstance<IConfiguration>();
} | 1 |
4cc6e799fb8eb4f81de9dc6810714a04 | f7d00941360813607662259927f52ebd | 플레이어 X축 이동 상태 확인 | public static class InputManager
public static bool xButton()
{
return Input.GetButtonDown("X Button");
} | 0 |
458aaeff9039985931dd33f4bf27aefa | 340b28babddf67dd88fabfde22da5d4f | Returns a handle to an instantiated tile, or null, if one was unable
to be spawned.
Takes a tile object to spawn, the rotation to orient it, and the grid location to place it. | void spawnTile(); | 0 |
de4b485b9d20f0bbb36fe573b93eb1ba | f4b5c768ada8bd06b7731d2c54a716db | Exit a parse tree produced by {@link DRL8Parser#classType_lf_classOrInterfaceType}. | class Java8Listener(ParseTreeListener):
# Enter a parse tree produced by Java8Parser#literal.
def exitClassType_lfno_classOrInterfaceType(self, ctx):
pass | 0 |
6a56a51bbc850e976c1bb27c8a6d1181 | 8ef2ae2c769eb0d8618a4892dcd247a3 | 获取所有订单和订单的收货信息 | public String selAllOrder(){
orders=service.selOrderDai("1");
List<Order> orders2=service.selOrderDai("3");
for (Order order : orders2) {
orders.add(order);
}
return "success";
} | 0 |
c03e632e03158258e184e1618cf62d4c | 03e846b8bed5d7a1e2a8b0cadaa6be57 | :keyword sync_type: Field indicating sync type e.g. to sync only in case of failure or in all
cases. Known values are: "Default" and "ForceResync". | class DataMovementRequest(object):
def sync(self, sync):
self._sync = sync | 0 |
51a38149414734b98bfe01bd60c31d5a | c6f982cc6b8a1d9f3ca358c97a988d55 | מגלה מה התשובה הנכונה שנבחרה בשאלת ריבוי תשובות | alternatives.forEach(alternative => {
if (questionSelected.answer == alternative.dataset['id']) {
alternative.parentElement.classList.add('answer-correct')
alternativeSelected.parentElement.classList.add('answer-incorrect')
}
})
} | 1 |
93336474f64e871b922f49ff1883e0c5 | 7735845e2906a740d556ef2b42ca3317 | get reaction type of a subscriber on a post | class BlogController extends Controller
public function reactAction(array $par) {
$reaction_id = $par['reaction_id'];
$article_id = $par['article_id'];
$this->redirectInvalidReaction($reaction_id);
$user_data = $this->_session->get(self::USER);
if($this->isRegistered($article_id,... | 0 |
20f904fee01930a7b95211c51ed7b5cf | a9fc2ec05905ee593984cd46b1c723c8 | Mocks /profile/meta response | function profileMetaResponse( $data=[] ){
$default = [
'appId' => ( rand(19000, 234000) . str_shuffle('abcdefghij') ),
'user' => [
'login' => 'app282173@email.com',
'password' => 'sha1:2ac9a6746aca543af8dff39894cfe8173afba21eb01c6fae33d52947222855ef',
'prefs... | 1 |
0787461e138a810d4c86951f0161f157 | 996cdce17e8fcfbe60e77b82ed7d49a7 | 12201802: Event 12201802 | def Event12104860(arg_0_1: short, arg_4_7: int, arg_8_9: short, arg_12_15: int, arg_16_19: int, arg_20_23: int,
arg_24_27: int):
EndIfFlagOn(12101850)
CreateNPCPart(2100810, npc_part_id=arg_0_1, part_index=arg_8_9, part_health=arg_12_15, damage_correction=1.0,
body_damage_c... | 0 |
4550ff6409209a07039d07cfb6e84f8f | 32627c23f93d31fa1cb43b4da523d864 | Отображаем панель со звёздочками внутри темы | theme = Theme.objects.get(id=theme_id)
topics = theme.topic_set.order_by('date_added')
context = {'theme': theme, 'topics': topics}
return render(request, 'winter_web/theme.html', context) | 0 |
593e151b3f399d12ac87ba4077303812 | cdd984d44f9a2ee899f2bb0c1de3e180 | Simulates telemetry output from a point-of-sale machine in an ice cream
shop. Sends temperature, humidity, and number of purchases data as a json
string to the given IoT Hub client every second endlessly. | def consume_metrics():
while not halt_event.is_set():
subzero_temp = list()
received_quantities = client.consume(timeout=1.0, on_error="warn")
for received_quantity in received_quantities:
print(f" -> Received new external data-point from {received_quantity['phenomenonTime']}: "... | 0 |
181c6e140c8bfba0891aae8f034a6519 | 9d45e2c6820a3a62e9d8407cd465a61b | Compute the haversine distance on unit sphere. Inputs are in degrees,
either scalars (with ops==math) or arrays (with ops==numpy). | def haversine(a, b):
def ensure_dimensions(a):
a = np.asarray(a)
if a.ndim == 1:
a = a[np.newaxis, :]
assert a.shape[1] == 2, "Inputs to haversine have the wrong shape!"
return a
a = ensure_dimensions(a)
b = ensure_dimensions(b)
return haversine_pts(a[np.newax... | 1 |
35efae1dd93e58b1855ed55b69e9e45a | 19e60e2e46003be61a6e520d1220174b | Returns a list of all app domains for all apps of the current user. | namespace Zu.ChromeDevTools.Schema
public class SchemaAdapter
public async Task<GetDomainsCommandResponse> GetDomains(GetDomainsCommand command = null, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
{
... | 1 |
c28c0d6910f944f42d17a1f544b80aeb | 098d9976ca1d514cde0305dff4b7be1b | Frees a block of environment strings.
the block must be obtained by calling the
GetEnvironmentStrings function. | TCHAR *rawenv = GetEnvironmentStrings();
TCHAR *env = useful_environment(rawenv);
int ret = unset_environment_block(env);
if (rawenv) FreeEnvironmentStrings(rawenv);
return ret;
} | 1 |
5cf623a5de21390227f9ff06f17f90e5 | 41bec417e059cecc4c2e0eb7c4e0d4bc | Handles the Click event of the gIncludedAttributesEdit control. | {
try
{
this.edit = true;
}
catch (Exception ex)
{
ExceptionManager.ManageException(ex, ExceptionManager.ActionType.Display, this.ParentForm);
}
} | 0 |
6cb67424072591d264788c9a7c45efe2 | d60b68e5a32d00655556ef7b161acba2 | Enable autolock. | public class Configuration public static class Builder
public Builder enableAutoLocking(final boolean enableAutoLocking) {
this.configuration = new ConfigurationImpl(new Configuration(this.configuration) {
@Override
public boolean isEnableAutoLocking() {
... | 1 |
ce5f9541f439b53f26f86840aa152aaa | 2fcbd4fec635a4b1c32a2306ddc5ec09 | Adds a new postprocessor to this project | public class Project implements Cloneable, Serializable
public void addPreprocessor(Preprocessor pr){
if(!preprocessors.contains(pr)){
preprocessors.addElement(pr);
}
} | 0 |
6feb681c0e53c1d5c04d2fd533ed3aab | d39b1a93d3a1044f1aaaf8826efe95e0 | Get the default theme value for this preference. | fun getApplicationTheme(context: Context): String {
return PreferenceManager.getDefaultSharedPreferences(context)
.getString(
APPLICATION_THEME_KEY,
THEME_LIGHT_VALUE
)
} | 1 |
4a0c700a94f18eef4747a4d543ae0533 | 5ed0bc6fd83b912158a1bdb177aecc4f | 通过编码或名称模糊查询异动来源类型信息列表 | public List<Type> queryBySearchInfo(String name, String assistantCode) throws Exception; | 1 |
f76898c9e0ca425f9a707a0c936a82ea | b3f7cc0e5af043c9df6c29c588d17f2f | 현재 시간을 시분초(HHMMSS)로 변환 | Calendar calendar = new GregorianCalendar();
int min = calendar.get(Calendar.MINUTE);
String minS = (min < 10) ? "0" + min : "" + min;
int sec = calendar.get(Calendar.SECOND);
String secS = (sec < 10) ? "0" + sec : "" + sec;
int msec = calendar.get(Calendar.MILLISECOND);
... | 0 |
9216adf5753cff1923fca4e9ccff5db9 | 35e80654c21c3da3ff24f443a4fc323c | Substitutes any filenames stored in this profile (eg quantizer matrices) according to
the substitution table | public class CT_Image extends CT_GraphicUnit<CT_Image>
public CT_Image setSubstitution(ST_RefID substitution) {
if (substitution == null) {
this.removeAttr("Substitution");
return this;
}
this.addAttribute("Substitution", substitution.toString());
return this;
... | 0 |
249f9ba0f4ffc98e91eb8aba09a2d312 | 6b5d78ed5e50d09cda54a8bd407c687f | Generate a unique IP address within the virsh DHCP scope. | class ZVMConnectorTestUtils(object):
def generate_test_ip(self):
global TEST_IP_POOL
if TEST_IP_POOL == []:
TEST_IP_POOL = CONF.tests.ip_addr_list.split(' ')
return TEST_IP_POOL.pop() | 0 |
2197e167df498297613da54f282d4b81 | ff6256e5706500c4854e55919b3a19db | 获取训练模型中所有节点的名字 | class Network(object):
def all_node(self):
return self.__network.keys() | 1 |
8561de69fe668274bde07daa37f14b9a | 3157ad731ad1a22e51c7695fb46241ab | @brief 执行DHCP Client | {
INT32U Val, Mask, tmp, i;
PDHCP_CLIENT pClient;
if(netif_is_up(Netif) == 0)
{
return DHCPS_ERR_LINKDOWN;
}
memset(&DhcpServer, 0, sizeof(DhcpServer));
Val = ntohl(Netif->ip_addr.addr);
Mask = ntohl(Netif->netmask.addr);
tmp = (Val & (~Mask));
tmp = ((tmp + 1) % (~Mask)) ? ((tmp + 1) % (~Mask)) : 1;
Val =... | 0 |
a7455fc68e3cfeac27a82ebb85d3d441 | ac8233e0f188e8dd5b0392266f1083a2 | Handles the user interface of selecting the size of the boats | public class PlayerBoard extends Board{ class ChoosingShipHandler implements EventHandler<ActionEvent>
public void handle(ActionEvent event)
{
setCurrentShipSize(sizeOfShip);
setCurrentShipName(typeOfShip);
} | 1 |
ba7433ad013a95fac819e66d4964f33a | 3487130e1ad0e19043066e560449e118 | Calcular el area del terreno | namespace Calculos
class Operaciones
public double CalcularArea(double lado1, double lado2, int valor)
{
return (lado1 * lado2);
} | 1 |
7f33382761343ad075904a0373edbc5f | 1f74bec54a460d1624030e6a43d66d15 | Ocenia algorytm używając podziału walidacji krzyżowej | def cross_validation():
dataset = load_data()
row, col = dataset.shape
X = dataset[:, :col - 1]
Y = dataset[:, -1]
clf = SVC(kernel='rbf', C=1000)
clf.fit(X, Y)
scores = cs.cross_val_score(clf, X, Y, cv=5)
joblib.dump(clf, "train_model.m")
print("Accuracy: %0.2f (+- %0.2f)" % (scores... | 1 |
c0c9e65902d90c1b55a25e6b9009d648 | a1817c263c1fbc160063706594d0bd44 | Метод проверяет есть цифры в тексте или нет | namespace Wolf.Systems.Core
public partial class Extensions
public static bool IncludeDigits(this string text) => text.IncludeDigits(1); | 1 |
0512db34228649bca679eda3081311c3 | 04499330864323a5c05c302b0620710d | Request the top-level navigational entities and show them in the page | namespace events.tac.local.Controllers
public class NavigationController : Controller
public ActionResult Index()
{
var currentItem = _renderingContext.ContextItem;
var dataSourceItem = _renderingContext.Rendering.Item;
var templateId = _renderingContext.Rendering.Paramet... | 1 |
c06fa218d92aec61ae83738d3ca36a6c | ce82e9ec7d06512eb140bb339c22f96b | add BOS and EOS to the instances index | class TextDataset:
def add_bos_eos(self, sequence: tf.Tensor) -> tf.Tensor:
return tf.concat([[self.vocab.bos_idx], sequence, [self.vocab.eos_idx]], 0) | 1 |
5467abdf6e8ccdab31e0fd24f6923eed | 693eb5c06d2eab402e535c8a117dc4ed | Get marketplace list. | {
$marketplaceRepo = new MarketplaceRepository(new Marketplace());
$markeplace = $marketplaceRepo->find($this->marketplace_id);
return [
'id' => $this->id,
'markeplace' => $markeplace
];
} | 0 |
d50a5c643e43b1c8330657aa76d63ac3 | 87acf4fbd2995948c770936cc8df8cc5 | 隐藏input框 | public class CzfQueryActivity extends Activity implements TextWatcher, View.OnClickListener, SwipeRefreshLayout.OnRefreshListener, AdapterView.OnItemClickListener
private void hideInput() {
inputManager = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
inputManager.hideSoftInputFrom... | 1 |
9aad2b82fc1461de0fcd71cf816bcf88 | 70b243fcfbd29270f11c689e132b7d76 | Sets the ngay tao of this yeu cau dang ky cong dan. | public void setNgayCapCcDieuHanh(Date ngayCapCcDieuHanh); | 0 |
3aa95ee3b32ae7d25c7cbf4e0eca7fa7 | e0fe5af905de415259aaecd4a6d9d0a7 | 计算解锁新障碍的关卡的成就等级 | for (var i = 1; i < tree.childList.length; i++) {
var tier = tree.getChild(i);
if (tier.unlockStatus == false) {
if (i == 1) return 0;
var basic = tree.getChild(i - 1).unlockPoint;
var range = tier.unlockPoint - basic;
var tierUsed = tree.usedPoint - basic;
var tierProgress = Math.floor(tier... | 1 |
8c689afbc7593632df4da218156f10f6 | c0f228e8d67ec690d486b7bde7238b0f | * To avoid collision between libraries, macro names should be prefixed with the name of the library. | {
if (mPluginLoader.isLoaded())
mPluginLoader.unload();
mPluginLoader.setFileName(library);
QObject* macro = mPluginLoader.instance();
if (macro) {
mMacroInterface = qobject_cast<MacroInterface*>(macro);
if (mMacroInterface)
mMacroInterface->run();
else
... | 0 |
dbb6cc503878e3f3bac34929f4e4a3b3 | 9874ba5b7554053db8d793340d68da8a | 获取所有技能和天赋 | public class TalentInfoModel :BaseMVCModel
public List<TalentInfoBean> GetAllLevelSkills()
{
return mTalentInfoService.QueryAllData();
} | 1 |
861adb9f6cf884f5af35000bf35ee93d | df0138fd7252bc0359674f1f9f019d3c | update dashboard card title | let link: string;
link = path.replace('dashboard/', '');
this.cards.forEach((card) => {
card.children.forEach((subCard) => {
subCard.link === link
? ((subCard.selected = true), (card.selected = true))
: ((subCard.selected = false), (card.selected = false));
});
})... | 0 |
d9dc1783b68834d0ed9e10c78f972064 | 9fc82f66db61fbb38a6c668222265333 | POST: api/Notifications | {
NotificationViewModel model = new NotificationViewModel();
model.Items = GetItems();
return View(model);
} | 0 |
91ee70de80c661bd4c2c1c9c13747001 | 8e35714843fd09b9d9c83d261cca3a50 | Lists all transparencium entities. | class EntitiesController extends Controller
public function index()
{
return view('beam::entities.index');
} | 0 |
2a6f18ef3de0f29286f0b4029eb20145 | 39eadf24deca2a43d9fcbd0e465a0f12 | Decorates a store with any number of viewAction definitions. | void decorate(DayViewFacade view); | 0 |
2dee89b338a74290facc516bd51a8c94 | b1db0e697727c1296ade7b98a43d316d | 获取数据库中对应的表名 | function get_table_name($tablename){
if (strpos($tablename,'adsense')>0){
return '广告';
}
if (strpos($tablename,'info')>0){
return '文章';
}
if (strpos($tablename,'video')>0){
return '影视';
}
if (strpos($tablename,'co_channel')>0){
return '自定义栏目转换';
}
if (strpos($tablename,'co_content')>0){
return ... | 0 |
0b39b91c522ff58808bbf8801a2d23ca | 7580c65f582f3eeb04440c88c4f61608 | My implementation of the diffie-hellman algorithm. | class DiffieHellman(object):
def __init__(self, use_proper_generator = True):
if use_proper_generator:
self.generator = 2
else:
self.generator = secure_random(100)
self.privateKey = secure_random(100)
self.publicKey = pow(self.generator, self.privateKey, self.prim... | 1 |
160912da95fc9cca689d3fe7c4a72ff0 | 3e00c698f4a6fa87e187df4d19379e3c | POST /talks | class TalkController extends \BaseController
public function index()
{
} | 0 |
62a9cb0a21d0456d47e405823af11dd4 | 91b4323ce275683bfa728a211d1ad736 | Converts the unified rectangle into a relative rectangle | {
return new Rect()
{
xMin = rect.xMin + left,
yMin = rect.yMin + top,
xMax = rect.xMax + right,
yMax = rect.yMax + bottom
};
} | 0 |
1b5830de5c4cea85d20c21d4515c2fc8 | 4c887f1762a77b451a8682c287acfa11 | Calculates multipication of two value and their errors | def df_prod_with_err(df, a_col, b_col, a_err_col, b_err_col):
prod = df_prod(df, a_col, b_col)
return prod, np.abs(prod) * df_rel_err_sum(df, a_col, b_col, a_err_col, b_err_col) | 1 |
a7bec0d0ec44dd3348e3679aad99abba | 19bd3693394aad532a04726140a146c2 | Sets the query string property based off of the query variable property.
The 'query_string' filter is deprecated, but still works. Plugins should
use the 'request' filter instead. | {
if (!$this->hasQueryString()) {
return $this;
}
$instance = clone $this;
$instance->queryString = null;
return $instance;
} | 0 |
eee8fe41c3e5307f39f76b6f3c497d93 | 8c3c9130e2bb39c38cf183bab4ecdba3 | Resets the value of the "last_cmd_sent" text on the GUI | async def reset_cmd(ctx): | 0 |
0e0ee5e490c9966428e803597c3b3fdd | 9c16d489ebf1ddd0a31c6e9c015038ea | Represents a field in the Reversi game field | class Field:
def __init__(self, row, col, playedBy):
self.col = col
self.row = row
self.playedBy = FieldValue.NONE
self.playableBy = CanBePlayedBy.NONE | 1 |
692d22cd11044acb51843ff2d276138e | a1a8717f720b9afac0849d22cf130fe3 | Determines whether the specified job is executing. | namespace mTiler.Core.Tiling
class MergeEngine
public Boolean HasJob(string jobId)
{
return MergeQueue.ContainsKey(jobId);
} | 0 |
8bba02338bac39461bd5e1e0fb87b7e7 | d0f1d777c267747602ee904efde6f737 | Returns the PlayerConnection object of the Player. | public PlayerInterface getPlayer(); | 0 |
a35be54dfccc86838d7bdbd3f48e7555 | af943228d02e62639877c35acbc5d828 | Increments the entities power | public class MunchkinCharacter
public void incrementPowerLevel()
{
powerLevel++;
} | 1 |
1585b0c67843fae1360124153563e3f0 | 626dd488559b085c8f2ec41a6ca0b9f9 | Updates a specific packaging group. You can't change the id attribute or any other system-generated attributes.
A MediaPackage VOD PackagingGroup resource configuration.
Asynchronous callback handler for events in the lifecycle of the request. Users can provide an
implementation of the callback methods in this interfac... | namespace Amazon.MediaPackageVod
public partial class AmazonMediaPackageVodClient : AmazonServiceClient, IAmazonMediaPackageVod
public virtual CreatePackagingGroupResponse EndCreatePackagingGroup(IAsyncResult asyncResult)
{
return EndInvoke<CreatePackagingGroupResponse>(asyncResult);
} | 0 |
7f4e7cfcf25bedf1d6ee69417d1bdbb0 | ab8cded7c79002817a42388f9cc1140c | 根据片区统计连续梁的信息 | public void tm_dwzs(List<LiuheEntity> list) {
Map<String, Object> countmap = new LinkedHashMap<String, Object>();
countmap.put("第一段", 0);
countmap.put("第二段", 0);
countmap.put("第三段", 0);
countmap.put("第四段", 0);
countmap.put("第五段", 0);
countmap.put("第六段", 0);
countmap.put("第七段", 0);
int yiduanyl = 0, e... | 0 |
d92a6091fb4b09e36cbb0833801365bd | ae4ebb273a91adb59347de2aaa0a7ee1 | Same as `DeeType_InheritsFrom()', but also check `tp_mro' for matches.
This function should be used when `implemented_type' is an abstract type. | def abstract_class_attribute(*names: str) -> Callable[..., Type]:
def aca_decorator(klass: Type, *names: str) -> Type:
def new_init_subclass(klass: Type, **kwargs: Any):
try:
orig_init_subclass(klass, **kwargs)
except TypeError:
orig_init_subclass(**kwargs)
... | 0 |
7d242a966541296f9d8126cd26e283bd | 493e10942a2c5dac744136126682853a | Filter the query by a related SalesPatientsparents object | {
if (null === $comparison) {
if (is_array($patientLastname)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $patientLastname)) {
$patientLastname = str_replace('*', '%', $patientLastname);
$comparison = Criteria::LIKE;
... | 0 |
a7ff372ed536adf9161d15375517ebb5 | e870fa0cdda8addfb4182fad2defdf16 | This method retrieves the error rate for the data transmission | {
var noOfErrorPackets = CalculateTotalNoOfErrorPackets(packetDictionary);
var noOfPackets = CalculateTotalNoOfPackets(packetDictionary);
var errorRate = noOfErrorPackets / (double)noOfPackets;
return errorRate;
} | 1 |
33dfd542d24d311197ba6fb0c7144093 | c88843e960963f7d5022d3ebf01237ef | PdoDriver constructor. | class PdoDriver implements DriverInterface
public function __construct(\PDO $pdo, $table = 'translations')
{
$this->pdo = $pdo;
$this->table = $table;
} | 1 |
f53af57332eaa65b76e928ad52059818 | 7003d2509477e8fe6fcada3cb4a2ec6e | 获取待上课的排期 | getClassTimetable() {
const owner = this;
JSH.request({
url: CloudMarketing.listClassManagementCoursesRela,
method: "post",
params: {
classId: owner.classId,
searchType: owner.searchType
},
success(data) {
if (data.success) {
... | 1 |
e41096a0fb3fe254fd3c3c8378631ced | 45213e268af28e282de7faf731e57538 | 根据病人编号查询处方信息 | namespace FuWai.action
public class TTreatment : IHttpHandler
private void selectByPatientId(HttpContext context)
{
String patientid = context.Request["patientid"];
String json = tbll.selectByPatientId(patientid);
context.Response.Write(json);
context.Response... | 1 |
b036be73b4d5df0fbf2d3f85591422f5 | d2bbc5ebbefd56492e5e08aa19fbdc10 | Create asset part. (That is link part to asset) | $url = 'elements/' . $this . '/' . $asset;
$this->core->assets->add($type, $this->core->assets->link($type, $url));
} | 1 |
1c91f605aa914a92ddd218efb960ba4b | eb27e841ab18accea8a9a876d8f28d79 | Description 实验室预约禁用时间段判冲 | public List<Appointment> queryAvailableLaboratory(@RequestParam Map<String, String> map) throws ParseException {
int minute = Integer.valueOf(map.get("minute"));
String startDate = map.get("startDate");
Date date = DateUtil.addMinute(DateUtil.stringToDateWithTime(startDate), minute);
... | 0 |
4aa62033d2554513e1db97494f4f8b45 | c4253acd785830767d72334d92d48ff6 | 获取佣金金额,(总金额-优惠金额-退款金额)*佣金比例 | if($pay_status == 1){
$level = db('promote_level')->where("id",$level_id)->find();
if($pay_way == 1 || $pay_way == 2 || $pay_way == 3){
$commission = number_format($amount - $amount * $level['revenue'],2);
}
if($pay_way == 4){
$comm... | 0 |
9b70ec5e355d538a53ce479a2df7271b | 599da56a4064a8b59282a9c555457935 | 插入订房信息 | @Controller
@RequestMapping("cake/OrderingServlet")
public class orderingServlet
@RequestMapping(value = "/insertOrding",method = RequestMethod.POST)
@ResponseBody
public int insertOrding(@RequestBody List<Ording> ordingList,HttpServletRequest request){
System.out.println(ordingList);
int oId=0;... | 1 |
7d9759c287ccfb29fac266f3d23012d9 | 46fed4ea54c8579af8999871a9683f91 | Load the values used initially for the Budget and display them in the Pie chart | await bvm.GetCurrentBudget();
SBBox.ItemsSource = bvm.CurrentBudget.SubBudgets;
List<string> paymethods = new List<string>()
{
"Cash",
"Credit",
"Debit"
};
PMBox.ItemsSource = paymethods;
try
... | 0 |
0ca9ed70227c22f96b3cf057eb91352b | 7408a325b1d9522557dbb6b58a7bcb51 | Adds a handler to all text changes events. | this.addTextChangedListener(object : TextWatcher {
override fun onTextChanged(s: CharSequence, start: Int, before: Int, count: Int) {}
override fun beforeTextChanged(s: CharSequence, start: Int, count: Int, after: Int) {}
override fun afterTextChanged(s: Editable) {
textChange.in... | 1 |
66125b4c35f319286605ca9b51836338 | 259c3361657a9268ab423c1428bb417f | Determine width of each column based upon number of choices | @Controller
@RequestMapping("/")
public class IndexController
private int getColumnWidth(int phasesSize) {
return (int) Math.floor(100 / (phasesSize + FIRST_COL_WIDTH_RATIO));
} | 1 |
88069e97b63779195a679eefcbc4404f | b06fd70a905ef175c8093abbeacc581c | Indicates that this object has no longer changed, or that it has already notified all of its observers of its
most recent change, so that the <tt>hasChanged</tt> method will now return <tt>false</tt>. This method is called
automatically by the <code>notifyObservers</code> methods. | public void clearChanged(); | 1 |
8a1eb1e55e4c805f2ef4255209ffd889 | 4874e750f13256b90a98a95ee4994be6 | Recommends a list of possible moves by eliminating
illegal moves | pos = self.pos_list[-1]
moves = [((move[0]+pos[0], move[1]+pos[1]), None) for move in move_list]
for i, move in reversed(list(enumerate(moves))):
if not self.no_conflict(board, move[0]):
del moves[i]
return moves | 1 |
0d391ca0f2def9156eb6fbc661b37342 | 3fcb9376580473de7fd47913680419ab | Dump the oscillation matrix | FILE * out;
out = fopen(fileName, "w");
for (int i = 0; i < N; i++) {
fprintf(out, "%-.9e", M[i][0]);
for (int j = 1; j < N; j++) {
fprintf(out, " %-.9e", M[i][j]);
}
fprintf(out, "\n");
}
fclose(out);
return;
} | 1 |
8d68bf0e6622e6ce1286de0e0279d88a | 2c6acc99c8be85d60b952aa32d5c18fc | The default for a node that doesn't require any special actions is to call all their childrens simplify functions. | regexNode* leafNode::simplify(){
return this;
} | 0 |
1dff67e49e53c1bc6fbc96a0e68ee50d | bc62f6c8aab44e0a156c08fbd43a0b9d | 局部页面加载,加载录像播放器 | var scrH = $(window).outerHeight();
var player = new prismplayer({
id: "video-player",
source: "http://zb.xfcyss.com/live/" + liveRoomInfo.currentRoomID + ".flv",
autoplay: true,
width: "100%",
height: (scrH - $('.video-tit... | 1 |
44b14658dc8be8eca405d467092f099a | 533d9bd78877ab3c3d9d57fbac3c45fb | 최소 공배수를 구하는 함수 - 유클리드 호제법 | def lcm(a,b):
ori_a=a
ori_b=b
while b!=0:
a,b=b,a%b
return (ori_a*ori_b)//a | 1 |
527977172e875c54637051591cab4d52 | 23fdc0cc66618f85627ae56ff86211a7 | 设置选中情况下资源id | public class Banner extends RelativeLayout
public Banner setIndicatorSelectResId(int resId) {
indicatorSelectedResId = resId;
return this;
} | 1 |
239bf5854e768d121760544c0c5c315f | ad804f1505b5eab25b8700352cdf5291 | enlève l'intersection de deux ensembles | {
assert(set != NULL);
assert(otherSet != NULL);
size_t i = 0, size = set->size;
void *t;
while (i < size) {
t = set->table[i];
if (t && ! BRSetContains(otherSet, t)) {
BRSetRemove(set, t);
}
else i++;
}
} | 0 |
ac6647d611bd26adbcfb5af3fb5b8230 | bc3c4aa8e76d4fbc02ecb2d0ec74c7a7 | gets all textfragments that intersect the given rectangle | {
std::vector<EntityData> data;
if (lineInRect(m_bounds, searchLine))
{
if (m_children[0] != nullptr)
{
m_children[CHILD_NW]->search(searchLine, data);
m_children[CHILD_NE]->search(searchLine, data);
m_children[CHILD_SE]->search(searchLine, data);
m_children[CHILD_SW]->search(searchLine, data);
}
... | 0 |
75ad2f12bfe7ae9ceb8071e1f3268301 | 939834268c42cef8879c298b5031d9e4 | Removes the all the fields in the index range from the selection. | void removeRange(int from, int to); | 1 |
e02b9e95d3e77258828cae826f297382 | 93681028b224ac27f8ddb278cd7c6a98 | 找到链表的第一个入环节点,如果无环,则返回null
不使用额外的空间 | public class EntryNodeInLinkedLoop23
public ListNode detectCycle(ListNode head) {
ListNode meetingNode = getMeetingNode(head);
if (meetingNode == null) {
return null;
}
ListNode p1 = meetingNode;
ListNode p2 = head;
while (p1 != p2) {
p1 = p1.next;... | 1 |
2bee3b6dba2ccf34c722b79194fc2e52 | d8e4ee9860dd4f1a948642a478c04ae0 | Sets the market area persistence. | public class JPATestHelper
public static void setPersistentUnit(String persistentUnit) {
JPATestHelper.persistentUnit = persistentUnit;
} | 0 |
3e09a1e7ce06a49c9134868d3e8e6c4f | 246f25652734e7f3ae128f5b6f3f4a25 | Questo metodo permette di mostrare a video un messaggio. | public class UIWindowSingleton extends JFrame
public void displayError(String message) {
JOptionPane.showMessageDialog(this, message,"Errore",JOptionPane.WARNING_MESSAGE);
} | 1 |
a3f66a1d9d582c086aa38326cbd88950 | 1fb4d72a0c1e629c4d0908609dbf4c1b | 推送订单信息给小米 | def ordercarry_weixin_push(sender, instance, created, **kwargs):
if not created:
return
if instance.mama_id < 1:
return
from flashsale.xiaolumm.tasks.tasks_mama_push import task_weixin_push_ordercarry
task_weixin_push_ordercarry.delay(instance) | 0 |
627bfbbac1474fe9fe305b016cbe7b83 | 4ff850a4ca5d765d0dc32bb0440d35da | 短信发送优惠券 | function send_deal_coupon_sms($deal_coupon_id)
{
if(app_conf("SMS_ON")==1&&app_conf("SMS_SEND_COUPON")==1)
{
$coupon_data = $GLOBALS['db']->getRow("select * from ".DB_PREFIX."deal_coupon where id = ".$deal_coupon_id);
if($coupon_data)
{
$forbid_sms = intval($GLOBALS['db']->getOne("select forbid_sms from ... | 1 |
3e4dc27445de6485fd63c145b2dc0c13 | 1d43d5b792dd9c7c1e5f88e8bffe3fee | Lists available attachments | class AttachmentController extends Controller
public function index()
{
return;
} | 0 |
222055868d8ed97fa8444033036561a0 | 2f02f1bbd45b23baa8b03c1194ecd389 | Check to see if NsName property is set | namespace Amazon.Tnb.Model
public partial class PutSolNetworkPackageContentResponse : AmazonWebServiceResponse
internal bool IsSetNsdName()
{
return this._nsdName != null;
} | 0 |
a9d71417088416ec9be6b88508b06f82 | a7d3ba0d45e0e7b933f240bbe22f8c64 | draws the tool bar | local alpha = 255
if self.colliderMode then
alpha = 150
end
local prevPos = self.sprites[1]:getWidth()
for i = 1,9 do
if self.sprites[i+self.toolbar] ~= nil then
local spriteWidth = self.sprites[i+self.toolbar]:getWidth()
local spriteHeight = self.sprites[i+self.toolbar]:getHeight()
local x = (self... | 1 |
b302de966d83c02ea0b02c8ef53fa1c1 | f90a328e558bdec5b61ab42dfbf7cb0a | Convert a number or array of integers to a string of padded hex octets. | if (process.browser || converter === undefined) {
const hex = num.toString(16);
const buffer =
Buffer.from(hex.padStart(width * 2, '0').slice(0, width * 2), 'hex');
buffer.reverse();
return buffer;
}
return converter.fromBigInt(num, Buffer.allocUnsafe(width), false);
} | 0 |
2cf277e9587724ab7d917bbfeb471aa2 | 953b1991d71786ae8fcadf25c7ed4197 | 查询系统文物区域统计 % 返回值 每个map为一种 区域的百分比统计 建‘key’ 区域名称 ,建‘value’ 该区域的 百分比值 | List<Map> qrySortPercent(Map params); | 1 |
8910c70ce85a7ff7612169d53d625d84 | aecd07926e92ed38137624f556764636 | Deletes all rows from the agent_sale_history table. | StringBuilder order = new StringBuilder("delete from ");
order.append(SearchHistory.TABLE_NAME);
PrizeDatabaseHelper.executeSQL(order.toString(), null);
} | 0 |
05bf884a21e16a34f11aa3b91dc32306 | 41df8ef90077f98fc6da543bdcb05270 | 从服务端接受到单词数据,加入本地列表并刷新页面 | public class WordHandler : MonoBehaviour, HttpUtil.ICallBack
public void OnRequestSuccess(long responseCode, string response)
{
AndroidUtil.Log(response);
AdventureHandler._instance.isCalcTime = true;
var infoArray = JsonUtility.FromJson<WordInfos>(GeneralUtils.JsonArrayToObject(response, "i... | 1 |
e58c1cf5749699afe8f783d599c2bfa8 | 2b3a56d4af306f6727038ef2e1f0f5ce | This function takes in a filepath to a map xml file. This
will allocate and return a TilePackage with all of the
information contained in the map file. This TilePackage
MUST be deleted (freed) by the caller of this function! | namespace Engine namespace XML
TilePackage* load_map(const char* map_filepath) {
LOG_DEBUG("Loading map: {0}", map_filepath);
XMLDocument xmlDoc;
XMLNode* root = load_xml_file(xmlDoc, map_filepath);
XMLElement* size = root->FirstChildElement("Size");
LOG_IF_AR(CRIT_LEVEL, size == nullptr, "Failed to Loa... | 1 |
7e78232d350ead9a000d11a70a07b602 | 9097636cca19a9ced09d1d84aa292aef | Returns cartesian delta vector from positions a to b decomposed in N. | class GeoPath(object):
def nvectors(self):
return self.positionA.to_nvector(), self.positionB.to_nvector() | 0 |
7393bdce81af535f2c553025a2b2add6 | d179d490e10f711eadaed7f55a69eb9b | Testing the GET review-requests/<id>/file-attachments/<id>/ API with Not Modified response | class AttachmentTestModel(TestCase):
def test_get_attachment(self):
attachment_detail_url = reverse("api:tasks-attachment_update",
kwargs={"pk": self.task.pk,
"attachment_pk":
... | 0 |
914f00101b83b8b4f7d20ad8ee651929 | a17947c8908e66f21b617a6ec288d29c | 文字交谈下,界面部分按钮提示 "动作不允许" | local msg = attacker.attacker_info.talk_content
local actor = attacker.attacker_info.talk_pos
if msg == "" or self.act_playing == true then
if callback then
callback()
end
return
end
msg = string.gsub(msg, "#name#", attacker.target_name or "")
local data = WordCensor:getInstance():relapceFaceIconTag(msg)... | 0 |
3c6b83f02820d634d7b8d82f6b9554dd | cafbab48269419a65262b8ce77de7e2a | Get subscription codes mapped by email | List<MailSubscription> list = map.get(eventSource);
if(list == null) {
return null;
}
return ImmutableList.copyOf(list);
} | 0 |
485dc73e6ad476951f0b238afd21ed7f | 81a85cc63266d5ce67555d953163d131 | Gets the nearby instruments. | {
using (var request = CreateRequest("image/*"))
{
var response = await request.GetAsync(string.Format("instruments/{0}", id));
if (response.IsSuccessStatusCode)
{
return response;
}
else
... | 0 |
b0b4131c8a308b8ef9cd380bcc03b3b9 | 13c1e3f860ca5c7806f857244a47ec9e | 解锁/锁定组件 | class ComponentMainPage extends Component
_onLockButtonClick() {
setChildLock(this.props.child_lock =='off'? 'on' : 'off');
} | 1 |
5ec9ff2d5d07bac3a5720569aba42c83 | c12ef3727443fb70b2ace0e9340191c4 | método para chamar o texto do menu | btnMenu.visibility = View.GONE
if (text == null) {
tvMenu.visibility = View.GONE
return
}
tvMenu.visibility = View.VISIBLE
when (text) {
is String -> tvMenu.text = text
is CharSequence -> tvMenu.text = text
is Int -> tvM... | 1 |
0bab9a0eb9e15428559a4ba4a53c4d33 | 49ea673d8d1b31e31cff73ca5c93b463 | The timestamp is updated whenever this concert client is visible on the gateway network.
This is the api that updates the timestamp. | class GetClientGatewayResult:
def update_time(self) -> str:
return pulumi.get(self, "update_time") | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.