query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
49c674e468f72e4d655974879dd9a4ab | b10d4cb0e91d92e358186169dd8eb929 | Servicio que obtiene todas las cirugias de un cirujano | {
$cirugias = Cirugia::all();
return view ('cirugia.index' , compact('cirugias'));
} | 0 |
4101752f011ceee7ae5be111bc7a0958 | d32bfb0ae4099bba87dac6e191f14be1 | Merges the maps. | namespace PHP
public class OrderedMap : System.Collections.Specialized.NameObjectCollectionBase
public static OrderedMap Merge(params OrderedMap[] args)
{
OrderedMap newOrderedMap = args[0];
for(int index=1; index<args.Length; index++)
{
newOrderedMap = Merge(newOrderedMap, args[index]);
}
return ... | 1 |
b3f880d3a6f872c624dd32ab78cef869 | 94522f0b5da16b1e97e90b743e34afac | 手牌が辺張アガリかどうかを判定 | namespace ump namespace mj
bool Agari::isYakuman() const {
return flag_.test(FLAG_YAKUMAN);
} | 0 |
31b02a0f1a1de3ea13e484777e7058fe | e4c87730b9d6c33ee7f450a073e1bb82 | The initialiser also loads the config from disk, assuming it can.
(If the file does not exist, you get an empty config.) | var c *Config = DefaultConfig()
var e error
b, e := ioutil.ReadFile(path)
if e != nil {
panic(e.Error())
}
e = c.Initialize(b)
return c
} | 0 |
225427fca183957373d6b6995b753d93 | 0e639a28a3b274ff8fb4a20f532ef5a7 | @brief Soft IIC write one byte | uint8_t Softiic::iicSendByte(uint8_t SendByte)
{
uint8_t i = 8;
while (i--)
{
sclL();
iicSoftDelay();
if (SendByte & 0x80)
{
sdaH();
} else
{
sdaL();
}
SendByte <<= 1;
iicSoftDelay();
sclH();
iicS... | 1 |
0074ad23c65ce72428bcf972cf71fefe | 922747d0bcbcd7fed7a6827274b28b6d | 根据XY轴坐标点击右键 | namespace ArcGISApp1.Controls.OtherTool
public partial class FeatureEditCsy : UserControl
private async void MyMapView_MouseRightButtonDown(object sender, MouseButtonEventArgs e)
{
IInputElement ie = (IInputElement)(sender); MapPoint loc = myMapView.ScreenToLocation(e.GetPosition(ie));
... | 1 |
2ed049402f894fcb773b0fc92cff6600 | 77332ec1ede8820c74f330f40456a90e | Single transformer encoder layer. Uses prenorm. | {
var res = THSNN_TransformerEncoderLayer_forward(handle,
src.Handle,
src_mask?.Handle ?? IntPtr.Zero,
IntPtr.Zero);
if (res == IntPtr.Zero) { torch.CheckForErrors(); }
return new Tensor(res);
... | 0 |
9291a67e1767e54aff2930265e48039e | fa3cf052de0fc08f7e61a4e1603f3029 | 更新订单消息 | Message updateStatus(Order order); | 1 |
a07e83e537468256beb139cf0060673a | 9d6b4cece1c8a9f2ead2712df4b87528 | Height of the outlet channel weir. | class VolumeProfile:
def FullHeight (self):
return self.__m_FullHeight | 0 |
a617e429084663cde29341c6e332c4ab | 8dd5504b3cfc3d69503ce27877acbfb3 | @brief 断开MQTT连接。 | static void data_mqtt_disconnect(mqtt_client_t *client)
{
mqtt_disconnect(client);
} | 1 |
a52ad3dd5e372b784d07a40bccc26979 | 7f61448ad6da3ef0f9cb03f40c5be655 | getter/reader method | cases like (1) | 0 |
21a70b3f5079b58e194d854ae6e390e1 | c37c23e5b98eb4602d5e5c5392f7aec4 | This writer produces CSV files and plots. | class TSUGOutputWriter(TSUGWriter):
def __init__(self):
super(TSUGOutputWriter, self).__init__(
required_arguments=["output_type"]) | 0 |
96e83ee42f36971c4a6aa8df0de28926 | 25a894bdc92525af07be81089c42249d | Implementation of base.restartNode command. | try:
main.log.info( self.name +
": Restarting Docker conatiner for node " + ctName )
response = self.dockerClient.restart( ctName )
if response is None:
main.log.info( "Restarted container for node: " + ctName )
retur... | 1 |
eb32865a431d2af5e24bbaf7e770f884 | 8088ea8456100dd2391a38f75228c363 | Gestionnaire du bouton 'Verifier n°adhérant'. | {
$teamId = Bn::getValue('teamId', -1);
$oTeam = new Oteam($teamId);
$oAdhe = new Oadhe($oTeam->getVal('captainid', -1));
$body = new Body();
$str = $oTeam->getVal('name');
$t = $body->addP('', LOC_TITLE_VCARD, 'bn-title-1');
$t->addBalise('span', '', $str);
$str = $oAdhe->getVal('name') . ' ' . $oAdhe... | 0 |
939565a31dd65f3631196c94cf96cca8 | 6af7a3a353b15c0cd245deea62b77f06 | 异常日志记录测试 | func TestLog(t *testing.T) {
myLog.Error("dfdfa")
myLog.Info("dfdfa:%v",util.Result{true,"xxx",[]interface{}{""}})
log.Printf("dfdfa:%s","xx")
myLog.Error("dfdfa")
} | 1 |
581bbc6eaea489c92bd841dc648f2da7 | 6d86ac722ae0e88d7cc9e61e9f556a01 | ! \brief Накладывает на изображение различные эффекты | {
m_fullImage = image;
m_cropRect = cropRect;
m_effectImage = image.copy();
} | 0 |
a68bc5287f9893d15695557196940be8 | fc25a2f25615ecf7eef24058065bcf61 | 查询已派发并且没有走到等待环节的子流程数量 | @RestController
@RequestMapping("api/cl")
public class ClCtrl extends BaseController<ClCl, String>
@GetMapping(value = "/totalWfxx/{id}")
public ApiResponse<Integer> totalWfxx(@PathVariable("id") String id) {
Integer total = new Integer(0);
try{
Example condition = new Example(ClWf.class);
condition.and()
... | 1 |
48995b205aedfff8dcbcdf13a6cc0e93 | d27233893cc0cdb29c8116f0b354627b | 获取儿子节点,不含后代子孙 | def get_son_list(current,deathlist,point_list):
sonlist=[]
for x in range(current.x-1,current.x+2):
for y in range(current.y-1,current.y+2):
if(current.canreach(x,y,point_list) and( not isinonelist(point_list[x][y],deathlist))):
sonlist.append(point_list[x][y])
return s... | 0 |
6cc94e3be4950bb9a6e27e4fbfcb13d1 | bd71ab41bf4cc4539e7f7c0006fcb4f0 | We always clear the active entry from the store. | function ParlayGenericSaveLoadDialogController ($scope, $timeout, $mdDialog, $mdMedia, ParlayNotification, ParlayObject, manager, options)
function clearActive () {
manager.clearActive();
} | 1 |
bd22710022361536591b9f2ad9c8f988 | 0b6e883ebc660d7d8c4f8637c7b1409e | Bootstrap package into the uvicore framework.
Boot takes place after ALL packages are registered. This means all package
configs are deep merged to provide a complete and accurate view of all
configuration. This is where you register, connections, models,
views, assets, routes, commands... If you need to perform work... | def main(global_config, **settings):
config = Configurator(settings=settings, root_factory=Root)
config.include('pyramid_jinja2')
config.add_jinja2_search_path("getrnia:ui-app")
config.add_static_view('static', 'getrnia:static')
config.add_static_view('ui-components', 'getrnia:ui-components',cache_m... | 0 |
22781109a9528325aee78e5ab6465fdd | 2a693fccfb26a4dac2cb332e5b567045 | adapted from http://www.html5rocks.com/en/tutorials/cors/ | export default class Part21Ajax
createCORSRequest(method = '', url = '') {
let xhr = new XMLHttpRequest();
if ('withCredentials' in xhr) {
xhr.open(method, url, true);
} else if (typeof XDomainRequest !== 'undefined') {
xhr = new XDomainRequest();
xhr.open(method, url);
} else {
... | 1 |
972b33670ceb51b2d631ddecb9c6015d | 41f83742701ff7cc081f171c46e6cfcd | Refill the players lamp (from the pack or floor) | void do_cmd_refill(void)
{
object_type *o_ptr;
u32b f1, f2, f3, f4, f5, esp;
o_ptr = &p_ptr->inventory[INVEN_LITE];
if (o_ptr->tval != TV_LITE)
{
msg_print("You are not wielding a light.");
return;
}
object_flags(o_ptr, &f1, &f2, &f3, &f4, &f5, &esp);
if (f4 & TR4_FUEL_LITE)
{
if (o_ptr->sval == SV_LITE_... | 1 |
d72e353a3b83c7955777072dcde89cff | e88b3b59766ff7be487b64b15df6375a | 获取再次发送短信的等待时间 | {
int result = 0;
if (int.TryParse(BitAuto.Utils.Config.ConfigurationUtil.GetAppSettingValue("TimeidleSendMessage"), out result))
{
return result;
}
return 600;
} | 1 |
8f799dc9c7ffae9a788813e22374d27a | 6cdefc89d1c4449030d4b194c852321e | This is used to add payroll data. | public void Insert(int EmployeeID,DateTime RateChangeDate,decimal Rate,byte PayFrequency,DateTime ModifiedDate)
{
EmployeePayHistory item = new EmployeePayHistory();
item.EmployeeID = EmployeeID;
item.RateChangeDate = RateChangeDate;
item.Rate = Rate;
item... | 1 |
4402cc6be0f8b642c6e68c7f69b14dd8 | 47895913d7ef592adb6b0442019e8843 | 清空数据,但是数据结构保留 | export default class Collection
clear() {
this.data = [];
this.sourceData = [];
this.removed = [];
this.mapDataRecs.clear();
this.mapPriRecs.clear();
this.clearCurrentRecord()
this.rawData = []
this.emitter.emit('clear', this);
} | 0 |
5797dec665564e2a0501ddee8ec379d0 | 3cdd9ea2c4d67afe4b5f02d472d7c37b | ERROR MESSAGE GENERATOR | char *str;
bool found = true;
switch (err) {
case LINE_TOO_LONG:
str = "Line is longer than allowed length";
break;
case FILE_OPEN_ERROR:
str = "Could not open file";
break;
case ERR_DUPLICATE_SYMBOL:
str = "The same symbol was decleared twice";
br... | 1 |
f1253ccbc3d206fde2f04c1b64fccf0e | 5040ec748a865257647a57acf847f716 | Set volume name. | namespace Se7en.Windows.Api.Native
public static class Kernel32
[DllImport(ExternDll.Kernel32, CharSet = CharSet.Auto, SetLastError = true, BestFitMapping = false, CallingConvention = CallingConvention.Winapi)]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern bool SetVolumeLabelW(string ... | 1 |
4176af81d4d8c58c800adf4df727012e | 0580679683d5fde7b79d88055e1030d7 | Asynchronously purges specified database instance | req: ClearInstanceRequest,
cb?: (error: string, rep: ClearInstanceResponse) => void
): Promise<ClearInstanceResponse> {
return this.request("ClearInstance", req, cb)
} | 1 |
a598ba578f9ca5656f6e0db5ddada822 | ce7438532c1eb570d4be9880066e7991 | check process status by pid: R=running, S=sleeping(most will be), T=terminated, Z=zombie, D=disk sleep, X=dead; https://linux.die.net/man/5/proc https://gitlab.com/procps-ng/procps | static char get_thread_state(
pid_t tid)
{
char proc_path[128];
ks_snprintf(proc_path, sizeof(proc_path), DEOBF_STR(PROC_STAT_FMT), tid);
int fd = sys_open(proc_path, O_RDONLY, 0);
DIE_IF_FMT(fd < 0, "could not open %s error %d", proc_path, fd);
char buf[4096];
int ret = sys_read(fd, buf, sizeof(buf) ... | 1 |
5f2668d77998b5616bd11f61c6cb7f55 | 2596fcd0771408d74786e2223016440a | Returns the diaphuongs before and after the current diaphuong in the ordered set where trangthai = ?.
<p>
Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> re... | public org.oep.cmon.dao.cd.model.TrinhDoChuyenMon[] findByTrangThai_PrevAndNext(
long id, int daXoa,
com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
throws com.liferay.portal.kernel.exception.SystemException,
org.oep.cmon.dao.cd.NoSuchTrinhDoChuyenMonException; | 1 |
9ac768196b8eb7e285deb84991b3cff2 | 32906811d482a764168032b73f9e1414 | Returns all offers sponsored by a given account. | class BaseOffersCallBuilder(BaseCallBuilder):
def for_sponsor(self, sponsor: str):
self._add_query_param("sponsor", sponsor)
return self | 1 |
89a996cc7c51a212e834255f966ad56d | d216ceaa39e6300fc83daac4ba9007c4 | Test with deprecated API to ensure backward compatibility | class TestBackwardsCompatibility(unittest.TestCase):
def test_api06(self):
self.assertSubprocess('tests.past_api06') | 1 |
f75dc92c7e444c1cf1eec88da91a3a58 | f94dc305915f6b3912ee81176dbab983 | 根据SESSION名称取得会话对象
SESSION名称与数据源配置文件中的数据源配置名称对应 | public Connection getConnection(String sDataSourceName) throws TransactionException; | 0 |
eddf6fde1700244b250b0db879033132 | c6577226d9332c4119fe255605ddd35f | # This is to scale the sparse matrix without centering | score.rescale <- function(Z, x)
{
scaleZ <- diag(crossprod(Z,x)) / nrow(x)
Z <- scale(Z, center = FALSE, scale = scaleZ)
return(list(Z=Z,scaleZ=scaleZ))
} | 1 |
0dbfadc3556b82887ceddd0f09d58856 | 8b5f096a403d5c2542303eb6f97d955e | Get last beat of this track | int getLastBeat(); | 1 |
57777f320cc80ee68828491c50a03052 | 5186268bfa410fc35972bbdebe30bac4 | Tells the server to drop the connection. | namespace Nettox
public class NettoxClient
public void disconnectFromServer(byte reason)
{
if (connectedToServer)
{
byte[] goodbye = new byte[4096];
goodbye[0] = 0x03;
for (int i = 1; i < 5; i++)
{
go... | 1 |
7f7deed6f111661909046d091b4d584d | 13b42f544cb5be6245f228a4952b118a | randomly generate some dummy touches. | {
step current, tmp;
int startHold = 3400;
int startWait = 500;
int startOffset = startHold + startWait;
tmp = createTouch(0, startHold);
current = tmp;
state->TouchDefault[0] = current;
tmp = createTap(startOffset + 400);
current = tmp;
state->TouchDefault[1] = current;
tmp = createTap(startOffset + 1472);... | 0 |
107882f3cad7b35afb80c1f1e1b2087c | 8ecbc2afec75d4b635a0d6a5dc350e0d | Funcion en la que se lee el archivo de control y se copia su contenido a la tablas
en la base de datos | $files = $this->load_files();
if(sizeof($files)>0){
rsort($files);
foreach($files as $f){
if(($handle = fopen($f, 'r')) !== false){
$ff = explode('/', $f);
switch($ff[1]){
case 'invoices.csv'... | 1 |
0e416765b77d34c631fa746134c5c9ee | a3c29e97ef8ba2ac5200e8062c42fd00 | Appends the string with some random guid. | {
var result = string.Empty;
char[] chars = _characters;
byte[] buffer = Guid.NewGuid().ToByteArray();
var iRoot = BitConverter.ToInt32(buffer, 0);
var random = new Random(iRoot);
for (int i = 0; i < length; i++)
{
... | 0 |
050755a72817eeddb994e7c358710e5a | 183fdb2341abcd43978eae0b946074fa | Compute the Jacobian determinant of displacement field. | def Jac(x):
height, width, depth, num_channel = x.shape
num_voxel = (height-1)*(width-1)*(depth-1)
dx = np.reshape(x[1:,:-1,:-1,:]-x[:-1,:-1,:-1,:], [num_voxel, num_channel])
dy = np.reshape(x[:-1,1:,:-1,:]-x[:-1,:-1,:-1,:], [num_voxel, num_channel])
dz = np.reshape(x[:-1,:-1,1:,:]-x[:-1,:-1,:-1,:],... | 0 |
8396d231257f8c35e06cad49ab734cc9 | 35f8479497aa562935db374965272318 | Write a (non-error) message to the text area. | class diFFit2DFrame(wx.Frame):
def write_message(self, s, panel=0):
self.SetStatusText(s, panel) | 0 |
1c460100e322b42cb991a5e5b8260442 | f67c232a178dcbc04754d427af866dd4 | Add a marble to the bag while verifying it can be added. | bag = self.bags[color]
played_piece = bag.selectPiece(piece_name)
surface_np = np.array(played_piece.forms[orientation]) + np.array(position)
surface = [tuple(pt) for pt in surface_np]
if minima(surface)[0] < 0 or \
minima(surface)[1] < 0 or \
maxima(sur... | 0 |
68a39e0ef55284dde5a0d68c39f7c729 | 6a0199b09d5d266df7a45ba06da37901 | Compares two strings based on their numeric value. / 2016-01-09 / Wethospu
This is needed to sort json data because ids are numeric strings. / 2016-01-09 / Wethospu | var value1 = (_.isNil(valueA) || valueA == '') ? 'zzz' : (valueA.toString()).toLowerCase();
var value2 = (_.isNil(valueB) || valueB == '') ? 'zzz' : (valueB.toString()).toLowerCase();
return value1.localeCompare(value2, undefined, {numeric: true});
} | 1 |
718e2505291b7363203a4b98e43d9ce7 | 37b33270d964906b1045f629d2cf276c | Return the entity_id of the sensor. | class AqmanBaseSensor(Entity):
def device_id(self) -> str:
return self._deviceid | 0 |
261f8bf572fcfbe186dbc0bf1d53592a | e11b3d67df87bd3cde9e2c0c3cb223b6 | Uncover one column (with Knuth DLX cover method) given the index | namespace DancingLinks
public class DLX
protected void UncoverColumn(int index)
{
UncoverColumn(columns[index]);
} | 1 |
a6a6ad216cbb1bf06fc6bfa54f071b13 | e86a191b802c1470078e872419264f3e | Computes the bag of words associated with an image.
Computes descriptions of every keypoint in an image
and assigns them to a word using the pretrained vocabulary
in the self.cluster classifier.
Then returns a histogram of the number of keypoints which
fall into each of the classes.
Input: image - an image as a numpy ... | class BOVWVectorizer(object):
def fit_transform(self, images, num_clusters=None, n_init=10):
from scipy.cluster.vq import whiten, vq
from numpy import histogram
descriptors = self.fit(images, num_clusters, n_init)
histograms = []
print("Creating image histograms...")
for ... | 1 |
fee05cff9ef143f72092c88b1e81736c | 558f54a002eb8254ef336c3b3faa1591 | Appends and returns a new empty "form-toolbars" element | public IForm addForm(); | 0 |
3b739cb69fa0956fddd986fe9d53e4cb | 8558cade13d2b244111f7c52902bf520 | Return a common format encompassing the precision and exponent range of both formats. | x_exp = int(floor(log10(x)))
xe_exp = int(floor(log10(xe)))
un_exp = xe_exp-precision+1
un_int = round(xe*10**(-un_exp))
no_exp = un_exp
no_int = round(x*10**(-no_exp))
fieldw = x_exp - no_exp
fmt = '%%.%df' % fieldw
result1 = (fmt + '(%.0f)e%d') % (no_int*10**(-fieldw), un_int, x_ex... | 1 |
d085fcbb6bd756d9d72dba317a7a93df | ff0c8ce71667068ebc36a8cf61319214 | Sniffing Langsung ############################# | {
int sd;
int res;
int saddr_size;
int data_size;
struct sockaddr saddr;
unsigned char *buffer;
t_sniffer sniffer;
fd_set fd_read;
buffer = malloc(sizeof(unsigned char *) * 65536);
sniffer.logfile = fopen("log.txt", "w");
fprintf(sniffer.logfile,"***LOGFILE(%s - %s)***\n", __DATE__, __TIME__);
if (sniffe... | 1 |
b0bc3d5031f65ade3e28685c72003d9d | 3f0295ac49b56bbdc156e456d5237f75 | Pause for microsecond increments. Function that will
pend the calling task for the specified number of microsecond.
See ST_init() for details on the granularity of this timer.
This function uses a mutex to protect against multiple tasks
using the timer at the same time. | void waitMicrosecond(uint32_t us) {
__asm("WMS_LOOP0: MOV R1, #6");
__asm("WMS_AGAIN: SUB R1, #1");
__asm(" CBZ R1, WMS_DONE1");
__asm(" NOP");
__asm(" B WMS_AGAIN");
__asm("WMS_DONE1: SUB R0, #1");
__asm(" CBZ R0, WMS_DONE0");
... | 0 |
026640036040a2dfb8746d5970ff8b42 | 39fb4d836d8407442404d91d4addb87f | 插入元素时先进左堆,然后取堆顶(最大元素)进入小顶堆,若数量过多,将右堆顶(最小元素)重新加入左堆 | {
if (maxH.empty()) {
maxH.push(num);
} else {
if (num <= maxH.top()) {
push_and_rebalance(maxH, minH, num, 1);
} else {
push_and_rebalance(minH, maxH, num, 0);
}
}
} | 0 |
ea58c857b07fb1a084922b65b68d810a | ce243d2be1aca37f1fe953ecef011844 | Sets the ignore_recoverings of this Subscription. | public class MechanismInfo
public void setSignRecover(boolean signRecover) {
setFlagBit(PKCS11Constants.CKF_SIGN_RECOVER, signRecover);
} | 0 |
7832feca426e8109545a2a52e5441b0d | b87198b7a9312d0b9b7515c06446cb23 | Revert forced low VM minimal background analysis for the current VS session. | public class VirtualMachine
public void vmForceOff()
{
} | 0 |
5c0bc0ebcf67fcd1deb2524bce5fbdae | d835364dba6b82998ad2d02674e62682 | 根据文章的id查询数据中的下一篇文章(用于显示上一篇和下一篇) | Article getAfterArticle(Integer id); | 1 |
c849016d26b2cfd910a4b6316c7b51b7 | 35c249f80cc05ee5033d43b5484396bf | Gets the total amount of sources. | public final class TableRowFilter extends ResultPanelModel
public int getTotalSources() {
return getFilteredSources() + _numSources;
} | 1 |
6ba64812939c13048b1cc32d9fe0bd75 | f7ba8cb593c1d2fc42ee816b8fd66975 | Create a new dictionary given two existing dictionaries,
by pivoting on a common language. | d_i_c_t = {}
for key in dict_1:
d_i_c_t[key] = dict_1[key]
for key in dict_2:
d_i_c_t[key] = dict_2[key]
return d_i_c_t | 0 |
273f904314db78677e57c3583ef7342c | d52aed75aa942bf54152ad0a968c4181 | Returns all home documents | public List<Home> findAllHomes() {
List<Home> homes = mongoTemplate.findAll(Home.class);
log.info("Number of homes in collecion >> " + homes.size());
return homes;
} | 1 |
6d93530ae1333e7eb1e20042b3c86c73 | 8c4310b70d0b78ac95ee35bd8c11e75b | Compute new mean and best objective function value. | class ObjectiveFunctionBase(object):
def feedback(self, x): | 0 |
0fe8a6a26c99dbfe389b551a95279ebe | c197cb4d03de1c5ac253590e8b6734c1 | Plays the given number of plays and returns statistics based on them. | class AIPlayer:
def play_game(self, num=1):
return [self._play_game() for i in range(num)] | 0 |
237a4d96b60f33f9bfb5c29f23788f22 | 4307c151084d8d609b4e0b2bc4d96d5f | delete a student struct | {
if (stu == NULL) {
return;
}
struct Student *st = *stu;
if (st != NULL) {
free(st);
*stu = NULL;
}
} | 1 |
68b71d867c1c015e3e865760e3d5fd4a | ea519794d96d69425080869a4d1a8fba | Gets the syntax errors for the given dsl. | class WSInterpreter
public static function getSyntaxErrors( $module, $text ) {
return self::invokeCodeParser( $text, $module, 'getSyntaxErrors' );
} | 1 |
e8d5944e2d5e249595f4a2179457f6fd | 80fe1c3634946edcfdfcbd411a46e714 | Method to subtract/add MP and changing values to min/max where neccessary | public abstract class Character : MonoBehaviour
public void Modify_mp(int amount)
{
if (amount != 0)
{
_mp += amount;
_mp = Math.Min(_skillMp, _mp);
_mp = Math.Max(0, _mp);
}
else
_mp = 0;
} | 1 |
2f54e3061e57b82f2e1bba0d5ff832fc | dde6363491d9a78d64e8093587524e4e | Gets the Java dependencies. | class MainJavaLibraryComponent(JarFilesMixin, SubdirectoryComponent):
def _deps(self):
return self.pom.lib_deps | 1 |
63104b4b2f268249333f6c9b6c705487 | f6d3491e750d3f184e4501ffa07b0b71 | Connects to the OBD2 ELM327 interface. | def ConnectELM327(ThisDisplay):
FlashVisuals.pop("MIL", None)
ThisDisplay.Buttons["MIL"].SetDown(False)
FlashVisuals["CONNECT"] = ThisDisplay.ELM327Info["CONNECT"]
try:
ThisDisplay.SetVisualText(ThisDisplay.ELM327Info, "INFO", "CONNECTING TO CAN BUS FOR OBDII COMMUNICATION...\n", False)
Result = ThisELM327.Conn... | 1 |
afce70d62e5b6dbc927f08a8a928f153 | 289b8dc8463b3a67869a46226b70599d | Gets a sequence of remote MediaStreams. | public Collection<? extends MediaSource> asMediaSources(); | 0 |
a1910a01d09d4c95fc07b38c21d40c30 | c5d3776ce9a348a5028be1b46bd67b0a | Returns the meta object for class '{@link org.xtext.example.mydsl.myAtl.StringLiteralExpCS <em>String Literal Exp CS</em>}'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | EClass getEnumLiteralExpCS(); | 0 |
2ecfe0870b4cf633731b5548210d6d30 | ba997972032ca2b301e467b881d2c901 | Set minimum range to trigger LED. | {
mDistance = ledit;
mDistance->setEnabled(false);
mDistance->setValidator(new CustomDoubleValidator(0, 99.99, 10));
} | 0 |
f8dc0fa424f7adb14136ce71d7510fe2 | 133d3eeaf7b6a495ab7293d43d57c81a | Test case for designAtomsCompatibilityGetLicense
. | class TestStaticApi(unittest.TestCase):
def test_api_v1_static_licenses_get(self):
pass | 0 |
6f81a70a4d8bb930927334b700fc6261 | 408723b22c8b5b8c2cde054bbe904739 | Returns a string representation of this peak bed object. Simply
appends the additional variables onto the end of the string generated
by the superclass. | class BEDRecord:
def __str__(self):
ret = '{}\t{}\t{}'.format(self.chrom, self.start, self.end)
l = self.nfields
if l > 3: ret += '\t{}'.format(self.name)
if l > 4: ret += '\t{}'.format(self.score)
if l > 5: ret += '\t{}'.format(self.strand)
if l > 6: ret += '\t{}'.format... | 1 |
4d9f91d53947001beae306d260f7f52b | b9c8e7fac9ca34ccd502c048e82e3c3d | Returns the unique color count of the stego image, or -1 if no encoding
has completed yet | public class FlateFilter extends PDFFilter
public int getColors() {
return colors;
} | 0 |
bb0d62b4f0c05e6513f1feca8d6696c6 | acf4a5ac2c99a4b9be45f818417cd159 | pearson | def Pearson(X,Y):
n = len(X)
if n < 10:
return None
x_sum = y_sum = x_sqr_sum = y_sqr_sum = product_sum = 0
for i in xrange(n):
x = X[i]
y = Y[i]
x_sum += x
x_sqr_sum += x*x
y_sum += y
y_sqr_sum += y*y
product_sum += x*y
n = float(n)
... | 1 |
0f09071670e2e6c266b696a681f481d0 | 1554a377c443a6bd75cf1865f85433a1 | No real good way to decide if there is a header so here we just check to see if the first character is a letter | namespace GameplayLib
public static class LazyCSVParser
private static bool CheckHead(string head)
=> head == "name;type;baseStr;baseAgi;baseInt;moveSpeed;baseArmor;minDmg;regeneration"; | 0 |
cbe0f805e71ad17526c0ba8710bbb92c | d535b46eeda6919a62272736cc0714b5 | 获得对应等级的建筑升级描述 | if (level == 0) {
level = 1
}
let cfg = ConfigManager.getItemByField(BarracksCfg, "type", type, { barracks_lv: level })
let desc = cfg.desc
let resStr = desc
let mat = desc.match(/{\w+}/g)
if (!mat) {
return resStr;
}
for (l... | 1 |
d478bea5cdce56d09a5cc7f8d3f71f15 | 3de2cd767b047df7ce5460d819591ff0 | Called when the path variable for this this TSPathShape has been changed from script or editor.) | namespace InputOutputLayer
void OnChanged(String path); | 1 |
bd976ba01d08e3de5616ebf1b35ba22f | 9ca9e2c36ad47ee3ed529aee3b4122de | メールアドレス1取得<br>
<br>
メールアドレス1を戻り値で返却する<br>
<br> | public class Mst0002s05Entity extends PageBaseEntity
public String getContractEmail1() {
return contractEmail1;
} | 1 |
6235da66e8b1fe12bf3e16ec3b9df031 | 27d4b95f1fc64a0e9fa607d0aa8a7858 | エリアの中心を通る横方向のライン上に、Avenueを生成し、シードとする。 | {
this.MapForRoom((int rx, int ry, Room room) => {
if (rx == this.size.x - 1) return;
int y = Random.Range(room.yMin, room.yMax);
int x1 = room.xMax;
int x2 = SearchChipToRight(x1, y, (uint)Flags.ReservedAisle);
if (x2 < 0) return;
MyGame.Util.LoopByRange(x1, x2... | 0 |
d78b402193ee455145967075743fb13b | f99abec83e429d84717c6363716586c5 | 更新总匹配次数 | MatchInfo db = matchDao.get(MatchInfo.class, matchId);
if (db.getMiHit() == null || db.getMiHit() == 0) {
db.setMiHit(1);
} else {
db.setMiHit(db.getMiHit() + 1);
}
matchDao.update(db);
return db;
} | 1 |
5a411cd1dd645c67274d121b7889cc0a | 9548a854a5eb2bbcf319ebe739c7e19c | !
\brief This powers down the rf chip
\author MS
\note | void
ISO14443BPowerOff(void)
{
unsigned char ucReg;
ucReg = TRF79x0ReadRegister(TRF79X0_CHIP_STATUS_CTRL_REG);
TRF79x0WriteRegister(TRF79X0_CHIP_STATUS_CTRL_REG,
ucReg & ~TRF79X0_STATUS_CTRL_RF_ON);
SysCtlDelay(((SysCtlClockGet() / 3) * 5) / 1000);
} | 1 |
03e0b11bc2c8fecefe2b24a78f964396 | da4710ebdbe6f2ee34eb6d9ac777cd94 | 大数相加, 支持正负 | namespace BigNum
public class BigInt : IComparable
public BigInt Add(BigInt target)
{
if (_negative)
{
if (!target._negative)
{
return _subtractCore(_bytes, target._bytes, true);
}
return _addCore(_by... | 1 |
adfe2915480aec2cf7955d1a85dd3aad | 98b3dacc8fb2ed12d85093d97bf37939 | 加载AGV小车 | {
int CurrentPx, CurrentPy;
PictureBox PAGVLabel = Config.AGVLabel[Config.AGVNum1[AGVNum]];
CalPoint(AGVPath, Config.AGVLoct1[AGVNum], out CurrentPx, out CurrentPy);
PAGVLabel.Top = CurrentPy - 6;
PAGVLabel.Left = CurrentPx - 6;
} | 0 |
81e24ea8e2ab1953286e45aab8077f4f | 88ecb1febc679e084d48c5f698604363 | Get the appropriate Side from a string | if str == 'S-Ni' or str == 'B-Ni':
return 0
if str == 'S-Nh' or str == 'B-Nh':
return 1
if str == 'S-Ns' or str == 'B-Ns':
return 2 | 1 |
4a8a32e61e5db0b2a575f02ed4cff7b4 | eca3ce568e60c6faab38ec48c4ac427b | Metoda wiążąca elementy interfejsu użytkownika ze zmiennymi wykorzystywanymi w kodzie. | bazaDanych = new TrasyPunktowaneDB();
grupy = bazaDanych.dajGrupyGorskie();
podgrupy = bazaDanych.dajPodgrupyGorskie();
stopnie = bazaDanych.dajStopnieTrudnosci();
zaleznosciGrupIPodgrup = bazaDanych.dajZaleznosciGrupIPodgrup();
niepelnosprawni = (CheckBox) findViewById(R... | 1 |
f02ca28636fc907655cffd288a46a375 | 0c5e0ebabf716fbbc3e2709cf878adf1 | Benchmark for the disk cache. | public class TestStringCache extends TestBase
public static void main(String... args) {
new TestStringCache().runBenchmark();
} | 0 |
27b40fca2f413a09e61e7b48f4c5fb49 | d4b16b85459ff5636e60a9ce248e3ee3 | [使用递归思想 ,计算n的阶乘] | @Slf4j
public class RecursionTest
public static int factorial(int n) {
if (n == 1) {
return 1;
} else {
return factorial(n - 1) * n;
}
} | 1 |
4b05b1fd0650fdb1e1ce6158cff1be3f | 66f533077f5f93494cf6add11c0a131e | returns int for how many times make appears in vector | int Recursion::getFrequencyOf(string make) const{
int frequency = 0;
int searchIndex = 0;
while (searchIndex < v.size()){
if ((v[searchIndex].getMake()) == make){
frequency++;
}
searchIndex++;
}
return frequency;
} | 1 |
c1e913ea58201fd951dddf6f55e703d5 | ab60bceb3e9f2aed9d5bfeb4aa838a29 | Finds the rights asynchronous. | [NotNull] string subject, [NotNull] string client,
[NotNull] string status, [NotNull] string type,
ImmutableArray<string> scopes, CancellationToken cancellationToken)
{
if (string.IsNullOrEmpty(subject))
{
throw new ArgumentException("T... | 1 |
6680849b3c2c7280123518e5eec0f6f6 | 571e2e777f087aacedc8cb7360045a7c | Marca como Seleccionado la Opcion Agregar Documentos | {
Documentos doc = SeleccionarDocumento();
if (doc != null)
{
_documentos.Add(doc);
RefrescarListDocumentos();
}
} | 0 |
68d056a9385fd61e643be0989d57c566 | a58ce7a4d533e51e1cc085296b335acb | turn escaped macro characters back into the real thing | g = match.group(1)
if g == '\\':
return '\\'
else:
return m.group(int(g)) | 1 |
5db39bf07a8f5672ed853158cf80bc94 | dd100829740db0837fc7ba45dd69a9d0 | A�ade un objeto al buz�n, el objeto se encola al final de los ya existentes | public void enqueue(T dato); | 1 |
e0e46afec2636878459bf43f30703fbe | 6da0422a4e96bff4841ea7c35ec68883 | This method is used to set the circuit type. | public class SdDatabase
public SdDatabase setCtype(String ctype) {
this.ctype = ctype;
return this;
} | 1 |
ea832fd1661f02cd25d0c2a72b7579f8 | 27e69578286824b76530ed28ddc9afdd | Select or deselects in a nodes tree all based on the nodes selection status | export class DynamicDataSource
handleTreeControl(change: SelectionChange<IgbeNode>) {
if (change.added) {
change.added.forEach(node => this.toggleNode(node, true));
}
if (change.removed) {
change.removed
.slice()
.reverse()
.forEach(node => this.toggleNode(node, false));
... | 1 |
6fce4475aaa8ca54b6f739c01e2bc979 | 95475ba0516d4e581beb15d9147fc11d | Get all paths of current CMS | public function getPaths(): array; | 1 |
f900291b00541863b5b4294efcea9cbb | 814b87ffaad4cac530b90ebb084d6cb3 | Helper function that clears the page collection and also the pages attached to the "visual root". | class ImageContainerBase(wx.Panel):
def ClearAll(self):
self._pagesInfoVec = []
self._nIndex = wx.NOT_FOUND | 1 |
9124569135a1f14c4391ad7ee11d32d1 | 731f9f20f5cefd03b8b32b376389a48a | Create a TrustManager that trusts the CAs in our KeyStore | TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance(
TrustManagerFactory.getDefaultAlgorithm());
trustManagerFactory.init((KeyStore) null);
TrustManager[] trustManagers = trustManagerFactory.getTrustManagers();
if (trustManagers.length != 1 || !(trus... | 0 |
506c6b800679ad0f70539f7477d854e3 | 0202b92a11bf42be7bd46f2cad462697 | .. note::
港澳台航线客座率指数 | class Macro():
def TaiwanDataCPI(self, indicID='', indicName='', beginDate='', endDate='', field=''):
code, result = self.client.getData(vs.TAIWANDATACPI%(indicID, indicName, beginDate, endDate, field))
return _ret_data(code, result) | 0 |
411464eb8028df64a2db502805f4646a | 88f1533a57cdb5537241c7dc9a4bc53c | 删除ContractCategory信息的方法 | public ModelAndView deleteCompCategory(Map<String, Object> model, Integer id) throws IOException{
ExtResult result = new ExtResult();
Integer i=compCategoryService.deleteCompCategory(id);
if(i>0){
result.setSuccess(true);
}
return printJson(result, model);
} | 0 |
57b94af09e463510b13539fa8b30a97f | 805f0c28fa0c3b65e7e17c25c49de517 | Fetches the {@link com.natalizioapps.monsignordoyle.objects.SchoolClass} for a specific
period
from shared preferences. | val preference = activity.getPreferences(Context.MODE_PRIVATE)
val rangeName = preference.getString(DateRangeService.dateRangeKey, Range.RECENT_MONTH.rangeName)
return create(rangeName)
} | 0 |
9d8e94a6a05bf0bb6210d544c459c149 | 4f2bc3914547e55b0ed3f56d118c5436 | Writes the y-coordinate of the body force. See dumpFlowData for format information. | {
for (int i = 0; i < npts; i++)
{
writeFloat(dos, y[i]);
}
if (leven == SAC.FALSE || iftype == SAC.IRLIM || iftype == SAC.IAMPH)
{
for (int i = 0; i < npts; i++)
{
writeFloat(dos, x[i]);
}
}
} | 1 |
1cb8f63b60cab43615f727d5472bb8eb | 35246318a6cf1bd17a20b5b449dd0ef1 | Вывод дива с компонентом начало | {
if ($this->allCategories[0]->lvl != $this->beginLvl) {
throw new Exception('Уровень вложенности первого элемента "lvl" не совпадает с "beginLvl".');
}
echo Html::beginTag('ul', $this->ul('main')) . PHP_EOL;
echo $this->createList($this->allCategories, $this->beginLv... | 0 |
a012c155ebe35d4dcbca55f7b8e1a131 | dda58058fc37bba1cb18e777219fe8cb | Set the text of an item of a treeview control | {
LV_ITEM lvitem = new LV_ITEM();
lvitem.mask = LVIF_TEXT | LVIF_IMAGE;
lvitem.iItem = itemindex;
lvitem.iSubItem = 1;
lvitem.iImage = imgindex;
if (!string.IsNullOrWhiteSpace(text))
{
lvitem.pszText =... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.