query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
0823a53a5bd4b6649915c942e1cf15ae | 12e65372d77bcc509d0b77fc0f3220cb | ValidateStruct validating struct based on their field tags. | type nestedAgain struct {
FieldI string `cfg:"{'name':'field-i','desc':'a string field','default':'field-i default'}"`
FieldII string `cfg:"{'name':'field-ii','desc':'a nested field','default':'field-ii default'}"`
}
type nested struct {
FieldA string `cfg:"{'name':'field-a','desc':'a string field','defa... | 0 |
69fa59384bf440456a6f4dd09348d247 | 982cc36c7547ea086fcc5c6f15843f5e | Gets the registered candidates iterator. | namespace PKW.Contracts
[OperationContract]
IEnumerable<Candidate> GetCandidates(); | 1 |
6183f075a44af76bfed5be5ad618ad52 | aaa37e6711df1d10c7b0730924dd1bda | ЧТЕНИЕ ЗНАЧЕНИЯ ИЗ РЕГИСТРА | {
if(rInReg)
{
copyValue(rInReg);
}
else
{
Error.printError(ERROR_NULL, FILE_BITREG);
}
} | 1 |
d070a604d048024988de10423aee339a | ffdf73d02f6208fbe082571ccbeacb0b | Use a relatively low heap size since nothing the worker does should require much memory. | impl Builder
pub fn new() -> Self {
Self {
max_threads: 512,
thread_name: Cow::Borrowed("blocking-worker"),
thread_stack_size: None,
idle_timeout: Duration::from_secs(10),
}
} | 0 |
6c54d6ab454aae6fc91d0c7980e7bfca | deb93274879f8066427cb11ad96188b7 | 使用模型检测运动区域,并对检测的区域去噪、连接 | def detection(img):
speed_limit = cv2.CascadeClassifier('USspeedlimit/cascade.xml')
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
height, weight = img.shape[:2]
roi_gray = np.zeros((height, weight, 1), np.uint8)
speed = speed_limit.detectMultiScale(gray)
region = []
for (x, y, w, h) in speed:... | 0 |
9208cc13dde5a7f07741acfe88073056 | cfc975621fcab999f177058c63fbcd69 | given a team, find their draft captain | {
if ($id > 0) { $this->id = $id; }
$q = sprintf("SELECT tm.name teamname, p.`first_name`, p.`last_name`, p.`email`, tm.`confirmed_on` FROM tournament_team tm JOIN tournament_person p ON tm.`id`=p.`team_id` WHERE p.`type`='captain' AND tm.`confirmed`=1 AND tm.`tournament_id`=%d",$this->id);
... | 1 |
b98afe9fba4b64b4a10db8c2336e2eb8 | beb0ce984cce0076f8056b29f068ed3c | Get all directives for the currently active state | export class ProjectSymbols
getDirectives(): DirectiveSymbol[] {
return this.extractProgramSymbols()
.filter(symbol => this.metadataResolver.isDirective(symbol))
.map(
symbol =>
new DirectiveSymbol(
this.program,
symbol,
this.metadataResolver,
... | 1 |
c39db1280e0824329aa0435f19dfc11d | 4bc662ce0b21bbb4ad749c11b6de4b65 | 将dic中的内容保存在Filename.xlsx中 | def saveDic(filename, dic):
with open(filename, "w", encoding="utf-8") as f:
for key in dic:
f.write(key + "," + dic[key] + "\n") | 0 |
e9e65b5e53cd3d7b0133505945076060 | 82573f99687de7f0db5a98803dde1b52 | 将A[lo, hi)随机打乱 | public final class RefinedRandom
public static void shuffle(Object[] a, int lo, int hi) {
validateNotNull(a);
validateSubarrayIndices(lo, hi, a.length);
for (int i = lo; i < hi; i++) {
int r = i + uniform(hi-i);
Object temp = a[i];
a[i] = a[r];
... | 1 |
f4da1fe188c0d47cc556d73ac885e536 | 8dae90407e98ecec628394f4e3b9fe83 | Accessor to get the save icon | if (isSaving) {
return (<CircularProgress size={30}/>)
} else {
return (
<Button onClick={saveChanges} color="primary">
<CheckIcon/>
</Button>)
}
} | 0 |
be89467e269d1d4d4099f377446e1f06 | 659854fdbcebd151a1616224b7b91ccc | Gets the projection criteria. | public getProjection(): Projection {
return this.projection;
} | 1 |
35d74975c48b43ddfe5c4e3cd8459571 | 4e6ac4e53672c81ceab0b790391becd5 | Determine the powerup associated with the given index | public class Controller : MonoBehaviour
public int getPowerUpIndex(){
return powerUpIndex;
} | 0 |
495d2db6c66175c8523aaa814e003d95 | cb432d1522d34a559322a729198d3ac2 | Configurable property for default receiver count. | public class SmtpServerConfiguration public static final class Builder
public Builder setMaxRecipients(int maxRecipients) {
configuration.maxRecipients = maxRecipients;
return this;
} | 1 |
f68742d6419a81b8849cc0ad5e4185d2 | 622cb859bd2dc2ac9484b984cbd1e4a7 | Retrieve the deals related to a company. | class OrganizationsApi
def organizations_id_deals_get(id, opts = {})
organizations_id_deals_get_with_http_info(id, opts)
end | 1 |
235f73334dfa20fe5de97a90349df0c8 | 768201c671bcb27a6de54239df58d16a | A recursive array key setter
Use this when you have multiple-levels array,
'key2' => 'value2];
to store value(ie: ['a', 'b', 'c']
will point to $array['a']['b']['c'])
if the key already exists, the old value of the array,
else null | class VarArray
public static function set($key, $value, &$inArray)
{
if (is_null($key)) {
$inArray = $value;
}
$keys = explode('.', $key);
while (count($keys) > 1) {
$key = array_shift($keys);
if (! isset($inArray[$key]) || ! is_array($inArray[$key... | 1 |
5b5066e936661daff9d0b94867128dba | cc00bfa09b901f8cf42686da5956db9b | \brief Gets the angular velocity damping.
\author dcofer
\date 3/2/2011 | public class ode
[DllImport("ode")]
public static extern dReal dWorldGetLinearDamping(dWorldID w); | 0 |
922548bd298e16b527786b4729604cbc | 9ba44b20e5d7ed97c0803aba8c99fe85 | Construct a `CameraGeometry` by guessing the appropriate quantities
from a list of pixel positions. | geom = read_single_camera_geometry(filename, camera_name)
readout = read_single_camera_readout(filename, camera_name)
return CameraDescription(camera_name, geometry=geom, readout=readout) | 0 |
3ff03895f4d0e73fe65fa4d4889f078c | d9efb05d95d08db604998489a627e8c4 | Get scope hierarchy. | final List<JkScope> list = new LinkedList<JkScope>();
list.add(this);
for (final JkScope scope : this.extendedScopes) {
for (final JkScope jkScope : scope.ancestorScopes()) {
if (!list.contains(jkScope)) {
list.add(jkScope);
}
... | 1 |
065dd9fc23de9299f874f00b3531e471 | f1a36d02187cf08017b289217ebea91f | 通过SQL中获取from_id对应的to_id | int operOfFromId=0;
int size=this.oneQueryList.size();
for(int i=0;i<size;i++){
List list=(List)this.oneQueryList.get(i);
String oper=(String)list.get(0);
if(oper.equals(this.isFROM)){
operOfFromId=i;
break;
}
}
return operOfFromId;
} | 0 |
bd2f6f08be47ee1158a5058ff50e4377 | 29ae7d5101dd59062f79ccb9a8c137b0 | 构建INSERT语句
<para>需返回自增列</para> | StringBuilder Tsql = new StringBuilder ();
if (dbparameters?.Count > 0) {
Tsql.Append ($" INSERT INTO {tbinfo.TableName} ({string.Join (",", dbparameters.Keys.ToArray ())}) VALUES ({string.Join (",", dbparameters.Values.ToList().Select(m=>m.ParameterName).ToArray ())}... | 1 |
fe1c56c9e057da17b7c61873090c97ae | ec8a79c3b0149c616b136cdb463e0251 | 为被选择的对象添加一个引用实体属性值 | public class XMLUtil
private static void setReferenceTypeMember(Element element,Object object, Field field) {
try {
Object _entity = getEntity(element);
field.set(object, _entity);
} catch (Exception e) {
throw new RuntimeException(e);
}
} | 1 |
25b0a121f1a752543ed7e7b100a1390a | a5aad4bf3cde7d7459bc367e12dd76cf | 기울이기 방향에 따라, 구슬의 우선순위를 구하는 함수 | dx,dy=dir.x-source.x,dir.y-source.y
if dx<0:dx*=-1
if dy<0:dy*=-1
if dx>dy:
if dir.x > source.x: output=3
else: output=1
else:
if dir.y>source.y: output=2
else: output=0
return output | 1 |
13df7887eac1d101d0a6bf65446df486 | 1c4f43b65c09e9c6cf83ce0d865aa0a3 | Permite saltar al personaje principal hacia el lado que esté mirando | public class Control_Laberinto : MonoBehaviour
private void OnTriggerEnter(Collider other)
{
if (other.name == "entrada")
{
ScripPersonaje.NumeroCamara = 1;
}
if (other.name == "muro")
{
ScripPersonaje.NumeroCamara = 3;
}
if (other.name... | 0 |
80e1526c22fb95c6f046f52e9a31d35b | de62532359d99e9581ab62eda143a33a | translate a concrete "abstract" value into a character | final class CharacterMapper
public char apply(final int i); | 1 |
1e2b76ff49d62a16103abda25afd08e9 | 25dc696cb57ac36621828f4b92ffa405 | Online learning method | class Learner():
def learn(self):
raise NotImplementedError | 0 |
04983660865870f7bb558c60b6f91457 | 70842481aade44bbea08735ec32373f6 | saves value from misc text box to a file | def mySaveFile(self): | 0 |
eb58c51573c943a4b81d0f30bf4907ee | 211ae8bbfcee1b69ffcfc60a2dbbc15a | Initialisation du référentiel de decôtes par défaut | void initialise_liaisons()
{
#ifndef AVEUGLE
type_liaison *liaison_courante;
liaison_courante = sc->deb_liaison;
while (liaison_courante != NULL)
{
initialise_coudes_liaison(liaison_courante);
liaison_courante = liaison_courante->s;
}
#endif
} | 0 |
9294385dd1cb2794dab4390c7eda8fad | 31baaf20b549a5932b4e43c69e278397 | Roberts 交叉边缘检测 | class PeakCount():
def roberts_cross(self, ims):
Rx = torch.tensor([[0.0, 1.0],
[-1.0, 0.0]])
Ry = torch.tensor([[1.0, 0.0],
[0.0, -1.0]])
Rx = Rx[None, None]
Ry = Ry[None, None]
p0 = F.conv2d(ims[..., :-1, :-1], Rx) ** 2
... | 1 |
bb1d29d771fd6d8d8f4be231bd88ba75 | 3f5add2977feb1957ac0e46cc26e0f24 | Filter the message by resource type. | type = this.typeToMap[type] || type;
if (!this.resourceMap[type]) {
return [];
}
return Object.keys(this.resourceMap[type])
.map(function(key) {
return this.resourceMap[type][key];
}, this)
.filter(function(r) {
return r;
});
} | 1 |
61cadea21b2a8b3a6f8a7feae4dea1eb | fbd458589773e6f74681457063eb8fbb | Performs the usual and customary operations on a socket, such
as read or accept. | public class AprSocketContext
protected void onSocket(@SuppressWarnings("unused") AprSocket s) {
} | 0 |
a59244e1d2e9b34fb19bd408d98d1fca | 2042693d99bedb8832b1be030f852504 | 转换成 / 模式的Jvm类描述 | StringBuilder sb = new StringBuilder(clazzName);
boolean classNameHasStarted = false;
for (int i=0; i<sb.length(); i++) {
if (sb.charAt(i) == '.') {
if (!classNameHasStarted)
sb.setCharAt(i, '/');
if (Character.isUpperCase(sb.charAt(i+1)))
classNameHasStarted = true;
}
}
return sb.toSt... | 1 |
e0caf9e96bd19972ba4c524a682cb50b | 42b4c85ab45c333a26e5593a57ad7954 | =================
R_RotateForViewer
Sets up the modelview matrix for a given viewParm
================= | void RB_SetViewMVPM(void)
{
matrix_t ortho;
MatrixOrthogonalProjection(ortho,
backEnd.viewParms.viewportX, backEnd.viewParms.viewportX + backEnd.viewParms.viewportWidth,
backEnd.viewParms.viewportY, backEnd.viewParms.viewportY + backEnd.viewParms.viewportHeight,... | 0 |
72152c78f7dc80811c3ccb426a527c4c | 09eca60c139fb65371194ea61727b671 | 获取协程运行状态 | static enum State get_status(schedule_t *s,int id)
{
coroutine_t *c=s->coroutines[id];
if(c==NULL)
return DEAD;
return c->state;
} | 1 |
3f3305ddb6f8100bdf7959f4f6180add | dcda096580baa01444a1d4c10af76b47 | Check if a substring is cointained within a given string | public class Board
boolean frame_Check(String substr,String mainString) {
int counterVariable = 0;
for (int i = 0; i < substr.length(); i++) {
if (mainString.indexOf(substr.charAt(i)) != -1) {
counterVariable += 1;
}
}
return (counterVariable == su... | 0 |
a39c4af527d6fd8124bec2c21290fdd4 | e7d15d845b88a37e6dc5fb076700ea88 | Verifica se o usuario logado é o dono do assunto da pagina atual | def check_topic_owner(owner, current_user):
if owner != current_user:
raise Http404 | 1 |
4b6242023ea103b7e074736c1f8ce576 | 2778c9e9799bcaff0cefec954d87dc89 | 爬取电影top250 | movie_url = "https://movie.douban.com/top250?start={}&filter="
movie_num = 0
movie_name = '名称'
movie_year = '年份'
movie_country = '国家'
movie_type = '类型'
movie_director = '导演'
movie_assess = '评价人数'
movie_score = '评分'
f = open('movies.csv', 'w', newline='', encoding='utf-8')
wri... | 1 |
421f78dabc249a0196bf40489cc6395e | 2f3f7e5853de48e5d0fef037465297dd | 开通银行账户获取验证码点击事件 | public void onClick(View widget) {
Intent intent = new Intent(Intent.ACTION_DIAL, Uri.parse("tel:" + bankPhoneString));
startActivity(intent);
} | 0 |
8e9a1863afd62abcec8ebf3669c45b7d | f023ea134227d7af27b5e3cf15ab1e50 | Whether the `eta.core.data.AttributeContainer` of attributes is
compliant with the schema. | res = True
for (key, val) in self._attrs.iteritems():
if key not in self._optional_attrs:
if val is None:
res = False
return res | 1 |
d6b9a423e498dbb13b1cc47dad95cf7e | a14a26ffd16f5b523573f81f314a8444 | Gets the nutzung id. | public class ApiNippouDeleteForm extends AbstractApiForm
public String getNipSid() {
return nipSid__;
} | 0 |
144ac91cc75c08cdc5293aa7f9108986 | d3ed9e6ffb1cbc459e126a96bc675041 | 每隔INTERVAL秒,ajax异步请求一次数据,更新data值 | setInterval(() => {
this.setState({
comments: [
{body: 'good', author: "zs"},
{body: 'no', author: "ii"}
]
})
},1000)
} | 0 |
7dce0e0bbc67f22311e3c23cc2a70a78 | 709d487586f00ee15f6abf500c7ea640 | this method is to flat the 3D array into 1D array | flat = []
for i in x:
for ii in i:
flat.append(ii)
return flat | 0 |
130094fe7fe19d21e017636e8fb13317 | 9d58904ac5b3662ef1e6a2ec8128f203 | 利润计算 | insurance = {}
calculated_salary = []
t = datetime.now()
cal_time = datetime.strftime(t, '%Y-%m-%d %H:%M:%S')
for k in insurance_tmp:
try:
insurance[k] = float(insurance_tmp[k])
except TypeError:
print('./homework3 -c <config_filename> -d <user_filename> -o <output_filename>')
sys.exit(2)
... | 0 |
ef8bbdf8588dc0978a3abc90f0ae7310 | f6b7157811de21dacd52dde721dfe224 | 预览审批附件
<p>
此接口需配合钉盘JSAPI使用,实现在企业应用内预览、下载审批附件的功能。使用方法如下:
<p>
(1)调用本文接口,授权用户预览、下载审批附件,获取到space_id。每一次预览审批附件前,都需要调用该接口进行授权。
<p>
(2)使用参数space_id,调用“H5微应用-JSAPI-预览钉盘文件”或“小程序-钉盘文件预览”后,获取钉盘附件的信息。
<p>
请求地址:https://oapi.dingtalk.com/topapi/processinstance/cspace/preview?access_token=ACCESS_TOKEN
<p>
接口文档:https://ding-doc.dingta... | async function previewFiles (params) {
return request({
url: "/api/v4/index/previewFiles",
method: 'POST',
data: params,
})
} | 1 |
2cef5331296f6434ced22294de4c9544 | 31f98951817d00a3d889b09f79e9346e | Attribute for a structure element that indicates the phonetic alphabet used by a {@link PdfName#Phoneme} attribute.
Applies to the structure element and its children, except where overridden by a child structure element.
<p>This value has meaning only for the PDF documents of version <b>2.0 and higher</b>.</p>
attribu... | public class Vocabulary
public void setPhAmMp3(String value) {
this.phAmMp3 = value;
} | 0 |
f0979c8d7e923c0303040bbbde4d80ac | 8eaf28c975afadc6348d755eba49e15e | Courseオブジェクトのリストを受け取ってjsonを返す | res_json="["
i=1
num_arr.each do |val|
if i != 1
res_json = res_json + ", "
end
if val != nil
res_json = res_json + val.to_s
else
res_json = res_json + "0"
end
i = i+1
end
res_json+="]"
return res_json
end | 0 |
97ee4a857c96ee6a1d089fa897c68f92 | fa284a7c64f962f61b5136dc982dbca5 | When TF iterates over examples, map the labels and IDs from integers back to strings. | class Hwu64Sub(datasets.GeneratorBasedBuilder):
def _generate_examples(self, samples):
for i, eg in enumerate(samples):
yield i, {'id': str(i), 'text': eg['text'], 'label': eg['category']} | 0 |
fcd9c11d5a42ff0102ae89c4b126807c | b3b17572ea732f69a1d3d44b50572d35 | 获取楼栋相关宿舍号 | List<BDormitory> getBDormitoryListByCol(@Param("buildingNo")String buildingNo, @Param("storey")String storey); | 1 |
4d494f7ec1d5d69152cf6e1b7571f720 | 8bd33f389055aed1e30e102e4905fd02 | 插入用户对该资讯的收藏状态 | def insert_collect(request, user_id, image_id):
user = User.objects.filter(id=user_id)
image = Image.objects.filter(image_id=image_id)
collect = UserCollect.objects.filter(user=user[0],image=image[0])
if len(collect) <=0 and len(user)>0 and len(image)>0:
collect = UserCollect(user=user[0],image=... | 1 |
b9bc9fa0b9e8ca45d07e796b4327d5f2 | 170458f6ff81bca6f4c6fadb8e96f3d3 | Bind Region dropdownlist when response is sent back from server | namespace YieldProphet
public class wfViewRegions : System.Web.UI.Page
private void cboRegions_SelectedIndexChanged(object sender, System.EventArgs e)
{
FillValueList();
} | 0 |
2e9e8309cb770271d0c2ad356aa4e7d3 | fec984112f2293e13ba8ed2aa211fba8 | 正则获取商品名称 | class TbCollection extends TbBase
protected function regExGoods($content)
{
preg_match_all('/<li class="item-wrap.+?>(.+?)<\/li>/s', $content, $goodsListLi);
$goodsList = array();
if (isset($goodsListLi[1]) && !empty($goodsListLi[1])) {
foreach ($goodsListLi[1] as $_li) {
... | 1 |
156da9c0940ac4b08537c67a729c3f40 | b9eab13facbe45a501ec9e296700b472 | Generate report and convert it by using report loader to load report. | public function generate(ReportSource $reportSource): GeneratedReport; | 0 |
a34e31aa6c8048cf04549a82477ffd5b | 0efcdc875975fc282a707276f5d3fb05 | Exit a parse tree produced by scriptingLanguageParser#command1ver4. | class scriptingLanguageListener(ParseTreeListener):
# This function the INITIALIZATION function called when the Listener is instantiated
def enterCommand8ver4(self, ctx):
pass | 0 |
20d3209c7f056cd6c925eca56daf774e | 0e28c629fffb9733c7416a5228d6baba | Increases the state vector for the given client id
the id of the client that executed an operation. | public class KvsWriter extends KvsOperation implements KvsExecutable
public void incrementWriteForClientWithIp(String clientIp){
HashMap<String, Integer> YCSBClientsWriteStatistics= ApplicationContext.getmYcsbClientsStatisticsMapSoFar();
if( YCSBClientsWriteStatistics.isEmpty()){
ApplicationContext.updatemYcsbC... | 1 |
ca8fa2f19c3254e663d413a819a485da | 1c49bf03c0a897ef5dd8cdd23488516b | Set virtual network configuration of the API Management service. | return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, networkVirtualApplianceName, parameters).map(new Func1<ServiceResponse<NetworkVirtualApplianceInner>, NetworkVirtualApplianceInner>() {
@Override
public NetworkVirtualApplianceInner call(ServiceResponse<NetworkVirtualA... | 0 |
c24f9e01882e9944a19fc28ce79854e0 | f3dba0145f578069883a4cb5e49c5e9d | int型二次元配列をバイナリファイルに出力 | def generateBinary(outputlist, filename):
np.array(outputlist, np.uint8).tofile(filename) | 0 |
aa17e7d00d6ec03d7000308b9d310029 | 0e7c62e7c27622269a8b13de5441ed41 | Get all driver devices of a specific class | namespace Voltmeter.Services
public abstract class WinUsb
[DllImport("setupapi.dll", SetLastError = true)]
protected static extern IntPtr SetupDiGetClassDevs(ref Guid gClass, [MarshalAs(UnmanagedType.LPStr)] string strEnumerator, IntPtr hParent, DeviceInfoFlags nFlags); | 1 |
4a7668da34cd202afb2a05a0e3ea7e15 | 2897dba9e1ddfcb85e985c51c61897af | Checks if every box is occupied | public class PlayerAI extends Player
public boolean allSquaresOccupied(final PlayerType[][] pos) {
for (int i = 0; i < 3; i++) {
for (int j = 0; j < 3; j++) {
if (pos[i][j] == PlayerType.NONE) {
return false;
}
}
}
return true;
} | 1 |
bf6d4347059b71c20b3bfd3ffc633c0a | f3c66fe1e7e87ab340f1054e3d4b44b1 | show songs, where there is at least one common author
of song authors and to-user-assigned authors | int count = 0;
string key_lower = lowercase(key);
for (int i=1; i<num_of_songs; i++) {
string artist_lower = lowercase(database[i].artist);
if(artist_lower.find(key_lower) != artist_lower.npos){
os << database[i];
count++;
}
}
return count;
} | 0 |
938d056b188ba0e3f8e32edead9625e3 | 3d29076db766325e0123e181c6694c57 | Extracts the country code out of an international phone number. | try:
phone_number = phonenumbers.parse(phone_number)
except phonenumbers.phonenumberutil.NumberParseException:
return None
return phone_number.country_code | 1 |
254de8600fb10a6467852e1d53dd38c1 | b620de3b22c5adcef6ff38c0f2c32f80 | Convert each image into a PDF page and merge all pages to one PDF file | let (width, height) = get_img_mm_size(&images[0]);
let (doc, page, layer) =
PdfDocument::new("PDF_Document_title", Mm(width), Mm(height), "Layer 1");
for (index, image) in images.iter().enumerate() {
let (page, layer) = if index > 0 {
doc.add_page(Mm(width), Mm(height), "Page 2, ... | 1 |
7ff9ff3c2c0a5a005af71419b731fa6d | f5159ce0f919e9a5300f4fab90eb3342 | 获取企业用户购买数量和已使用数量 | class Test extends Controller
public function count(Request $request)
{
$data = explode("\r\n",file_get_contents($this->path));
$test_code = 'MACAddress=1';
$prod_code = 'MACAddress=2';
$test_data = [];
$prod_data = [];
foreach($data as $row) {
if($row == ... | 0 |
b8666a62430a95c7d8bb4e7cd558f599 | e66c00e38eda639581ce318275ccf0f2 | attempts to pass validation and create project on Enter or click of Add Button | let {actions} = this.props;
if (this.refs.form.isValid()) {
actions.saveProject(this.refs.form.getFormParams());
}
} | 1 |
391ef311f8acb53776ec5b1126b21fe1 | 8158132a241e8e6371b8f831ea3ef86e | Get refCommandeFournisseur | class Product
public function getRefFournisseur()
{
return $this->refFournisseur;
} | 0 |
5c8a99a23cca0e566b1e184f08195d28 | 7087a697c87af6a55e9efd3006a078b4 | CALCULER LE NOMBRE DE REPONSES D UN SONDAGE | {
$responseQuery="SELECT *
FROM $this->_name
WHERE user_id='".$user_id."' and poll_id='".$poll_id."'";
if(($count=$this->getNbRows($responseQuery))>0)
{
$responseArray=$this->getQuery($responseQuery,true);
return $responseArray;
}
else
... | 0 |
2bd654ab9de65196ec8788f19a7d6990 | 6310a77e0a9f4fccbecef3eff59f490c | 获取玩家今天的押注情况 | {
$aParam = $request->all();
if(strtotime($aParam['timeStart']) == strtotime(date('Y-m-d'))){
$aData = Bets::UserTodaySum($aParam);
}else {
if (isset($aParam['game_id']) && array_key_exists('game_id', $aParam))
$aData = ReportBetMember::reportQuerySum(... | 1 |
5ab01439249da1ca323fe384a7ec86ff | 80b70ac6104cc3740ffde9a3aea6be2d | 只要有消息来了,遍历map,给map中的每个成员广播此消息 | synchronized (getInstance().mMap) {
for (Map.Entry<String, Handler> entry : getInstance().mMap
.entrySet()) {
Handler handler = entry.getValue();
sendMessage(handler, msgId, msgObj);
}
}
} | 1 |
cb3dcacb5e896f5134769ec1f45cfae2 | f18783f3d09bef9248e1f77c876362b5 | Retrieve session info cache identifier | class Cache(object):
def session_id(self):
if not self._session_id:
sid = os.getenv(SID)
if sid:
self._session_id = sid
self._from_cache = True
else:
self._session_id = str(os.getpid())
return self._session_id | 1 |
4f58973701d0e00c062fef4a3c3eeda5 | 49ea07571a517f8435b76a64d739d963 | Reveal all connected empty spaces with no adjacent mines
Invalid spaces do nothing | revealed = []
zero_spaces = []
check_stack = [position]
checked = []
while len(check_stack) > 0:
pos = x, y = check_stack.pop()
if self.get_num_mines_around_position(x, y) == 0:
zero_spaces.append(pos)
for ay in range(y-1, y... | 1 |
5f0671f6dc6f7c3b8f1f873ba1597d70 | 32cff8c20d4f0033124cb24bc9f7bd39 | move userFish right | {
if (((Location.Y + 10) < (System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height - 100 - FishSize.Height)) && (Location.X > 10))
Location = new Point(Location.X - (int)(15 * Math.Cos(315 * (Math.PI / 180))),
Location.Y - (int)(10 * Math.Sin(315 * (Math.PI / 180))))... | 0 |
9a2c62cecf97a713e7664700ff0bc0a0 | 12a0ab4784c78b5569b767b55e385b07 | Verifies that a claim with no samhsa diagnosis, procedure, or item-level HCPCS codes does
trigger filtering because the code array is empty and therefore does not contain known systems. | public void matchOutpatientClaimsByIcd9Procedure() throws FHIRException {
SamhsaMatcher matcher = new SamhsaMatcher();
ExplanationOfBenefit sampleEob = getSampleAClaim(ClaimType.OUTPATIENT);
Coding sampleEobDiagnosis = sampleEob.getProcedureFirstRep().getProcedureCodeableConcept().getCodingFirstRep();
sampleEo... | 0 |
db87c98b0871e75b659296e8319d3b64 | 384dce1be658aeab69c3d91e4e3919e8 | bubble sort in descending order | {
int i,j;
int temp;
printf("You Chose option 3");
printf("\n These are your numbers in acending order \n");
for(i=0; i<SIZE-1; i++)
{
for(j=0; j<SIZE-i-1; j++)
{
if(*(sort + j) > *(sort + j+1))
{
temp = *(sort + j);
*(sort ... | 0 |
f377de66f6a48bdd6ca157633341e1c7 | 3fd83be7ec9fc984c32e10c26acf7bfe | Převede seznam bitů na celé nezáporné číslo. | function bitsToNum(bitArray) {
return bitArray.reduce(function (s, n) { return s * 2 + n; }, 0);
} | 1 |
ff39b1f332a0b280504c7cd6a4d41bd6 | 0aa0d873aa84166584ab69cfa63d3810 | Deletes a specific userBankData of a user on the database | public int deleteUserBank(Long id); | 1 |
38b6d93dbc7a9a3949ec6181cca5284d | a1f8a35abdc462ef7e3ecd47e367205d | Create a tropospheric model from explicit weather data | throw(InvalidParameter)
{
try
{
TropModel::setWeather(wx);
validWeather = true;
valid = validWeather && validHeights && validRxHeight;
}
catch(InvalidParameter& e)
{
valid = validWeather = false;
GPSTK_RETHROW(e);
}
} | 1 |
990cd55eafa67727a315ced12b2a99f1 | d605c3bf49cd27470870f9be1861bd72 | 渲染Level Info数据 | {
bigLevelID = levelInfo.bigLevelID;
levelID = levelInfo.levelID;
for(int i=0;i<row;i++)
{
for(int j=0;j<column;j++)
{
gridPoints[i,j].gridState = levelInfo.gridPoints[i*column+j];
gridPoints[i,j].UpdataGrid();
}
}
monsterPathGrids.Clear();
for(int i=0;i<levelInfo.monsterPathPoints.Count... | 1 |
011d14d3bc9fbd6ca4a95409823bd722 | 57902a603763584a2a2ca585f1141355 | Test opening a session from an invalid token. | class TestAuthClient(IBMQTestCase):
def test_invalid_token(self, qe_token, qe_url):
qe_token = 'INVALID_TOKEN'
with self.assertRaises(ApiError):
_ = AuthClient(qe_token, qe_url) | 1 |
e5de099f3d1192e75e60c28296b91a88 | 4e2d6f86288a53655467d700039b030c | 职业条件 | if work in self.work_name.keys():
if self.edu_range[self.education][3] >= self.edu_range[self.work_need[work][0]][3]:
skill_require = []
for skill in self.work_need[work][1]:
if skill in self.skill.keys():
continue
else:
return skill
if self.work_name[self.work] + 1 >= self.work_... | 1 |
dee4df8873147252924b899c14f054a9 | 1645654c695a8a37481c2d069068a042 | <summary>
This approach uses an internal an internal bit array
to store the characters seen in the string. If we already
have that characters bit set when we see it again, return
false to indicate the string does not contain all unique characters.
</summary>
<complexity>
<run-time>O(N)</run-time>
<space>O(1)</space>
</... | namespace CSInterviewPractise
public static class ArraysAndStrings
public static bool UniqueCharacters(string s)
{
HashSet<char> uniques = new HashSet<char>(s);
return uniques.Count == s.Length;
} | 0 |
f91b34ee4b1984ca80148626835b427b | 9a688a53f68edffc78b7c0d22e4f683e | CBTHostApp initialization | {
av_app_cb.audio_route = AUDIO_ROUTE_UART;
av_app_cb.audio_sf = DEFAULT_SAMPLE_FREQUENCY;
av_app_cb.audio_chcfg = DEFAULT_CHANNEL_CONFIG;
av_app_cb.audio_stream_state = AV_STREAM_STATE_STOPPED;
av_app_cb.is_host_streaming = WICED_FALSE;
hci_control_audio_init();
if ( av_app_memIni... | 1 |
79b87f4f3e281190a656f7007d23ca0f | a3c4d288db8119268d8e418ac00a5781 | Consulta para mostrar el conteo del tipo de problema registrado en el mes | {
$data = Ticket::select(DB::raw('count(tipoProblema) as Registros'),'tipoProblema')
->where(DB::raw('date_format(Fecha,"%m")'),'=',DB::raw('MONTH(CURDATE())'))
->groupby('tipoProblema')
->get();
return $data;
} | 1 |
303fcf3b0edee1d7c055693cff97cd8b | c12fb0053a2462f1d8203bf8afef51a8 | This function returns the associated note | namespace dart namespace biomechanics
std::string SubjectOnDisk::getNotes()
{
return mNotes;
} | 1 |
12c538d53816a221223a2bb075e0fff2 | b9776eeef882e05216b996ffe7aa4230 | Returns an array of all group ids | class ForumEntity extends EntityAccess
public function getModeratorGroupsAsIdArray($includeParents = false)
{
$output = array();
$thisForum = $this;
while (isset($thisForum) && $thisForum->getForum_id() > 1) {
foreach ($thisForum->getModeratorGroups() as $moderatorGroup) {
... | 1 |
7513d5ccd329b72ed1ba2b281fe4824b | 477352f346bc1a60a3f7a0fb1e72667a | Agrega Candy | @Service
public class CandyService
private int insertCandy(Candy candy) {
return candyDao.insertCandy(candy);
} | 1 |
a881a4bf9d768ff5b62a285ea3170455 | 28197790e9da4649338803e6dccf5fea | Set the camera position and size using a rect in world coordinates. | local minX, minY = GetRectMinX(rect), GetRectMinY(rect)
local maxX, maxY = GetRectMaxX(rect), GetRectMaxY(rect)
if player then
if gP.isLocalPlayer(player) then
SetCameraBounds(minX, minY, minX, maxY, maxX, maxY, maxX, minY)
end
else
SetCameraBounds(minX, minY, minX, m... | 1 |
b57aca3f628ac9a28e1f747fb84bd521 | 783465330888c42a7cc05d05959a9871 | Returns model root node (QSceneObjectProxy) | class Tree(Widget):
def _get_root(self):
return self.model.root | 1 |
650d1b85fb735a65dcf495947455906d | 1cdd5abfa05cc9d1cd6b56dd5b49c257 | Initializes the algolia client and index variables. | this._searchClient = algoliasearch(
process.env.APPLICATION_ID,
process.env.API_KEY
);
this._searchInstance = instantsearch({
indexName: process.env.INDEX_NAME,
searchClient: this._searchClient,
});
} | 1 |
3aa5dfcff26a60e835e4bba6cc383e03 | 5ca98d92b4c3b4fbdf2779fc5c69deb4 | 是否同一天。同一天返回true ,否则返回false | if (DT1._day == DT2._day&&DT1._month == DT2._month&&DT1._year == DT2._year) return true;
else return false;
} | 1 |
11c03e11c5fed7f7bb69354d4a6aa65c | c17ef8d9c2e018bfa824c4f695ad39f2 | Função para incluir um anuncio na lista de desejos | [HttpPost]
[ProducesResponseType(typeof(int), 200)]
[ProducesResponseType(typeof(string), 400)]
public IActionResult Inserir([FromBody]AnunciosDomain Anuncios)
{
try
{
return Ok(_repo.Inserir(Anuncios));
}
catch (Sys... | 0 |
82dc656b3439ef182823f48d198d8db4 | 456f2f23fbe0f6522ed1365c1144f98d | =======================Start Server============================= | server = socketServer(serverAddress)
print >> sys.stderr, 'server is starting on %s port %s' % serverAddress
try:
while True:
conn, addr = server.accept()
session = setSession()
print >> sys.stderr, 'client connected with ip : %s' % str(addr)
thrd = threading.Thread(target=handler, args=(conn, addr, s... | 1 |
a2708d7fd38986801e3427f8d146e6ad | 9d895b2ac36bf1fd8d7dd9bf59bbe6ff | bring up a file upload window | global $_, $ONESCRIPT, $ipath, $param1, $INPUT_NUONCE, $UPLOAD_FIELDS;
echo '<h2>'.hsc($_['Upload_File']).'</h2>';
echo '<p>';
echo hsc($_['upload_txt_03']).' '.ini_get('upload_max_filesize').' '.hsc($_['upload_txt_01']).'<br>';
echo hsc($_['upload_txt_04']).' '.ini_get('post_max_size') .' '.hsc($_['upload_tx... | 1 |
f52e6d5d01d7215bc1b6349203aa7cf0 | d7dae675c687a6d4d607e8f6ab319db3 | Receive device certificate from host. | class Communicator(socketserver.TCPServer):
def __exchange_certificate(self, com_address):
com_certificate = self.__get_certificate(com_address, self.certificate)
return self.register_certificate(com_certificate) | 0 |
f67436b54e5d1d040e41de5eb1952547 | 682fd88ecf7698d5ec1fa04e7a65f743 | Функция генерирует матрицу заданной длины со случайными числами | int** create_random_matrix(int n)
{
int** m = (int**)malloc(n*sizeof(int*));
for (int i = 0; i < n; ++i)
{
m[i] = (int*)malloc(n*sizeof(int));
for (int j = 0; j < n; ++j)
{
m[i][j] = rand() % 5;
}
}
return m;
} | 1 |
261c27be4040c8ed7268cf6d87743a25 | 0820def72713e9ff5b0e9787dc11b929 | Configures the maximum packet size that can be used when generating an
SNMP request.
The desired packet size. | public final class Login7 implements TokenStream, ClientMessage public static class Builder
public Builder packetSize(int packetSize) {
this.packetSize = packetSize;
return this;
} | 1 |
103bae501a83a9b06db2f9422fec39b6 | 78ef37035da1800710d6480d085ce7cb | Проверяет является ли пользователь победителем | public function isWinner(): bool; | 1 |
f16be9d67158926a9a4b0d82b32baf92 | 733d795241e44d3df10709ee205b59df | Enable the hooks for taking screenshots. | public function enableHooks(); | 1 |
a53ac0bd60d82442fcfa3b35f765726b | 852062683bd9c390321ae323c36fb2a2 | close or minimize app depending on user settings | class MainWindow(QMainWindow):
def closeEvent(self, event):
if self.check_box.isChecked():
event.ignore()
self.hide()
self.tray_icon.showMessage(
"Tray Program",
"Application was minimized to Tray",
QSystemTrayIcon.Information,
... | 1 |
3e77534d3c858518dc9488c9a53ed4d6 | d7e8060b5d918fa9a9d2f3eea28b0cd9 | 修改店铺库存预警数 | public class LingbaoGift implements Serializable
public void setWarningStore(Integer warningStore) {
this.warningStore = warningStore;
} | 1 |
953a9fc04610dcdbde928cac7dc43a7c | 05d1ce8f404bf0b4acf8e2799755d0cc | TVクリップキー一覧is_forceフラグを取得. | class Response
public function getForceModal(): array
{
return $_SESSION['__data']['force_modal'] ?? [];
} | 0 |
c3c42f8f2f5ed915b6d5728e143f0ed6 | 02cb395cd84e35aa93fe16639b82c13c | Funcion para extraer datos de un archivo .csv | del lst[:]
print("Cargando archivo ....")
t1_start = process_time()
dialect = csv.excel()
dialect.delimiter=sep
with open(file, encoding="utf-8-sig") as csvfile:
spamreader = csv.DictReader(csvfile, dialect=dialect)
for row in spamreader:
lst.append(row)
t1_stop... | 1 |
b9fff89dd969e52c37a238c2829b8fb8 | 738f63a8ac066a340963cee11180de87 | 清空客户信息和外呼反馈表。 | function clearDemanderCustomerUpdate() {
$("#dcuLinkname").val("");
$("#dcuLinkphone").val("");
$("dcuBirth").val("");
$("#dcuCompany").val("");
$("#dcuBusiness").val("");
$("#dcuId").val("");
$("#dcuTipsInfo").html("");
} | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.