query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
d925e1bfd09d83cdf8e065687d095af2 | b11af9b57ec1c4bb4eadfd2a485134d5 | 在activity的onDestroy时调用,销毁释放mVideoView | public class Screenshot extends Activity
@Override
public void onDestroy() {
mOrionVideoView.onDestroy();
super.onDestroy();
} | 1 |
29a4436c17c8f37d0d1bf8cc87f3266e | dc52c4a244f3b6e9a87e7c17c56399cd | This function is used to flash erase for BLE. | {
uint32_t ulApiResult;
if(ucFlashSaveFlag == 0) return;
ulApiResult = ulFlashErase(FLASH_START_ADDR, 1);
if(ulApiResult == 0)
{
ulApiResult = ulFlashWrite(FLASH_START_ADDR, sizeof(BondID_t), (uint8_t *)&xBondPhoneID);
if(ulApiResult == 1)
{
}
ucFlashSaveFlag... | 1 |
82af6857315b677281ad50fedd728ceb | 0d5905c581cf6f82503e4736ffced9c4 | 获取投资事件ID数组 | class Log
public static function getEventIdList()
{
return array(
self::EVENT_ID_TASK
);
} | 0 |
0342928e3b11a2dd76e2925a96fd2a62 | 28fa3c8cbac5b114e094750910ab16d1 | метод поиска компьютера по имени | void MainWindow::on_searchComp_textChanged(const QString &arg1){
ui->cmpSearchLabel->clear();
string input = ui->searchComp->text().toStdString();
list<Computer> cmp = item_manager.searchComputer(input);
displayComputers(cmp);
} | 1 |
558572edbf958a1ba1fa23c1322f08bd | 4fcf790826c4d11fc7f8cd27a1dabd31 | Return the display size associated with a plot before
rendering to any particular format. Used to generate
appropriate HTML display.
Returns a tuple of (width, height) in pixels. | class ELCustomDisplay(pylink.EyeLinkCustomDisplay, EnvAgent):
def size(self):
return (self.__imgwidth__, self.__imgheight__) | 1 |
eae6b5763a3ab9de05e3c66a2cff9b57 | 2a3506f527a9468b2315b719efe79746 | Método encargado de obtener la información de la campaña partiendo del nombre de la misma | namespace OCM.WebServices.Services.Private.Contract
[OperationContract]
CampanaDto ObtenerCampana(string campana); | 1 |
3cb786430ab2dcfd159e502257da7b84 | bf871e073b1a10c511a2c04aebde9a3c | Passes on the animal object to be edited to the Dao | @ResponseBody
public Animal setAnimal(@RequestBody Animal animal) {
animal.setCreator(animalService.getAnimal(animal.getId()).getCreator());
return animalService.setAnimal(animal);
} | 1 |
45f0d0c1c5d584afd39d7067b62bdafe | 7af823cbce5a5d944534f27de7ff9d93 | Returns the number of clients from the list
O(1) | public class TeilnehmerListe
public synchronized int getSize() {
return m_ClientNum;
} | 1 |
4d39bfb53a796f6dd783d70e2453de98 | bab9c3dec8107f7a77caeda22392ebd8 | Generates 0 | int CPU::op_00(CPURegisters *registers)
{
return 4;
} | 0 |
874adccfd1ba761268d76a99fab48d3e | b89c5ab769268f7a420a58835ea7b87a | Fuehrt eine Datumsuche aus mit den eingestellten Daten aus. | void Model::search(QDate date, bool _date, QString person, bool _person,
QString type, bool _type, int density, bool _density, int flag,
QString pattern, bool _description){
s_items->clear();
Data *item = new Data();
if(_date && _person && _type && _densit... | 1 |
32460a3dc3dc3aa1f82735cab10e41d5 | 86d5fde2a7823a375f821c1825878949 | method to return viscosity of the phase | public double getViscosity(); | 1 |
531df3b85d55c50ae87f46bae3f2d45e | 9e2a115b58324fb1bbc1d89bd1b660f6 | The Coroutine that animates the movement of the content rect of the ScrollRect this component is controlling. | _coroutineIsRunning = true;
while (!MathUtil.IsApproximate (_rectTransform.anchoredPosition, _initialPosition)) {
_rectTransform.anchoredPosition = Vector2.Lerp (_rectTransform.anchoredPosition, _initialPosition, 10f * Time.deltaTime);
yield return null;
}
if(_backObjectWhenFinish != null)
_backObjectW... | 1 |
3c03876b5f2c1d23e492ab73cc58511b | f4a24c405f2c65bf38a6b3109042c729 | Update UI with new selected color | Button b = findViewById(R.id.currentColour);
if(i < colourCodes.length){
b.setBackgroundColor(Color.parseColor(colourCodes[i]));
colourPicked = colourCodes[i];
}
} | 1 |
b7b0b6d7915a67efe8dccdc783e24241 | e137ea05357f58bd160d9f1a9ec62028 | Counts processes that are created until cancellation is requested. | public function getIdleProcesses(): int; | 0 |
92a6deb73048c05a0e594a31c8b69b4f | 9786d0a95ac3b7c07cfe67a75a09ab17 | Convert a findmypast date integer of form 19260504
into a date string of form 1926-05-04. | if (i.v == -1) { return ""; }
double stamp = (unsigned int)i.v;
if (stamp == 0 || stamp == -1) { return ""; }
time_t myt = stamp*24*3600/197.2;
stringstream st;
st << std::put_time(std::gmtime(& myt), "%b %e, ");
string retval = regex_replace(st.str(), regex(" "), " ");
st.str(""); ... | 0 |
c4644b0c2f975f117664582e0bbee14c | 9aaa5c5683fe7da118afc3a7e03db154 | Transforms position from canvas space into screen space. | {
Vector2 viewportPosition = GameManager.Instance.GameCamera.Camera.WorldToViewportPoint (worldPosition);
Vector2 canvasPosition = new Vector2(
((viewportPosition.x * canvasRect.sizeDelta.x) - (canvasRect.sizeDelta.x*0.5f)),
((viewportPosition.y * canvasRect.sizeDelta.y) - (canvasRect.sizeDelta.y*0.5f))
);... | 0 |
a04d84d0771cd9f3dd49bd4ff3c6399f | 29c04429d1ab9cd1283f5d672fa2c413 | Set a property of one or more torrents. | namespace QBittorrent.Client
[ApiLevel(ApiLevel.V2)]
Task ChangeTorrentPriorityAsync(
TorrentPriorityChange change,
CancellationToken token = default); | 1 |
48f2173c3011b79b71e109d31fe7ff86 | 68f4a57407e4e512d848fa15f70ee50c | 每个1s显示当前的时间 | new Thread(() -> {
Calendar cal;
JLabel time = new JLabel();
time.setBounds(125, 4, 50, 30);
show.add(time);
while (true) {
cal = Calendar.getInstance();
time.setText(cal.get(Calendar.HOUR_OF_DAY) + ":" + cal.get(Calenda... | 1 |
604efacbbd87f16afa6aa7964b27b868 | 4e020f028979293706feccb93917a83b | Get the probabilities associated with each feature. This technique
uses the max across probabilities to form the global probabilities.
This method should be called after fitting the SP. | wgts = [(self.probwgt(features, l), l) for l in self.labels]
Z = sum([w for w, l in wgts])
prob = [(w / Z, l) for w, l in wgts]
return prob | 0 |
794a465b65a65af3448e13886b561d26 | 702bb94d30bde0ed2de09c2aa7956707 | 创建CIFAR10图像识别模型 | def weight_variable(shape, name='weight'):
init = tf.truncated_normal(shape, stddev=0.1)
var = tf.Variable(initial_value=init, name=name)
return var
def bias_variable(shape, name='bias'):
init = tf.constant(0.1, shape=shape)
var = tf.Variable(init, name=name)
retu... | 0 |
6d3d79fcf3d2ff0d264764d19458a215 | b933e8412d9a956919546b26668e2877 | Add milli seconds to stored time. | void InchiTimeAddMsec( e_inchiTime *TickEnd, unsigned long nNumMsec )
{
clock_t delta;
if ( !TickEnd )
return;
if ( FullMaxClock > 0 ) {
delta = INCHI_CLOCK_T(nNumMsec);
TickEnd->clockTime += delta;
} else {
FillMaxMinClock( );
delta = INCHI_CLOCK_T(nNumMsec);
... | 1 |
d8a037c8784f152ffa8620d08ebfb6eb | 3cec10a71d360b7e9f1447bb1982c3c6 | 在第L关中检验怪物向右移动一次是否撞墙 | {
if (row + 1 < m_map[0].size())
{
if (m_map[row][i] != GROUND && m_map[row + 1][i] == GROUND)
return true;
else if (m_map[row][i] != GROUND && m_map[row + 1][i] == LADDER && m_map[row][i] != LADDER)
return true;
}
return false;
} | 0 |
701886f47955558319a2fbdcab2e98c2 | 18e8ca2aa53b7b632a241619df772c46 | Setter for <code>mysql.db.References_priv</code>. | @Generated(
value = {
"http://www.jooq.org",
"jOOQ version:3.8.4"
},
comments = "This class is generated by jOOQ"
)
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class TMallRoleprivileges extends TableImpl<TMallRoleprivilegesRecord>
@Override
public List<ForeignKey<TMallRo... | 0 |
4578379411e1e2ff6703febf38a503d2 | 3fe0721c72f1cb34c4e6906b40a049f9 | 初始化单选组件 | super(config);
this.isMultiSelect = config.isMultiSelect ? true : false;
this.init();
} | 0 |
d29e4d029e99f404392fb87b028cb017 | a019d35aab1e30542e5624f57f795768 | 导出客服详情列表 | @ResponseBody
public void exportData(HttpServletRequest request, HttpServletResponse response) {
DzdResponse dzdResponse = new DzdResponse();
String cname = request.getParameter("cname");
String telephone = request.getParameter("telephone");
String bname = request.getParameter("b... | 1 |
67b8f3a026fb847d7e7ef462311e6d68 | 48aab977278b6f824047182d6a523376 | 根据skuId删除对应的sukInfo对象数据 | public int delete(String ski_id); | 1 |
a7ac5c00c48385d2d542cdfd7aea19fc | a77e5eab617720742e0a62a6403566f6 | @brief Start LCD Scrolling. | uint8_t i;
for (i=0;i<n;i++)
{
Shift_cursor (RL);
LCD_PORT_CMD->BSRR =A0_Low;
LCD_PORT_CMD->BSRR =E_High;
LCD_PORT_DATA->ODR = 0xA000|(0x20);
LCD_PORT_CMD->BSRR =E_Low;
Delay(40);
Shift_cursor (RL);
}
} | 1 |
09d47a873b4c747e67c0b92a27c9bd45 | 327fa04434fccd92f007f1f9b3d96cef | Guarda los datos del medio de pago cheques | {
$request = $_REQUEST;
$tipoid = SessionGetVar("tipoid");
$id = SessionGetVar("id");
$farmacia = SessionGetVar("farmacia");
$documento = SessionGetVar("document");
$Cheque = SessionGetVar("valorconDescuento");
$nocheque=$request['nocheque'];
$banco=$request['banco']; ... | 1 |
18a1f82da4cf7ddfdfa6d560ee36061e | 7b6300ca7b982a0c12e1e8d7414fae9c | 根据指定的条件删除数据库符合条件的记录,T_S_SOLUTION | public class ApasTimesManager
public boolean doDeleteByCondition(String condition){
return dbObjectManager.doDeleteByCondition(condition);
} | 1 |
82f5aef9121efd568d205c5bd949fe62 | c65ca526180ef255e53d51d22d919651 | Creates a new module component (just the header info). | class ModuleComp(om.ExplicitComponent):
def __init__(self):
om.ExplicitComponent.__init__(self)
self.module_name = mod | 1 |
55b0ff50d942e6d533b901736be88dd2 | b72b58347f3548e5e6be56407c9a4438 | 用户修改时用 除该客户ID外是否有其他相同的客户名 | boolean isHaveOrther = false;
String staffCode = GlobalInfo.getInstance().getProfile().getUserData().userCode;
for (CustomerInputQuantityDetailDTO detail : customer.details) {
if(!staffCode.equals(detail.UPDATE_USER)){
isHaveOrther = true;
break;
}
}
return isHaveOrther;
} | 0 |
61f54482ed92e4aea7ee7831f0adf5c1 | e0ea9458d39281d3f56d0e902fa28303 | 获取path上的图片,使用BufferedImage保存 | public BitmapDrawable getImageDrawable(String path) throws IOException {
File file = new File(path);
if (!file.exists()) {
return null;
}
ByteArrayOutputStream outStream = new ByteArrayOutputStream();
byte[] bt = new byte[BUFFER_SIZE];
InputStream in = new FileInputStream(file);
int readLength = in.re... | 0 |
7d8b8d3b8ece882379476095bea9ef99 | d23a698f71cafe25f62518663c2e45d0 | LandListView的点击事件,横屏当点击时右侧fragment显示单词数据。 | namespace DpkViewer
public partial class WinDpkMain : Window
void listStringViewDpkWords_ClickItem(object sender, ListStringView.ClickDataItemEventArgs e)
{
if (e.ChangedButton == MouseButton.Right)
{
DpkWordItem item = (DpkWordItem)e.Item;
int val = (... | 0 |
c9c4e8a3a486e5f117d1aa53b651809b | 067ef7236fffb1a13ecac7bf6d6008b4 | yearly play chart data for use with BarCharts from React Recharts library | function prepareTimeChartData() {
var yearEntries = [];
var yearStats = {};
var minYear = 1e6;
var maxYear = -1e6;
var maxYearCount = 0;
$.each(entriesMap, function(k, v){
if (!yearStats[v.year])
yearStats[v.year] = 0;
yearStats[v.year] += 1;
if (yearStats[v.year] > maxYearCount)
maxYearCount = yearSt... | 1 |
a78a576362e984b4f983b70a413c5c11 | cab579f6d0d922599ab876db1ce8eec2 | 计算课程售价 | price = float(self.price)
if expire_id > 0:
expire_obj = self.course_expire.get(id=expire_id)
price = float(expire_obj.price)
r_price = price
a = self.activity()
if a:
sale = a[0].discount.sale
condition_price = a[0].discount.condit... | 1 |
da2ea155f802f916371006b52b840781 | 3890a0ac1497d2037a7af2702b00b788 | Метод определения того, что у клиента имеется арендованное оборудование | class User
public function isRent()
{
return (bool) $this->rent;
} | 1 |
49393e9135c7ff2e37392a04d187b933 | c75c22d1bdc86f06d0dc4f4138fcb432 | 用于将一个visual对象输出为一张jpeg格式图片 | namespace SoftwareDesign_2017
class SavePic
public bool SaveVisual(Visual visual,string url)
{
try
{
RenderTargetBitmap bmp = new RenderTargetBitmap(428, 248, 96, 96, PixelFormats.Default);
bmp.Render(visual);
BitmapEncoder encoder = ne... | 1 |
8150a3a529105f22dc59060cf9a2396c | 70b3cdcf9bfa6936750a184098e1d029 | Obriši sve knjige. | namespace BookCatalog
public class BookCatalog
public void ClearCatalog()
{
Catalog.Clear();
} | 1 |
3784d72388d9aad264cd418ecd93f952 | 1c7e1efa3637083a41ea33de337b8b29 | 根据bid查找农产品 | BookEntity findInfoByBid(Integer bid); | 0 |
b8a11a56fd13a482e4deace7afd21454 | 43d3bc97cc97e6008ac6c3f3a103ab43 | 将给定的参数用制表符(\t)连成字符串 | def convert_to_str(arg):
arg = str(arg)
if arg.isspace():
return " "
else:
return arg
return '\t'.join(map(convert_to_str, args)) | 1 |
454b330754c58b8938b5dddafafa32ee | 8ec6e2e31615358ed0951e87921406e9 | simulates round robin CPU scheduling | void roundRobin(struct Process p[])
{
int remainingRunTime[NUMBER_OF_PROCESSES];
int remainingArrivalTime[NUMBER_OF_PROCESSES];
int waitTime[NUMBER_OF_PROCESSES];
int turnaroundTime[NUMBER_OF_PROCESSES];
int responseTime[NUMBER_OF_PROCESSES];
for (int i = 0;i<NUMBER_OF_PROCESSES;i++)
{
remainingRunTime[i] = p[... | 1 |
72d06f84428ced98d04a323bbd704cf0 | 025e0f43b39463ef00a47350ce54418d | CHARACTER CO-OCCURRENCE NETWORK | def index_c(c_rstr, trail=False):
alphabet = [chr(x+65) for x in range (0,26)]
c_fstr = core.eng_filter(c_rstr, False, True)
c_len = len(c_fstr)
IC = 0
try:
for letter in alphabet:
IC += (c_fstr.count(letter)*(c_fstr.count(letter)-1))
IC /= (c_len*(c_len-1))/26
except... | 0 |
b71865d48a051b5b398c480884325dbe | 155c090a39aa2de4eeb23d774066f807 | #### Calculate total reads in a bam file in a range provided by Granges object | getTotalReadsInPeaks <- function(inputBam, peaksPath){
suppressMessages(library(Rsamtools))
accessibilityPeaks <- importMACS2narrowPeak(peaksPath)
accessibilityPeaks <- cleanGRanges(accessibilityPeaks)
param = ScanBamParam(which = accessibilityPeaks)
totalReadsInPeaks <- countBam(inputBam, param = param)
to... | 1 |
12afd0516db78c06ce7f4ba3cff086cb | e1ca382b3c73e0f9f5a0f6feb2895511 | 消费authorization, | OAuth2Authentication<? extends UnconfirmedAuthorizationCodeAuthenticationToken, ? extends Authentication> consumeAuthorizationCode(String code) throws InvalidGrantException ; | 1 |
090f4dc0afd8a35661ef26a3993ec839 | 4b3df0638ea47074f51da1b991dc3a17 | 기본키 생성 | @Repository
public class OrderRepository
@PostConstruct
public void init() {
SimpleJdbcInsert simpleJdbcInsert = new SimpleJdbcInsert((JdbcTemplate) template.getJdbcOperations());
SimpleJdbcInsert withTableName = simpleJdbcInsert.withTableName("orders");
insert = withTableName.usingGeneratedKeyColumns("id");
} | 1 |
fd75b63705f1a821705b451805e1cc91 | be697d69ac999103b97ac595b58ccef8 | Set tenant id. By default it is 'common'. | export default class FusionAuthClientNative
setTenantId(tenantId) {
this.tenantId = tenantId;
return this;
} | 1 |
7fe7cd1c1dbdc745349a15b5cb28a0ab | 4eda51c24922138b4605cc9cadfec0d3 | prints the url | function printURL (req, res, next) {
console.log(req.url);
next();
} | 1 |
87a9da7e54b50c4cc8832126b32a906f | b7c2e5f42fbe69c68fe757bca77addd2 | (z.manning 2010-02-18 14:08) - PLID 37404 - Function to find detail stamp by ID | @Stateless
public class StampServiceBean
public StampModel getStamp(String stampId) {
try {
return em.find(StampModel.class, stampId);
} catch (NoResultException e) {
}
return null;
} | 1 |
2666a908e2684daaddee80c1750f1fd7 | 0d73f7f0ad22075a89f9f5460ff5c65f | Ensure only active organizations belonging to the user are listed | qs = super(MigrateOrganizationMember, self).list_from()
m = MigrateOrganization()
organization_list = m._list_from()
qs = qs.filter(org__in=organization_list)
return qs | 0 |
f9c643b42ae14af5c7c1880032a7c167 | d431adcd2962b2839f74f9d34f5c1f3d | 根据项目id查询项目的github地址 | @Service
public class ProjectService
public List<String> findProjectUrlList(Long userId) {
String path = "/projects";
List<ProjectUrlBo> projectUrlBos = RequestUtil.getList(path, userId, ProjectUrlBo.class);
List<String> res = new ArrayList<>();
for (ProjectUrlBo projectUrlBo : projectUr... | 0 |
7a5fff379775255dc162773dbc944574 | 2ecf73a9b2ab0a8b371cb99c5acad1ed | metoda zajmująca się zapisem wybranego statku do pliku | namespace KasjerConsola.Klasy
public class DataStorage
private static void SaveWallet(StreamWriter writer, List<FaceValue> faceValues)
{
foreach (var item in faceValues)
{
writer.WriteLine(item.quantity);
}
} | 0 |
4338bd0b0c4307e68f317142afc38955 | da8c8710a4b9214c09949b15f5d5ce14 | Subscribe a batch of email addresses to a list at once. Maximum batch sizes vary based
on the amount of data in each record, though you should cap them
at 5k - 10k records, depending on your experience. These calls are also
long, so be sure you increase your timeout values. | namespace mailslurp.Api
ApiResponse<ValidateEmailAddressListResult> ValidateEmailAddressListWithHttpInfo(ValidateEmailAddressListOptions validateEmailAddressListOptions, int operationIndex = 0); | 0 |
8c2be4c2943f048cc1b0af387d840af4 | d0eaa029da0b9b6f25928b4ac90d590e | Callback handler when Bluetooth request enable finished. | public class EntryActivity extends AppCompatActivity implements EmpaDataDelegate, EmpaStatusDelegate
@Override
public void didRequestEnableBluetooth() {
Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);
startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);
} | 0 |
685a6c4755fc8fa1eb334804d4a6ca9a | c1eb64883d51814dc413f24b11ff41bf | Test that the heavy set can be computed from a given circuit. | yield ops.PhasedXPowGate(phase_exponent=0.44650378384076217,
exponent=0.8817921214052824).on(a)
yield ops.PhasedXPowGate(phase_exponent=-0.7656774060816165,
exponent=0.6628666504604785).on(b)
yield google.SYC.on(a, b)
yield ops.PhasedXPowGate(pha... | 0 |
3fde69ca69f2b779e1799a9afdf5020f | 9bf00ff486ddc2f4fe8271289f9af368 | 获取txt中的IP地址 | public class StringUtils
public static String getIP(String str) {
Matcher match = ipPattern.matcher(str);
if (match.find()) {
return match.group();
} else {
return null;
}
} | 1 |
652e5a94b59c3ae7022a1db5fec9d069 | 17e3dbe12648bf64b4bbeb5d5287c131 | Generate a new Bitcoin deposit address. | $request = array(
'GenerateNewKey' => true,
);
return $this->fetch_deposit_address($code, array_merge($request, $params));
} | 1 |
ad800d44c11ef2e54ca9f1cf1f5406ad | d986541784fbc29fc67d4ae8a76112eb | This method was generated by MyBatis Generator. This method returns the
value of the database column root_user_role_mng_mt.REG_DATE | public class TblOutgoing extends Combean
public String getOutgoingRegDt() {
return outgoingRegDt;
} | 0 |
b6a5e94901e40905534e3155cd4f7e3f | c0587a949f599684003cd69221eaa79e | Sets (as xml) the "resource_type" attribute | public class ActionButton
public void setResourceType( String strResourceType )
{
this._strResourceType = strResourceType;
} | 0 |
c697b05d464dd6b3b353310b85bbcbaf | cb3dce9aaf7c79560f193f31af4cf03c | Gets feed elements for specified user, optionally including only results after certain date | public JsonElement getUserFeed(IAccessToken token) throws SocialExerciseException; | 0 |
2c2aa8793b771263da74dcb35493b8e6 | 03c9161795c4a852194b28be11cae7f6 | Called each tick while using an item. | namespace UniInventory.Items [System.Serializable]
public class ItemStack
public void Use(EntityLiving user, float deltaTime)
{
this.useTime += deltaTime;
if (useTime >= GetItem().GetMaxUseTime(this))
{
this.useTime = 0;
GetItem().OnUse... | 1 |
2979815c449d7c9d4dcbbc96e70760ef | 05f3496e6e12d66c6d83a6cc2171651a | Find indices for a block based on behavioral data. | index = 0
while index < len(data):
if index + 7 < len(data) and data[index][attr_index] < data[index + 7][attr_index]:
index_table_.append([data[index][attr_index], blk_number_])
blk_number_ += 1
index += 7
elif index + 7 < len(data) and data[index][attr_index... | 1 |
5e0144e72e8198a4f4ba9cc2c2316692 | 0dc69b53b7d6fbc4dfc4c5276622fca8 | 移除加锁的包名 | SQLiteDatabase database = lockeddb.getWritableDatabase();
database.delete(LockedTable.TABLENAME, LockedTable.PACKNAME + "=?", new String[]{packName});
database.close();
context.getContentResolver().notifyChange(LockedTable.uri, null);
} | 1 |
5985975c3ff700f2fac99ee6ce97c5db | b86e633bdd36ba74ada70206b2834188 | обрезает у словоформ в массиве всякие знаки препинания, включая тире, сводит все
словоформы к нижнему регистру и возвращает массив словоформ | for i in symbols_to_filter:
if i in text:
text = text.replace(i, '')
formatted_text = text.lower().split(' ')
for i in water_words:
for j in formatted_text:
if i == j:
formatted_text.remove(j)
return formatted_text | 0 |
cdcd2ea11ff3eea6ac57be400ba881a0 | 045d3c483f90aea15b9a2f91f4f05c6e | 通过header.txt载入用于设置request的header | {
char buf[MAXLINE];
Rio_readlineb(rp, buf, MAXLINE);
int ua = 0, ac = 0, ae = 0, co = 0, pc = 0;
while(strcmp(buf, "\r\n") && strcmp(buf, "\n"))
{
if(strstr(buf, "User-Agent")){
sprintf(header, "%sUser-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.3) Gecko/20120305 Firefox/10.0.3\r\n",header);
ua = 1;
... | 0 |
2d6a20076fecb0c3ca8b3762ae34ce02 | d6c1fdd3c8437dc3779fd7cfad7939c9 | The name of the diffuse texture. | public class MTLMaterial
public String getDiffuseTexture() {
return diffuseTexture;
} | 1 |
e4d3f32e22c61f116a845bc0d953bea4 | 9b9c37d69c096c75af3def6373a16060 | Insert historic values using historic access.
The endpoint must be activated and connected and the module client
and server must trust each other. | namespace Azure.IIoT.OpcUa.Publisher.Service.Sdk
Task<HistoryUpdateResponseModel> HistoryUpsertValuesAsync(string endpointId,
HistoryUpdateRequestModel<UpdateValuesDetailsModel> request,
CancellationToken ct = default); | 1 |
7f481efcbf73be90de1e352102dd2599 | 50c303df6981af155047417464d3c644 | Given a string containing a GraphQL Type (ex. `[Int!]`), parse the AST for
that type.
This is useful within tools that operate upon GraphQL Types directly and
in isolation of complete GraphQL documents. | if (ast.kind === graphql.STRING) {
return this.parseValue(ast.value);
}
return null;
} | 0 |
bc328a22e69d2ef262db454ef53368c3 | c6c7a74efb5275e3d59af2229ea4d96b | 向量的叉乘>0为逆时针,<0为顺时针,=0同线 | long long ret = (checked.x - vec_begin.x) * (vec_end.y - vec_begin.y) -
(checked.y - vec_begin.y) * (vec_end.x - vec_begin.x);
return (0 < ret) - (ret < 0);
} | 1 |
e3c0bec4964414563d15acba4e9e10fe | cc844434b2d611b79c4010929b64383f | Delete the preview post | {
if ( !isset(self::$preview[$configName]) )
throw new CException('Invalid config key', 500);
list($filePath, $fileName) = $this->generatePath($id);
$fullName = self::PREFIX_PREVIEW.'/'.$filePath.'/'.$configName.'_'.$fileName.'.'.self::DEFAULT_EXT;
if (file_exists($fullName)) {
return @unlink($fullName);... | 1 |
fd10491d2edcc0861249041c301e8778 | 2c710a531706c0344ae39096387dc87f | Cancel a transaction, return true if succeed | class Transaction extends Api{
public function cancel($reason = null) {
if ($this->write(array(
'status' => self::STATE_CANCELLED,
'cancel_time' => Dater::serverDatetime()
))) {
return true;
}
return false;
} | 1 |
40b9a837181e802dce52f07aa4988a24 | b85006f7649d977b704a0ee2e903063c | Calculate the difference between two 3x3 matricies | {
result.M11 = left.M11 - right.M11;
result.M12 = left.M12 - right.M12;
result.M13 = left.M13 - right.M13;
result.M21 = left.M21 - right.M21;
result.M22 = left.M22 - right.M22;
result.M23 = left.M23 - right.M23;
result.M31 = lef... | 1 |
684f55bf9900d14c0482848c5375ea90 | 8b0e1c6fcf3f128242f85e19ff459f2d | Tidies up the contents of a text node from an ODD doc. | var nocode = /(?:^|\s)nocode(?:\s|$)/;
var lineBreak = /\r\n?|\n/;
var document = node.ownerDocument;
var whitespace;
if (node.currentStyle) {
whitespace = node.currentStyle.whiteSpace;
} else if (window.getComputedStyle) {
whitespace = document.defaultView.getComputedStyle(node, nul... | 1 |
422b5c6e8ab210b831282919f6edfba4 | 3776752a4ccae56bc6e5769c8955a173 | SiteMapGeneratorCommand constructor. | {
$this
->setDescription('Create a sitemap')
->setDefinition([
new InputArgument('host', InputArgument::REQUIRED, 'Set the host'),
new InputOption('scheme', null, InputOption::VALUE_OPTIONAL, 'Set the scheme', 'http'),
])
->setH... | 0 |
4dc43b69bfa2b0febf8d0eff20f59c6d | ff30b58f5569ee7740040cdb0934a57d | Reads configuration from user_dir/.crunch/config into a map of KVPs | void KScopeConfig::load()
{
uint i;
KConfig* pConf = kapp->config();
s_cpDef.fonts[FileList] = KGlobalSettings::generalFont();
s_cpDef.fonts[TagList] = KGlobalSettings::generalFont();
s_cpDef.fonts[QueryWindow] = KGlobalSettings::generalFont();
s_cpDef.fonts[Graph] = KGlobalSettings::generalFont();
pConf->setGro... | 0 |
c9cc4da2dae0bca390fd066f2bc24e01 | 3552e6cb1d0e08168a68a3ad2d9a5d25 | 编辑综合标准 | def edit_standard(request, sid):
action = request.GET.get('action')
menuid = request.GET.get('menuid')
power = checkpower(menuid, request.session['mylogin'], request.session['role_id'])
request.session['powerdata'] = power
if request.method == 'GET':
supervise_list = SupervisionType.objects.... | 1 |
f0c56d2a47c41ea18d008ddeb8e57ff0 | 9c22e2766e59738db6c155ab91a5e087 | Esvazia pilha de estados e o estado armazenado. | class PilhaContiguidade:
def limpa(self): self.topo = self.inicio = None; self.tamanho = 0 | 1 |
b76df52a79d5862414e1f6e93e91a326 | 803991cb9d8a5a4c05c2b6c5003d3681 | Returns the raw path component of this URI.
<p>
The path component of a URI, if defined, only contains the slash
character (<tt>'/'</tt>), the commercial-at character (<tt>'@'</tt>), and
characters in the <i>unreserved</i>, <i>punct</i>, <i>escaped</i>, and
<i>other</i> categories.
</p>
undefined | public class HttpQuery
public String rawPath() {
return decoder.rawPath();
} | 1 |
db43d1cdf2f556848cef2e70f5d3549d | 3fe3a93e6febf0fda4f52e764ef0e76b | Rounds number to the nearest integer | if (num > 0):
return int(num + .5)
else:
return int(num - .5) | 1 |
5d2d6f1b425a04908268cab2c5053f32 | 6bbcd2832042fefd30e84ba379312b8b | Poll cached right mouse button state. | public class MouseClicks extends GLFWMouseButtonCallback
public static boolean rightMouseDown() {
return rightMouseButton;
} | 1 |
77e95af6363a53b15ba4ae1034261107 | 037c9abf44cfde0068864668fda0ebb8 | System Denominator
Returns:
array_like: system's denominator | class ProcessParams(object):
def measure_system(self):
return self._measure_system | 0 |
dbee0af4463381f77a65122f27c7879d | 0dfe046cb8dd9be8b3ab30c50482ee35 | 查看挂载点详细信息。 | namespace JDCloudSDK.Zfs.Client
public class ZfsClient : JdcloudClient
public DescribeMountTargetResponse DescribeMountTarget(DescribeMountTargetRequest request) {
return new DescribeMountTargetExecutor().Client(this).Execute<DescribeMountTargetResponse, DescribeMountTargetResult, DescribeMountTargetRe... | 1 |
e28a263c14b9d2bbf03d6840f8b1189c | 86cfcf40f1115a5cfba0cc9e285131b3 | Modifies the mode group to contain both elements present in that object and the given collection. | namespace Drexel.Collections.Generic
new void UnionWith(IEnumerable<T> other); | 1 |
7e33b30731385d0130bbd41851d02c9a | 0c29fc3d179ba4eaf870fa2f83e978d9 | 회원 ID를 매게변수로 받아화 해당 회원을 수정하는 메서드 | public boolean modify(MemberDTO userDTO); | 0 |
278de2477bd9ac5157962671d1c84646 | ca7e625cf40ea812738a46bbe8065b0e | OCSP response stapling information. | ret_ad, args = jitter.func_args_stdcall(["hServerOcspResponse"])
raise RuntimeError('API not implemented')
jitter.func_ret_stdcall(ret_ad, ret_value) | 0 |
7460b3b75c34b79e8761f7d2c70ed76a | b0193662c68907a3c6509c60c1f7fb48 | Computes the body of a natural loop by a depth-first
search on the reversed control flow graph. | name = None
loop = LoopControl()
if node.variable is not None:
name = self.general_assign(value=loop, var_ast=node.variable, var_type=None)
value = self.visit(node.value)
for _ in range(value):
loop._count()
if loop.get_remaining_ignore_count()... | 0 |
c2a4c18197c4e6952f22a0132aae315f | 2612fbdba7dc36ed6d7cd7ab94d40a28 | getFilmeByDiretor
Busca os Filmes que possuem o diretor informado e retorna um array com objetos da classe lFilme. | void SearchByDirector(mediaStore mS[]) {
cout << "Type Film Director";
char dir[15];
cin >> dir;
for (size_t i = 0; i < length; i++) {
if (strcmp(mS[i].director, dir)) {
print(&mS[i]);
}
else {
cout << "Error: No Film has this director";
}
}
} | 0 |
b1c0c269ed72fc0a6769d9b879b37cf7 | 97cf07c182f11a49fbcc7a5305049f61 | Write data to the out stream.
Returns ARCHIVE_OK if all data written, error otherwise. | {
if (fwrite(data, 1, size, out) != size)
ccerr(F, "error while writing to the output file");
} | 0 |
b9efcd65301a052b0c855f68286c3326 | d2219e98106caa494626b43eece34bd8 | a handler which adds the current user to online userPool | function handleOnlineUser(event)
{
if (event.data.indexOf("plus1:") !== -1 && currentChat === "public")
{
var index = event.data.indexOf(":") + 1;
var usr = event.data.substring(index);
var newUsr = usr.substring(0, usr.indexOf("\""));
if (newUsr !== "")
{
usr = newUsr;
}
if (checkIfUserExists(usr) =... | 0 |
c5528f4e3e460a1b885b210b95f1a1b6 | ff2baf9415c916dd1109a7d3f228f8c7 | генератор факториала | def factorial(n):
a=1
fact=1
while(a<=n):
yield fact
fact=fact*a
a+=1 | 1 |
feee5a7cd79d304d859d79be4e2ffef4 | 6968b773fe44440e22e79c797c6e6355 | check if the bit is set, if so the port asset is owned | public class PlotManager : MonoBehaviour, ISaveableState
public bool isOwned(Position pos) {
return this.isOwned(pos.x, pos.y);
} | 0 |
cce9ae6460a0160a810058e93182b246 | c07eac365e1779a6881d48960bb8e9fe | 获取当前会话的Request | class Request(protected val req:HttpServletRequest /* 请求对象 */):H
public fun current(): Request {
return reqs.get()!!;
} | 1 |
f08c949f8c62abc1f3bfc90d2b073119 | 42033374a899fe0c5f24fe50403adf63 | Factorized Convolutional Unit
Reference: https://arxiv.org/pdf/1906.09826v1.pdf | dilation_rate=(1, 1), depth_multiplier=1, activation=None, **kwargs):
self.kernel_size, self.strides = kernel_size, strides
self.padding, self.data_format = padding, data_format
self.dilation_rate, self.depth_multiplier = dilation_rate, depth_multiplier
self.activation =... | 0 |
3f76d6f9ae97bd1bdcbc325a10ddc0cf | 489228bfc43ecdb69c2ef4d4e82f2f84 | Fill the movie textures dictionary | mxs = pymxs.runtime
self.texturefolder = texturefolder
self.mdlfolder = mdlfolder
self.basemdl = "PWOmniPBR_Opacity::PWOmniPBR_Opacity"
self.mat_dict ={}
self.rgbmult = 0.003921568
self.scene_materials = mxs.sceneMaterials | 0 |
38da34360d1468f3b7f7c6673c85a4d7 | 7d4669fdea2e051b5e10ed30685f3f33 | This lists all the report sections on the admin--> report master page | {
$q = Doctrine_Query::create ()
->from ( 'Report rp' )
->innerJoin ( 'rp.Module mo' )
->where('rp.report_id != ?', 7)
->orderBy ( 'rp.report_name ASC' );
return $q->execute ();
} | 1 |
cea43ca27742ed2d8ee43ef918ca47bb | c5eaafc2f9e60dec04298dcfeb15dac9 | 根据物料代码查找产品信息 | @Repository
public class ProductRepositoryImpl implements ProductRepository
@Override
public Product findByProductCode(String productCode) {
ResponseResult responseResult = productCloudRepository.findByProductCode(productCode);
Map<String, Object> resultMap = responseResult.getResult();
if (... | 1 |
fbee36e5c65787caea99dbdc5b91cf4d | 53c2be671898b203e7eaa179ed169330 | Asynchronously close the wire connection
Same as Close() but returns asynchronously | {
if (_client == null)
{
throw new InvalidOperationException($"Must call {nameof(SetupAsync)} before calling {nameof(CloseAsync)}");
}
return _client.CloseAsync();
} | 1 |
b8ffe40a02bef3888828c37b01bade13 | 552f4c5cab06783ecbbc2694bd00fd43 | Get the speed between two points in 2D space given the time. | def getSpeed(time):
return interpolateValues(SPEED_VALUES, time, True) | 0 |
6f11ab04a65f6ef71ce1ddcd1a4000dd | 526094c5908fc9563a823c36728d9015 | sets an async IO writer; callee should ref the interface | func NewWriter(w io.Writer) *Writer | 0 |
26aa859d1dee1432865da001c39a0ef4 | 4b7710eb809405886aebbc62fb3841ec | Retorna o Motivo do cancelamento da nota | class History extends Model
public function getReason(): ?string
{
return $this->reason;
} | 1 |
f71dbb224ad124622caae22771555d91 | 5c2718dd94c352383aa3e7df3c199095 | Evaluate the continuous heat-based kernel between dgm1 and dgm2 (more correct
than L2 on the discretized verison above but may be slower because can't exploit
fast matrix multiplication when evaluating many, many kernels) | bond_array_1, c1, etypes1, bond_array_2, c2, etypes2, sig, ls, r_cut, cutoff_func
):
kern = 0
ls1 = 1 / (2 * ls * ls)
sig2 = sig * sig
for m in range(bond_array_1.shape[0]):
ri = bond_array_1[m, 0]
fi, _ = cutoff_func(r_cut, ri, 0)
e1 = etypes1[m]
for n in range(bond_... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.