query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
f6fb46250562647432c7bb6561095423 | b8bbe1f9e1109160c230dfca9f3bf615 | Function
Synopsis [Dereference an ADD node.]
Description [Dereference an ADD node.]
SideEffects [The reference count of the node is decremented by one.]
SeeAlso [add_ref add_free] | int
ieee80211_node_dectestref(struct ieee80211_node* ni)
{
return atomic_add((vint32*)&ni->ni_refcnt, -1) == 1;
} | 1 |
b4f4ddf1b8280197afd1208dc6efc4dc | 65f42b885ea71a6b33698019a28dfc9a | Callback function for new ball detected | class SoccerbotRos(Soccerbot):
def ball_pixel_callback(self, msg: Pose2D):
self.ball_pixel = msg | 1 |
ff19b5d81d6eb50eda4bf407caaf9ed3 | 62daba87d7f4a5ba1b30325f1c1c8af4 | 修改弹性伸缩策略(V2版本)
修改指定弹性伸缩策略。修改弹性伸缩策略V2版本与V1版本的区别在于,V2版本支持修改伸缩资源类型。
Please refer to HUAWEI cloud API Explorer for details. | UpdateSecurityPolicyRequest request) {
return new SyncInvoker<UpdateSecurityPolicyRequest, UpdateSecurityPolicyResponse>(request,
ElbMeta.updateSecurityPolicy, hcClient);
} | 0 |
73547c4fc3e0a30161faad9936e33d8c | ac0032ef237990d3f4baaa2f7267716f | 执行指定的动作,如果遇到错误,则显示错误对话框 | namespace KaSon.FrameWork.Common.Utilities
public static class UsefullHelper
public static void TryDoAction(Action action)
{
try
{
if (action != null)
{
action();
}
}
catch (Exception ex)
... | 0 |
ca6b76fb6b3a0eee1835281a8276e571 | 0bbe774331ea585f43eab5d26440532b | コンポーネントの有効状態の設定 | public class DefaultComponentManager implements ComponentManager, ContainerListener
public void setEnabled(boolean value) {
this.enabled = value;
} | 1 |
d20ea645ef43416b5d0f8bc7951812e4 | fcf54ee4e69e3dac9474e20894fa889b | Activate or deactivate BFD feature toggle effect. | class StaticRouteNextHop(object):
def bfd_enabled(self, bfd_enabled):
self._bfd_enabled = bfd_enabled | 1 |
ec44f14d2b425597de9d080f7761b3e1 | 9723fc70b5da25ea4cc1e54ccf60230a | 存储当前用户是否曾开启阅后即焚的标识 | public class MyApplication extends MultiDexApplication
public void setIsTuicai(String tuicai) {
editor.putString("dc_istuicai", tuicai).commit();
} | 1 |
c4f9ea4c560030b005f220f2e1506458 | f1aa0c9d57cec089bbf128ba2519a477 | Update button state for mode changes (e.g. scenario edit vs game mode) | {
bool iEEGButtonEnabled = false;
bool IRMFButtonEnabled = false;
if (m_currentMode != null)
{
switch (m_currentMode.m_idMode)
{
case Mode.ModesId.NoPathDefined:
m_sceneButton.interactable... | 1 |
70c0ff357a51efa21dcec80fc65d4ccc | 5758a7f66c04848cc922066a5f72ec9f | Find all instances of @xxxx text and send slack notifications to those users. If the user doesn't exist slack will just ignore. | def main(config_path, cache_path, bom_url, search_string, notify_user):
config_file = os.path.join(config_path, 'config.ini')
config = ConfigParser()
config.read(config_file)
client_id = config.get('Hangouts', 'client_id')
client_secret = config.get('Hangouts', 'client_secret')
token_file = os.p... | 0 |
56f9f805ce0664c4d8aa20b6f9250441 | 76ed0218b2b71174e0a19bf857ed931f | se pueden escribir más datos | def appendText():
f = open('myText.txt', mode='at', encoding='utf-8')
f.write("texto para escribir")
f.close() | 1 |
8edeb95da017d8484a6c22ad764a12ee | 015891d2fd89c6756cb18e8df318c824 | Check if there is given letter. | for (int i = 0; i < alfab.length(); i++) {
if (c == alfab.charAt(i))
return true;
}
return false;
} | 1 |
b659e1584afe14ff950b9f225ac28ca9 | 4c4ea9e4bbe23bc60f3e4de45750d594 | Get permitted_action value.
Notes:
The permitted action to USE/EXTEND/READ/INSTANTIATE an entity Possible values are USE, READ, ALL, INSTANTIATE, EXTEND, DEPLOY, .
This attribute is named `permittedAction` in VSD API. | result = self._values.get("action_name")
assert result is not None, "Required property 'action_name' is missing"
return typing.cast(builtins.str, result) | 0 |
22d11a476c3802a11ede9cecd087e00d | 663117d9d2a7c93ad747489ca560f1b9 | The ``(y, x)`` coordinate, relative to the cutout data, of the
maximum pixel value of the ``data`` within the source segment.
If there are multiple occurrences of the maximum value, only the
first occurrence is returned. | class Bins:
def max(self) -> Union[_cpp.Variable, _cpp.DataArray]:
return _call_cpp_func(_cpp.bins_max, self._obj) | 0 |
db5e0ed3842e01b294413d5df9adf53e | 96437d262c3a9da3ac30775835df9a33 | Get the dimensions of an image (with cacheing) | function getImageDimensions(path) {
imgSizer.src = path;
return [imgSizer.srcWidth, imgSizer.srcHeight];
} | 0 |
547b6c408353ea2bd527b8e2ec1c19ca | 41385fcc582d5daceeac41d262dc4b62 | ● オートマッピングが更新されたときに呼ばれます。 | public class MainActivity extends FragmentActivity
implements GoogleApiClient.ConnectionCallbacks, GoogleApiClient.OnConnectionFailedListener,
View.OnClickListener, RealTimeMessageReceivedListener,
RoomStatusUpdateListener, RoomUpdateListener, OnInvitationReceivedListener,
OnMapReadyCall... | 1 |
70326c5fc97d66176aa5c18866b2046e | b798e020a5367df40f73dbfc52ce1fd4 | Get the physx Controller Manager of this world | PxControllerManager* PhysicsManager::GetControllerManager()
{
return controllerManager;
} | 1 |
0b6d094038f06aa5a7748690bfa75da1 | 9fa24901e6e48945a35d462e74274e6d | Same as increment_mins, but decrements instead of increments | class SReportSpawnDeath extends Component
subtractDeathMins(event) {
let newDeathTimeMins = this.state.deathTimeMins;
newDeathTimeMins = newDeathTimeMins - (event.shiftKey ? 10 : 1);
if (newDeathTimeMins <= 0)
newDeathTimeMins = 0;
this.setState({ deathTimeMins: newDeathTimeMins })
} | 1 |
2d02a6480b4f7668e4ab59c73b405850 | 2032e96762588527cbbd675b033ca80f | Select the nearest pickupable object to pickup | def pickUpNearestCoin():
items = self.findItems()
nearestCoin = self.findNearest(items)
if nearestCoin and self.distanceTo(nearestCoin)<30:
if self.isReady("jump"):
self.jumpTo(nearestCoin.pos)
else:
self.move(nearestCoin.pos) | 1 |
a6df78c6f0fda02890551786a6b3a8cf | c8a1a5fb962498cb1a32540fc85f7872 | GET /kitchens_sliders
GET /kitchens_sliders.json | class CookbooksController
def index
@cookbooks = Cookbook.all
end | 0 |
a91385485a5ad2b51428eef8492a61b7 | a202113dae7a1c9d3d0e43843f6064d9 | If we're not dealing with an absolute path, then we
need to get the *calling* code's directory, since
the sql file is being referenced relative to that location | function filedirnameFromCaller(): Result {
return filedirnameFromPath(
getCurrentLine({
method: 'filedirname',
frames: 0,
immediate: false,
}).file
)
} | 1 |
f8c14c29ea1f415e0e630edfa69ebfd7 | b231f1a2db845bc3f306ba686c47abea | frequency to midi pitch | def midi2f(m):
return 440 * np.power(2, ((m - 69) / 12)) | 0 |
b19f5cc71ded3ac77a7ae9f62979ae5d | 75f4776f598c556cb8673619c663b868 | Changes player position in player list. | public class XibaListUtil extends XibaBaseListUtil
public void removePlayer(int listPosition){
if (listPosition == mPlayingIndex) {
removePlayerFromParent();
addToContentView();
}
} | 0 |
2a7c9c7bd2f8084f0191d67c775563ad | ccfd5e4c17931a8e79eff7713cc738e0 | Con este metodo podemos decir si el estudiante aprueba o reprueba. | public class Student
public String finalStatus(){
if(average >= 28){
status = "Aprobado";
} else {
status = "Reprobado";
}
return status;
} | 1 |
1b610027244c6ca59b0fee9fb4896b2e | a6a56fc5b8b456ec0353aa7f73f4a735 | Находит объем параллелепипеда. | {
double S_osnov = pi * Math.pow(r, 2.0);
V = S_osnov * h;
return V;
} | 0 |
68c6a9edba609b4664678842bbf15b4f | 20717889d9300c49e4105eaba4c3179a | Add new buddy to list tail
Input:buddy list head, new buddy
Output:none | void buddy_list_add_chain(buddy_t *pHead, buddy_t *pTail, buddy_t *pList){
pHead->pPrev=pList;
pTail->pNext=pList->pNext;
pList->pNext->pPrev=pTail;
pList->pNext=pHead;
} | 0 |
66aedcd2938bd20c2d6727c6ab6734dc | e48a91e07e373ad2469b0bf84264946d | Obtains the Tick Resolution. | namespace _1wireXamarinForms.DalSemi.OneWire.Container
long GetClockResolution(); | 1 |
43d2995f753fe79632bfd695ed4be3cd | d4f8db80768648ee295007dcdececd99 | Se agregan los juegos disponibles para el casino | this->casino = Casino();
Mayor13 * juego1 = new Mayor13();
DosColores * juego2 = new DosColores();
masCercano * juego3 = new masCercano();
casino.agregarJuego(juego1);
casino.agregarJuego(juego2);
casino.agregarJuego(juego3);
} | 1 |
4f3ac0fe556f2f90c298ed47806178ad | a6662fb34822c72b43b6e542b21a3af2 | 会员登录获取token | @RestController
@RequestMapping("/educenter/member")
//@CrossOrigin
public class UcenterMemberController
@PostMapping("login")
public R loginUser(@RequestBody UcenterMember member) {
String token = memberService.login(member);
return R.ok().data("token",token);
} | 1 |
bb90275675be86e005950eb56f662a57 | eb43d9689017f3b05ea609e47b3be095 | Test when the access token is expired | async def test_token_expired_exception(authenticated_local_client, event_loop):
async with authenticated_local_client:
with pytest.raises(TokenExpiredError):
async with aiohttp.ClientSession(loop=event_loop) as websession:
client = await login(
TEST_HOST, TEST... | 1 |
2d3dd53f8b61f53285b13da45c62758c | 9b7496f439550c68e53e1b1aaac13d44 | 执行在子线程,如果发布者是子线程则直接执行,如果发布者不是子线程,则创建一个再执行
此处可能会有线程阻塞问题。 | if (android.os.Process.myTid().toLong() == Thread.currentThread().id) {
runnable.run()
} else {
getHandler().post(runnable)
}
} | 1 |
45c91d2c288b15292ee8607ed0585520 | 76e3738e9bab61b240608204ba2c5e39 | Checks if explosion animation is in progress. | @Singleton
public class MessageBoxManagerImpl implements MessageBoxManager
@Override
public boolean isAnimationInProgress() {
return this.bottomMessageBox.isDrawingInProgress();
} | 0 |
633ba3838452ccb85eacb8aaad643fc0 | f5e7792d4cada156787864fef311646a | Gets the current character set used for output of the cipher | export class CipherHandler
public getCharset(): string {
return this.charset;
} | 1 |
b4ed923cdabf7176fc3db51d66334094 | 244d29643bce8a8d4be14d7fb72e589e | this is a wrapper for the actual function in protocol_FL702LT.c | {
char i,len;
len=Read_From_SC16IS740_Internal_Register(0x09);
CS_SC16IS740_Lat=OFF;
SPIPut_SC16IS740(0x80);
for(i=0;i<len;i++)
{
buff[i]=SPIGet_SC16IS740(0x00);
}
CS_SC16IS740_Lat=ON;
buff[len]=0;
Write_To_SC16IS740_Internal_Register(0x02,0x03);
#ifdef SC16IS740_Buffe... | 0 |
599daf79aedb1d3bf2867f0800e8af32 | d1c8690f152021448cfa667f165ec6b7 | A function that prints a section of memory.
You can change the width (w), which decides how many bytes you want to put on each line. | int i = 0;
printf("Memory status:\n");
printf("\n");
if (strcmp(type, "byte") == 0) {
printf("Byte view\n");
printf("-----------\n");
for (i = startAddr; i <= endAddr; i++) {
printf("Address: %o", i);
printf("\t[ %d ]\n", getByte(i));
}
} else if (strcmp(type, "word") == 0) {
printf("Word view\n");... | 0 |
18efe1be9daddfad988f50c11bcd84cd | c058589dc65a6a0b6a4db3fabe6414f9 | 通过反射获取表类中的表项的内容,包装成表项实体 | namespace DataDictionaryGenerator.Core
public class MsSqlReader : IReader
private IList<T> Table2List<T>(DataTable table) where T : new()
{
if (table == null || table.Rows.Count <= 0)
return new List<T>();
IList<T> result = new List<T>(table.Rows.Count);
I... | 1 |
af1e5241a8e572d69a2e23400acfabb0 | 9ae9fef4f0c2fef495dad2d5796599cf | # Возвращает информацию о каждом потоке из массива uuid потоков | if(empty($uuid)) return FALSE;
$this->ResetFilter();
$this->AddFilter(array('uuid' => $uuid));
return $this->Search();
} | 0 |
9ac099df271a7628cccfab350584a43a | 04b2f28c25b6599b2b779be59f7421ca | Test making labels from filths | class TestFilth(Filth):
type = 'test_type'
filth_replacer = FilthReplacer()
self.assertEqual(
filth_replacer.filth_label(TestFilth(0, 1, 'a')),
'TEST_TYPE'
)
merged = MergedFilth(TestFilth(0, 2, 'ab'), EmailFilth(1, 2, 'b'))
self.assert... | 1 |
12a8e9117301e3c4c605cd5ecb87a5fd | 32ef6636049b9c7ca807f6d171e51f59 | Get all basic application information with paginated manner | export class ApplicationService
getAllApplications(title, page, size, order, type, subType) {
let minusOnePage = String(page);
let params = new HttpParams();
params = params.append('title', title);
params = params.append('page', minusOnePage);
params = params.append('size', size);
params = para... | 1 |
9309fa02f7bbf57af2a5869302311963 | bd4a3db27e687e2b7cdc5b99afbc534b | 设置列宽 相同宽度时 | public class StyleUtils
public static HSSFSheet setSheetStyle(HSSFSheet sheet) {
sheet.setColumnWidth(0, 6000);
sheet.setColumnWidth(1, 10000);
sheet.setColumnWidth(2, 15000);
sheet.setColumnWidth(3, 3000);
sheet.setColumnWidth(4, 3000);
sheet.setColumnWidth(5, 3000);
... | 0 |
22539b1ef2d289850722f0a03a580b37 | 4ef80193bee5d515dcfb9708dd629f85 | taken from https://rubyalgo.github.io/algorithms/sorting/insertion-sort/ | for (unsigned i = 1; i < nums.size(); ++i) {
for (unsigned j = i; j > 0 && nums[j - 1] > nums[j]; --j) {
std::swap(nums[j], nums[j - 1]);
}
}
} | 0 |
6f5583eaca110fdfd897ac167c1c4c3b | 5c4f4d4346ea1ccf5d07fb6adeebd17b | 获取计时器经过的时间 | class Timer extends Base_Abstract
public function get_time()
{
return max(0, $this->_stop - $this->_start);
} | 1 |
8879fba4fbb4bed4b9e0f5656ed4be64 | b56f4357fa6742b727f02420a4c67790 | Dumps the RethinkDB database and returns the name of the dump. | class DumpCommand extends Command
protected function execute(InputInterface $input, OutputInterface $output)
{
$database = $input->getArgument('database');
$target = $input->getArgument('target');
$file = $input->getOption('file');
$learning = $input->getOption('learning');
$... | 0 |
0f81d4ef1fe9b05a3c593656d487a2f5 | 11911da6c31031348ddc80261f7e1a66 | 数组清空 容量回归默认 | class ArrList{
public void clear(){
data = new String[10];
size = 0;
} | 1 |
bb3649e3ae293ed864929d95164ecd11 | 657d8859f11f12daedc55fe0753ee2b6 | Returns an ascending linked list. | def linked_list_1():
ll_1 = LinkedList([1, 3, 5, 7, 9])
return ll_1 | 1 |
ab798a9ce5c6cc64506eb9bf16ee005e | dc9007a5ed9d946430857c51b534e260 | 检测url是否含有参数,如果有,则把参数加到参数列表中 | public class HttpUtils
private static void setParams(String url, HttpClientWrapper hw) {
String[] paramStr = url.split("[?]", 2);
if (paramStr == null || paramStr.length != 2) {
return;
}
String[] paramArray = paramStr[1].split("[&]");
if (paramArray == null) {
return;
}
for (String param : paramArr... | 1 |
11ea2017464b69847b05500440e2bd95 | dd4ce80895a5b311e0cb5dcda53a75eb | 两两翻转链表 | int invertList(listNode* h) {
if (h == NULL) {
printf("you need initialize.\n");
return 0;
}
if (h->rlink == h) {
printf("Nothing in List. Plz insert something\n");
return 0;
}
listNode* lead = (listNode*)malloc(sizeof(listNode));
listNode* mid = (listNode*)malloc... | 0 |
8dfae0431b597f5c73dbfe4048398793 | 60fafc7a9ab912417f415baeed7f0900 | 计算时差的毫秒数 | namespace LearnSite.Common
public class Computer
public static string DatagoneMilliseconds(DateTime Time1, DateTime Time2)
{
TimeSpan ts = new TimeSpan(Time2.Ticks - Time1.Ticks);
return ts.TotalMilliseconds.ToString();
} | 1 |
38c55cdbb2aae25c23c79be2e60feabc | 476200a0c45b187446be2f9ef66cb7ec | Evento que atualiza os campos com a informação da turma selecionada | DefaultListModel<String> itens = new DefaultListModel<>();
if(!Main.turmas.isEmpty()){
List<String> nomeTurma = new ArrayList<>();
boolean matriculado;
for(Turma turma : Main.turmas){
matriculado = false;
if(turma.getEstado()){
... | 1 |
2c6e66be9a2d422f02d033e9a86a926e | 8b45d27d28b88827e63fa0f214f4ea40 | 显示定时关闭的消息显示框 | namespace MountingRobot.UI
public partial class FrmManual : Form
private void showMeesage(string Msg, int mode)
{
timerMessage.Enabled = true;
timerMessage.Start();
showSeconds = 0;
switch (mode)
{
case 0:
lblMes... | 1 |
c4c4a1a539119b22252bb6de25dd5859 | 56345dae3a62959849037a4679802188 | periodic signed distance if all interaction sites are in the same simulation box | def dist_periodic(a,b,lengths):
return weave.inline(distcodeP,['a','b','lengths']) | 1 |
149bf23bbbf2be92f964fc0a5ae4e301 | 297e0fcce31300c87d9ec753c51f44e9 | 获取电影价格 | ResultCode<MoviePriceVo> getMoviePriceByMovieIdAndCityCode(Long movieid, String citycode); | 1 |
d02b7d9263f360e660c5850ea4a65749 | 1fd11995da7802179641400df138af88 | https://cses.fi/problemset/task/1072 | ios_base::sync_with_stdio(0);
cin.tie(0);
int l, r, n;
int actCase = 1;
while((cin>> l >> r >> n) && l+r+n > 0){
int ans = -1;
v<int> vec(n);
for(auto &x : vec) cin >> x;
queue<pii> q;
map<int, bool> visited;
q.push({l, 0});
visited[l] = 1;
while(!q.empty()){
... | 1 |
2b923898d02bee70f74d4365121e191e | 3ca390ba6b23528601bfc424226ef7bb | Plots proximity of samples on heatmap. | fig, ax = plt.subplots(figsize=(10, 10))
im = ax.imshow(torch.cdist(x.detach().cpu(), x.detach().cpu(), p=2), vmax=50)
fig.colorbar(im, fraction=0.01, pad=0.02)
return fig | 1 |
d8b6ea891c52153681d7008c0a1f6cb7 | 9d089addca99dfe737729c46da584ef7 | 移动鼠标到指定元素,并且指定位于元素的x,y偏移量(偏移量相对于元素的左上角) | class BasePage(object):
def move_to_element_by_mouse(self,element_info):
element = self.find_element(element_info)
ActionChains(self.driver).move_to_element(element).perform() | 0 |
2ae8e477a2c07a3e27311e78f9aa18ed | d9a23a26beae13870118caa0ec1bf387 | 更新crawler的資料到es | crawler_classes = {
'DN': dncrawler2.DNCrawler,
'SM': smcrawler.SMCrawler,
'TS': tscrawler.TSCrawler,
'DM': dmcrawler.DMCrawler,
'EA': eacrawler.EACrawler,
'CT': ctcrawler.CTCrawler,
'BD': bdcrawler.BDCrawler,
'SE': secrawler.SECrawler
}
non_dictionary_classes = ['DN','TS','BD','SE']
articles = ... | 0 |
4b4c690cdfb878aeec2aa78e416fe6a0 | 0239d8c996f1802bb59eb15ada132677 | 两个MyRunnable共享了同一个NotThreadSafe实例,它们调用add()方法时会造成竞态条件 | public class ArrayListMultiThread
public static void main(String[] args) throws InterruptedException {
Thread t1 = new Thread(new AddTread());
Thread t2 = new Thread(new AddTread());
t1.start();
t2.start();
t1.join();
t2.join();
System.out.println(list.size());
} | 1 |
41b6af58969e4dce80668afbf585782e | 4c8c10218771ca1209938dfc6746ba4b | Returns all instances of <see cref="HttpContent"/> in a sequence that has a <see cref="MediaTypeHeaderValue"/> header field
with a <see cref="MediaTypeHeaderValue.MediaType"/> property equal to the provided <paramref name="contentType"/>. | {
if (SupportedMediaTypes.Count == 0)
{
var message = Resources.FormatFormatter_NoMediaTypes(
GetType().FullName,
nameof(SupportedMediaTypes));
throw new InvalidOperationException(message);
}
if (!CanReadType(objectType))
... | 0 |
9b83db63aa97ce710cb0a50bb2c02c2e | 3fa1225af19762bbd44282a888dbd241 | 判断用户输入是否是9的倍数 | try {
FileInputStream fileIn = openFileInput("file9.txt");
InputStreamReader InputRead = new InputStreamReader(fileIn);
char[] inputBuffer = new char[READ_BLOCK_SIZE];
String s = "";
int charRead;
while ((charRead = InputRead.read(inputBuff... | 0 |
73584d026e3511447906340a69f8bf4c | 2ce34d57ee5d9a7217dda28ed92917ad | 构建Hive作业执行上下文空间 | boolean local = ConfigurationManager.getBoolean(Constants.SPARK_LOCAL);
if(local) {
return new SQLContext(sc);
} else {
return new HiveContext(sc);
}
} | 1 |
339ab2a8d713f5c5af26778f2c85fbb7 | 8e3bd00f576e3001c16ae4e83db32451 | Remove the specified treatment from storage. | class TreatmentController extends Controller
public function destroy(Treatment $treatment)
{
$treatment = Treatment::find(request('id'));
$this->unsetMedicine($treatment->medicine_id, $treatment->quantity);
$treatment->delete();
return response()->json([], 202);
} | 1 |
15dcc19d05e19a3345d14963022dbaef | 07f6c9598244a1d6e51b390fc5970ae1 | Get workflow data for content element | $rec = BackendUtility::getRecord($table, $offlineId, 't3ver_wsid');
$workspaceId = $rec['t3ver_wsid'];
$elementData = array();
if ($workspaceId != 0) {
if ($table != 'pages') {
$rec = BackendUtility::getRecord($table, $id, 'pid');
$pageId = $rec['pid'];
$rec = BackendUtility::getRecord('pages', $... | 1 |
9ffb377abea6a8f33c199ba57428796b | be0f9f51c7abb3aa91ed8bf416f2e7b0 | ------------------------------------------------------------------------------ Search ---------------------------------------------------------------------------- | if (joboffers === null || joboffers[0] === null) {
return [];
}
if (!searchFilter) {
return joboffers;
}
const filtered = [];
joboffers.forEach(joboffer => {
if (
joboffer.enterpriseName
.toLowerCase()
.includes(searchFilter.toLowerCase()) ||
... | 1 |
fbf31d8b0396ff7f03600467515e171f | d4dcb08ed99ba29006771a0e1dc6e21a | Runs the tracking once while the tracking is paused. | class TargetTracking(Sequence):
def _start_pause(self):
pass | 0 |
0206c787631c0f7ca5bb5a6789f0abe1 | 557032d55f8a05b2ffaf190a836d1eea | Gets the message query var name. | @Override
public String getName() {
return MESSAGE_Name;
} | 0 |
b5a9c1b7a0ae891cba15063265e53b00 | e3713f321ce1b0d69d1e84957c4a57be | 根据文件夹路径查询文件夹的id | url = "http://openapi.vdisk.me/?m=dir&a=get_dirid_with_path"
data = urllib.urlencode({"token":self.token, "path":path})
req = urllib2.Request(url, data)
fd = self.opener.open(req)
js = json.loads(fd.read())
fd.close()
if js['err_code'] != 0:
self.log(j... | 1 |
ba1efbea33592eef2068d9900b3fd5c2 | 6c578c5a3f856c4b11c0796aa95a3436 | 触模屏校准 | {
touch_lcd_gpio_init();
p_delay(100);
p_lcd_setcursor(0, Y_PIX_MAX / 2);
p_lcd_fill_screen(BLACK);
p_lcd_printf("\t\tCALIBRATION LOADING....\r\n");
p_delay(2000);
uint8_t MeasureFlags = 0;
uint16_t adcX;
uint16_t adcY;
uint16_t pointX[4] = { 0 };
uint16_t pointY[4] = { 0 };
... | 1 |
06a0eca244293f691760592e96608c0f | c7f23095f133745e02f2ecd18c491f82 | Adds registered models to the current revision, if any. | class PageAdmin(PageBaseAdmin):
def get_revision_instances(self, request, obj):
instances = [obj]
instances.append(obj.content)
for _, inline in self.content_inlines:
try:
instances.extend(inline.model._default_manager.filter(page=obj))
except:
... | 1 |
656597240cf52c8ff28c0f765f386d79 | cc3338b1f2001d877f0b5a4692b33110 | Finds sub commodities by commodity. | @RestController
@RequestMapping("/api/store")
public class StoreController extends AbstractEntityController<Store>
@GetMapping("/commodity/{commodityId}")
public GeneralResult<List<Store>> findByCommodity(@PathVariable("commodityId") Integer commodityId) {
val commodity = commodityService.require(commodityI... | 0 |
3916c2829bc2f6127575185cb0c08522 | 57f710531ee93d7b191501ce061c50a0 | 반려동물 정보 수정폼 | public String petchange(@RequestParam String pet_no, Model model) {
model.addAttribute("pet_no", pet_no);
PetImagePetDto pet = memberService.getpet(pet_no);
model.addAttribute("pet", pet);
return "member/petchange";
} | 1 |
134082d9a51a2bfb47fc7bf7ee2d9c32 | 66c96787680deace6159b33c59dbf21b | Tomcat limits the header size to 8192 bytes (8 KB). See maxHttpHeaderSize on https://tomcat.apache.org/tomcat-8.5-doc/config/http.html
<br>
If we write the save request cookie to big we will exceed 8 KB and the client will receive a 500 from Tomcat with
the following stack trace.
<pre>
Increase maxHttpHeaderSize on the... | final class JettyConfig
public int getHeaderSize() {
return getIntProperty(FELIX_JETTY_HEADER_BUFFER_SIZE, 16384);
} | 0 |
41a787d3c99d04812aadc1f829dda066 | 6989b68162002b8f75ba87b37299ac40 | Applies the Berlekamp-Massey Algorithm to the given sequence of bits;
Returns the smallest annihilating polynomial F, ie. the smallest inverse
feedback polynomial corresponding to the generating LFSR.( F(sequence) = 0 ) | def berlekamp_massey_decode(syndromes, logarithm_table, power, t):
flipped_logarithm_table = flip_dictionary(dictionary=logarithm_table)
number_of_elements = 2 ** power - 1
C = [0] * (2 * t)
C[0] = 1
L = 0
B = [0] * (2 * t)
B[0] = 1
for n in range(2 * t):
delta = 0
for... | 1 |
8fe4609224285b5b4376d7a43feddddb | af8ecfbeff1543c251af59d512008b4a | 13の倍数かどうかを調べる関数 | class Nabeatsu{
function multiple($n,$n_multiple){
if($n % $n_multiple == 0){
return true;
}else{
return false;
}
} | 1 |
ebc2fe8eed91d2976e55f626b512abde | 4783aa281bf0eeec89f06d17d22445bb | Copy payload, expand the cryptic abbreviated roles in the JWT token to full versions. | Map<String, String> claims = new HashMap<String, String>();
jwt.getClaims().forEach((k,v)->{
String asString = v.asString();
claims.put(k, asString);
});
payload.setClaims(claims);
return payload;
} | 0 |
33b344c24b9734b46eb89e1b2d63257d | 0238cf21fcb20600258915543c4f6fd1 | Discovery for previously defined service should return defined service. | {
$endpointA = $this->serviceBus->define('calc');
$endpointB = $this->serviceBus->discover('calc');
$this->assertSame($endpointA, $endpointB);
} | 1 |
5f0a789eb8babfde4785918d3b89c2ac | f9b008e68796ae3fab9032beeeb79b02 | Retrives the ExtendedDataParam passed into the constructor | void C3DReference::GetExtParaData(int& nExtParaSize, void*& pExeParaData) const
{
nExtParaSize = m_nExtParaSize;
pExeParaData = m_pExtParaData;
} | 1 |
bc1ba743b98463b0460bfe57c8cd10d9 | 071e5fdd8f19f19bbad8a01959d10576 | Gets the UDPRN. | public class Device
@Nonnull
public String getUdn() {
return mUdn;
} | 0 |
e017ee2f5f24e775f5d868cf85b4c7b4 | ac6ca513b70e2f6a2f384b2cf9c36161 | Whether the right bumper (RB) was released since the last check. | class XboxController():
def getBumperReleased(self, hand) -> bool:
if hand == self.Hand.kLeft:
return self.getRawButtonReleased(self.Button.kBumperLeft)
else:
return self.getRawButtonReleased(self.Button.kBumperRight) | 1 |
1cb036e8d450fc98482fbb2a72e4394f | af972dd35f1a29122aa47176d2005f9f | Getter for <code>storeal.stl_webservice_account.is_module</code>. | boolean funcModule(); | 0 |
2d25a28c67d5f344af38864c95699ad6 | 87889178d1b77eb57c98fb64d33a62ed | User-defined labels for the metastore federation. | class KogitoMgmtConsoleSpecArgs:
def service_labels(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]:
return pulumi.get(self, "service_labels") | 1 |
14cc5182156367e9c3390ab0c82ec2a1 | e35fb6bce8c8fcb614baab12f2dc087d | Initializes GameObjects containing HUD elements | for (int objectIndex = 0; objectIndex < hudElements.Length; objectIndex++) {
hudElements[objectIndex].initialize();
hudElements[objectIndex].loadData();
}
} | 1 |
27d7bd233d04ca39fc888c4a7d2532d9 | 3149930ee477a65e12af4fd66f39c151 | Creates a notification and shows it in the OS drag-down status bar | {
assert(text);
Notification* n = new Notification;
n->text = text;
n->icon = icon;
n->t = timer;
n->state = (notifications.size() >= maxNotifications ? Notification::Pending : Notification::Showing);
notifications.push_back(n);
return n;
} | 0 |
7ca1dbd6dda3126414dae0094aac7cf3 | 5fe3c14ce5d37515c6b699096460bd02 | Пост метод получаения всех кошельков. | namespace Happy.Weddings.Wallet.Core.Repository
Task<List<WalletResponse>> GetAllWallet(WalletsParameter walletsParameter); | 0 |
6186b95edd082c55ccf1cf5c83912049 | e42d6d74b425cf9a9aa001db9f4656bc | Writes a P3 image from an Image structure to an file | int pgm_write(char *filename, unsigned char *pimage){
FILE *fp;
fp=fopen(filename,"wb");
fprintf(fp,"P5\n320 240\n255\n");
fwrite(pimage,sizeof(unsigned char),320*240,fp);
fclose(fp);
return 0;
} | 0 |
92f09980bd946e778ea05498b9ebb1a8 | ec2ff99a4fe1001cfe11e19f3e7c698e | Convert from IOB to IOBES notation. | class Loader:
def iobes_iob(self, tags):
new_tags = []
for i, tag in enumerate(tags):
if tag.split('-')[0] == 'B':
new_tags.append(tag)
elif tag.split('-')[0] == 'I':
new_tags.append(tag)
elif tag.split('-')[0] == 'S':
n... | 0 |
084351ca1125fbfb8242a14b05e3ce6a | ca73a5ad2650d9a6d721f5a188a18d92 | 修改乐理包 | @WebServlet(name = "LywmManageAction", urlPatterns = "/manage/LywmManageAction.jsp")
public class LywmManageAction extends HttpServlet
private void updateLy(HttpServletRequest request, HttpServletResponse response) {
Lyb lyb = new Lyb();
Hyberbin hyberbin = new Hyberbin(lyb);
ServletUtil.loadByB... | 1 |
e70e70f5cfef759f2edef7fa413c3be0 | e2d624dde0895bf9fa24831fe56cc504 | 使用提供的算法名创建一个算法工厂。 | namespace System.Security.Cryptography
[ComVisible(true)]
public abstract class KeyedHashAlgorithm : HashAlgorithm
public new static KeyedHashAlgorithm Create(string algName)
{
return (KeyedHashAlgorithm)CryptoConfig.CreateFromName(algName);
} | 1 |
9bdb563c141d47c83c31b60352195f87 | f067e05385bf3ae8836c270f76be6630 | Finalize inflating a view from XML. This is called as the last phase
of inflation, after all child views have been added.
<p>Even if the subclass overrides onFinishInflate, they should always be
sure to call the super method, so that we get called. | public class SummaryBottomSheet extends FrameLayout
@Override
protected void onFinishInflate() {
super.onFinishInflate();
bind();
} | 1 |
63a615b696e04bde2c6713368b5eb37f | 472b3802e632c2dab6c52fa1a5293cd8 | Increases response timeout for current transaction | void UASTransaction::trying_timer_expired()
{
enter_context();
pthread_mutex_lock(&_trying_timer_lock);
if ((_trying_timer.id == TRYING_TIMER) &&
(_tsx->state == PJSIP_TSX_STATE_TRYING))
{
send_response(100);
_trying_timer.id = 0;
}
pthread_mutex_unlock(&_trying_timer_lock);
exit_context();
... | 0 |
9d1bd4a7a2ebfc8bdcc354781b2508c7 | c102b845c6ea62d176d76044c9c638b2 | Generates presentation from template and excel values. | namespace SJRCS.Excel
string PreviewAuditedData(IEnumerable<Dynamic> heads, IEnumerable<Dynamic> datas, string templatePath); | 1 |
04ac6c3986ac0e777abdfb617654aada | fa3a09b0bfc2274cb83d7c8b95fbc849 | The ratio of how much the grid walker occupies the given cell width. | public class FeatureRasterizer implements StreamingProcess
public double getCellWidth() {
return cellWidth;
} | 0 |
1011934632829fea59022cbcccaa7df2 | 45960c9557f32ec76fee8e092e12e66e | Генерирует ориентированный связанный граф в виде списка смежности. | {
Dictionary<int, List<int>> ls = new Dictionary<int, List<int>>();
int[][] graph;
var g = new List<int[]>();
for (int i = 0; i < adjacency.Length; i++)
{
for (int j = 0; j < adjacency[i].Length; j++)
{
... | 1 |
34943fc088f075c49499ec0c4af36899 | 48c38c3f37376d4c3e1c6690a071e6ff | Disable the OpenGraph. | add_filter( 'jetpack_enable_open_graph', '__return_false' );
add_filter('wpseo_opengraph_desc', '__return_false' );
add_filter('wpseo_opengraph_title', '__return_false' );
add_filter('wpseo_opengraph_image', '__return_false' );
} | 1 |
18e2d02beacaa7720c6571d1eaf90928 | 9407b4cd1051756ac4d148b12289e9b2 | 线性筛求质数,效率比埃氏筛高,但会额外占用空间 | memset(prime, 0, sizeof(prime));
for(int i = 2; i <= MAXN; i++) {
if(!prime[i])prime[++prime[0]] = i;
for(int j = 1; j <= prime[0] && prime[j] <= MAXN / i; j++) {
prime[prime[j]*i] = 1;
if(i % prime[j] == 0) break;
}
}
} | 1 |
139b6c3cecddc9736ba052578b850dfe | 18be1d93fa9beaf6bef15b9db0bc9081 | 设置摄像头权限状态 | if(rights === 'camera' || rights === 'mic' || rights === 'platform' || rights === ''){
let req = {
class_id: Global.classId,
event: 'PermissionControl',
data: {
enable: (enable ? 1 : 0),
rights: rights === 'platf... | 1 |
d63339f13f593889bb799ae3770a61ef | 404e07aeb5fea164ac16191d6ac1e3d6 | Changes direction in x or y if it meets a boundary | self.rect.x += self.change_x
self.rect.y += self.change_y
if self.rect.right >= self.right_boundary or self.rect.left <= self.left_boundary:
self.change_x *= -1
if self.rect.bottom >= self.bottom_boundary or self.rect.top <= self.top_boundary:
self.change_y *= -1 | 1 |
9e1f3e1f39e68194cb3eeea21be60382 | a03c39d9025f6c4a95a73a6e86c4eb3a | Compute cohesiveness strength between two patches // PROXIMITY // | CV_Assert ( caib::isBinary(inputGST) && caib::isBinary(inputS) && inputGST.cols == inputS.cols && inputGST.rows == inputS.rows);
cv::Mat img_intersec = caib::morphIntersec(inputGST, inputS);
int count_intersec = cv::countNonZero(img_intersec);;
int count_inputGST = cv::countNonZero(inputGST);
int co... | 1 |
dae2b1d78e8e47abefce3df918e57557 | 178270625ada3dd79c9d7b0ef7ab769c | Returns the length of time the light is red | public class TrafficLight
public double getRedPhaseLength() {
return redPhaseLength_;
} | 1 |
0fec28c70f67abdef12ef805e1fff130 | d839da908b124b53dcc21c1aa338f670 | Modified from K&R | int dividend,
int divisor,
int *quotient,
int *remainder
)
{
unsigned int dend;
unsigned int dor;
unsigned int q;
unsigned int r;
dend = ABS(dividend);
dor = ABS(divisor);
unsigned_divide(dend, dor, &q, &r);
*quotient = q;
if (dividend < 0) {
... | 1 |
07c5b33a6d5ffca698093c959bc8f500 | 58be63cd42eac9809f60b94207b22c7e | Force storing of values important to the task in the management element monitoring the group, i.e the WorkerWatcher.
Will store the TaskContainer and contained task description and variables,
most importantly the initParams/value array, i.e. a meta-checkpoint.
Upon re-deployment the Task instance will be feed the initP... | dict.__init__(self)
self.executionMgr = executionMgrRef
self.monitorConfig = None
self.updatorConfig = None
self.ignoreErrors = True
self.state = MonitorState() | 0 |
ef5dcaab451951153e9d361458305c36 | 5cc2f695d379ebeb8b92c317c892d28b | Hilfsfunktion für die Berechnung des Zinssatzes nach dem Iterationsverfahren nach Newton. | double berechne_abschreibung(double startwert, int dauer, double restwert)
{
return 1 - pow( restwert / startwert, 1.0 / dauer);
} | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.