query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
fa845d616a2fbc9da50c78eaf18b0972 | 2d265f995ccf02d753253a506d457b02 | Get Wcf client instance. A new instance is created for each call then disposed and will not throw any exception. | namespace DevLib.ServiceModel
public static class WcfClientProxy<TChannel> where TChannel : class
public static TChannel GetPerCallUnthrowableInstance(string remoteUri, bool fromCaching = true)
{
return GetInstance<WcfClientPerCallUnthrowableClassBuilder<TChannel>>(PerCallUnthrowableInstanceDict... | 1 |
666e5f8371ff5daa79e5dcabd11e19f9 | 39edf81da18d71f296045310d6f63217 | Create a new console Progress Bar. | class Bar1(Progress):
def __init__(
self,
total=None,
*,
ratelimit=DEFAULT_RATELIMIT,
show_topic=True,
topic=None,
total_tostring=None,
value_tostring=None,
width=WIDTH_AUTO,
):
if not should_stde... | 1 |
99fce82ba52ff327b522420d26514cf2 | afbe6ea2e7a3bcd1c48e430766fc0aac | Sets the tuple at an index to the given tuple. | slotIndex = tupleId.tupleIndex
slotStart = self.header.offsetOfSlot(slotIndex)
slotEnd = slotStart + self.header.tupleSize
self.buffer[slotStart:slotEnd] = tupleData
return | 1 |
78b6d751be845133c263904f1a6058ad | 09a3da9328549ac3e5a84190635b3304 | Returns the result of a logical or operation of the children state. | def or_(*children):
return {'or': [child for child in children]} | 0 |
34538a5dbc69b5f6f592e6f34e824f9c | 34e09451d85ba09169a1465c134ab1e0 | 移除文件注释 | func ReplaceComment(noRemarkCont string) string {
lineRegPatten := `\/\/[^\n]*`
blockRegPatten := `\/\*.*?\*\/`
lineReg, _ := regexp.Compile(lineRegPatten)
blockReg, _ := regexp.Compile(blockRegPatten)
noRemarkCont = lineReg.ReplaceAllString(noRemarkCont, "")
noRemarkCont = blockReg.ReplaceAllString(noRemarkCont,... | 1 |
e86bfe943002c7395ed132a55bd6bfe4 | e74658721184b5fc3829ebcc1a4ae839 | Taken from a forum.
Create concatenated ranges of integers for multiple start/stop | if stop is None: stop = start; start = 0
if start is None: start = 0
if step is None: step = (start < stop) * 2 - 1
if (start < stop and step < 0) or (start > stop and step > 0):
seq = ()
else:
seq, next = (start,), start + step
while (next <... | 0 |
f02844a304dc3f666e404a0d7643be75 | b104f4125cbc47c68db23916a7ea88c4 | switch the data grid from all item to current item and from the opposite side | const dataIdIndex = this.frontDataSourceComponent.dataIdList.indexOf(this.contextmenuLayoutItemId);
const dataIdItem = this.frontDataSourceComponent.dataIdList[dataIdIndex];
if (flag === 'bottom') {
if (dataIdIndex === this.frontDataSourceComponent.dataIdList.length - 1) {
return;
}
... | 1 |
d81b8863d99e6eab54f22c1bdf44d223 | 4b5e9936522def4fe547233b99f3936d | 判断组件是否在DOM树里 | const me = this;
for(;dom!==undefined && dom!==me;dom=dom.parent);
return dom !== undefined;
} | 1 |
74f125c8f145ae69d0433bb42c0011ea | 34e413bfb87ba1d093dd3e80739c8043 | # Max available level for Outsiders with growing costs | {
long stockup_limit=0;
int lvl_limit=5;
stockup_limit = lvl_limit * 2000;
return (stockup_limit);
} | 0 |
72b7167b1f233d631bdfc94ced7fe67e | 3451c6267393a1c863d97f6a79837d61 | URL编码
<p>若系统不支持指定的编码字符集,则直接将input原样返回</p> | public abstract class StringUtils
public static String urlEncode(String input) {
try {
return URLEncoder.encode(input, "UTF-8");
} catch (UnsupportedEncodingException ignore) {
return input;
}
} | 1 |
3c31b02ea6db4eb608e8536548f52c4d | 523f8977d23e7f2b32568728ffea5735 | possible percepts:
'stench' - wumpus is adjacent
'breeze' - pit is adjacent
'empty' - nothing perceived in this cell
'bump' - hit a wall (calling function should not move the agent)
'glitter' - gold in cell | clearPercepts();
if (vcx == 0 && vcy == 0) {
addPercept(lPos1);
} else if (vcx == 1 && vcy == 0) {
addPercept(lPos2);
} else if (vcx == 0 && vcy == 1) {
addPercept(lPos3);
} else if (vcx == 1 && vcy == 1) {
addPercept(lPos4);... | 0 |
b2f43a348498a925a5550ba090b6afc6 | e8cdc7a068a7e0b419f12f15b8b08cdc | Initiates the asynchronous execution of the ListCopyJobs operation. | namespace Amazon.GlueDataBrew
IAsyncResult BeginListJobs(ListJobsRequest request, AsyncCallback callback, object state); | 0 |
ea7045cc94a855266d3cd21c7bce033a | 4226628594ae5af683e37964dff847d2 | Método que imprime o acervo de livros, ordenado em ordem crescente pro chave | public class Controle extends Thread
public void topLivros() {
Collections.sort(estante.livroCount, new Comparator<Elemento>() {
public int compare(Elemento elemento1, Elemento elemento2) {
return elemento2.quantidade
.compareTo(elemento1.quantidade);
}
});
for (int i = 1; i <= estante.l... | 0 |
777dfcfb884a7e144d50c247c64689cb | 9946d7c4fc3fd3ac131cf969fb735756 | Reports if SingularWS has a fast connection available. | NetworkInfo info = getNetworkInfo();
return (info != null && info.isConnected() && isConnectionFast(info.getType(), info.getSubtype()));
} | 1 |
dec261d0232ca3adbdf192e03a587394 | 18b9f1cc2e5e710c5f7cd60cdc46b75f | After the wave finishes it adds the products it produced to a queue. | class EoSip_modifier(ingester.Ingester):
#
# config version is like: name_floatVersion
#
def afterProductDone(self, processInfo):
pass | 0 |
97a016768266148b0cd4de7112c5148b | 95b81a6c29075deb8fc7d9934646cf78 | Transform the flattened correlation matrice back to matrices
for visualisation | class PipeLine:
def visualizeCorr(self):
DR.visualizeCorrMatrix(self.corrCof()) | 0 |
6cc1074548d5e572c62d2f087de4902c | 1bd80899638a0851ef021d5ac2a91ee5 | Function Name: Userdef_RIIC0_WaitReceiveFull
Description : Execute this function to wait until the conditions for the
Arguments : none
Return Value : none | void Userdef_RIIC0_WaitReceiveFull(void)
{
while (DEVDRV_FLAG_OFF == riic_receive_full_flg[DEVDRV_CH_0])
{
}
} | 1 |
38fee26954d5e5c6f5ed3dba72d34cc4 | f1d03b345910f09b694d2146ea43b983 | Shut-down the Zoe M8 GNSS chip. | self._open()
try:
version = self._connect()
self._write_long(CMD_SHUTDOWN)
time.sleep(0.01)
self.reset()
return version
finally:
self._close() | 1 |
1ce56d40bad857a1dc1c90bd2016ad99 | fd178b18c8e76c72da5e97717d97e6da | method to return the calculated empirical counts vector for gradient calculation | N = temp.size
cVArray = np.zeros(N)
index = 0
for T in np.nditer(temp):
cVArray[index] = cV(N, T, theta_D)
index += 1
return cVArray | 0 |
37dbec19849a152a8292c881fa78da55 | 23d8248b43c9eb9c50a7830e07a58058 | <sumary>
Get a new array of 'number' values from this vector array
</sumary> | public class ArrayVectorImpl implements ArrayVector
public double[] get() {
return this.aRealNum;
} | 0 |
f74cea44146dfc7e5a4999d542797cf3 | 4fc68550bdc479cd218b8a0fa7dca201 | 遍历所有事务实例进行事务提交 | @Component
public class CacheTransaction
public void commit() {
try {
String transactionId = Thread.currentThread().getName();
if(transactionId.startsWith(ServiceAspect.THREADNAMESTARTS)) {
ConcurrentHashMap<String, ConcurrentHashMap<String, Object>> ctransactionMap = transactionMap.get(transactionId);
... | 1 |
6e1f9a79b1be9eae71bc1cca382aa31f | b01e7e1ca26e838ef55a3fee74af1ca1 | Delete old files and generate all feeds | {
planetcsharpEntities db = new planetcsharpEntities();
var blogs = db.Blogs;
foreach (var blog in blogs)
{
CheckFeed(blog);
}
var maxPostID = db.Posts.Max(p => p.ID);
foreach (var post in db.Posts.Where(post => ... | 0 |
05d9227161c160926466f4c5653acff4 | 060afdd8996dee105c1997c75c4a952f | Tests that CV qnodes can compute the correct gradient when the same parameter is used
in multiple gates. | dev = qml.device("default.qubit", wires=2)
import torch
@qml.qnode(dev, interface=interface)
def circuit(x):
qml.RX(x[0], wires=[0])
qml.CNOT(wires=[0, 1])
return qml.expval(qml.PauliZ(0))
x = torch.tensor([0.543, 0.2], requires_grad=True)
... | 0 |
4c12f873b24a9b9be17eb49aea70990b | eb48a507b9fc0aa071d371d9b218d630 | Indicates whether the simulation is completed or not
Returns | class Simulation:
def is_ready(self):
return self.state == SimulationState.READY | 0 |
740ada2c2a2718e8bba138490e1a3a03 | 58f62898409927a03f21caa2a6272ac1 | return true if ter1 is a neighbor of ter2 | {
assert(m_graph != NULL);
assert((var1 >= 0) && (var1 < m_size));
assert((var1 >= 0) && (var1 < m_size));
return ((1 == m_graph[var1][var2]) ||
(3 == m_graph[var1][var2]));
} | 1 |
a404373c241e1699d0423d502d7f5ca1 | 17a2ee98bca064ba14a44438923d25dc | Get a string which uniquely represents the algorithms and keys used to encrypt the data. | namespace iTextSharp.text.pdf.security
public class PdfPKCS7
public virtual string GetEncryptionAlgorithm(); | 1 |
50540693fcb8e032d50969489de64986 | 87c9e575058e6c1399b4d0f395befcf8 | 根据O'Brien的混合法则计算在cracks中的层间出现分层时的总能量释放率
!!! 注意: 如果出现多个裂纹,计算结果是这几个裂纹一同扩展时的总能量释放率 | def energy(xxx_todo_changeme6, xxx_todo_changeme7,alpha):
(a,b) = xxx_todo_changeme6
(a2,b2) = xxx_todo_changeme7
E = STACKING_ENERGY[a,a2,b2,b]
return math.exp(-(alpha*E)/(BOLTZMANN*T)) | 0 |
a500441db029863ed0d8bd4d71d53843 | 1f39b5366d4946066d8ddb0fe4c4377f | 添加总部进货信息 | namespace Mvc易特进销存网页版.Controllers
public class HuiYuanZuBieController : Controller
public ContentResult TianJiaHuiYuanZuBie(string strZuBieMingCheng, string intDengJiZhi, string decChuShiJinE, string decChuShiJiFen, string decGouWuZheKou
)
{
int i = mymvcHuiYuanZuBie_Insert.TianJiaHu... | 0 |
4e85374dc2bc5733baf3da47534cb5eb | 2135b51ccd8cd6d07d4aeb7e728ab878 | Add one value to histogram. This increases the count of the relevant bin by 1 | public class IntHistogram
public void addValue(int v) {
int loc = (v-min)/width;
loc = (loc < buckets.length? loc: buckets.length-1);
buckets[loc]++;
totalVals++;
} | 1 |
c09e9e2f6cc1f215ad5d41e984ccb7f3 | e5d82a5c6ad4b125b50aee3ba15c41b6 | 创建活动日志
返回日志创建是否成功 | WithCreate withLogActivityTrace(Integer logActivityTrace); | 0 |
a344b9e8a3d588289c7b00dab8e48ddd | e7cbad3e5b7b831c06cb13cb2eeeac9d | funkcja rekurencyjna wyznaczajaca wektor wartosci wezlow podanego poddrzewa | uint32_t tree_to_vector(tnode *root, tree_vector *v, uint32_t *pos)
{
uint32_t tmp = *pos;
uint32_t color_count = 0;
v[tmp].color = root->color;
v[tmp].area = root->area;
if (root->topleft == NULL)
{
v[tmp].topleft = -1;
v[tmp].topright = -1;
v[tmp].botright = -1;
v[tmp].botleft = -1;
color_count++;
}
... | 1 |
c403002f640f91e453a6c1bffc016801 | ece6896fdd8918850e189273cd24377d | 根据国家获取地区 | class Trackapp extends TrackappBase
public function getRegions($country)
{
return $this->request('geo/regions', 'GET', ['country' => $country])->_requestContents;
} | 1 |
ba9a918adefdad16e9e972eeceea4cb8 | 14c7a6f83dde72e2b1497e5a26a412bd | !
@brief set operation mode via sysfs node | {
uint8_t status = 0;
uint8_t target_mode = (uint8_t)atoi(param[0]);
status = wifi_set_opmode(target_mode);
if (status == 0) {
printf("wifi_config_set_opmode(%d) Success, status=%d\n", (unsigned int)target_mode, status);
} else {
printf("wifi_config_set_opmode(%d) Error, status=%d\n... | 0 |
c026e88369c8922804bd5eca09a6b730 | 17a793821638e37b76cb31cf1b7fa485 | Opens a new document loaded from the provided url asynchronously in
the given context. | this._context = context;
this._callback = callback;
this._result = {
loaded: 0,
duration: 0,
firstPackageDuration: 0,
succeeded: true,
}
this._startTime = performance.now();
if (this._loader) {
this._loader.destr... | 1 |
5052f30ae9562186015fce645ba2ffd4 | 032f5a4c99391ee85df453db4eff29ae | Gets the index of the element that is current first in the buffer. | {
if (IsEmpty)
{
return -1;
}
var span = First.Span;
return span[0];
} | 0 |
828d8e32d707386da0617d6c9264b5f0 | d4eb12f213ec314db6bc0c9631f955d0 | 扩展方法:计算日期是年内的第几周,一周从星期天开始 | {
try
{
int dayOfYear = dtime.DayOfYear;
DateTime tempDate = new DateTime(dtime.Year, 1, 1);
int tempDayOfWeek = (int)tempDate.DayOfWeek;
tempDayOfWeek = tempDayOfWeek == 0 ? 7 : tempDayOfWeek;
... | 1 |
003d3cd2888351b64b48b2f394d07815 | 37e35b08f33f3a830ce25dcddb1559aa | Method converts RUB to EURO. | public class Converter
public int evroToRubli(int value) {
return value * 70;
} | 0 |
434a82d6cfb4cdbe6ca8e64c0f34095c | 3a8f4cfe5df76ec21a11bf6b216a0544 | Шейдер, заполняющий буфер глубины | glGenTextures(1, &tex);
glBindTexture(GL_TEXTURE_2D, tex);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL... | 0 |
abd55bfab10daf4ce382d5af31efa203 | d2b6810b3fd9aff165415d8733bdb6d0 | Removes first occurrence of specified spec. | public class TextBuilder implements CharSequence, Appendable, Builder<String>
public TextBuilder deleteFirst(final Matchers matcher) {
return replace(matcher, null, 0, this.indexes, 1);
} | 1 |
3472da8c7cceb842f22c8afc21f33e28 | ce3bc5e7d985480c012842d52427533f | Check to see if PrivateLinkServiceName property is set | namespace Amazon.EC2.Model
public partial class AssociateNatGatewayAddressRequest : AmazonEC2Request
internal bool IsSetPrivateIpAddresses()
{
return this._privateIpAddresses != null && this._privateIpAddresses.Count > 0;
} | 0 |
5ddc570c1d235a13ead99a69d824562d | ed458f8b244849f3a96d925660cf8bba | kihonsparec5を取得します。 | public class JuchuJuchuAddOnlyCatRecord extends CategoryDataCommonRecord
public String getBikou5Tx() {
return (String) get("BIKOU_5_TX");
} | 0 |
8cb81143bee793b96fcba6b79e7416d5 | b7b60be1560c724b112f7a4599428778 | Schedule a repeating task, with the specified gap between runs. | namespace CoreScheduler
public class Scheduler
public static ScheduledTask Schedule<T>(Action<T> callback, DateTime when, Repeat repeat)
{
return Schedule<T>(callback, null, default(T), when, repeat);
} | 1 |
c67c200d04e6fbf452a58212f29af3d8 | 4056dd01b2883a1013e1f4266daf2e2d | returns the time of day [from 12:00:01am to 11:59:59pm] as a range of 0 to 1 | class DateTime:
def time_of_day(self):
return self.time_of_day_value | 0 |
2ef40a8d6903d5242e2e47f1ee93d487 | 05bd072f427f7afba704cb23e89ba070 | Take packets of the software queue and queue them to the tx hardware | class Transmitter():
def run(self):
packetData = self.getPacketData()
packet = None
if self.lastPacket == None:
self.lastPacket = len(packetData)
try:
sessionPackets = []
for pid in range(self.lastPacket-self.firstPacket):
try:
packet = DataPacket(data=packetData[pid], pid=pid+self.firstPacke... | 0 |
47a0269e9488ffc0223da4d2b426df7a | 2ef33b4cb971c922ce1a63d13864a81a | 获取角色为销售的员工 | @Repository
public class SalesRepDao extends HibernateDao<SalesRep, Integer>{
public List<SalesRep> findSalesRep (String salesRoleType) {
return this.find(SELECT_PROJECT_SUPPORT, salesRoleType);
} | 1 |
d65c10ce89462601a6a7ecdb4e75f08f | d363eb03eb93ddd9e9bd9e012b03b269 | 使用决策树分析样本属性重要性, 返回属性权重排序和max属性组成 | def method_end():
features = get_features()
k=1/np.log(3)
yij=features.sum(axis=0)
pij=features/yij
test=pij*np.log(pij + 1e-5)
test=np.nan_to_num(test)
ej=-k*(test.sum(axis=0))
wi=(1-ej)/np.sum(1-ej)
print('w',wi)
scores = np.sum(features * wi,1)
sort_score = np.argsort(scor... | 0 |
f7a2c48298e22b451cd24231e4e07dfe | 8d4e3ab46de03746f09cb871f3ee8263 | Add one second wait command to the command stack. | class WinBuild(Checkout):
def add_delay_step(self, seconds):
self.addStep(steps.ShellCommand(
name='sleep',
command=['ping', '-n', seconds, 'localhost'])) | 1 |
00bd8188da2a3647322f2d612a01bdc8 | 9440b801d42aa99c03830fae4210c4e1 | If there are no 'ids' or 'entities' in store, it creates them. | export class TelegrafWikibase
async preload(keysOrEntityIds: readonly string[]): Promise<void> {
const entityIds = keysOrEntityIds.map(o => this.entityIdFromKey(o));
await this.#entityCache.getMany(entityIds);
} | 0 |
c82afa2abf4ce0d46491bfc9f34fafc5 | 0b69f29b5f7838da25f411a77e150d77 | 创建集群前预检查
Please refer to HUAWEI cloud API Explorer for details. | @ServiceMethod(returns = ReturnType.SINGLE)
ClusterCreateValidationResultInner validateClusterCreateRequest(
String location, ClusterCreateRequestValidationParameters parameters); | 1 |
7e9817b9a692ae1ccee76e5497c34cec | 2915ad084e3e218da5eda7122e5febd8 | Gère l'affichage des commenatires dans le recycler | FirebaseRecyclerOptions<CommentModel> options =
new FirebaseRecyclerOptions.Builder<CommentModel>()
.setQuery(mCommentReference, CommentModel.class).build();
mFirebaseAdapter = new FirebaseRecyclerAdapter<CommentModel, FirebaseCommentViewHolder>
(o... | 1 |
c033bfbb4937bad97a9fdb00446698f9 | 62c22c37b915d0fae21725e47d225539 | 捕获panic异常,会打印出异常处的函数名和错误信息 | defer func() {
if msg := recover(); msg != nil {
fmt.Println("get painc:", msg)
fmt.Println("recover program")
}
}()
panic("panic test")
} | 0 |
c641f3447385e0e504e3b0bb384e922e | 44396d54caee9ef3ab796a03a8681011 | Convert a PIL image to a PNG binary string. | def im_to_data(im):
with BytesIO() as buffer:
im.save(buffer, format='PNG')
data = buffer.getvalue()
return data | 1 |
b99c5298457880a180864b13078a74fa | f3fb09186d0bb8e7fe13ea6b48250eb8 | remove empty levels from the given PG | def pgprint_all(p):
prefix = ''
while p:
pgprint(p, prefix)
p = p['parent']
prefix += '^'
return 0 | 0 |
189441a29a0859e067c32b95276154be | e27af559303d8fe8c1452c4df551f762 | Retrieves the path to a file that has been shadow copied. | {
var shadowCopiedFile = fileProvider.Combine(shadowCopyDirectory, fileProvider.GetFileName(assemblyFile));
if (fileProvider.FileExists(shadowCopiedFile))
{
var areFilesIdentical = fileProvider.GetCreationTime(shadowCopiedFile).ToUniversalTime().Ticks >=
... | 1 |
9dcb9282eddc6e5b142dbf974b860cf2 | 8068393e7080f5d7271e77d254f0247a | from the calculated UB matrix, subject to constraints corresponding
to a specific unit cell type. This method AND the setParameters()
method MUST be implemented in derived classes to apply the constraints
for the cell type. | public abstract UnitCell getUnitCell(); | 0 |
baf185cf735630563d413c3f53fad714 | 82ed665192fe6be785419872f1625cc7 | 设置当前kitView不响应触摸事件
控件默认响应触摸事件
需要在子view的onViewCreated中调用 | abstract class AbsDokitView : DokitView, TouchProxy.OnTouchEventListener, DokitViewManager.DokitViewAttachedListener
fun detach() {
DokitViewManager.instance.detach(this)
} | 0 |
f130ff324330cf9fdd3e633b9ef57644 | abf4f770eec00bb620199e53ca9ea463 | Given an ASIN, get the URL of the large image
Returns a string | if(params==undefined) {
params = {Idtype:"ASIN"};
}
if($.isArray(element)) {
itemId = itemId.join(',');
}
params = {
ItemId:itemId,
ResponseGroup:"Small,Images"
};
aws_getItemLookup(
params,
function(response) {
drawMediumImage(element, response);
}
);
} | 0 |
1af19b6a6950d146778d80f8fc2081c7 | 8daa6488c4e2247c7f3f442c3e2d4f26 | fonction qui prend des photos pour le stop motion et qui les envoie au serveur | var form = new formdata.IncomingForm();
form.uploadDir = "/var/www/img/upload";
form.keepExtensions = true;
req.files = {};
req.data = {};
form.on('field',function (name, value) {
req.data[name] = value;
}).on('file', function (name, file) {
req.files[name] = file;
}).on('end', function(){
for(var k in re... | 0 |
287ed39aabc4cf316add29574b634860 | cc556f17355ca42df476769cfe474dc3 | Registers a property list with same type of an already registered one | namespace TamClass1 public class PropertyList
public void addProperty(PropertyListItem item) {
PropertyListItem current = getItem(item.name);
current.assign(item);
} | 0 |
d49a9cd85effdac5b1bb2a2ae1e642d3 | 11c96c81b40c18843124f23684f29770 | Stores the database system settings in the settings table. The settings table is recreated.
If the default collation method changes later then the database will be reindexed
and the new collation dll name will replace the existing one in the settings table.
Note that the function may also leave with some other database... | ISQLiteDatabase* db)
{
db->BeginTransaction();
AutoPtr<ISQLiteStatement> stmt;
db->CompileStatement(String("INSERT OR REPLACE INTO system(name,value) VALUES(?,?);"), (ISQLiteStatement**)&stmt);
LoadIntegerSetting(stmt, ISettingsSystem::SCREEN_OFF_TIMEOUT, R::integer::def_screen_off_timeout);
db->Se... | 0 |
ed4a943372b659da8d7814370fde0cf5 | 1a7c89850c2d989f9438ad35af4d9387 | 根据id号删除疾病的方法 可以批量删除 | {
$id = $request -> id;
$rw = DB::table('hkyl_disease') -> where('id',$id) -> first();
$res = DB::table('hkyl_disease') -> delete($id);
$num = DB::table('hkyl_cases') -> where('id',$rw -> cid) -> first();
$bl = $num -> num;
$bln['num'] = $bl - 1;
$blunm = DB::table('hkyl_ca... | 0 |
d13acc5563406d69f0362e1b9a35033e | 87916c1069f8743d840d056da7670d9d | Sets the type of this BGPGeneralSettingModel. | void setType(final String newType); | 1 |
15e27ad13234b1034cf10a019da1739a | 0bc6967f66b7fb5e294a67b466c62516 | Ajankohta kun kohde julkaistiin GMT-ajassa. | public class AjastinTehtava extends TimerTask{
@Override
public void run() {
this.kl.getMiinaharava().kasvataAikaa();
this.kl.paivita();
} | 0 |
3e3beeba4522fd35f672952af01370c6 | d076e1f4c12024e66ac902c1bee08162 | Выполнить действие асинхронно при положительном значении, вернуть результирующий ответ | namespace LeagueRecorder.Shared.Abstractions.Results
public class Result
[DebuggerStepThrough]
public static async Task<Result> CreateAsync(Func<Task> action)
{
Guard.AgainstNullArgument("action", action);
try
{
await action().ConfigureAwait(false)... | 1 |
95931e135a69bc894c5f8ea5d1adb2a5 | 5ae6802524543a26e495a05ff8b9c83d | Adds a new MultiValue to set the int[] specified by <paramref name="expression"/>. By default this MultiValue is not required.
The elements will be converted to int and stored in a collection of type Array. | {
var obj = new NamelessMultiArgConfig<TClass, int, int[]>(false, ToInt, Array);
config(obj);
return AddMultiValueCore(expression, obj);
} | 1 |
ed985a1b3dee7cd0373b6996f6b3d16a | 991b24166f0e11a077671863d917cfa6 | Metodissa tulostetaan päävalikon ohjeet. | public class GUI implements Runnable
@Override
public void run() {
JOptionPane.showMessageDialog(null, "Voit vaihtaa tekstikäyttöliittymään \n"
+ "muuttamalla rivejä main metodissa 'Hallitsija.java'. \n\n Sulje"
+ "ohjelma käyttäen 'Poistu' linkkiä. Muussa tapauksessa varasto... | 1 |
6ec824e2550af079a042523d0189df16 | 4eebc3944e45cea4244c8950a9b71faa | Sets the current font used when drawing text. | {
this.format = format;
if ( this.font != null )
this.font.Reset();
} | 0 |
c97071f883ba314956aa69dbfdafdf3e | f41603f297784f0a3f62f9c6b09e36dc | returns the number of elements in this collection. If this collection contains more
than Integer.MAX_VALUE elements, returns Integer.MAX_VALUE. | public final class BitImmutableCollection
public int size() {
return internal.size();
} | 0 |
eca36d1a518e585b61cda3a775346036 | cdbe1862811a1695586cc16b38b4de43 | Preferably don't use this; it might be removed in the future. | public class BuildOptions public static class BuildOptionsBuilder
@Deprecated(forRemoval = true)
public BuildOptionsBuilder setExperimental(Boolean value) {
return this;
} | 1 |
f6ad67520ebed1c37f8ec91b4bb126ce | 10b63dec5b78ae7c131eb66ea4873ca2 | Methode de récuperation du message sonore | public class Niveau1 extends FenetreAbstraite implements ActionListener{
protected String wavAide() {
return "../ressources/sons/aide.wav";
} | 1 |
40ae55e9abe33d0e1ba12099cb50d4fe | 4f041c4bf4037a4a343dc5af7230528f | Очистить все поля формы | namespace TemporaryCertificates
public partial class Офисы : Form
private void FieldsForm_Clear()
{
KodOffice.Text = "";
Address.Text = "";
Office.Text = "";
Telephone.Text = "";
KodOffice.Enabled = true;
KodOffice.Focus();
} | 1 |
6d846571acdebdafd7fbdaf45923824c | 90367a136a6bbb09bef806197ef55007 | Allows direct iteration over all squares | export class Board
*[Symbol.iterator]() {
for (let i = 0; i < this.WIDTH; i++) {
for (let j = 0; j < this.HEIGHT; j++) {
if (!this.has(i,j)) continue;
yield new Tile(i,j,this.get(i,j).color);
}
}
} | 1 |
bc5f767074bb7d403811ec946ca7647b | 53ec6ea54b88e1ad0b85cac871965061 | Returns the value of the '<em><b>Name Info</b></em>' attribute.
<!-- begin-user-doc -->
<p>
If the meaning of the '<em>Name Info</em>' attribute isn't clear,
there really should be more of a description here...
</p>
<!-- end-user-doc --> | String getNameInf(); | 1 |
61cfa06f6e4932471727bd846fb3ffbb | 75b430994e6a08bb08d3854c0807f59d | test if the two actor updates are equal | namespace Cauldron
bool PhysXFixedActor::operator==(const PhysXFixedActor & RHS)
{
unsigned int __idx__; __idx__ = 0;
if(_Density!=RHS._Density) return false;
if(_PhysXCache!=RHS._PhysXCache) return false;
if(!((*_PhysicalGeometry)==(*(RHS._PhysicalGeometry)))) return false;
if(_ActingGroup!=RHS._ActingGroup) retu... | 1 |
4cb521c978512cf1d860ddf185f486d6 | e5608a8344c0c0c006e5fa9bf3cc8fb5 | Deposita moedas nos baus | namespace ContaCorrente
class Conta
public void Deposito(int entrada)
{
Saldo = Saldo + entrada;
Console.WriteLine("Foi depositado:" + entrada);
} | 0 |
57f0973334a3a44f9d72488a46ca58c9 | a0ac915c888d4407be85366239e7925b | @brief translate the raw netlist into DesignDB status | if ( getDebugMode() > 0 ) {
std::cout << indent( getBaseIndent() + 0);
std::cout << "^ Layout::draw() called...\n";
}
int status = 0;
Device* d = NULL;
for (unsigned i = 0; i < Netlist.size(); ++i) {
d = Netlist.at(i);
if ( d != NULL ) {
if ( !d->isDrawn() ) status += d->draw();
}
}
isDrawn(true);
... | 0 |
71c29d63eec57dba7cbc62b08d992330 | eb68830204890a63a71aea3aa2fc3ea5 | Gets a specific implementation of a ShadowCamera setup. | self.camera_index = camera_index
self.resolution = resolution
if not lazy_setup:
self._setup() | 0 |
1d756c991a15d534b0aa87b48c0c6d80 | 1153d41a8101f656c59235a7ec57ec62 | Returns the element of source for which valueFunc is maximal
If there are several maxima the first one is returned
NaNs are never considered as maximum.
If the sequence is empty or consists only of NaNs the result is `defaultValue` | namespace DwrUtility.LinqExt
public static class MaxExtension
public static double? MaxValue<TSource>(this IEnumerable<TSource> source, Func<TSource, double?> selector)
{
return GetMaxValue(source, selector);
} | 0 |
5be74aa4514febdf8ed72ad2695bc395 | f515d4e345847e25f286248bd3bccd31 | Output stdout and stderr to console | const outputs: string[] = [];
const oldStdoutWrite = (process.stdout as any).__proto__.write;
const oldStdErrorWrite = (process.stderr as any).__proto__.write;
(process.stderr as any).__proto__.write = (process.stdout as any).__proto__.write = function (buffer, cb1?, cb2?) {
if (buffer && buffer... | 0 |
2ee4b0ad585f339e80c155f81cd26acd | 1c18deda825a810faebcb21f050ac2a7 | Stein Variational Gradient Descent
Sample by optimization with the
Stein Variational Gradient Descent with a Gaussian
kernel. | class ModelAndData:
def svi(self, iter=10, num_samples=10, seed=None, backend=pyro_backend, **kwargs):
return self.run_algo('svi', backend, iter, num_samples, seed, **kwargs) | 0 |
076c5cfe1021c848d67f809e495a4ce7 | 1550b2b494e2c0255cf3d53680d8ad28 | Call this method to override the default list of blacklisted devices
specified in WebRtcAudioUtils.BLACKLISTED_OPEN_SL_ES_MODELS.
Allows an app to take control over which devices to exclude from using
the OpenSL ES audio output path | public void addToWhitelist(@NonNull List<String> packageNames) {
try {
mService.addPowerSaveWhitelistApps(packageNames);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
} | 0 |
4df9ddd773d513b6da9b0c53d2159ddc | 5bf94bfbdab38b184598d8d9cb3f0ce1 | Represents a bounding box of WGS84 coordinates | export class LatLngBounds
constructor(sw?: LatLng | LatLngLiteral, ne?: LatLng | LatLngLiteral) {
} | 1 |
817ed17c8a68ec0224a139daccde803e | 466d7104bb0a9537e06bea760302cc84 | Create metadata for a collection of batches of profiles. | class HapiDataResponse():
def _collect_stats(cls, datasets, logger):
variables = None
count = 0
for dataset in datasets:
count += dataset.length
if not variables:
variables = list(dataset)
yield dataset
if logger:
logger.inf... | 0 |
61bc5d0b744d44b80404a9c7f25944f5 | 410d2fd2484ff1e2b2d57bf903774efe | 查询失败的迁移记录(单表单天查询) | @Service
public class SendFailServiceImpl implements SendFailService
@Override
public ResponseJson selectSendFailListAndPage(String accountId, String appName, String tempCode, String mobile, String dateOne, String dateTwo,
Integer pageIndex, Integer pageSize) {
PageObject<Map<String, Object>> page = new PageObjec... | 1 |
cf02d97d5d8393380f155c378c03e87b | 6b7d18f86d92812b2e1d24f709a8a64c | 根据ProadddatabaseID获取表 的对象ProaddInfo 的位置 | namespace CRM_BLL
public class BLLBaseCommon
public DataTable get_link_position_by_id(string id)
{
return DALBaseCommon.get_link_position_by_id(id);
} | 0 |
890725f2cd9a835a799af8a66b7153ea | 52a1c44a7bb9b9e9e1fe8fcbe4e255f1 | Destroys the HMD. | namespace UnityEngine.XR.MagicLeap
public sealed partial class MLEyes : MLAutoAPISingleton<MLEyes>
private class NativeBindings : MagicLeapNativeBindings
[DllImport(MLPerceptionClientDll, CallingConvention = CallingConvention.Cdecl)]
public static extern MLResult.Code MLEyeTrackingDestroy(ulong ... | 0 |
852e70c347c95bd5ed79cbd0f8d8946a | f6f379f26d658c0b57da0af8d817bcf2 | 二点間からラジアンを求める | export class MathUtil
public static radians(x1: number, y1: number, x2: number, y2: number): number {
let dx = x2 - x1;
let dy = y2 - y1;
return Math.atan2(dy, dx);
} | 1 |
89dfc6fdd1eff673ac559aaea9f9e8d2 | 604065335e360802c6aa2e398a62b5d1 | Guess a title given a file name. Examples: | label = file_dict.keys()[0]
guessed_extension = label.split('_')[-1]
file_data = file_dict[label]
filename = get_identifier(file_data['assetContentId'])
return '{0}.{1}'.format(filename, guessed_extension) | 0 |
ffc43dfd046501707e6ac13c8d97ce55 | 9176fee4ecef1b474a5f285fd850b716 | Check for valid permissions givent the storage context for a file, also taking
into account the location where the file was included within Moodle. | {
$result = false;
$path = removeDocRoot($strFilename);
global $USER;
if (!$isFile)
{
if ($USER->CanDoFileOperation("fm_view_listing", array(SITE_ID, $path)))
$result = true;
}
else
{
if ($USER->CanDoFileOperation('fm_view_file', array(SITE_ID,$path)) &&
($USER->CanDoOperation('edit_php') ... | 1 |
f5b9ca121a8f6d8fc6f1e4d2517ca4c1 | 5ae5291df135f9389aa57f34117a84e6 | 将inode写回到磁盘中 | void iupdate(struct i_node *inode){
iwrite(inode);
} | 1 |
519f6f35fdd87ebc58a08ea99739938e | 2d048cb3d1bf19139e7c46470ad57306 | converts the team abbreviation used by the website
to the one used by the database | def team_converter(team_id):
team_map = {
1: "Arsenal",
2: "Aston Villa",
3: "Bournemouth",
4: "Brentford",
5: "Brighton",
6: "Burnley",
7: "Chelsea",
8: "Crystal Palace",
9: "Everton",
10: "Fulham",
11: "Liverpool",
12:... | 0 |
2e4159c43720a8c6b892bed4d112cbb0 | 895b513e733a2854672374d62b74dd9c | Crea una calificacion con la información ingresada como parametro.
Retorna una calificacion creada. | export class CrearResenaComponent implements OnInit
califica(calificacion){
this.calificacion=calificacion
} | 0 |
394031f255e141eab9839903df703a1f | e4b75f09b590bdbf9f1c91c4206a6eb6 | Returns the name of the nth key in the list, or null if n is greater than or equal to the number of key/value pairs in the object. | public class RMGraph extends RMParentShape
public String getKey(int anIndex)
{
return _keys.get(anIndex);
} | 0 |
7d76f09ce616342481086f71f5723435 | 3480cf9e066f7dad98086da31f881c56 | get all ssh keys from a dictionary of UserCloudInfo objects | user_id = self.connection.request("/profile.json").object["user"]["id"]
response = self.connection.request("/users/%s/ssh_keys.json" % user_id)
ssh_keys = []
for ssh_key in response.object:
ssh_keys.append(self._to_key_pair(ssh_key["ssh_key"]))
return ssh_keys | 0 |
382df64a76271d5da45f7e0b5d8a14a7 | a8e5bca7a77900ae59c9d83c6444992a | Une représentation graphique du nombre de réclamation par type de réclamation (CMS, vague, …) | def circular_graphic(texts, type):
if type == 'tw':
labels = []
colors = []
data = texts['Label'].value_counts()
for i in data.index:
labels.append(i)
if i == 'Positive':
colors.append('lightgreen')
elif i == 'Negative':
... | 0 |
98eb7a80ce36c75b91cd163a8b62e04f | 0e15f5157b3a8923d78225a1c69ff027 | 获取角色状态map | public class CacheUtil
public static Map<String,Object> getShiroRolesMap(){
Map<String,Object> rolesMap = (Map<String, Object>) get(KEY_SHIRO_ROLES_MAP);
return rolesMap;
} | 1 |
11076e8493ce5ae2b30963bc9375ea7a | ee699e3dfd8093e444ed32c04beacb1d | Returns the capability ID | @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2019-09-26T13:42:29.731930-05:00[America/Chicago]")
public class MozuAppDevContractsApplicationCapabilityType
@ApiModelProperty(value = "")
public Integer getCapabilityTypeId() {
return capabilityTypeId;
} | 1 |
246271a27378c3e1a9462d111d3aadd0 | 8659a65434c491f34ec2f8c36acaa040 | Gets the Offset of the Last Snapshot, as found in the main Segment's metadata. | public class JournalSegment<E> implements AutoCloseable
public long lastIndex() {
return writer.getLastIndex();
} | 0 |
7a8756fd1e991566d1e0a006b4f6e2c6 | 164d1daf85e5c29bae5713369d37e5b3 | Checking whether removing rows several times at once is working. | public void removeTest1()
{
for (int i = 0; i < 20; i++)
{
for (int j = 0; j < 10; j++)
{
removeTest(i);
}
}
} | 1 |
8349bed78afa1be6b6cceefaf4fa5d97 | 9b1b431ad91fdee0151e61ed7f4438e0 | Returns the function that is the interpolation of a 2-D field. | class BaseVectorField2D(Animation):
def f(self, xy, *t) -> None:
raise NotImplementedError | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.