query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
5e0e624cbf77e30ae4961e6311f506d9 | f0bf6722e105d1e9f3df98ab7977c467 | Computes the combined apparent magnitude of two objects. | obj1 = [int(math.ceil(obj1[RGB_RED])),
int(math.ceil(obj1[RGB_GREEN])),
int(math.ceil(obj1[RGB_BLUE]))]
obj2 = [int(math.ceil(obj2[RGB_RED])),
int(math.ceil(obj2[RGB_GREEN])),
int(math.ceil(obj2[RGB_BLUE]))]
rmean = obj1[RGB_RED] + obj2[RGB_RED] / 2
r = ob... | 0 |
2807560cc588dddc7b656c68309665ab | 36066a9afc83d41b14fa1f40c9b4b7c4 | Check whether stream has ended. This function is required for point cloud streams of files | class point_cloud(object):
def end_of_stream(self):
if not self._stream_buffered:
self._read_stream()
return not self._stream_buffered or self._stream_data.HasField('footer') | 1 |
b7b2296462ca1e47fe6520bbbfbaedfc | f4e7d66c169724822fdd544a1b7ccafd | Returns a truly random integer betwen two indexes (including both the start and end indexes) | public class FloatMath
public static int nextRandomInt(int start, int end) {
if (end <= start) {
throw new IllegalArgumentException("The end bound must be more" +
" then the start bound.");
}
return start + rand.nextInt(end - start + 1);
} | 1 |
1a1341f4f3f69b869113a2c227aa438c | 230c7457355b076712e77c29256d521a | Adds user statuses entries into database. | {
$this->db->set('statusName', $formData['userStatusName']);
$this->db->set('statusSlug', str_replace(' ', '-', $formData['userStatusSlug']));
$this->db->set('statusDescription', $formData['userStatusDescription']);
$this->db->set('state', $formData['state']);
$this->db->set(... | 1 |
cafb6c807a767ce59270bc86ef36126f | 5c66682cc587d721c867fade3454cb0b | Create plan and allocate memory. | CUDPPListRankPlan::CUDPPListRankPlan(CUDPPManager *mgr, CUDPPConfiguration config, size_t numElements)
: CUDPPPlan(mgr, config, numElements, 1, 0)
{
allocListRankStorage(this);
} | 1 |
a0a3e481fba25cbf1eb76103e62c29ca | 32e4296bcf424374712b58c6d2041e7b | Method for updating animal image and its metadata | namespace TNCApp_New
public partial class MainWindow : Window
AnimalImage UploadImage(string imagePath , AnimalImage animalImage)
{
try
{
this.UploadingBar.Value = 0;
var client = new HttpClient();
animalImage.ImageName = Path.GetFileNa... | 1 |
1addf37ff9155ad5f7737b2250fe0aed | e8db4051226896414a24928801a51933 | class that handles all cables, showing them all on one page | CCable::CCable()
{
} | 0 |
f038456bccd23573d19ceb540ba7915a | d8e49cb02ee4d94cc48d41128a5a5f57 | 将NideshopFootprint保存到数据库 | self::getDb($key, $query);
$isexist = self::checkFootprint( $key, $data['user_id'], $data['footprint_link'] );
if ( ! $isexist ) {
$query->add($data);
}
$count = self::count( $key, $data['user_id'] );
if ( $count > 60 ) {
$min_id = $query->where( ... | 1 |
15bc9aca6bc9cc1d7cc1615856612842 | 58e27e93e5dbdda7e433b27598798692 | Adds the selected customer to the new project | namespace eCommerce.Controllers
public class CustomerController : Controller
public ActionResult addProject()
{
if (!homeController.Authenticated)
{
return RedirectToAction("Index", "home");
}
return View();
} | 0 |
248063e45c4d91d9d06f92a2443d1a1c | 5a5b1d9ff06cbec7a6d3e3f6dbe0535e | test that utf8 decodes to wide | FILE* fp = fopen( "out.txt", "w" );
const char* test_string =
"Fáilte.Ő ΏΘ ЩӜ ݞ ణ ആ ญ ᚉ ant😈n ᛋ € ✋ is Amazing ✌️ ぢぽ\n习乡乢乣乤乥书乧乨乩乪乫乬乭乮乯𠀀 ";
char string_b[5];
string_b[0] = (char)0xEF;
string_b[1] = (char)0xBF;
string_b[2] = (char)0xBD;
string_b[3] = 0;
fprintf( fp, "[%s]\n", string_b );
fprintf(... | 1 |
a8cba08c5b9f778c1884af8a2b65235e | 1768d1faef85d851bbd686482af725dd | The Amazon Resource Name (ARN) for the private CA issues the certificate.
:link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-acmpca-certificate.html#cfn-acmpca-certificate-certificateauthorityarn | class CertificateAuthorityActivation(pulumi.CustomResource):
def certificate_authority_arn(self) -> pulumi.Output[str]:
return pulumi.get(self, "certificate_authority_arn") | 1 |
ff08826b0c42faf9239697601b55ab2c | 0b63361eaaa84fd52b63473a298bcd6e | Gets the StudySessions related to this module. | @Entity
@Table(uniqueConstraints=@UniqueConstraint(columnNames={"authority,protocol,studyId"}))
public class Study implements java.io.Serializable
public List<StudyRelStudy> getStudyRelStudies() {
return metadata.getStudyRelStudies();
} | 0 |
cc00dc6cf66b9d68a2b3d8e2652522f0 | cd336c1cbf3e166eb8c358056210fded | Compares literals of synonym and the specified SynSet, returns true if their have same literals. | namespace Fornax.Net.Index.Common
[Serializable,ProtoContract]
[Progress("SynsetIndex", true, Documented = true, Tested = true)]
public class SynsetIndex : java.io.Serializable.__Interface , IEnumerable<string>
internal bool IsSubsetOf(IEnumerable<string> other) {
return index.IsSubsetOf(other);... | 0 |
02cf1cb3b38722cbcac3c84546ef5ae0 | 1f9c17fd177aba2eb9a48f0a6e8d4678 | Boot the config for the package. | class GooglServiceProvider extends ServiceProvider
public function boot()
{
$this->publishConfig();
} | 1 |
56caa004ed235fd993fa978a50121bf4 | b465a2e4c20e9fc7e51b6c83cfee0933 | return the minimum number of votes any remaining candidate has | {
uint64_t min_votes = prev_available_votes / BTS_BLOCKCHAIN_BLOCKS_PER_YEAR;
if( min_votes > votes_cast )
return min_votes - votes_cast;
return 0;
} | 0 |
fb46c3b0e77c4d55859443020a9b1436 | 01d2ff556a82ce4f454aaf3177b53500 | @warning: block has no effect on this implementation | impl<T: DenseAccess> Transact for BlockListUnary<T>
async fn rollback(&self, _txn_id: &TxnId) {
} | 1 |
6bbba6ff612055af10170e4e7f590fbc | 33bbac8021cefdaf4981ed6da960f9f7 | GET: Note/ShowOnlyFinished | {
var QuickSoapSelected = from m in dbQuickSoap.QuickSoapNotesDatabase
where m.UniqueID == id
select m;
return View(QuickSoapSelected.ToList());
} | 0 |
2a8bef06d3fccea79a3a73ef365d28e0 | af567a28c8767c3786557b8becebe35f | Gasim pretul unei rezervari | def getPret(rezervare):
return rezervare[3] | 1 |
ccfdf031f2e1e5949c5c07a59d786ea3 | 9fce84ebf1099e04132597d45e6a3b93 | overwrite the yoast og image to use imgix as the domain | $og_image = get_post_meta( $this->postID, 'mashsb_og_image', true );
if( $og_image ) {
return wp_get_attachment_url( $og_image );
}
} | 0 |
9827f59ac3ee2b89d5e41842b04c10bc | 4f9ae51c405e9efe7b02177908ffd2f6 | Gets all elements of a object store. | public class ElementIdAssigningStore implements Store
@Override
public Map<Object, Element> getAll(Collection<?> keys) {
return delegate.getAll(keys);
} | 1 |
5ae230f4be90d017de1ab51e9ce26f84 | ee015f1070fadf2b242e1e346bd47f55 | \brief Initializes Temperature sensor I2C pins. | void temp_init(void) {
pio_init_pin(PIOB, PIO_PB25B_TIOA0, PIO_OUTPUT | PIO_OPENDRAIN | PIO_PULLUP);
pio_set_pin(TEMP_PIO, TEMP_PIN, 0);
delay_ms(12);
pio_set_pin(TEMP_PIO, TEMP_PIN, 1);
PMC->PMC_PCER0 = 1 << ID_TC0;
tc_set_writeprotect(TEMP_TC, 0);
volatile uint32_t settings =
TC_CMR_TCCLKS_TIMER_CLOCK1 |
... | 0 |
d705e00b02de3682dd2498d4e50dc267 | 58863a3dd3c8eee67f70cb1e50dca6aa | Forward select mode to cells | {
uddCellItem* pCell = wxDynamicCast( IPluginManager::Get()->GetActiveCanvas()->GetShapeUnderCursor(), uddCellItem );
if ( pCell && pCell->IsKindOf( CLASSINFO( uddCellItem ) ) )
{
IPluginManager::Get()->GetActiveCanvas()->DeselectAll();
pCell->Select( true );
IPluginManager::Get()->GetActiveCanvas()->Refresh()... | 1 |
01de3fc389cb34d06722a1eeb11c5aa0 | c8600d5e4d5428e36ac9d2f61543d537 | 获得商品已添加属性中 属性类型为单选属性(即可选规格)的商品属性列表 | public List<GoodsAttribute> getGoodsAttributeList(GoodsType goodsType); | 0 |
67d0a89168dc5990f456fe061c8e1adf | 9b59237ce3be1a7d27845610372f1aed | Sets the object's initial name to adhere to the 'instanceN' naming scheme. | namespace Ihaius
public class PrefabPool : ObjectPool<Transform>
protected override void nameInstance(Transform instance)
{
instance.gameObject.name = instance.name.Replace("(Clone)", string.Empty) + (this.totalCount + 1).ToString("#000");
} | 1 |
d9cdd89acae8395c81a814efe389c7e6 | 4556076d397345a1f75855b6bb7fb4ff | 查询车次途径站点列表 | ArrayList<VIAStation> list = new ArrayList<VIAStation>();
HashMap<String, String> parmValues = new HashMap<String, String>();
parmValues.put("sessionId", Property.SessionId);
String methodPath = Constant.MP_TRAININFO;
String methodName = Constant.MN_GET_VIASTATION;
WebSer... | 1 |
49f90aeb37bd178f3a4c77bb2a119f8a | ec1436703a9e3e7c467b9dedb409ab2e | Este metodo plotea solo la estacion que le pasemos como argumento | class EstacionController extends Controller
public function showAction($id)
{
$response = parent::showAction($id);
return $response;
} | 0 |
3e5cdc3fb75c19517e96003667a41a7b | 734c87034c449dfc0ea23f9ebfbea350 | Получение строковых значений выбранных узлов | namespace core
public class INodeList : IDisposable
public virtual System.Collections.Generic.List<string> GetListOfSelectedKeyValues()
{
System.Collections.Generic.List<string> Result = new System.Collections.Generic.List<string>();
foreach (INode N in FItems)
{
... | 1 |
d12c9e7af6c220f07af6aa4f3df3d168 | b2acb68711fe4b5e04629145ed35dbc0 | Creates a window and widgets for editing the pre-made characters.
This is only for the Remastered version of the ROM. | function editCharacter(){
actchar.drawEdit();
return;
} | 0 |
fac02f70a9069a1202fbc444f2bd3ad3 | 5448eee8e1b59bb9ec685cd69bedc4af | 初始化头部横向滑动条 | @EActivity(R.layout.main)
public class MainScroll extends FragmentActivity
private void initHeadView() {
} | 0 |
12b57f351c51557126a0e7a5fa6a2f39 | 9cf7882086fafbb8ecf53cf532da9c95 | Returns a generator of consonant-vowel-consonant pseudo-word. | def generate_syllable():
return generate_consonant() + generate_vowel() | 0 |
e18aff6ccc7d7b7016f6d281a95a57eb | 846b111edc705ee24fb1c6aca01b5d33 | Tests that blacklisted words get redacted | reserved_word = 'search'
keyword = 'sea'
keyword_plural = 'seas'
line = '{reserved_word} {keyword} {keyword_plural}'\
.format(reserved_word=reserved_word, keyword=keyword, keyword_plural=keyword_plural)
anonymizer = SensitiveWordAnonymizer([keyword], SALT, [reserved_word])
anon_line = an... | 1 |
fe013011cf9da4f2c1c05c28a06af2be | 785be0ef0c112e586e617b6b68149fc4 | updates the costs for the entire population | for path in self.paths :
self._aggState[path] = 0
for pop in self.populations :
if path in pop.paths :
self._aggState[path] += pop._state[path]
for pop in self.populations :
pop._setAggState(self._aggState)
pop._setCurre... | 1 |
57fd5411e7fad51c1de87ed2925d2089 | fc6c176dfd55ee74227bd00ac3d7ad75 | Removes the ith "pointProperty" element | void removeAspect(int i); | 0 |
034a91d14a41f23a1b96767bf9725d98 | a5fd203dfd5a58ac5e161f7637735f56 | Insert a row into the parameter_file table for the provided FileID, | def f_myadv_ins_gps_file_rec ( fname ):
s_fname = os.path.basename ( fname )
s_dirpath = os.path.abspath ( fname )
n_file_id = int ( 1 )
sql_getid1=""" select gps_file_seq.nextval from dual """
cur = con.cursor()
cur.execute ( sql_getid1 )
for result in cur:
n_file_id = int( result[0] )
s_sql_i... | 0 |
6b119c56fce32c1fcab8d2bc4613f426 | 0952eac5c6ff218310daf1fad18d362e | 修改首次回访有针使用信息 | class Visit
async modifyFirstVisitNeedleInfo(data) {
const res = await post('/v1/visit/first/needle', data)
return res
} | 1 |
9dbe71e34f0683153a65ca5cf39252dd | ad079e9e662aeb6ee1de40333d70a0a2 | 指定日志文件路径。 | class AppConfig(metaclass=Singleton):
def log_file_path(self):
return self._log.get('LOG_FILE_PATH') | 0 |
8e7367afd52281f6896069313ef84644 | ec50cad5141d65d358df19b0f727df89 | Don't let logged in users sign up again | class SignupController
def new
redirect_to :root if user_signed_in?
not_used_auth_production
end | 1 |
c5b20f269898262fab6a387f10a71ff0 | 31bcd383567f4236c03caf0942f7f2ee | Create an instance of {@link InsertRecsIntoCRMExtWebFormRequest } | @XmlRegistry
public class ObjectFactory
public InsertOrUpdateUserInfoExt createInsertOrUpdateUserInfoExt() {
return new InsertOrUpdateUserInfoExt();
} | 0 |
fa9f1bfd2ed0502345c58694b31ddf11 | b3e54ab793bdbcf707390ef161c5d247 | Constructor para la clase Limpiador de texto | class CleanText:
def __init__(self):
pass | 1 |
1bd3eaf62084dba211a1186e5de97a40 | 060091ea8da91f6ccb5ea925ed428c2e | 从被删除节点的父亲开始重平衡AVL树 | public class MyAVLTreeMap<K,V> extends TreeMap<K,V>
@Override
protected void rebalanceDelete(Position<Entry<K,V>> p) {
if (!isRoot(p))
rebalance(parent(p));
} | 1 |
ff1c57fb3882e38e25933f4fb51e64d3 | e8436312e8242dfade1b42d8b89dba61 | 检查Item(工种)是否全部被选中 | export default class Department extends Component
allChecked() {
const { jobs } = this.props;
const { checkedList } = this.state;
return !!(checkedList.length && checkedList.length === jobs.length);
} | 1 |
7089689bf1f3ff4814afd2acd79275f7 | f22e9cffde0cbd14ceec921f0da1e083 | 获取已知卫星的频率带宽 | class WSST(Base):
def get_fre_band_arr(self):
fn = self._lib['wsstObj_getFreBandArr']
fn.argtypes = [POINTER(OpaqueWSST)]
fn.restype = c_void_p
p = fn(self._obj)
ret = np.frombuffer((c_float * self.num).from_address(p), np.float32).copy()
return ret | 1 |
f2ae8b36b8abef7e7740bfe57a7d4cd8 | 8f6138dd67f27a4796e0a61e9ec50dfd | 在屏幕上创建一个新的字母 | char c = currentLetterIndex.charAt(0);
int j = (int) c;
String newLetterIndex = String.valueOf(Character.toChars(j+1));
JLabel columnHead = new JLabel(" " + newLetterIndex);
columnHead.setBorder(new MatteBorder(0,0,2,0,Color.LIGHT_GRAY));
columnHead.setPreferredSize(new ... | 1 |
69036b90db221328d7ba7f3b65222197 | 947fb0c5b8ebba85a703c79253d43a43 | will be left with 'year-month-day hour-minute-second' | human_readable_time human_readable_time::from_date_time( const std::string& dt )
{
return from_format( dt, "%Y-%m-%d %H:%M:%S" );
} | 1 |
4c57dd453dd61ee68f994b015864f049 | 470da58b64d85d978fa0b93e8bc9a103 | Zwraca czy istnieje błąd niepozwalający na poprawne wypchnięcie zmian. | public abstract class AbstractVarEditor<V>
implements IVarEditor<V>
public final boolean wasChanges() {
return wasChanges;
} | 0 |
2377d8448cc839cf3a80177203b79d36 | 49ac34546e0bc003e3b22e00c3bafa23 | Forcibly reapplies the transform to all the source items. | public void reApply(Store store); | 1 |
70c88259f1a4bd8f3c2f898b99f7c5fc | 6e2a6d661f9f1ac7b6b897ab6ea0701f | This function will append evaluation metrics for each model type, target variable,
and metric type, along with the metric value into our eval_df data frame object. | class Results:
def add_eval_metrics(**eval_metrics):
for eval_metric, value in eval_metrics.items():
self.results['eval_metrics'][eval_metric] = value | 0 |
91dbbf7053da62a07d46fdce2e030c26 | 3e8195b58574a13c2f9902bd522231da | Take the intersection of two Counting Bloom Filters | public class BloomFilter extends Message
public void merge(BloomFilter filter) {
if (!this.matchesAll() && !filter.matchesAll()) {
checkArgument(filter.data.length == this.data.length
&& filter.hashFuncs == this.hashFuncs
&& filter.nTweak == this.nTweak);
for (int i = 0; i < data.length; i++)
this... | 0 |
14bac9fa4395d82d588350e053f42e49 | f95b4d436b479e5ba22fbfdc3aa5f5ef | Decrypt encrypted data using a provided cipher context | {
$this->validateOneTimePad($oneTimePad);
$last = count($this->ciphers) - 1;
for ($i = $last; $i >= 0; $i--) {
$cipher = $this->ciphers[$i];
$cipherData = $cipher->decryptData($cipherData);
}
if (!empty(trim($oneTimePad))) {
$cipherData = $... | 1 |
c83bfeb212391b1a5487c82eee2212ac | 3735ae376bbbca3548e84e715a35f07a | 批量更新(首页分类名称关联产品分类)信息 | @Controller
@RequestMapping("products")
public class ProductsController
@RequestMapping(value = "/saveIndexs1", method = RequestMethod.POST)
public ModelAndView saveIndexs1(String id1, String gid, String indexs1) throws Exception {
ModelAndView mav = new ModelAndView(com.baofeng.utils.Constants.COREWEB_BUILDITEMS + ... | 0 |
a08d199168b97a898eb6b41dee2cf873 | 69338b8729c451e2ec34a1b34551e508 | Get the current floor height from object's transformation | if (floorProjectionPlane != null) {
tmpRay.origin.x = at.x;
tmpRay.origin.z = at.y;
tmpRay.origin.y = -10000;
if (Intersector.intersectRayPlane(tmpRay, floorProjectionPlane, tmpVec)) {
return tmpVec.y;
}
} return currentFloorHeight;
} | 0 |
5b23eccaa3a283288d1fb7a26522faae | bf2655ef2a2bcef73e585933af7a10ec | Helper function to write the full (noisy) simulate dataset to an H5 file. | def tohdf5(matrices: Iter[np.ndarray], labels: Iter[int], outfile: str) -> None:
try:
import h5py
except ImportError:
raise ImportError("can't use h5 backend, h5py not available")
f = h5py.File(outfile, "w", libver='latest')
columns = "time freq amp phase bw"
labellist = aslist(label... | 1 |
3268e9de8f32c9c93c1cea107ed60e50 | dc0ed1d0b32e50c0b75c792e014d9f69 | Add a command module from a <see cref="Type" />. | namespace Discord.Bot.PreBuilt
public sealed class SimpleCommandHandler : ICommandHandler
public async Task RegisterModuleAsync(Type t)
{
await _service.AddModuleAsync(t, null);
} | 1 |
01b59ba950bb552e046bcc22ab6f3a7e | f3218bbde541b18f32b9013d92ab7bfe | State will include (i) joint angles and (ii) joint velocities | class FreeAgentROS(AgentROS):
def get_state(self):
return [self.obs, self.joint_angles] | 0 |
134bd4c72aa8cc7b4e5049718dd6ecf2 | 4e35054bef023287b58b0e895e8a8918 | Triggers threeDInitRequest with MessageBus THREEDINIT event and publish this event with data. | class ControlFrame extends Frame
private _requestThreeDInit() {
this._payment.threeDInitRequest().then((result: any) => {
const messageBusEvent: IMessageBusEvent = {
data: result.response,
type: MessageBus.EVENTS_PUBLIC.THREEDINIT
};
this._messageBus.publish(messageBusEvent, true);... | 1 |
87d363ce24bb45902b014a72d114995c | 445b16e31170588c68bff2a6c12697f2 | Method used to get the list of custom fields associated with a
given project. | namespace BugNET.Providers.DataProviders
public partial class SqlDataProvider : DataProvider
public override List<CustomField> GetCustomFieldsByProjectId(int projectId)
{
if (projectId <= Globals.NEW_ID) throw (new ArgumentOutOfRangeException("projectId"));
using (var sqlCmd = new Sq... | 1 |
6b3753242042730c59a824833047332d | 37080a04e30a88a37abbdd09a70699c7 | 获取注册登录页面的title | public class Registration_FirstPage
public String getLoginTitle(){
return driver.getTitle();
} | 1 |
73737b19d413e892caa39d668a206531 | 1eb7bf83af043809bfb08e313855334b | Retourne de façon formatté les instructions JS | {
$jsInline = '';
$jsFooterInline = '';
if (!empty($this->jsInline)) {
foreach ($this->jsInline as $name => $properties) {
$jsCode = '/*' . htmlspecialchars($name) . '*/' . LF . $properties['code'] . LF;
if ($properties['forceOnTop']) {
... | 1 |
fc564f0e113cea1356345703b903a8d6 | 3bbd3ab5d920df84aced307e88c5afae | Imprime la petición en el formato estándar.
Es llamado desde el método __toString de la petición y su
formato de salida es igual a como se debe introducir la
petición en la barra de direcciones del navegador:
Cadena de texto con la salida estándar de la petición. | class request
public function __toString(){
return (string)($this->request_no . "\t" . $this->product_name . "\t" .$this->producer . "\t" .$this->images . "\t" .$this->name . "\t" .$this->name_read . "\t" .$this->mail_address . "\t" .$this->other);
} | 1 |
86b52b13a807c42b5809f83a1dabdc21 | 47b5affae15c59cb55a86fdf0c86a7f3 | Setter for <code>order.BalanceVip.remains</code>. 当月余额 | public class Ctr0002s01Entity extends PageBaseEntity
public void setRemainderAmount(BigDecimal remainderAmount) {
this.remainderAmount = remainderAmount;
} | 0 |
8004034e67f94bcf671fd7ca0acd2723 | cfba7223b8d5c9bf7a9a9dfeb91dd6be | 布尔条件初始化为false | namespace DotMaysWind.Data.Command.Condition
public class SqlConditionBuilder
public SqlBasicParameterCondition False()
{
return SqlCondition.False(this._baseCommand);
} | 1 |
297ed6371ff45ab1d239b0b36013b87e | 16a04142a077718d2710b09a46ab0a0d | öğrenci idsine göre öğrenciyi ait ekinliği siler | @ContextConfiguration(locations = {"classpath*:/META-INF/assignment2/beans.xml"})
@Transactional
public class DefaultStudentSystem implements StudentSystem
@Override
public void delDegree(int degreeId) {
Degree d = degreeDAO.getDegree(degreeId);
Collection<Student> s = studentDAO.getAllStudents();
for(Student st... | 0 |
07d32525b3f4bf4ca7b6a40a369b3d86 | a0dcf750d3947788032a9d2ce88e4033 | Callback executed when there is a redis error. | public function onError(\Exception $e, Connection $connection = null); | 1 |
affb1c6cf1b8c738ce7d626b374d46cc | 066293f806d4859caf9e0b430e619fdb | Subscribes to the joined world event. | {
Node * n = GetNode();
PhysicsWorld2 * w = ItemBase::getWorld( n );
if ( !w )
return;
SubscribeToEvent(w, E_PHYSICSPOSTSTEP_2, URHO3D_HANDLER( ItemBase, OnPhysicsPostStep ) );
} | 1 |
2d59923fe89280240aebba00a680fe07 | 9e151d8611a401559350dd13f30dcc1a | Reads a single word from a file
assuming SPACE + TAB + EOL to be word boundaries | static char *
fget_word(char buf[256], FILE *fp)
{
int c;
char *cp;
while (!(c = getc(fp)) || isspace(c))
;
if (c == EOF)
return(NULL);
cp = buf;
do
*cp++ = c;
while ((c = getc(fp)) != EOF && !isspace(c) && cp < buf+255);
*cp = '\0';
while (isspace(c) & (c != '\n'))
c = getc(fp);
if (c != EOF)
unget... | 1 |
fec469735d25679189679b233b892397 | c8da0c5d6ebf698abb2ea4ea131e451c | Get Print Parameter | Bundle param = new Bundle();
if (printDensity >= 0) {
param.putInt(IDzPrinter.PrintParamName.PRINT_DENSITY, printDensity);
}
if (printSpeed >= 0) {
param.putInt(IDzPrinter.PrintParamName.PRINT_SPEED, printSpeed);
}
if (gapType >= 0) {
p... | 0 |
e7ab1e595d094bb62cb9e8d60c1cd95e | 79a6cd77a507e912be21cb351fd92a09 | Transpose the upper 3x3 part and zero the rest. For building
the normal matrix from the inverse of model matrix. | m03 = trans.x;
m13 = trans.y;
m23 = trans.z;
} | 0 |
06b07722af2313fe6a4efcc5dc7108c5 | a173d69d0c900becfc34a98be9dbc96d | Returns a Device with a vetu ploye field.
tinctures: a list of exactly two tinctures.
The outer sections are the 0th tincture, and the inner
lozenge is the 1st tincture.
location: a Rect representing the location on the screen of the vetu ploye
portion of the field. For a vetu ploye field on the full shield, the Rect s... | vert_locs = draw_corner_2D(triangles, angle, thickness)
mode('EDIT')
t = bpy.ops.turtle
t.select_all()
t.pd()
t.up(d=0.001)
t.up(d=wall_height - base_height - 0.011)
t.up(d=0.01)
t.select_all()
bpy.ops.mesh.normals_make_consistent()
t.pu()
t.deselect_all()
t.home()
... | 0 |
3c5d215d25ff2306b664f7db7404ae0c | 56030af5d07dc2265675a51f5c5c07b0 | Get nrolegajo. | public abstract class Direccion_atisBean implements javax.ejb.EntityBean
public abstract java.lang.String getDir_nro_lg1(); | 0 |
536d243445b9ce3838a53cfad6f27010 | 84dade7f1c9098b554c9915840d8886b | 初始化坦克状态 | Toolkit toolkit = Toolkit.getDefaultToolkit();
tankLeftImg = toolkit.getImage("resource/tankPicture/left.png");
tankRightImg = toolkit.getImage("resource/tankPicture/right.png");
tankUpImg = toolkit.getImage("resource/tankPicture/up.png");
tankDownImg = toolkit.getImage("resource/tankPicture/down.png... | 1 |
f34d7648eaf87db663c79ea80033830b | 024553e8b5e7e81eeae682840a095483 | Get recurrence end date. | public function getRecurrenceUntil(); | 1 |
e21946e02939ccf2a4f4258f99e05e4a | 3312402e4e2de2aa99f0664b1e69eedc | 批量测试,对mlp不做改动,返回正确的数据组数 | namespace cppNet
int network::evaluate_network(data_vector& test_data) {
int count = 0;
VectorF x;
for (size_t i = 0; i < test_data.size(); i++) {
x = feedforward(test_data[i].input);
float max = 0; int index = -1;
for (size_t j = 0; j < x.rows(); j++) {
if (x[j] > max) {
max = x[j];
index ... | 1 |
6f86ab3edffe6c8ceabe0f72ad13696d | dc2f8d826e840b8ab82c0db5a4e665bf | 增加技能经验 | void Player::AddExp(int32 val)
{
if(val <= 0)
{
return;
}
GetSkillInfoMgr()->AddExp(val);
GetPetMgr()->AddExp(val);
const int32 nMaxLevel = SystemConfigManager::Instance()->GetMaxLevel();
if (GetLevel() >= nMaxLevel)
{
return;
}
int32 nMaxExp = GetMaxExp();
va... | 1 |
d6ce17c9afa0a2224273d80de87c56cf | 11b00e87c97f9b34d045f94fb55db8ea | Tests that you can get items for an invoice | class InvoiceTest extends TestCase
public function testShow()
{
$invoice = factory(Invoice::class)->create();
for ($i = 0; $i < 3; $i++) {
$invoiceItem = factory(InvoiceItem::class)->create([
'invoice_id' => $invoice->id,
'item_id' => $i + 1,
]... | 1 |
1ed05e7abe79ab90329e6475c957f8ff | 5d1a6ab4bb0422731c011d983ef918a1 | decode a 4 char base64 encoded byte triple | {
if (NULL == in || NULL == out)
{
return B64_INVALID_PARAM;
}
uint32_t val = (b64GetVal(in[0]) << 18) | (b64GetVal(in[1]) << 12) |
(b64GetVal(in[2]) << 6) | (b64GetVal(in[3]));
out[0] = (val >> 16) & 0xff;
if ('=' != in[2])
{
out[1] = (val >> 8) & 0xff;
}
i... | 1 |
485cf30e1f7f226abb3e0e43d9f7c797 | 5507f4076e6b0e48f925ac30042f72a1 | Gets the relative weight for link capacity when the load balancing mode is set to
LB_METHOD_QOS. | class Pool
def qos_coefficient_rtt
super
end | 0 |
1df3e4788e8662f1eba2a1100ad21296 | 3760ed2178a23a12a90d7543957b6133 | 生成相应的form复选框 | class FormRepository extends Repository
public function getForm($data)
{
foreach ($data as $k => $v) {
$data[$k]['input_str'] = '';
if (isset($v['update']) && ! $v['update']) {
continue;
}
if (isset($v['values']) && is_array($v['values']) && ! ... | 1 |
1d9a7e79116165ae1a3cda0c7e76502a | c98c320344af2a82e127727cdf9eac39 | Controlamos el click de cada item del listView y mostramos los datos en los TextBox | namespace ej16peqbasedatos
public partial class Form1 : Form
private void BTmodificar_Click(object sender, EventArgs e)
{
TBnombre.Text = listView1.SelectedItems[0].Text;
TBcolorpelo.Text = listView1.SelectedItems[0].SubItems[1].Text;
TBraza.Text = listView1.SelectedItems... | 1 |
4fd0f5dd5fb3337ca879ca3cd431ff22 | dffe832fc844107dcf44d08b3b4dedb3 | 5. Получить список всех Учителей, преподающих в указанном классе | Klasse = Schulklasse.objects.get(Name=klasse)
partnerlehrer = Klasse.partner_set.all()
lehrerliste = [partner.lehrer.Kurzname for partner in Klasse.partner_set.all()]
return lehrerliste | 1 |
096d3d355dfa2d43c8e92f9be9384948 | 8543d58ca24db0e9c45f6d73cf0f74ad | 通过set集合判断子集有多少个“组件”。ps.组件是连续的 | boolean flag = false;
int position = 0;
for (Set<String> s : setList) {
String[] sArr = s.toArray(new String[0]);
String[] setArr = set.toArray(new String[0]);
for (int i = 0; i < sArr.length; i++) {
if (sArr[i].equals(setArr[i])) {
position = i;
} else {
break;
}
}
if (positi... | 0 |
ac15c0ba8e21d42c7a7504670abd148f | 20593082ea9d0f6afd2323f633aee682 | Regression test for https://github.com/bazelbuild/bazel/issues/9321 | files := []testtools.FileSpec{
{
Path: "WORKSPACE",
}, {
Path: "BUILD.bazel",
Content: `
# gazelle:js_grep_extern React //js/externs:react
# gazelle:js_rule_per_file true
`,
}, {
Path: "corp.js",
Content: `goog.provide('corp')`,
}, {
Path: "i18n.js",
Content: `goog.provide("corp.i18n");... | 0 |
fc0c9c1988964a15ed92cac513cfe4f7 | aa59d1e648a817a6d31f1fe7926e8e71 | remove part before @ | function trimId(id: string) {
return id.split('@')[0];
} | 0 |
f0e1c2c27f23347396a81bd3e8197ed1 | 6f4a53eed540098190414223925ff1f8 | The method that we expect all plugins to implement. This is the
method that our framework will call | class Plugin(object):
def execute(self, message, socket=None):
raise NotImplementedError("Class {} doesn't implement execute()".format(self.__class__.__name__)) | 1 |
85588d1127e5d28a4563e529bf50660d | e21367ad77237fd9a6987d1d0a344fbc | 只接受UserDTO类型的消息,并且设置为默认处理器 | @Component
public class SelfMessageConverter extends AbstractHttpMessageConverter<Person>
@Override
protected boolean supports(Class<?> clazz) {
return Person.class.isAssignableFrom(clazz);
} | 0 |
62e2760fa6af80dfad1e17d0ce0f2332 | 53a3da75997ede1cb89ec814e07f9dac | 构造神经元,目前只执行初始化超参数的步骤 | neuron_num_1st_layer = [self.input_dim, int(1.5*self.input_dim), 2*self.input_dim]
neuron_num_2nd_layer = [int(x/2) for x in neuron_num_1st_layer]
self.neurons = list(zip(neuron_num_1st_layer, neuron_num_2nd_layer))
self.neurons = [list(x) for x in self.neurons]
self.optimizer = ... | 1 |
6385fe12b5fbf121bf46f358bc50a938 | 40e84b5cdde0e89b199a3c3356aa36ce | Executes the given method inside an open StreamReader. The caller is not responsible for opening, closing, or
cleaning up after the StreamReader. | namespace NanoByte.Common.Streams
string Run(Action<StreamWriter>? onStartup, params string[] arguments); | 0 |
90ff9fc0fdb5049190169d7878c4fdd9 | dbcc6382443fa857838836f5f8789b29 | 可能な区間の組み合わせの中から最適な区間を求める | def best_fit(parts, wave, block, placed):
sort = []
for part_no in range(len(parts)):
if (part_no not in placed):
for comb_no in range(len(parts[part_no][0])):
part = parts[part_no][0][comb_no]
if (overlap(part[0], block) == 0):
sort.append... | 1 |
668f699f5c8a5af2632b2274ef55e4a7 | ad447daf2fbad60dd32aae550f08eaf7 | Gets a list of all scene items in a scene.
Scenes only | namespace PlatformGameCreator.Editor.Scenes
class SceneScreen : GraphicsDeviceControl
private IEnumerable<SceneNode> GetAllSceneNodes(bool onlyVisible = false)
{
return GetAllSceneNodes(Nodes, onlyVisible);
} | 1 |
28e58fb04574270ba53c3a848af74160 | 6a6ad749246c8acbe22b1e9b4a3368f4 | Add a vector to this vector, returns this instance. | class Vector(ABC):
def __iadd__(self, other):
return self + other | 0 |
f0a60c3ab47095457f72a5b394286a16 | b00b7ac269b1dfb8c799f153e0be86c2 | POST /institutes
POST /institutes.json | class InstituteController extends Controller
public function addInstitute(Request $request){
$instituteName = $request->input('instituteName');
$sequence = $request->input('sequence');
$institute = new Institute();
$institute->instituteName = $instituteName;
$institute->sequence ... | 1 |
395c64472c1ab133a3832710f36211cc | aadb3481d1facd3f8fbfa0d4ae64806c | Setter for property fieldLength. | public class X_AD_Attribute extends PO
public void setFieldLength(int FieldLength) {
set_Value("FieldLength", new Integer(FieldLength));
} | 1 |
1b901912fc8c4e5a2781c64037558cc8 | e3f6f3695b28bc6add65e3182101d73d | Is theItem a GroupItem? | {
CBCGPGridRow* pRow = TreeItem(hItem);
if (pRow != NULL)
{
ASSERT_VALID(pRow);
return pRow->IsGroup() && pRow->GetSubItemsCount() > 0;
}
return FALSE;
} | 1 |
111aa0c53cedd3bfafe5027d190526bd | 6dc40de7d81f1634377d22f96b4e9c1a | Obtain subject alternative names from the Python cryptography extensions object. | csr_object = x509.load_pem_x509_csr(csr)
sans = csr_object.extensions.get_extension_for_class(x509.SubjectAlternativeName)
names = sans.value.get_values_for_type(x509.DNSName)
ips = sans.value.get_values_for_type(x509.IPAddress)
return csr_object.subject, names, ips | 1 |
514b6b4328a42204ee1bbe0b5ca1f810 | f3fe3f5c0536e08d1d1a0596b3c6ba2d | Sets whether to use strings in lower case or not. | @DTOMapping(StringChoiceDTO.class)
@JsonContentType("stringChoice")
public class StringChoice extends Choice
public void setCaseInsensitive(final boolean caseInsensitive) {
this.caseInsensitive = caseInsensitive;
} | 1 |
330062d06a1bf9fd0979ae88988f93dd | e94cdaf19ac9e386d22123039c706a6d | Returns a regex that is used for determining the extension of a file
name. The first match group will be the entire extension, including the
leading period. | RegExp getTokenRegExp(); | 0 |
db259147db612e2c51cf73d4561dd082 | 0f7bc672e1432931f0a84bd872513180 | @brief This function handles TIM0 global interrupt request. | if (__HAL_TIM_GET_FLAG(&htim6, TIM_FLAG_UPDATE) != RESET) {
if (__HAL_TIM_GET_IT_SOURCE(&htim6, TIM_IT_UPDATE) != RESET) {
__HAL_TIM_CLEAR_IT(&htim6, TIM_IT_UPDATE);
Stopwatch_hook();
}
}
} | 0 |
e7f02fe59b1c17302ea2b94b87afbbd8 | 6d810c0b31af27c2411c03e4cc73697f | この要素が保持する子要素から指定の要素選択ルールに適合する要素を取得する。<br/>
要素が存在しない場合、空のリストを返却する。 | if (parent == null)
throw new RulesManagerException("parent is null");
Vector str_children = getChildren(parent);
if (pre_check && !isValid(getNodeName(parent), str_children))
throw new RulesManagerException("element <" + getNodeName(parent) + "> has invalid content: " + str_children);
return getAlternati... | 0 |
3c4129e88f78ccc23a13bd83fbf888df | 13709d530bc5d667b69e6f8496278489 | Allow user to change the current world size | void PhysicsWorld::set_size(GLfloat const size_x, GLfloat const size_y)
{
_size_x = size_x;
_size_y = size_y;
} | 1 |
9a6ae20a1c20b46c3f8a320944b12dae | 94c54b0efb15306e76fb972e9ea8b76d | condition of EVENT_TO_GRAVE + destroyed_by_opponent_from_field | local owner = self:getOwner()
local battleData = getGameData():getBattleDataMt()
return cndNum2is2(self, nil )
end | 0 |
4c31f306e2f322d057683d7390d2953e | f14be71854aab0ca7617ae952fdc50b8 | 一个字段ui对象, 对不同的类型输出不同的html代码 | if(DATATYPE.SELECT.equals(this.getDatatype())) {
return UIUtils.buildCombox(this);
}
HiddenField hf = new HiddenField();
hf.setId(this.genUniqueId());
hf.setName(this.getItemkey().trim());
hf.setValue(this.getDefaultvalue());
return hf;
} | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.