query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
fb30c8e1bd330107192b0deb050b3043 | 54f08caf25c0d417d30e4cbf52e5a155 | 通过Exchange给绑定的队列发消息 | abstract class MessageQueueModel
public function bindExchange($exchang_name, $route_key) {
$this->queue->bind($exchang_name, $route_key);
return $this;
} | 0 |
3c2e964fbc263f391042e6d000857c9e | 2126a1387b3627bbe83abec1a0fc03d5 | Static method to validate the input. | namespace ProjectAssistant.App.ViewModels
[Export]
[ImplementPropertyChanged]
[PartCreationPolicy(CreationPolicy.Shared)]
public class ReferenceAssMgrViewModel : ContentBase<ReferenceAssMgrViewModel, Project>
public override bool ValidateInput()
{
return string.IsNullOrEmpty(this.Re... | 0 |
47ff67425df470b7bb007607070c0dea | a2df3e1a7d82ffec61ceeb81ff9df3ce | Given a list of BIO-2 labels, return list of corresponding BILOU labels. | tags1 = ("B-BRAWLER", "I-BRAWLER", "I-BRAWLER")
assert iob_to_biluo(tags1) == ["B-BRAWLER", "I-BRAWLER", "L-BRAWLER"]
tags2 = ("I-ORG", "I-ORG", "B-ORG")
assert iob_to_biluo(tags2) == ["B-ORG", "L-ORG", "U-ORG"]
tags3 = ("B-PERSON", "I-PERSON", "B-PERSON")
assert iob_to_biluo(tags3) == ["B-PERSO... | 1 |
c8cf256bdb80ec64155172a1ea4de165 | b00305f041f1b325e2986cdb02edbf44 | Gets the axis used by the specified component instance to classify the specified Silverpeas
object. If there is no axis configured to be used in the component instance, then all PdC axis
are returned as axis that can be used for classifying a content. If the content is already
classified, then the values on invariant a... | int absoluteAxis;
if (axis == LINE_AXIS) {
absoluteAxis = o.isHorizontal() ? X_AXIS : Y_AXIS;
}
else if (axis == PAGE_AXIS) {
absoluteAxis = o.isHorizontal() ? Y_AXIS : X_AXIS;
}
else {
absoluteAxis = axis;
}
... | 0 |
abacacb0c8b6782d597eba8b7f4e765f | 2876c45be932818db153e056c14e92f9 | 32bitPCM形式を8bit形式に変換(注意:返り値は32bit整数だが、8bit範囲でクリップされている) | {
int mask;
int seg;
unsigned char aval;
if (pcm_val >= 0) {
mask = 0xD5;
} else {
mask = 0x55;
pcm_val = -pcm_val - 8;
}
seg = search(pcm_val, seg_end, 8);
if (seg >= 8)
return (0x7F ^ mask);
else {
aval = seg << SEG_SHIFT;
if (seg < 2)
aval |= (pcm_val >> 4) & QUANT_MASK;
else
ava... | 0 |
f2b851c305dcae7f78852bff497bad84 | 89e93084717f37a4f10a9928daf8f8b7 | Redirects the user to the front page on successful login. | class GuardAuthenticator extends AbstractGuardAuthenticator
public function onAuthenticationSuccess(Request $request, TokenInterface $token, $providerKey)
{
return new RedirectResponse($this->router->generate('openidconnect_homepage'));
} | 1 |
7f6f63ad673b347c19cda8b410f44f62 | 9384e27e2fbb9232199c82fe07e09aad | Sign
Given the file to sign and the key in PEM format returns
the file signed with ECDSA. | const args = ["timestamp"];
if (!undef(options.url))
args.push("/t", options.url);
if (!undef(options.rfcUrl))
args.push("/tr", options.rfcUrl);
if (!undef(options.sealUrl))
args.push("/tseal", options.sealUrl);
if (!undef(options.algorithm))
args.push("/td", options.... | 0 |
a21c689dfe10a916a67c4b9bb10f43ea | 7e592e4b79ac093c9edc46c6f4370f55 | 指定されたDependencyObjectからビジュアルツリーをさかのぼり、
Genericで指定された型のオブジェクトを検索します。
【CAUTION!!】DataGridColumnを探す事はできません!)<br/>
検索できなかった時はnullを返します。<br/> | namespace OneTo50.Utility
public class TreeViewHelper
public static T FindVisualChild<T>(DependencyObject root) where T : class
{
var queue = new Queue<DependencyObject>();
queue.Enqueue(root);
while (queue.Count > 0)
{
DependencyObject current... | 1 |
189ddeca34e257fe6cc6d36bc8ecca3e | 0c0192030faff46bfd4ac65a96ac7cd7 | we want to check whether or not the user id and auth tokens are present in local storage | class NewPoll extends React.Component
componentDidMount() {
if (localStorage.getItem("token")) {
axios.post('/authenticate', {}, { headers: { Authorization: localStorage.getItem("token") } })
.catch((error) => (console.log(error)))
.then((response) => {
this.setState({
u... | 1 |
331bc5c88447aaf3652627458c395745 | 27062a9192ba1e03f460626de28f4921 | Trouver tous les enseignants qui ont selectionnés ce voeu pour une période donnée | $requete = $this->select()->where('etatEnseignant = ?', 1);
if($page == null){
return $this->fetchAll($requete);
} else {
$paginator = new Zend_Paginator(new Zend_Paginator_Adapter_DbTableSelect($requete));
$paginator ->setItemCountPerPage($this->_nbItemByPage);
$paginator ->setCurrentPageNumber($page... | 0 |
c2d2cab28a293d4b0016bd0ae2ca3306 | b51635c79dd1b34b477f823e1020cbdb | 社員1のスコア入力欄Enter押下時処理。 | namespace D9020
[SmartPart]
public partial class F9020 : BaseSmartPart
private void ValueTextBox_KeyPress(object sender, KeyPressEventArgs e)
{
if (e.KeyChar == (char)13)
{
e.Handled = true;
}
} | 1 |
56de36bcaf4d788761f38f19eec5de97 | 29bc831788a098776cf4766846979218 | Send a Midi SONG POSITION message, with a 14-bit position (always for all channels) | songNumber = 0
songLength = 3
songNote1 = 75
songNote1Length = 60
songNote2 = 55
songNote2Length = 30
data = struct.pack('>BBBBBBBBB', _SONG_, songNumber, songLength,\
songNote1, songNote1Length, songNote2, \
so... | 0 |
61e527821934466016b6183c14a9b59d | daa1e79f210ea857737f5ada6245ea8c | 동호회 개설비 지불 페이지 | @RequestMapping(value = { "membership" }, method = RequestMethod.GET)
public String membership(HttpServletRequest request, HttpServletResponse response, Model model) {
logger.info("membership");
Account account = AccountUtils.getAccount();
model.addAttribute("account", account);
model.addAttribute("accountTit... | 0 |
394cda5a8e737f1ea94e65787808f458 | 9ee93a657afbf2a63e9c83e9c61829e3 | Gibt zurueck, ob in dem Graphen mindestens 1 FlipFlops vorhanden ist. | public boolean istVoll(); | 0 |
db06af32ba71916461f032f52d2c76c9 | 36a28526b6e6be2912e9a59d9513dc0f | verificaçao sobre o dia da semana para saber se tem aula ou é final de semana | int diaDaSemana = 1;
switch (diaDaSemana) {
case 1:
System.out.println("Domingo");
break;
case 2:
System.out.println("Segunda - feira");
break;
case 3:
System.out.println("Terça - feira"... | 0 |
50daf32e76b12c87652313a5a673615c | 61c218ff122818156e07f9aca22f6cf1 | Checks whether the given account type has any transfer types that requires authorization | namespace JetBlack.MessageBus.AuthFeedBus.Distributor.Interactors
public class InteractorManager : IDisposable
private bool IsAuthorizationRequired(string feed)
{
return _repository.DistributorRole.FeedRoles.ContainsKey(feed);
} | 0 |
cef708fe83a27a31ecbc68f8d592cb2f | c0965a87bfd9ddc22ade51c81551f788 | 显示所有主机 | class HostsController
def show
@hosts = Host.all
end | 1 |
c0274205843877f0adbcdfcaef99ba2b | 23da3be6f775072bc2eb27f0662d6ef9 | Constant-time selection between two EdwardsPoints. | BigInteger q, SMState state, int version)
throws SMException
{
BigInteger temp2 = state.g3.modPow(d1, MODULUS_S);
BigInteger temp3 = p.modPow(c, MODULUS_S);
BigInteger temp1 = temp2.multiply(temp3).mod(MODULUS_S);
temp2 = state.g1.modPow(d1, MODULUS_S);
... | 0 |
dd51979e61d40020548ac7a258dd2a9c | 98638062e66e8779803d84665341acea | Calculates area of Parallelogram | class Calculator{
parallelogramCalculate(){
const areaPara = this.base * this.height;
return areaPara;
} | 1 |
5d0c24f86b53dd7452d686c04c38dcae | e650d758de1e3df74416cfba2197ff26 | Get current checkout order type | export class CheckoutService
getCurrentOrderType(): Observable<ORDER_TYPE> {
return this.checkoutStore.pipe(
select(CheckoutSelectors.getSelectedOrderType)
);
} | 1 |
21bc7b8915b1001940ff2ff4de6f500d | f5bda09dce7ba3c58c304f6242c2b93d | Update an existing raw doc in the data store. The '_rev' value
must exist in the doc and must be the most recent known doc
version. If not, a Conflict exception is thrown. | if update:
last_rev = _get(post_url)['_rev']
params['_rev'] = last_rev
return _parse_json(_unsafe_io_with_server(requests.put,
expected_response,
post_url,
js... | 1 |
99cb2e57adeeb6e9b01963727640e988 | 4cd85a043001e73ce593b9271eb3088d | It should strip leading and trailing spaces. | input_str = ' test input with leading and trailing whitespace '
ret_str = ask.standardize(input_str)
self.assertTrue(ret_str == input_str.strip()) | 1 |
18ec1f577232f632a1bdfcf01c685df5 | 77220d8e4679d019535e047569f8a1b4 | Carrega imagem da galeria no perfil | public class SaveBCardActivity extends AppCompatActivity
private void setImageFromGallery(ActivityResult result) {
Glide.with(this)
.load(result.getData().getData())
.circleCrop()
.into(mBinding.ivSelectProfile);
} | 1 |
c0146bcc7ba3debf8850015313f9d07c | 3224e005dba481114679884b1a332aba | Metodo que establece el placeholder del elemento select2
Method establish placeholder in select2 element | {
setTimeout(function() {
$("#selectId_" + $scope.$id).select2({
placeholder: placeholder
});
},0);
} | 1 |
eaeb30cee2fc91b019468c9ef0c919ad | b1d896744bb8d2caf47d1bdf281b1d56 | REST call for updating and storing each user's hunt sessions | function saveUsersSessionsData(completionHandler){
var formData = $('#session_choice');
sendAjaxCommon({
type: 'POST',
url: adv_ajax_url + '/Sessions/saveUsersSessionsData/'+workshopId,
data:formData.serialize(),
cache: false,
success: functio... | 1 |
7810113945e308738e5f231d63c6b244 | e6cb75f8c3a5e525c01cfdbcab02757c | Stop GPSService when app is closed. If tracking in progress, TrackingService will restart the GPSService | public class MainActivity extends Activity
@Override
protected void onDestroy() {
stopService(sectionTrackerIntent);
super.onDestroy();
} | 1 |
2f182af32145ea738b6e9f5f0fb2250d | 884fff0b6b0a3627d7694f448e6d7b54 | Initializes the cart. | {
orderChanged = true;
var wasRedirectedOnce = ValidationHelper.GetBoolean(SessionHelper.GetValue(EMPTY_CART_REDIRECTED), false);
if (ShoppingCart.IsEmpty && !wasRedirectedOnce)
{
SessionHelper.SetValue(EMPTY_CART_REDIRECTED, true);
URLHelper.Redirect(RequestC... | 0 |
5cffc3350162f52030fc4e8103140721 | 9378bcfc956fc4af4f88af10fc5297eb | Returns {@code true} iff at least one of {@code items} is in {@code collection}. | public interface Collection<out E> : Iterable<E>
public fun containsAll(elements: Collection<@UnsafeVariance E>): Boolean | 0 |
dc7282f095d455171a5017f72944aa23 | ed93e22f72ed21ce3cc700a12714fc3f | actividad con formato | id => array(text, css_class) | class ActividadController extends Controller
public function index()
{
$actividades = Actividad::all();
foreach ($actividades as $actividad) {
foreach ($actividad->tipo_actividad as $tipo) {
}
foreach ($actividad->asignatura as $asignatura) {
}
... | 0 |
8bc26cfe975e34114b6893add3a8521c | 063844bb3e47b98222f114434e296853 | Creates sub-record key, which references base record | class Gems_Tracker_Engine_FieldsDefinition extends MUtil_Translate_TranslateableAbstract
public static function makeKey($sub, $fieldId)
{
return $sub . self::FIELD_KEY_SEPARATOR . $fieldId;
} | 1 |
b1487212b9d435aeedb0ef7d48aa565c | 9509c2ac1b85e3290ec096cbbb5a6c73 | 获取日期段的详细价格数据 | wx.showLoading({
title: '加载中',
mask: true
})
wx.cloud.callFunction({
name: "getdatabyDate",
data: {
date
}
}).then(result => {
wx.hideLoading()
this.setData({
MoneyDataBy... | 1 |
bf5029fc738367e057df4650f896f044 | 63354ebc79d2af27c2f3752bb7319c4b | create type of candidate | class Candidate:
def __init__(self, entity=None, id=None, score=0.0):
self.entity = entity
self.score = score
if id:
self.id = id
else:
self.id = entity | 1 |
e081c8adf3fc89f1536fbb57e47c285d | 983ec57d1e7dd57b2fa1a145f39506b7 | Determine the credential to use for the current controller.
This is a work-around for https://bugs.launchpad.net/juju/+bug/1652171 | class SuperNova(object):
def prep_python_creds(self):
creds = dict((utils.rm_prefix(k[0].lower()), k[1])
for k in self.prep_nova_creds())
if creds.get('url'):
creds['auth_url'] = creds.pop('url')
if creds.get('tenant_name'):
creds['project_id'] = cred... | 1 |
00669a2adbe86377de0d8f7abec7bd7d | 5fd15d5426b6bcaeb8c514980b75c2e8 | Determines if the given <see cref="BasicInstallTask"/> can be removed from
the monitor. | namespace Kephas.Plugins
public abstract class PluginManagerBase : Loggable, IPluginManager
protected virtual bool CanUninstallPlugin(PluginData pluginData, IPluginContext context)
{
return pluginData.State == PluginState.PendingUninstallation
|| pluginData.State == PluginState.P... | 0 |
bf94412b748828031f94e07c255f3802 | be8f842f65bf5af06f65290c608c0e11 | 获取数据项编码(以","隔开) | {
string strRtn = string.Empty;
if (lst != null && lst.Count > 0)
{
foreach (EyouSoft.Model.NewsStructure.OtherItems en in lst)
{
strRtn = strRtn + (int)en + ",";
}
}
return strRtn.Tri... | 1 |
bd11fbaf4ca337d181c89bc864cad370 | dc7adfc242ddf802ab83e346345d17e6 | 从os打印vector的函数(通过迭代器便利)
tip:由于传入的vector是const型的,因此要使用const类型的迭代器 | void printVector(const vector<T> &v)
{
typename vector<T>::const_iterator it;
for(it=v.begin();it!=v.end();++it)
cout<<*it<<" ";
cout<<endl;
} | 1 |
b34ef50a063733d959696210d818aedd | 1d4ce7de500b6346e1ceafeb7e438155 | Gets clean resource mode. | class Df_Seo_Model_Template_Expression extends Df_Core_Model
public function getClean() {return $this->cfg(self::P__CLEAN);} | 1 |
ea20b933064ece68b445f1606190a3da | 0767b5e597b50e5ee870d84b0df367aa | 合规审查 | global dict_config
dict_config=dict_config_input
init_variable()
list_auditresult=[]
fsqlfinal = dealsqltext(sqltext)
global online_info_flag
try:
username,password,ip,port,servicename=args
global checkobj
checkobj=CheckOnlineStructure(username,password,ip,port,servi... | 1 |
4ef4e18a14b9ebf29638ffec1fad84fb | 91a6d733d225150bbdf960cc56e89b7f | Get sheet music (as a string) | public function getLyrics() : string; | 0 |
5e6b71b54df65a23e6eaba77177c123b | a02b72d5544e4d8428505e4c72ea649e | Adds an Element as a child to the ScrollArea. This is usable by ScrollAreas NOT flagged for isTextOnly | namespace WindowsLibrary
public class Window : Element
public override void AddChildren(Element p_element)
{
Children.Add(p_element);
} | 0 |
2c03e9a3cecd9059681394271fde3b3b | 251d2fd38274c5e5ab4beccf7da6b0e2 | 根据快递员id批量更新是否作废状态 | int updateToCancle(@Param("idList") List<Long> idList); | 1 |
1ce510062ed633a00010f3d4299f9889 | 9124024593d3c9ca8d1afd2f17babdc3 | Returns array field name | class MultiSelectAjax extends MultiSelect implements Initializable, WithRoutesInterface
public function getFieldName()
{
return str_replace('[]', '', $this->getName());
} | 0 |
f4beb7cb895b38a518a3c5ad1843f36b | dc9f708ed538e8bf924ee5aa6930edf3 | Client to access the Digestor Service. | @Configuration
@EnableWebSecurity
public class Config extends WebSecurityConfigurerAdapter{
@Bean
public DigestRestClient digestRestClient() {
return new DigestRestClient();
} | 1 |
a8b860b624246b0c594dd6b85df97c08 | 8cf5168457867921d825aa23e9f6077d | @brief Create admin window with administrative tools
Create window content with administrative tools. | createContents() {
shell = new Shell();
int shell_W = (int) ((int)(float)dim.getWidth() * 0.7);
int shell_H = (int) ((int)(float)dim.getHeight() * 0.7);
shell.setSize(CONS.Views.win_W, CONS.Views.win_H);
shell.setText(CONS.Admin.str_MainWindow_Title);
int shell_Loc_W = (int) (dim.getWidth() / 2 - shell.get... | 1 |
4c8c6f2a786534c9e2cb6ff517e586cc | 160d5087690748716a624757f1de7838 | 行是否合法 | class AFind
isLegal(row, col, matrix, marked) {
return row >= 0 && row < 10 && col >= 0 && col < 10 && !marked[row][col] && matrix[row][col] !== 1;
} | 1 |
2af0ccc3327d6a3ae67ed746b49efb49 | 020e4a8629c10e7ffd39a394bfaf6fc6 | Gets an event raised when the value of the metadata property changes | export class FormItem extends ItemStack implements ISave{
public get valueChanged(): LatteEvent{
if(!this._valueChanged){
this._valueChanged = new LatteEvent(this);
}
return this._valueChanged;
} | 1 |
6dfcec0e8abb9d14da4774124a7d9efb | ff91a6cb9727f428de56ceae4349dce6 | 3. 解析web.xml中servlet的初始化参数 | public class ZTomcat
private void init() {
try {
String WEB_INF = this.getClass().getResource("/").getPath();
FileInputStream fis = new FileInputStream(WEB_INF + "netty_tomcat.properties");
webxml.load(fis);
for (Object k : webxml.keySet()) {
Strin... | 0 |
5db362611227de96559c16873828c27a | 01439c3843332e0e8d4ce44475741505 | 12- Dados los coeficientes de un polinomio de grado dos y un número real, evaluar la derivada del polinomio en ese número. | void newt_eval(double *coef,int n,double *px,double *py)
{
int i;
double x,y;
x = *px;
y = coef[n];
for(i=(n-1); i>=0; i--){
y = coef[i]+x*y;
}
*px = x;
*py = y;
} | 0 |
8b529c1121977524c18f12569da8fdf0 | 6de28b0e057fa58369fc127a008eb9c3 | 查询门户未授权的用户信息 | namespace ZTGJWechatBll.Bussiness
public class WechatBll
public List<Bus_GetUsers_response> GetUnboundUsers(string source)
{
return wechatdal.GetUnboundUsers(source);
} | 1 |
9e3fde90421ea98c6d2c98ec43c05d6d | 9c6d7c7d066142b3d1191ab86c7f63d1 | 将键值对的值列表转换为value(对应键值对的key)、label(对应键值对的value)的json数组 | def enum2Json(value):
out = []
for v in value:
obj = {}
obj['key'] = v.name
obj['value'] = v.value
out.append(obj)
j = json.dumps(out).decode("unicode-escape")
return j | 1 |
689547875e6f4bc9449d453845078144 | 4973ca90f0b32eb08824b2ef15921a72 | # 格式化模块数据(生成json文件) | class Modules extends Common
protected function formatModuleAccessData(
&$modules,
$name,
$identifying,
$cat_name,
$title,
$permission,
$url,
$ico
) {
url_del(['mark']);
$data['name'] = "$name";
$data['title'] = $ti... | 1 |
099ebb137bd142d0b4025c086c0006a0 | 00e372cb862e9bb48e36c5714254a2e3 | ファイル内の単語を数える | int count = 0;
try {
FileWordReader reader = new FileWordReader(file);
String word = reader.nextWord();
while (word != null) {
counter.incCount(word);
word = reader.nextWord();
count++;
}
} catch (IOException e) {
System.err.println("Error processing " + file + " " + e);
System.exit(... | 1 |
77b0bb97c18cba525685425a0e095b63 | 6c2304a1bd5d9fad8e5ac1da1faaea75 | Inserta Autorizado elegidos en el formulario para el Nino. | class DespachosController
def guardarDespachoAutorizado
hijo=params[:IdHijo]
anio=params[:AnioDespacho]
@hijo = CargaFamiliar.BuscarHijos(hijo,anio)
ficha=@hijo.numero_personal
@empleado=Empleado.find(ficha)
respuesta, despachos, mensaje = Despacho.guardar_Despacho_Autorizado(params)
if resp... | 1 |
dfb49db1bdbd019592f977ce9b5c1d83 | 360eabf7d4e224b4b61ac737cb57b9c5 | Returns the element's name without the container's
prefix (if any).
foo => foo
containerName[foo] > foo
containerName[foo][sub] > foo[sub] | class NsUtils
public static function getElementShortName($elem)
{
$parts = explode('\\', $elem);
return array_pop($parts);
} | 1 |
7ad0ba9527ddd3ee9c50e477104a93b7 | 0c309384e3bede8d7b1d00371790742f | 门诊医生个人工作量统计 | namespace HIS.ZYDoc_BLL.QueryWork
public class OP_Rpt : BaseBLL
public static DataTable QueryDocWork(int userid, DateTime Btime, DateTime Etime)
{
string strsql = @"select itemname as item_name, SUM(TOLAL_FEE) as money from
(select patlistid,presdeptcode as currdeptcode,presdoccod... | 1 |
2fa45611e9b84481c21fdd6fbbdd01f5 | 58dac9781b431e7bede045ec4040a3f4 | Marks the specified {@link DataSetManifest} as processed, removing it from the list of pending
data sets in this {@link DataSetQueue}.
processed | public void markDocumentCompleted(DocumentDescription documentDescription)
throws ManifoldCFException; | 0 |
6d47dfb9193b48c7dccb007abd26ad88 | 0fa12a596cf888441d628e48f9e039bc | 未投票者取得用関数 | getUnSelectedPerson({commit},data){
return new Promise((resolve, reject) => {
getUnSelectedPersonApi(data).then(
res => { resolve(res); },
error => { reject(error); })
})
} | 1 |
617e44992e7e285f93c7bcd1827a8c65 | 2953e5a0b4e5ad0cc569d1d69973af6e | Checking that Python command is available on the current system. | return subprocess.call("type " + cmd,
shell=True,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE) == 0 | 1 |
c2000255e42c159c8c135349080af7b3 | 6bafbb331537af60e4bd90cc5e28bf96 | Поиск максимального произведения n-чисел в двумерном массиве, расположенных в любом направлении (вверх, вниз, вправо, влево или по диагонали).
Search for the maximum product of n-numbers in a two-dimensional array located in any direction (up, down, right, left or diagonally). | public class Main
public static int maxProductDiagonalRight(int[][] arr) {
int first = 0;
int second = 0;
int third = 0;
int fourth = 0;
int max_product = 0;
for (int i = 3; i < arr.length; i++) {
for (int j = 0; j < arr[i].length - 3; j++) {
f... | 0 |
1c46ec33174f3f70a872e77d31142730 | 90265ec2986e5038565ffe0d5908a56e | Check whether two bounding boxes intersect | {
return ( box1.rt.y < box2.lb.y || box1.rt.x < box2.lb.x
|| box1.lb.y > box2.rt.y || box1.lb.x > box2.rt.x ) ? false: true;
} | 1 |
e107a9845cee3f742484c2a46cb1607f | 69d749296de6af2f36d308d6929b4b80 | Metodo que gera url de um determinado controlador | function registrar_url($dados) {
$dados_ambiente = Controlador::getInstancia()->get('dados_ambiente');
if($dados_ambiente["roteamento"]["ativo"])
verificaRota($dados);
if(!Controlador::getInstancia()->existe("modulo")){
if (count ( $dados ) > 0) {
$modulo = array_shift ( $dados );
if (!pesquisarNoDir... | 0 |
cd90a1b2c5fdc7ffe3fbecf86c4d28d3 | 0c7439ac71a3e2052591924f341dee88 | 入力した数値や演算結果のビット表示 | public class BitTest : MonoBehaviour
void Operation()
{
char curNum = ' ', preNum = ' ';
for(int i = 0; i < targetStatus.Length; ++i)
{
curNum = targetStatus[i];
if(targetStatus[0] == '1' && i == 0) operationNum++;
if(curNum != preNum && i > 0)
... | 0 |
dd0144b35a74f30e5f3d95bee2ce14ea | bdd41fcdcd9f89f83384de268e29d8c9 | Return the bindings associated to this project. | Collection getBindings(); | 1 |
722a792bc6085c3ca248f102191f6072 | f68e2e55ea1cf8676c85bf230c385203 | WaitToSee value in the input tag on the page by That and Casing. default values are That.Equals and Casing.Ignore <para />
Example: to wait to see a value of "input" on the page by exact match use WaitToSeeValue(That.Equals, "input", Casing.Exact); | [When(WaitToSeeElementWithTimeoutRegex)]
[Then(WaitToSeeElementWithTimeoutRegex)]
public void WaitToSeeElementWithTimeout(int timeout, string propertyName)
{
this.CallPipelineAction(propertyName, WaitConditions.BecomesExistent, GetTimeSpan(timeout));
} | 0 |
b7fa2eda64e6af0f9280fcfbb3987ffd | 597339b254a9d012f9c72896ae1d3519 | @brief Initialize SPI for SD Card Adapater | void STM_SPI_Init(void)
{
GPIO_InitTypeDef GPIO_InitStructure;
SPI_InitTypeDef SPI_InitStructure;
RCC_APB2PeriphClockCmd(SPI_MOSI_GPIO_CLK | SPI_MISO_GPIO_CLK | SPI_SCK_GPIO_CLK, ENABLE);
RCC_APB2PeriphClockCmd(LCD_SD_SPI_CLK, ENABLE);
GPIO_InitStructure.GPIO_Pin = SPI_SCK_PIN;
GPIO_InitStructure.GPIO_Mo... | 1 |
2722648de083b46de6aa356576cf31cb | 0910386d3f746c75151bb5577146ad54 | 文件是否为插件 | var directory = path.normalize(path.dirname(file));
if(directory == '.' || directory == path.join(process.cwd(), config.plugins.path || './plugins')) {
if(path.extname(file) == '.js') {
return true;
}
}
return false;
} | 1 |
a3907dc55dcb8240c910b3bbf6a12c07 | 530e72eb2130f28d38308dd5b0b534e1 | Copy an enforcement set. | self.state = self._tstate_run
ret = self.apiobj._run_enforcement(
name=self.eset.name, ids=self.ids, fields=self.src_fields, query=self.src_query
)
self.state = self._tstate_ran
return ret | 0 |
035d639d0fb4d4c1aef663a34f93a683 | d084e39495c97bbed6000fba96c0e4c3 | 위도와 경도 문자열을 받아서 주소를 리턴하는 요청을 처리하는 메소드 | List<Address> list = null;
String str = et3.getText().toString();
try {
list = geocoder.getFromLocationName(
str,
10);
} catch (IOException e) {
e.printStackTrace();
Log.e("test", "입출력 오류 - 서버에서 주소변환시 에러발생");
... | 0 |
c99c9ffcf9fe4e6e5b1ac551510067e9 | 54be53726c23f4cfb5fc7ee713a69d38 | Test adding two shapes. | public void AddTest()
{
_testInvoker.Start();
Point Location1 = new Point(100, 102);
Point Location2 = new Point(100, 110);
AddCommand command = new AddCommand("Class", Location1, Location1, testDrawing);
_testInvoker.EnqueueCommandForExecutio... | 1 |
bb691535e0ac810d3cdb9d39a9021d5e | fe8c9251147fffb601136cd8e99d808a | 是否让 AndroidAutoSize 支持 sp 单位, 默认支持, 详情请看类文件的注释 {@link UnitsManager} | AutoSizeConfig.getInstance()
.setCustomFragment(true)
.setOnAdaptListener(object : onAdaptListener {
override fun onAdaptBefore(target: Any, activity: Activity) {
}
override fun onAdaptAfter(target: Any, activity: Activi... | 0 |
b5426142ca9afcb6a22f0033f1ec3e04 | 5aaaad93f965f1b599873af8e3f94fa9 | 管理员下发用户卡,下发时先查询用户是否在该楼栋有卡,如有则先注销当前卡,再下发,下发是从管理员处将卡转移到用户下 | namespace ACS.Service.Impl
public class EmployeeServiceImpl : CommonServiceImpl<Employee>, EmployeeService
public void DownCardList(List<string> list,String uuID)
{
log.Info("Download card list by Employees : uuid=" + uuID + ".Employee list is" + JsonConvert.ObjectToJson(list));
int ... | 0 |
2369c478bfba24e9a7c6573fc0a2256a | 29d1bb2c5d7540ad612c2d535797731d | Noise shaped DC extraction. | def denoise(data):
coeffs = pywt.wavedec(data=data, wavelet='db5', level=9)
cA9, cD9, cD8, cD7, cD6, cD5, cD4, cD3, cD2, cD1 = coeffs
threshold = (np.median(np.abs(cD1)) / 0.6745) * (np.sqrt(2 * np.log(len(cD1))))
cD1.fill(0)
cD2.fill(0)
for i in range(1, len(coeffs) - 2):
coeffs[i] = py... | 0 |
d489eda3bf76e95150b40123513aa86c | 116a2c4016a9c7d9544d22737f9337ee | Peeks at the last element from the schedule and returns it | int peek(){
return arr[count - 1];
} | 1 |
00d2b4f8bfad0ce335e3eb77429af556 | 072d0dd9690b0e6520a23d3f0d5cf32e | 值转换,PO对象转成VO对象 | default V parseVo(P po) {
return parseVo(po, true);
} | 1 |
3233bef1b205751db358e2cc19c3a969 | 3e710ec5873479dabc9fd9f938e50d76 | Gets the errors of this ImportRealReq. # noqa: E501 | try :
return self._Import
except Exception as e:
raise e | 0 |
fe6a019e3663c490565e0e3915264ad9 | fa294c4b8ea08ab9e24c1b82a7fd2dfc | Stops the dispatcher thread and joins it | class TWHThreadController(object):
def stop(self):
if self.running:
self.wrapper_handler.queue.put_nowait(self._sentinel)
self._thread.join()
self._thread = None | 1 |
5d143c862df657e6b1c465f712fddcca | 5e3f42001b64c261a7d20ef90e67d965 | Gets the version of this SingleReportRequest. # noqa: E501
The version of the website/app. Nullable (not recommended). # noqa: E501 | def version(self):
return self.version | 1 |
cc3a757d9daf08b2a86c3b7ffa2a7b2c | 2a1313e3ddaaad4e84bcf129fc00a064 | Cxkk - RND _Vx, byte
Set _Vx = random byte AND kk. | impl CPU
fn op_ld_vx_byte(&mut self) {
self.v[self.get_x() as usize] = self.get_kk();
self.inc_pc();
} | 0 |
8b99ae135be473514b8583da3f5449fa | 590908f1aea56575934b4afa99eea52e | start recording video, automatically generate file name | class ClientRecorder:
def start(self, filename):
filename = "{}{}.{}".format(os.environ.get('app_videos_directory'), filename, ClientRecorder.FILE_FORMAT)
self._rec.start_recording(filename) | 1 |
ad6e192b381409498fc9c136731f1ff9 | fe63aa5d796fda96c40ba0161f9e6ff2 | convert inlen raw bytes at in to base64 string (NUL-terminated) at out.
out size should be at least 4*inlen/3 + 4.
return length of out (sans trailing NUL). | {
unsigned int l = 0, k = 0;
int n = 0;
l = inLen * 8;
k = (447 - l) % 512;
n = (l+k+65)/512;
if(*outLen < n *64)
{
*outLen = n * 64;
return 1;
}
memmove(outBuf, inBuf, inLen);
outBuf[inLen] = 0x80;
*outLen = n * 64;
memset(outBuf+inLen+1, 0, n*64-inLen-5);
int2char(l, outBuf+n*64-4);
return 0;
} | 0 |
799fe24d5e49e5e430fbaadd743e727d | 4e32ee8cfc4905bd6ca400dbe3306c53 | Multiply an Fp2 element by the special element i. This function assumes that p = 3 (mod4)
and that the field extension is as described above.
We have c = c0 + c1*i = -a1 + a0*i. | impl TECurveConfig for EdwardsConfig
fn mul_by_a(elem: Self::BaseField) -> Self::BaseField {
-elem
} | 0 |
55b69a67f649abbfba30f382cefb5d6a | cf6a4b3e960f9ce8804d77c318ea6986 | Log register values | printf("Register Data\n");
printf(" ADC T : %x\n", adcT);
printf(" ADC P : %x\n", adcP);
printf(" ADC H : %x\n", adcH);
printf(" cT : %d\n", cT);
printf(" cP : %d\n", cP);
printf(" cH : %d\n", cH);
} | 1 |
23676ff5939aa58f15ddd308fc31a225 | 6537a7196f6ebc3a80a128842f382b8b | Gets the value of the patient property.
possible object is
{@link PatientIdentityFeedRequestType.ControlActProcess.Subject.RegistrationEvent.Subject1 .Patient } | class BodySite extends DomainResource
get patient() {
return this.__patient;
} | 1 |
49236a48e0dfbfbe87edcb785d602184 | a159c2b10ec6e4be570ea2ed371aa11c | We raise error if list is empty | class TestLab1(unittest.TestCase):
def test_max_list_iter_ValueError(self):
tlist = None
with self.assertRaises(ValueError):
max_list_iter(tlist) | 0 |
ccf1ad878ff0574718f0739a2da63458 | 75c28faff036ff9db12737f62b1b4a13 | Reverses the ordering of the queryset. | class QueryBuilder extends Builder
public function reversed()
{
$this->orders = null;
return $this->orderBy($this->node->getLftName(), 'desc');
} | 1 |
7580e380374693bcaad18e97f3a8d461 | f6d619fa1cc0c172842e4e211d223544 | # deviance information criterion: | mIC <- function(y, X, Z, bhat, method){
N <- dim(X)[1]
K <- dim(X)[2]
C <- log(log(K))
y <- as.vector(y)
PZ <- Z %*% solve( t(Z) %*% Z ) %*% t(Z)
e <- y - X%*%bhat
sigmaS <- diag(1/N * t(e) %*% PZ %*% e )
S <- colSums( abs(bhat) > 0.0001 )
if (method == "BIC") {
crit <- sigmaS + S * log(N)*C/N
... | 0 |
e73f64a5c687b74254243592404c56d6 | beb73e3cf69ed48d51391113c72d5536 | 充值油卡界面 | class Oldman_cardAction extends UserAction{
public function recharge(){
$db = M('Userinfo');
if (!is_numeric($_GET['uid']) or !is_numeric($_GET['cid'])) {
echo "<script language=JavaScript>alert('参数错误!');window.close();</script>";
} else {
$uid = (int)$_GET['uid'];
$cid = (int)$_GET['cid'];
}
$cardty... | 0 |
43b0a5b24a65fd2a958117d449b24144 | 089357ac20058dfd74bb8791941673e4 | Generate document head object for Nuxt based on SEO field from Dato CMS. | siteName: string,
description: string,
baseUrl: string,
locale: string,
imageUri: string,
imageHeight: number,
imageWidth: number,
allowFollow: boolean,
allowIndex: boolean
): DefaultSeoProps {
const title = siteName;
return {
description,
title,
dangerouslySetAllPagesToNoFollow: !allo... | 1 |
140722651a9f8334490530ca13271dea | c28e42f985231ecde12a9e215a00e5bd | Converts a multi-line string to one line and removes extra spaces | public class UOAThesisExtractor implements ReportExtractor
private String singleLine(String value) {
return value.replaceAll("\\s+", " ").trim();
} | 1 |
a51d3eac0e39902ceb322d6220d7f82c | b59664d18bbd87eb84bf67b519f44157 | Obtiene los nombres de los atributos de la clase | public class FunctionsCommon
static ArrayList<String> getNamesAttributes(String nameDataset) {
ArrayList<String> namesAttributes = new ArrayList<String>();
String pathDataset = nameDataset;
try {
File fileDataset = new File(pathDataset);
FileReader reader = new FileReader... | 1 |
b61732e37c1754a8d8a386f169378699 | aab33f4986e710c5ac3263b829be9450 | 歸還貴賓證 | {
$id = Crypt::decryptString($id);
$updated = date('Y-m-d h:i:s');
DB::table('reserve_books')
->where('id', $id)
->update(['out_entry' => 0, 'in_entry' => 1, 'updated_at' => $updated]);
$books_data = Books::join('reserve_books', 'reserve_books.book_id', '=', '... | 0 |
a3d3c8ef529c1ff57c36daa665e47730 | fd276d63c9deae9febc72771550b7f0a | Load the drop presets into memory. This should be called before trying
to access any drop sets' data or set the current drop set. | public final class NoDropsAtSpawn extends JavaPlugin implements Listener
private void loadSettings() {
noDropMsg = loadMessage("item-drop-message");
noPickupMsg = loadMessage("item-pickup-message");
} | 0 |
932a4333a07e01b5cf706a4abc905318 | e457d513985400b6e7a8370da0767523 | 开始同步 | start () {
this.scheduleOnce(this.destoryToastDialog, 1);
} | 0 |
48d4b7ca17d9075a3b382cb1f3dc0b0f | ef32c1e61a509ac19e09fd6629a37f9d | returns last modified time of a file | class GTempalte(object):
def _getFileModiryTime(self,fname):
return os.stat(fname).st_mtime | 1 |
086559a6001cc4e69d90bf17d2ae2614 | 46807fe3b5e588baab3ca615429ea707 | Get the border style object. | public class PDAnnotationWidget extends PDAnnotation
public PDBorderStyleDictionary getBorderStyle()
{
COSDictionary bs = getCOSObject().getCOSDictionary(COSName.BS);
return bs != null ? new PDBorderStyleDictionary(bs) : null;
} | 1 |
e49e1a30ea36ab4f57457e86dabb4867 | f45afb5a28bb1fd894a6b44a357e0a80 | 保存稀疏矩阵到本地 | def save_sparse_csr(filename,array):
np.savez(filename,data = array.data ,indices=array.indices,
indptr =array.indptr, shape=array.shape ) | 1 |
9415edb0917c09977f1c9a462ba01003 | 714f2d9e89b0dbddc86454415edadb96 | Tests for uniform crossover.
The function takes variables from both parents randomly. | class GenericAlgorithm(object):
def _uniform_cross_over(self, pop, ind_prob):
child_group1 = pop[::2]
child_group2 = pop[1::2]
for child1, child2 in zip(child_group1, child_group2):
size = min(len(child1), len(child2))
for i in range(size):
if np.random.random() < ind_prob:
child1[i], child2[i] = c... | 1 |
6ab958e7e204f0e868b2a7ae0ee860ab | f911f97c9472d0645bd5e82a93570123 | Function to save a player's changes to a global (or a new one). | class MainWindow(QWidget, object):
def global_player_save_cb(self):
self.latest_search = self.sender().text()
self.refresh_player_char_data_cb() | 0 |
17656bdcc7c417dd4f09d07d8ed04ab5 | 2670ed4b78c7980ebb1925ed93355154 | Visit an Assign node. | public function visitAssign_op(Context\Assign_opContext $context); | 1 |
bf3f4ad227c76eac867657e356a39d91 | 5f408001b404a2c27a6c19c46de3dc0d | Resets fail reason | function Run:_resetExpectedFail()
self._expectFail = nil
self._expectFailPattern = nil
end | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.