query_id
string
corpus_id
string
query
string
code
string
label
int64
10e9b66a532edff2b43e8486907783a5
ac395a7abea893e117127d8fa1ef71ab
RabbitMQ에서 메시지를 수신할 Listener의 Factory를 선언하고 반환한다.
public SimpleRabbitListenerContainerFactory rabbitListenerContainerFactory( ConnectionFactory connectionFactory) { SimpleRabbitListenerContainerFactory factory = new SimpleRabbitListenerContainerFactory(); factory.setConnectionFactory(connectionFactory); factory.setPrefetchCount(...
1
4ef05c06b6ed44d6fb5bb6c3c6588744
31f2ed31956d97155b7d2efc8b562d4a
Получение списка заполняемых полей из модели Catalog.
$values = array(); $post = $this->post; switch ($this->catalog_type) { case 'goods': $values['code'] = ''; $values['title'] = ''; $values['price'] = ''; $values['suppliers'] = $this->getSelectValues('suppliers'); break; case 'suppliers': case 'custom...
1
f469004eab499dfd35337dba78876d97
a9f04f47e680c3619a4434a8164a8363
Clears the model and sets the filename to None.
class Files(ModelBase): def _clear(self): self.id = 0 self.name = "" self.line = 0
0
ec0a8360c2356fb6ce230bd85fda0a97
b9a3ad7cd09be6fcf573546c281f464e
自定义按钮点击监听响应
public void onClick(View v) { if (v == null) { return; } if (v.getTag() == null) { return; } String tag = ""; Object objTag = v.getTag(); if (objTag instanceof String) { tag = (String) objTag; } else if (objTag insta...
1
8f31514b013fb73ae2fc1823456d87e6
3f8e9078370519ed0c7390a4946e5ab1
주어진 문자열을 두 균형잡인 괄호 문자열로 나눠주는 함수
def brac(str): brac = str.maketrans('()', '[]') str = str.translate(brac) return str
0
1e5175fe9fa93fd877ca7841e1be446b
c8ce85952dd8ae019621bc150e44f7f9
This operation sets the dynamic DNS settings on a device. If the device supports dynamic DNS as specified in [RFC 2136] and [RFC 4702], it shall be possible to set the type, name and TTL through the SetDynamicDNS command.
SOAP_FMAC6 __tds__SetHostname_(struct soap* soap, struct _tds__SetHostname *tds__SetHostname, struct _tds__SetHostnameResponse *tds__SetHostnameResponse) { return 0; }
0
e8e4d35524721616fabba4d1aa81b835
51042272bfaba673ca9bc73d357ed4ab
Representa un contador de tiempo con cuenta regresiva. Por ejemplo:
class CountDownExec(CountDownTimer): def __init__(self, seconds, action, args=[]): self.args = args self.action = action CountDownTimer.__init__(self, seconds)
1
2a783c469a570dae39eb0ebff271d015
7da59a4895d322c562ac877b29197764
Calculates the overall void fraction of the expanded bed.
{ $expansion_factor = (1 - ($density_max / $density_min)); return $expansion_factor * $base_volume; }
0
6f042131a8ede1616e3c8bb4f39b26e4
6c888bb0aca4ed37c7ceaac08ecfc8b8
load default data, and create product instance with packs
class PaymentConfigTest extends AbstractWebPageTestCase private function buildCoin(ProductRegistry $Registry) { $Product = $Registry->getCoin(); foreach ($Product->getPacks() as $Pack) { $Product->removePack($Pack->getName()); } $Pack = $Product->createPack(); $Pack->...
1
3d1c7abce4ecdb4fe9a40375d74d0f39
85f4aad8019a34af9251e48521351b03
업데이트 수행 전 온라인 버전을 불러옴
function Update_ol() { global $runfc, $db_online; if ($runfc == 'Y') { if ($db_online) { Sql_ol(); } else { Txt_ol(); } $runfc = 'N'; } }
1
2d0e7fa3bf6617437d7659e772cfba52
3e43fceea922ebb6e08f858cd62b6764
Returns whether the role is for an outsider. Whether the role is for an outsider.
boolean isForeign();
1
10936ce7c91413e9e34c7cec56b52fa2
ff434a51cf5bc536ad4863517f6dc956
Returns the file, class name, and parent for the given driver.
class Driver public function getFileInfo() { return $this->engine->getFileInfo(); }
0
8a1f39b083f476d3547781a6c27b84a5
14329c427e90b9f09572a445e67af7c3
Asserts that effects contains at least on MessageEffect with priority INFO.
class SIMTestCase(TestCase): def assertInfoIn(self, effects): self.assertPriorityIn(INFO, effects)
1
30db1428a15383cc14fa6b8bf0db144e
ccb8bfaaa9b270d736a283916cfe1d17
获取动机子数据集
dataset = [['1000','youth', 'N', 'N', 'normal', 'disagree'], ['2000','youth', 'N', 'N', 'good', 'disagree'], ['7000','youth', 'Y', 'N', 'good', 'agree'], ['7100','youth', 'Y', 'Y', 'normal', 'agree'], ['3000','youth', 'N', 'N', 'normal', 'disagree'], ['3500','mid-age', 'N', 'N', 'normal', 'disagree...
0
ea4f3271fe0fcf122fbd23f845a0d084
57617df187e953e94addfa1464f02d3f
根据中文类型获取系统内卡类型
public class TemplateFactory private String getCardTypeCn(int type){ if(type==1) return "身份证"; else if(type==2) return "护照"; else if(type==3) return "驾照"; else if(type==4) return "营业执照"; else return ""; }
0
533c621285c5ff77f9586b22420f439b
11f4e0eea1004f27b0b6539e25ed319a
calculation of the maximum energy of the electrons at each time step.
def pE(rrange): global Ep Ep=[0] r=rrange[0] while r<rrange[1]: r=r+dr Ep.append(-ee/r)
0
60d19f8fb014dc3375f40fb1d30f9ee8
f4f3c278cd0baeb677808fdb0026274f
根据模板重新生成指定页面
{ $this->tplModel = new PageTplModel(); $tplInfo = $this->tplModel->findOne($tplId); $tplInfo = ArrayHelper::toArray($tplInfo); $this->copyPage($pageId, $tplInfo, $lang); return true; }
1
459f7edbf8ed8f39d01e04876f0e3b71
2a214f99f212904016cf029b4f88985e
Alternates between two colors on even and odd numbered pixels
def two_color_swap(bt, col1, col2, freq=10, duration=10): for a in range(0, freq * duration): for i in range(0, bt.get_led_count()): if i % 2 == 0: bt.sendPixel(col1.red, col1.green, col1.blue) else: bt.sendPixel(col2.red, col2.green, col2.blue) ...
1
d2a09823390538b545d05f43e0271835
0dbc17a25e94923c49c777e06a007ab6
フォームの入力値をReceiptインスタンスへ詰め込む
{ $this->before_write_receipt = new \Shop\Model\Orm\Receipt($this['id']); if ($save_flag == self::INSERT_FLAG){ $this['dateof'] = date("Y-m-d H:i:s"); } $this['extra'] = serialize($this['extra_arr']); }
0
57466122d30fbaee6cb95e6b24b61ce6
a928d483cce4c55c29ce0bc3ab74f368
Created by PhpStorm. 优化的冒泡排序,原理是判断排序过程有没有再次发生交换, 因为如果没有发生交换,说明前面已经排好序了,不需要再继续进行 排序。
{ $length = count($arr); if ($length <= 1) return; for ($i = 0; $i < $length; $i++) { $flag = false; for ($j = 0; $j < $length - $i - 1; $j++) { if ($arr[$j] > $arr[$j + 1]) { $tmp = $arr[$j]; $arr[$j] = $arr[$j + 1]; $arr[$j + 1] =...
1
3794b695ced025a6aacb3afdadccca1a
1502f89b0721a50db56df586d06763c5
Add quotes to fields
{ txt = txt.Replace(Quote, Quote + Quote); return Quote + txt + Quote; }
1
d76048fc90eb276f3a67e12e54ae704a
35d91369ca45b82f761476140cf12c2c
解析mapper接口上的注解并封装成mappers集合
SqlSessionTemplate sqlSessionTemplate) { GenericApplicationContext pluginApplicationContext = pluginRegistryInfo.getPluginApplicationContext(); List<Class> mapperGroupClasses = pluginRegistryInfo.getClassesFromGroup(PluginMapperGroup.GROUP_ID); if (mapperGroupClasse...
1
5fe33266301b076add1e82104195e508
55089ce603b71a96162c18c93eb3e874
ユーザー経験値のエフェクトを適用する。
{ int numEligibleCharacters = GetNumConciousCharacters(); if (numEligibleCharacters == 0) { return; } int expPerCharacter = experienceAmount / numEligibleCharacters; Characters.ForEach(chr => { if...
1
7bb4c947e0645a2dd16ec4d445cdc750
4e195d38e97cbe7a0d84f6a0364ad432
Installs the appropriate LayoutManager on the <code>JRootPane</code> to render the window decorations.
public class PlasticTabbedPaneUI extends MetalTabbedPaneUI protected LayoutManager createLayoutManager() { return new TabbedPaneLayout(); }
0
f720cf620527d7dd362e93c7b2db4e78
6ff3aab49f9d41c1bda29873d5da535b
查询已经开通文档预览的存储桶
class CosS3Client(object): def ci_get_doc_bucket(self, Regions='', BucketName='', BucketNames='', PageNumber=1, PageSize=10, **kwargs): headers = mapped(kwargs) final_headers = {} params = {} for key in headers: if key.startswith("response"): params[key] = hea...
1
1d2421e6a2502daff334dd2c85aab16c
97416c46439a5443ff376491748d46c3
get the singleton instance of the ThreadPoolTaskExecutor
public class DefaultAmazonS3Operations extends AbstractAmazonS3Operations public ThreadPoolExecutor getThreadPoolExecutor() { return threadPoolExecutor; }
0
d46735a8479d2b668859d5f62c2c73ea
3ff4459223d8a331ef354137a6821f7d
function to delete menu item, accepts id and returns true or false
class MenusController extends Controller public function destroy($id) { $menu = Menu::find($id); if (false != $menu) { $menu->delete(); return "This Menu was deleted"; } else { return "This Menu was deleted erlier"; } }
0
4ae4d50fdc65309cbaae2d10f3162fb2
07f3e82c4e06c378d625d67c6c69bee4
Reads the entries of the iman env entry specified.
class EtsiPackager(CsarBasePackager): def _read_etsi_manifest(self, wd, tosca_meta): try: if (tosca_meta is not None and tosca_meta[0].get("Entry-Manifest") is not None): path = search_for_file( os.path.join(wd, tosca_meta[0].get("Entry-Manifes...
0
9ef5fa5bec1e44332d8dd3c408163e53
03abde3b6e5c3cf750edd8c2015d0137
Gets the path of this ComputerApplication. # noqa: E501
class AppFolder: def spath(self): return self.__str__()
0
7c56c112ed60a698b0487a8f19371247
8615a6cdbd97403f34b0f473283bce14
槽函数,删除RAID
known_devices = dm.Device.get_devices() device = devices[0] if device not in known_devices.keys(): return {'warning': 'Unknown device: {}'.format(device)} dev = known_devices[device] try: dev_row = Disk.objects.get(uuid=dev.uuid) if dev_row.mode == dev_row.ACTIVE: ...
1
933f4461da48fbbfbbcf5f40e69cb324
7393e552e8bbc5a893d9f11e55836f4a
10分鐘雨量是否達mm
{ for (int i = 3; i < 9; i++) { if (da.Rows[0][i].ToString() == "" || da.Rows[0][i].ToString() == null) continue; TimeSpan ts = DateTime.Now - Convert.ToDateTime(da.Rows[0][i].ToString()); if (ts.TotalMinutes < 10) { ...
0
e6a93125edac5d09e92aa42d0b9d8830
ab4bedc956451cc391266adc5e6b07a5
Initializes(creates) forms of the collection and links them to it.
private void Init() { ToolTips = new ToolTipCollection(); Titles = new TitleCollection(); Legends = new LegendCollection(); TrendLines = new TrendLineCollection(); AxesX = new AxisCollection(); AxesY = new AxisCollection(); Seri...
1
3720aa05c505fe4157bd21374ff57fee
1bb67eb39dd9cfd6e5e849196a7af61f
Возвращает ближайщий к дрону астероид
class OlshannikovDron(Drone): def _get_my_asteroid(self): self.set_distance_to_asteroids() self.choice_asteroid_with_team() return self.my_asteroid
0
4a5de6e1450ba0693dbdce79722b3e68
dc96b619197c12b798dcafe832e2856a
Method to find out if booking has been paid for.
public function isPaid();
1
a84c2a4e21d0a521c2053ae0a88cf22e
03872029ec4420db32e9b59b68c09f48
Calculate the average difference between the image pixels and returns a number.
def get_diff(image_file, threshold = 0): img = plt.imread(image_file) gravity = np.array([0.299,0.587,0.114]) img = np.dot(img, gravity) fil = np.array([[ 1, 1, 1], [ 1, -8, 1], [ 1, 1, 1]]) res = cv2.filter2D(img,-1,fil...
1
fb0ee9319784ed8ca86cc3bce2bc7d6a
26322d3b640a53fbaf548163cbed2bd4
Set the properties for the create button.
class CreateButton extends AbstractButton public function setDefaultOptions(OptionsResolverInterface $resolver) { parent::setDefaultOptions($resolver); $resolver->setDefaults(array( 'label' => 'btn_admin.create', 'attr' => array( 'class' => 'btn btn-success b...
1
06f5c938024a525a8dee16756728064b
f367fd8a2aeb7ccaf5e530334cd10df8
Get the date/time for the beginning of the current date/time.
namespace System public static class DateExtensions public static DateTimeOffset BeginOfDate(this DateTimeOffset self) { return new DateTimeOffset(self.Year, self.Month, self.Day, 0, 0, 0, self.Offset); }
1
7cc82f919e81abbcefb43a2f00ae84ab
789f2b12a5e7ae41ad07fb330a45ea77
Gets the dimensions of the player
function Player:getSize(parameters) return self.p_siz end
1
44c1917ca07bbcbeaf67a8b73347608b
00d6711318290ef8bdce6789cb00c0a2
==============================根据当前数据取得农历字符
class ChinaDate final private static String cyclicalm(int num) { return (gan[num % 10] + zhi[num % 12]); }
0
c4cbf798db06bea2a90a7d761c76944b
3e091d504c1c7512407307b8a701b3cf
Exposes the private technology collection property for read access collection
{ return $this->hasMany(Technology::className(), ['technologyId' => 'technologyId'])->viaTable('solutionTechnology', ['solutionId' => 'solutionId']); }
0
9966aa9407bed62311e9543993cf78bd
419af078f1f7bf05b388a495aa4965c2
Converts {@code vector} location from this node to world. {@link #location(Vector)} performs the inverse transformation. {@link #worldDisplacement(Vector)} converts vector displacements instead of locations. {@link #worldDisplacement(Quaternion)} converts quaternion displacements instead of locations.
public class Matrix4 extends Matrix public Vector3D convertLocalToWorld( Vector3D localVector ) { return this.transform( localVector ); }
1
39265128e9c6cae7c4d82decf3173ce2
9bd39c4c3104f3a8ba0017188e1f9ba4
根据公司首页股东信息字段判断股东数量,模糊判断,需做二次判断
{ $this->db->group_start(); $this->db->or_like($strarr); $this->db->group_end(); $this->db->where('manage_data', $tp); $this->db->where('id !=', $comid); $this->db->where('user_type', 'company'); return count($this->db->get('userinfo')->result_array()); }
1
bbf81730d6be3d1338071e45b08d9a0c
b432fdea9a00a5b6964e538d7e00aaea
Nils the "auth" element
try : return self._authnvsname except Exception as e: raise e
0
5bf1c7e180da2252c3bb06ba381c45e4
ef02e1ab32f3a4d2e808d43053e705f3
软删除收款账号
{ if (!request()->isAjax()) { return $this->index(); } $id = input('post.id'); $time = Db::table('mch_order')->where('pay_type', $id)->limit(1)->order('accept_time desc')->value('accept_time'); if (!empty($time)) { $now_time = time() - $time; ...
0
d498344024689936a15ce8d0eca3291e
4a6c290a79aaf52dad19f926a6215896
Test useless intermediate level in a 3 levels embedding
data_list = get_testing_complex_list() dims = [1, 2] bs = list(range(2, len(data_list)+1)) params = itertools.product(bs, dims, dims) torch.manual_seed(0) for batch_size, batch_max_dim, model_max_dim in params: if batch_max_dim > model_max_dim: continue data_loader = ...
1
7c943856b0aef8b6bf21c56c9ceac408
fe36ede7147f283d1893edf65ac775cf
Action lorsqu'on selectionne une salle.
CDbRoom *pRoom) { ASSERT(pRoom); delete this->pSelectedRoom; this->pSelectedRoom = pRoom; ASSERT(this->pSelectedHold); pRoom->PlaceCharacters(this->pSelectedHold); this->pMapWidget->SelectRoom(pRoom->dwRoomX, pRoom->dwRoomY); GetLevelEntrancesInRoom(); this->pRoomWidget->LoadFromRoom(pRoom, this->pSelectedH...
1
7fbb734f9165b02264294a2c46c19d6c
0a693ae121c6e6e63a8f9bc4846f050b
@brief Accède à la valeur de OcrNA.
{ FCI_DELAYBYTE_MS(1); char CommandLine[]="ANALOGREAD,NN\0"; sprintf(CommandLine,"ANALOGREAD,%d",Voie ); if(Voie<=3) Input[Voie]=Command(CommandLine); return(Input[Voie]); }
0
210b55fac671015f9572c67eec4b5761
5328d5e232e9a6a8ee95f37156831298
## function to convert hex to rgb
function hex_to_rgb($hex) { if(substr($hex,0,1) == '#') $hex = substr($hex,1); if(strlen($hex) == 3) { $hex = substr($hex,0,1) . substr($hex,0,1) . substr($hex,1,1) . substr($hex,1,1) . substr($hex,2,1) . substr($hex,2,1); } $rgb['red'] = hexdec(substr($hex,0,2)); $rgb['green'] = hexdec(substr($hex,2,2)); ...
1
960124e95731c664a98dd8c338c332ef
7906c790ad3c380fd6edcfb15b778ee6
Monitor the OverlayGraph and delete expired links.
class Sticky public function monitorExpired() { if (is_null($this->timer)) { Tools::log('Start Timer For Sticky Data.'); $obj = $this; $this->timer = Timer::add($this->expiredTime, function () use (&$obj) { if (!empty($obj->stickyPackageExpiredTime)) { ...
0
a14789fd025ea1fa7bef2d849b3de3d5
c91b6dda9b06ae71111578d6a241a0e3
Returns the current piece being played
public final class Board extends Observable public Piece getCurrentPiece() { return myCurrentPiece; }
1
49abe7de1c6594aa61eb5e342f8ea212
8f84842c6b0481caf629b6a73f7e8852
Förflyttar spelaren och det spelaren har i händerna till vänster ett steg.
namespace Easter_Egg public class Controller private void steerLeft(int whichPlayer) { player[whichPlayer].setSpeed(new Vector(0, 0)); switch (player[whichPlayer].getDirection()) { case CarDirection.EAST: player[whichPlayer].setDirection(CarDirection.NORTH); break; case CarDirection.WEST:...
0
e3f5d4dfac362cfc5185e22dc7dcaa80
2424b7019eb6dcb539864af67ba6847e
=========================================================================== DESCRIPTION This function logs the allow HDR orig during GPS event RETURN VALUE None SIDE EFFECTS None ===========================================================================
( boolean agc0_is_valid, boolean agc1_is_valid ) { if (log_status(LOG_HDR_LINK_SUMMARY_C)) { hdrrx_log_link_summary(); } if (log_status(LOG_HDR_POWER_C)) { hdrrx_log_rf_power( agc0_is_valid, agc1_is_valid ); } #ifdef FEATURE_HDR_BCMCS #ifdef FEATURE_HDR_PB hdrbclog_process_pn_roll_logging(); ...
0
02d575652b8db37bb91d03c03e664a03
606c9572a52f90d45a955e9c307a4e2d
Deletes a rock type from the grid
bool Environment::deleteCreature (int r, int c) { if(isValid(r, c) && isOccupied(r, c)) { position[r][c] = '\0'; grid->setChar (r, c, '.'); return true; } return false; }
0
61f64e7817ec51b359e3be14d9dfd22b
16703a51cde87f9253111e552e6ba98d
Crea il pannello che contiene le tabelle della situazione e movimentazione dei lotti dell'articolo.
TableView<EventTable> table; if (tabPane.getTabs().size() == 4) { table = (TableView<EventTable>) tabPane.getTabs().get(3).getContent(); table.getColumns().clear(); } else { table = new TableView<>(); table.setEditable(true); Tab tableView = new Tab(); tableView.setText("...
0
0fc55b822af0b55ce2a6cac5fd27e7a4
8c8f0178524cc70c043d6dc2b474fc6c
Gets the current text of the used label
public class BasicOptionsJPanel extends JPanel public String getLabelText() { return label.getText(); }
1
ca9bc1e0cd5d6ed994ae1f43404315ac
34feaf449c31bafa9129418961acd848
Update the team that is displayed when it is clicked in the menu
public class DeathMatch : GameManager public void UpdateTeam(int whichTeam) { nextPlayersTeam = whichTeam; PhotonRoom.room.myPhotonNetworkPlayer.GetComponent<PhotonPlayer>().CallGetTeam(); teamPanel.SetActive(false); }
1
f4c183c9d0fed36a80e059cf24393ac8
fb776d4871b766ace627f25e47cd680c
Loads a configuration from text (source code).
namespace ArmyAnt public abstract class AConfigFile : IConfigFile public abstract bool LoadString(string text);
1
6498db7116ff73b4204df40e42b01a4a
034fa245df2f54b0a3d9686909651670
Beinhaltet die Kernfunktionalität des Spiels für die Ausführung innerhalb einer Konsole
{ Scanner input = new Scanner(System.in); String enteredLine; String commandString = ""; boolean byeByeSeeYouLater = false; while (!byeByeSeeYouLater) { System.out.print("cheja▹"); try { enteredLine = input.nextLine(...
1
388077c5032c240c91b1bc147c848c0f
5a31d27e9e5fd0110af49b8c7f2a59f2
Function to set the amount of Coffee Machines in the Store
if (numberOfCoffees == 100) { return; } numberOfCoffees = numberOfCoffees + 1; displayQuantity(numberOfCoffees); }
0
5352358828564d0647c44f4b4f1ca936
69f97ebd634a6ef18e233d54a54ff82b
Use local data to train the neural net, probably made by bin/create_training_data.py.
def CreateAndTrainNetwork(): pass
0
5c3cf292eeefcd944bce119e92942929
8406400c972dad9736e536d3eeb73481
Routine Description: Get user defined trap attribute value. [in] hostif_user_defined_trap_id - host interface user defined trap id [in] attr_count - number of attributes [in,out] attr_list - array of attributes Return Values: SAI_STATUS_SUCCESS on success Failure status code on error
_In_ const sai_attribute_value_t *value, void *arg) { return SAI_STATUS_NOT_IMPLEMENTED; }
0
bc14151bbfe4fe50a1b01da981435a05
0aa28572667889bd0afee6ebab1b7210
# Constructs a layout based on the number of rows assuming the 3 horizontal graphs
new_layout <- layout_info nTiers <- as.numeric(nTiers) nPasses <- as.numeric(nPasses) nPlots <- nrow(new_layout) new_layout <- new_layout[order(as.numeric(new_layout$plotNumber)),] new_layout$X <- make_serpentine(nTiers, nPasses, nPlots) new_layout$Y <- rep(1:nTiers, each=nPasses) return(new_layout) }
0
92585af21c5c5f140ea7e821231576ed
040e051887bec291ba72739c789e2914
Extract real stream url from tunein stream url
url = sanitize url matches = VIMEO_REGEX.match url.to_str matches[2] if matches end
0
6eabe9f435d511ffeab7929e6babeaa9
9eb8ecf3874f401c8ad16b71874c3221
获取处方笺ID
@Table(name = "srvs_prescription_scan") public class PrescriptionScan public void setYdId(String ydId) { this.ydId = ydId == null ? null : ydId.trim(); }
0
41c10b6c319a8272bc97c3b1415986ab
5422b819600662597c9dfa40f1a55d33
获取经过RSA加密后的字符串
public class Constans public static String RSA(String str, Context CT) { try { return RSAUtils.GetRsA(CT, str); } catch (Exception e) { e.printStackTrace(); } return ""; }
1
ffb339861940963ad58e4b2278e7f74b
51e0763a924ef38697d17b7b5bee97aa
Returns `True` if it's a simpleType derived from xs:QName, `False` otherwise.
public final class ComputedAttribute extends AttributeCreator public boolean isAllowNameAsQName() { return allowNameAsQName; }
0
be573e6554241bd407deaa1394a698a1
77c8b9a4e557e80ad0e619c35a085ab7
Returns the size of the largest tetromino.
public class Board public Coordinates getMaxSize() {return maxSize;}
0
8d5af9af477ff910444bc797ce827be4
4940dad563ff9e955e89d1ca5d56097f
Devolve o numero de vendas e o numero de clientes distintos num determinado mes
public class ClieP implements Serializable public int getNumVendas(int mes){ return numVendas[mes]; }
0
777551e9e320aa0c94facce73eb0c4f9
c6fba500fb76292f4e2e4cc2e0e9e46a
Displays the store's current profit
public class CookieTracker extends javax.swing.JFrame private void btnCalculateActionPerformed(java.awt.event.ActionEvent evt) { int a = 0; if (tfMintsSold.getText().equals("")){ a = 0; } else { a = Integer.parseInt(this.tfMintsSold.getText()); } String s...
1
3fee071d7fead7bb79eebd6c962f751d
996ddbfdd95a7f969716584db5243d22
Decode data format that original Nunchuck uses with old init sequence. This never worked with other controllers (e.g. wireless Nunchuck from other vendors)
{ analogX = nunchuck_buf[0]; analogY = nunchuck_buf[1]; accelX = nunchuck_buf[2] << 2; accelY = nunchuck_buf[3] << 2; accelZ = nunchuck_buf[4] << 2; zButtonDown = ((nunchuck_buf[5] & 0x01) == 0); cButtonDown = ((nunchuck_buf[5] ...
1
d7e563ec127dab2a220f7388d0f8b7c1
ca97c05e2bb191e1917484e18b612b99
Returns the meta object for the '{@link commons.Commentable#getObjectClass() <em>Get Object Class</em>}' operation. <!-- begin-user-doc --> <!-- end-user-doc -->
@XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "ObjectIdentifier", propOrder = { "objectClass", "objectId" }) public class ObjectIdentifier public String getObjectClass() { return objectClass; }
0
cacf60c85064db6e6cb5e592f142584b
c4968da6604601f05c9f166574327d03
Set the libelle bul.
class TauxRetraiteMetier public function setLibelleBul(?string $libelleBul): TauxRetraiteMetier { $this->libelleBul = $libelleBul; return $this; }
1
05161b9c5602a1ac0d7598a9b24370eb
9db4ed8ed63e206bcee62298e6353822
对字节数组进行BASE64解码
public class Base64Utils public static byte[] decode(byte[] base64) throws Exception { return Base64.getDecoder().decode(base64); }
1
0b4b214ac6e46485b5472e5d31f55a85
01bc5214ca412cf72dc054064b69a5ef
Determines if we are running on release or debug
fun isReleaseBuild() = provider!!.isReleaseBuild
1
85aef0680a15e55cbc0102e5461e1ae5
ec0a825d5ae32e3bbc36e2cd994d0f05
根据列数获取列的字符(例:28列AB)
let str = ''; let iAlpha = 0; let iRemainder = 0; iAlpha = parseInt(iCol / 26, 10); iRemainder = iCol - iAlpha * 26; if (iAlpha > 0) { str = String.fromCharCode(iAlpha + 64); } if (iRemainder >= 0) { str = str + String.fromCharCode(iRemainder + 65); } return str; }
1
501c5c99696ce20dc9b4ddc097707dc6
a8973456e02d52fefbf9ad97dd2786ad
Starts the process of saving the current project to the specified path without actually asking the user anything. Other entry points are <see cref="ProjectSaver.Save" /> and <see cref="ProjectSaver.SaveAs" />
{ var param = new ProjectDescriptionSaver.ParametersForSave(PAC_Name, path, silentMode); if (silentMode) { ProjectDescriptionSaver.Save(param); } else { var t = new Thread(new ParameterizedTh...
1
022e447c8807f18b9b2fe18e397e9895
d9b39270e7c22b505bbb76face778fbf
Updates the attribute 'ItemWithholdingTaxSchema' in the specified resource.<para/> Response: When successful, the response body is empty.<para/> Response status codes:<para/> 200 OK. The operation was completed successfully.<para/> 400 BadRequest. The request parameters are invalid.
namespace Acumatica.DefaultEndpoint.Api StockItem StockItemGetAdHocSchema ();
0
d49dbbef20db5458b8ebcdaa0b0938e8
4a84cd796a0035c9d83312d4e247d4db
Get all items, check that the response list is not empty
class TestService: def test_list(self): response = requests.get(item_list_url, params={"id": TestService.item_id}) print(response.json()) assert response.status_code == 200 assert len(response.json()) > 0
1
2e5244985ee81c5ea1213857f878be9f
f3a42f1ac2fbe211d9010bc3c9e96e4b
Funkce z původní bitmapy vytvoří její černobílou variaci v závislosti na hranici světlosti.
{ float Er = Col.R / 225f; float Er2 = Col.G / 225f; float Er3 = Col.B / 225f; Bitmap newBitmap = new Bitmap(Blacks.Width, Blacks.Height); Graphics g = Graphics.FromImage(newBitmap); ColorMatrix colorMatrix = new ColorMatrix( ne...
0
9df9d32ae9319fa2060492617777584e
46c3947831a1959d840a1df113f75c31
匹配短信中间的4个数字(验证码等)
public class Utils public static boolean isNumberCode(String phoneNumber) { Pattern p = Pattern.compile("^\\d{4}$"); Matcher m = p.matcher(phoneNumber); return m.matches(); }
1
58e37bd7dbdc5c4fcecb2a57f0cfc794
1bd220da0aa22a358ada736691c298ec
before looping over all the data to process and store it, calculate the global mean and variance to normalize the features later on
void LDArne::processClass() { double* meanVector; double* cov; int32_t numFeatures = (int32_t) m_trainingMatrix.size()/nVars; mNumFeatures.push_back(numFeatures); cout << "numFeatures: " << numFeatures << endl; cout << "mean()" << endl; meanVector = getMeanVector(m_trainingMatrix.data(), num...
0
c6e02d8775924d9ff9744b272041d35a
5fb3c0a6af5b94875a9270b8efba5b6f
Gets query for [[TournamentMatches]].
[ProducesResponseType(typeof(IList<DTO.Tournament.MatchSeries>), 200)] [ProducesResponseType(typeof(Svalbard.Error), 404)] public async Task<OperationResult<IList<DTO.Tournament.MatchSeries>>> GetMatches(Guid tournamentId) { if (this.resourceId == Guid.Empty) { return new OperationRe...
1
c9a8b930670fe471adf59f41da5ed658
c8d1daa649cd971c62297817eb2a00e7
Gets the value of the sublabel property. possible object is {@link String }
@XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "Definition_Class", propOrder = { "notAnElement", "derivedTypeDefinition", "derivedRecordExtensionDefinition", "enumerationTypeDefinition", "signedIntegerTypeDefinition", "modularTypeDefinition", "rootIntegerDefinition", "rootRealDefi...
0
479b150a0c6f735fc78e7cc6ac71279f
7d898d929311cbb1d66e9ce02dfc23fc
Add a page to the dashboard to display the output.
{ $title = grab_request_var("title", ""); if (empty($title)) { echo _("NO TITLE") . "\n"; return; } $opts = grab_request_var("opts", ""); $background = encode_form_val(grab_request_var("background", "")); $opts["background"] = $background; $transparent = intval(grab_request_v...
1
0f514381e16cefe8559ef7015ccf6f7b
1039a88ecf934d46208af7fcd868dae9
unsigned_int型のbit数を調べる(0をbit反転してから1の数を数える)
int bit_pop(unsigned char num) { int count = 0; while (num != 0) { if (num & 1) { ++count; } num >>= 1; } return count; }
0
1780ca2c03b0d6aead89723790fdda22
cebe2cb6dd98c65ab123914ae78205c4
科室门诊次均药费比
public String dept(@RequestParam String beginDate, @RequestParam String endDate, @RequestParam String deptCode, @RequestParam(required = false) String costType, HttpServletRequest request) { JSONObject result = new JSONObject(); result.put("inp", 2312); ...
0
db6d89acc06adb68b0e28df82494c3e0
3bb6ad369894c0a6e90f53331dacec73
Add or Remove start feature structure of TAG tree set
void sm2feature(SENTENCE_DATA *sp) { int i; char *cp, feature_buffer[BNST_LENGTH_MAX + SM_CODE_SIZE * SM_ELEMENT_MAX + 4]; for (i = 0; i < sp->Tag_num; i++) { if (cp = check_feature((sp->tag_data + i)->f, "NTT")) { sprintf(feature_buffer, "%s:%s", cp, (sp->tag_data + i)->SM_code); assign_cfeature...
0
8ef58d55a43a1d61d86dd3a535c802ca
bfa08d2735596e4dd06914d67b2ce78b
Sauvegarde une nouvelle pizza
namespace FoodOrderApp.Interfaces.Services Task<IServiceResult<PizzaToReturnDto>> CreateAsync(PizzaToCreateDto pizzaToCreate);
1
087403ed12275de93696c26e55336155
746e9117a012ce12f642762008b361dd
Change image in the slider (remove the previous and add the current)
function switch_photo1(new_img){ var photo1Slider = $("#prod-photo-1"); var photo1Thumb = $("#prod-small-photo-1"); var current_img = photo1Slider.attr("data-img"); var file_src = photo1Slider.attr("src"); if(current_img != new_img) { current_img = "_c"+current_img; file_src = file_src.replace(current_img,"_...
1
8910c5fb269672a8500718714fec9689
e8e6d335ab89920c5db210dcdf2402f6
停车到空位最少的停车场
curr_node): car_obj_list = [w[0] for w in cars_list] if len(car_obj_list) == 1: return car_obj_list[0].index temp = sorted([sorted( [(i, w.min_time[curr_node] + charge_time_left_list[x.index]) for j, w in enumerate(car_obj_list) if j != i], key=lambda y: -y[1]) for i, ...
0
c0fd9120f794b47a52f945d7110162a4
0dceaa44e876bbd8f01e44d49cfcb484
Function to handle the death of children
void handle_sigchild(int signo){ int status; pid_t pid; struct job_t *tempjob_list; while((pid = waitpid(-1,&status,WNOHANG|WUNTRACED)) > 0){ if(WIFEXITED(status)){ tempjob_list=getjob(job_list,pid); printf("[%d] %d finished %s\n",tempjob_list->jid,tempjob_list->pid,tempjob_list->inputcmd); deletejob(j...
1
436542106d6ac507544635736f61601b
5ea9723a579725b46d3b642f2d343c24
将数组中的水果对象随机添加到集合(假数据)
FruitItem fruitItem1 = new FruitItem(); FruitItem fruitItem2 = new FruitItem(); FruitItem fruitItem3 = new FruitItem(); fruitItem1.ID = 0001; fruitItem1.name = "pingguo"; fruitItem1.money = 0.75; fruitItem2.ID = 0002; fruitItem2.name = "xiangjiao"; ...
0
38cf4fb80002b407d02a7ef0facd5297
46249dcaf50495eea8f7efedcb4a6f81
If the argument is NULL, the user entered nothing to remove
void remove_last_arg(char *args[MAX_BUFFER_SIZE], int last_position) { args[last_position] = NULL; }
0
b4865b90bc90e1bec80d14246a9361fa
48e32e77bc3c60805bad9ab8dc5e5384
Teste et crée l'aarborescence nécessaire
prGreen("CRÉATION DE L'ARBRE LDAP...") time.sleep(3) actions_user.add_base(server, variables.dn_roed) actions_user.add_base(server, variables.dn_roed_ass) actions_user.add_base(server, variables.dn_roed_entr) actions_user.add_base(server, variables.dn_simax) actions_user.add_base(server, var...
1
bd5032284d6011e6aac6bbdc7505d3d3
9dcd5dceb26ae6083c5969f4b2a1ce18
takes a college name and returns what type of institution is it, public, private for profit, or private non-profit
int isFoundation(std::string str) { std::string temp; temp = str; temp.erase(temp.begin() + 4, temp.end()); if (temp == "CSC1") return 0; temp = str; temp.erase(temp.begin() + 3, temp.end()); if (temp == "BAA") { if (str[str.length() - 2] == '1' || str[str.length() - 2] == '2' || str[str.length() - 2] == '3')...
0
1e0100430f00582def32fe4fb0d9a6a3
b4cbe2ffee372976c6c0bb565c72b5aa
Test unsigned 8-bit, 1 sample/px, 2 frame.
class TimeGetPixelData(object): def time_16bit_3sample_2frame(self): for ii in range(self.no_runs): get_pixeldata(self.ds_16_3_2)
0
326c3f28149f0ed7b33f7fbee3cacabf
15f4a19e03961523572cda5e37f532c1
metodo que elimina lógicamente un puesto en la base de datos
class PuestosController extends Controller public function destroy($id) { $puestos = puesto::findOrFail($id); if ($puestos->delete()) { return response($puestos,200); } return response($id,404); }
0
317075aac3dd73cf1d208b1535da0e5e
35959851a17dfa32cdf3f0b4d775085e
Given some dot/graphviz source code, render and display the graph in the Jupyter notebook.
tmp_filename = "/tmp/jupyter_tmp_image" tmp_file = open(tmp_filename, "w", encoding="utf-8") tmp_file.write(dot_source) tmp_file.close() render_graph(tmp_filename, filetype=filetype) image = Image(filename=tmp_filename + "." + filetype, embed=True, format=filetype) return image
1
82839dadaad8b3728ed8a622171f071e
96d3b71a59784b3f84d7b357a66c292c
Creates the affected gl entry form.
GLTransaction glt = new GLTransaction ("(" + getDetail() + ")"); glt.setJournal (getJournal()); Iterator iter = getEntries().iterator(); while (iter.hasNext()) { GLEntry e = (GLEntry) iter.next(); glt.createGLEntry ( e.getAccount(), ...
1
a2a81e317b121711c8ab7748cf06f995
457c7cf21d0614b8fbbb93d9119b53ba
Metoda koja preporucuje korisniku listu filmova
SqlHelper sql = SqlHelper.getInstance(); StandardHelpers.rememberedFilms = sql.getRememberedFromDb(StandardHelpers.currentUser.getName()); return true; }
0