query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
91596085d37a289fe47ea9993720fdcb | 72da260feec011259ae929864537530e | Imports pages from an URL. | class WiktionaryParser:
def __download_page(self, url: str):
self.setup_imports()
response = requests.get(url)
soup = self.BeautifulSoup(response.text, features="lxml")
return soup | 1 |
41f5902a8cea43f6eb19a3bf18f744d2 | 5d382e3887717cf0f0ddb54e0cbf019a | Получение списка пользователей из выподающего списка | class AjaxController extends JKY_Controller
private function get_users() {
$where = get_request('where' );
$select = get_request('select' );
$initial = get_request('initial' );
$sql= 'SELECT Contacts.id, Contacts.full_name'
. ' FROM Contacts'
. ' WHERE ' . $where
. ' ORDER BY Contacts.full_name'
;
if ($... | 1 |
44da1785ab374d89cd392aaede4314d3 | d23d20a3e90d7053f19a9217d0b41fc7 | 获取Vlan数 | let res = await requestMethod.getVmwareCount("get")
if (res.code == 200) {
this.vmwareCount = res.data.item
}
} | 0 |
d8b0bc2dbd69f5cd4c9884599a14d75a | 692e89c2654bad0879174b30575803aa | GET: ExportField | namespace Senstay.Dojo.Controllers
[Authorize]
public class ExportDbController : AppBaseController
public ActionResult Index()
{
return View();
} | 0 |
564d6aff304c75fa6fbd4d3528fc2635 | d476de3601a6ac38f1a8e650705f5b73 | ============TEMP ================= | function swapNumberWithoutTemp(a: number, b: number) {
console.log(`before swap: A: ${a} and B: ${b}`)
b = b - a
a = a + b
b = a - b
console.log(`after swap: A: ${a} and B: ${b}`)
} | 0 |
4ad9d493d1249f4a1deae1aca08acd82 | e134c71889e80a3bf3bbb431d3909212 | 初始化EgarApi 操作句柄 | namespace LvHui.CTPTrader4CS
public class CThostFtdcTraderApi
public void Init()
{
ThostFtdcTraderApiAdapter.Init(pTraderApi);
} | 0 |
aa4aa8e91e6fcf9e893640c17ae56b1a | a3fde484b8af97c232346a2d7708d910 | 根据学生ID更新部门信息 | int updateStudetnBySid(Serializable sid); | 0 |
a00d297d8ca3ff00fe31594a5ac1519a | a9ac7da0ac64215a50d09a17de5d5343 | Create Head node user and a loop with a menu
for the user to create, edit and display
nodes as they wish, this should provide the
developer some idea what is going on. | int main()
{
NodeType *lastPtr;
NodeType *listPtr;
NodeType *currPtr;
NodeType *newNodePtr;
string delVal;
listPtr = nullptr;
newNodePtr = CreateNode();
AddNode(listPtr, newNodePtr);
PrintList(listPtr);
newNodePtr = CreateNode();
AddNode(listPtr, newNodeP... | 0 |
5a331fd60d915b6dd042a02639151bfc | 651a48f93d35d0d223230ba0dc74167f | Verifies that the expression is valid and returns descriptive texts. | public class ExpressionEditor<O> extends JTextPane implements RefreshableComponent,
VerifiedInputEditor
protected void checkExpression() {
this.expressionChecker.check(this.getText());
this.setError(this.expressionChecker.getErrorReport());
} | 1 |
04d56e17d418e72dcff6fca326945d73 | 059a7b25ef818584599c8d884c9cb10e | 查询文件内容及其翻译 | dic_str = self.dic_content(dic_name)
if dic_str[-1] == "\n":
dic_str.rstrip("\n")
en_list = dic_str.split('\n')
cn_list = []
for item in en_list:
cn_t = self.trans(item)
cn_str = "".join(cn_t[0])
cn_word = cn_str.replace('\\n', '---... | 1 |
c83997bf0648993329fc6e1ad614adcf | 73139bff3b04c3e22fb58ec2dfd67c07 | Test to ensure the blogposts.html is used | request = HttpRequest()
response = views.index(request)
expected_html = render_to_string('blog/index.html')
self.assertEqual(response.content.decode(), expected_html) | 0 |
dbe49273f7f8f78bf275d012e1f50e49 | aeed5c570d46982a4242b2e6f0376266 | 当审核界面点击同意按钮时打开新网页 | function approvalOpen() {
$.ajax({
type:"post",
url:"updateTest",
dataType:"json",
success:function(data){
if(null != data && null != data[0] && data[0].invalidate){
window.parent.location.href = data[0].loginPage;
}
if(null != data && null != data[0].noOpt && data[0].n... | 0 |
db032e7b5004a89a6b5618df8f3c01a6 | b7e6beed58419d486583ac4da450ec2a | расчёт SQRT | function sqrt()
{
if(document.getElementsByName("text")[0].value!="Error")
{
if(judge_result_temp==0)
{
result-=0;
if(result<0)val="Error";
else
{
result=Math.sqrt(result);
val=result;
num=result;
if(val%1!=0)
point... | 1 |
4052e268bcba5fd1c2467ca14e672c23 | 69a3fd31639431c91c81e83a0caca1a4 | Implementation of the IFNULL(), NVL(), and COALESCE() functions.
All three do the same thing. They return the first argument
non-NULL argument. | function coalesce() {
foreach (func_get_args() as $arg) {
if (!is_null($arg)) {
return $arg;
}
}
return null;
} | 1 |
5dd33f047f279e873d203bf394102d4f | 4da4d1ac48b2c1a5447839e3a18cf124 | Draws a crate and textures them | Textures texCoche;
if (pc) {
texCoche = texPaintPc;
} else {
texCoche = texPaint;
}
glm::mat4 S = scale(I, glm::vec3(0.4,0.2,0.8));
glm::mat4 T = translate(I, glm::vec3(0,0.4,0));
drawObjectTex(cube,texCoche,P,V,M*T*S);
glm::mat4 Scab = scale(I, glm::vec3(0.4,0.3,0.55));
... | 1 |
581b0e572971342656c9a483a4d4fa96 | 2eebd611a56cdda0e14904b495a7bb29 | Initializes a pmap backend. | pmap_init(phys_start, phys_end)
vm_offset_t phys_start, phys_end;
{
extern int physmem;
pv_init();
physmem = btoc(phys_end);
} | 1 |
b1e890138a88e56f0146971352afbd49 | 66a8f4396af96a1adf68681a6f1dae53 | Save a file holding the frame rate data for each gesture. | def save_time_file(save_file, ts):
data = {'timestamps': ts, 'fs': 1 / np.mean(np.diff(ts))}
return save(save_file, data) | 0 |
008fc8af83c53b212e2fb9df5ac7016e | fb0e6703062e8d90ebef7ed10171e3e8 | YCbCr to RGB conversion | {
unsigned char *yuyv = (unsigned char *)yuyv_img;
unsigned char *ycrcb = (unsigned char *)img->imageData;
int num = img->width * img->height / 2;
int y0, y1, u, v;
for (int n=0; n<num ; n++){
y0 = (*yuyv++);
u = (*yuyv++);
y1 = (*yuyv++);
v = (*yuyv++);
*(ycrcb++) = y0;
*(ycrcb++) = v;
*(ycrcb++) ... | 0 |
a5a8de96e87068871973893ed8df76a2 | 4154b7ede095c354e324f210161bea72 | # determine if is a crop input unit | {
return (isset($params['crop_position_x']) && is_numeric($params['crop_position_x'])
&& isset($params['crop_position_y']) && is_numeric($params['crop_position_y'])
&& isset($params['crop_size']) && is_numeric($params['crop_size'])
&& isset($params['crop_photo_width']) &&... | 1 |
3fca568e9fcc8c4cacba87244eeb67e1 | 97c65050a1aa2d557d77965da6e46659 | Notify the providers that there is new endpoint information available. | void notifyNoProvider(); | 0 |
e572630fb6ab1ceef9137617f7520488 | 6ecb1a91200b63732384543023c54716 | Sets the mime type is application is associated with. Multiple mime types are separated
by semicolons. | {
if (is_array($type)) {
array_merge(self::$mimeTypes, $type);
} else {
self::$mimeTypes[$type] = $value;
}
return $this;
} | 0 |
aabaa34a94d2557e6767fafbd1d320c2 | 57eb56717468c18b92306a04da9bd31e | ゾーン名を設定し、自オブジェクトを返します。 | class ColRegion extends CompoundState<Map<String, ColRegionInfo>>
public ColRegion withName(final String name) {
this.name = name;
return this;
} | 1 |
0979c15752dbc040da089ba7e6b5f550 | 89c02b9c7355be3646fc832135b9539b | \brief Função que desenha o Menu de Vitória | char msg[15] = "VitoriaDerrota";
int i;
if(pts_jg==14){
printf("\n\n ");
for(i=0;i<7;i++){
printf("%c",msg[i]);
Sleep(300);
}
}else{
printf("\n\n ");
for(i=7;i<14;i++){
printf("%c",msg[i]);
Sleep(300);
}}
printf("\n\n");
} | 0 |
f9f5b7042b2c1fa943f02f0eafbda0a0 | 3e9ad94321cafa9ab78468c6714a1403 | 校验文件对象aformfile大小 | if(file.size > 20971520){
message.error('选择的文件大小不能超过20MB');
return false;
}else{
const temp_fileList=[];
temp_fileList.push(file);
const temp_obj=this.state.form;
temp_obj.file=temp_fileList[0];
this.setState({
... | 1 |
f5180f93e9a81f64020105e623bbe297 | d5214454c3be0568e8f4bec76aa3e28b | 得到全部数据,但执行分页 | class AmoFlowStoDB extends MysqlDb
public function getAllForPage($page = 0, $pagesize = 20) {
$where = null;
if (! is_null($where)) {
$this->where($where);
}
$this->_totalPage = $this->count();
return $this->page($page, $pagesize)->order("{$this->_primary} desc")->select();
} | 1 |
b9e31c821330420501cac131e5301000 | c807e3edae27488569cd689802a87999 | Store the send metadata from the last received push. | function receivePush(e) {
PushWooshModule.sendPushStat(e.data.p);
self.newNotificationEvent(e);
} | 0 |
bb07d56dacbdaa5b1261b45f1b2e1c13 | ba4570263dcd583284d4d72e24531283 | Convertit des niveaux d'indentation en WBS. | {
foreach(var lineBreak in document.Descendants("br").ToList())
lineBreak.ReplaceWith(new XElement(w + "br"));
} | 0 |
21655a25c70a37b42058525bc1e833de | c23ea562ae5da928c9dca49113d18b21 | Deletes an event from the case. | ClientResponse<Empty> deleteEvent(final String eventId); | 1 |
d4158134f31ff03f1231aff188cf3060 | 13bb889bb049c9b10445b01a23f98d5d | Метод для приведення двовимірного масиву цілих чисел до масиву чисел з плаваючою точкою. | public class AmbiguitySolver
private double[] toDoubleArray(final int size, final long[] longArray) {
final double[] doubleArray = new double[size];
for (int index = 0; index < size; index++) {
doubleArray[index] = longArray[index];
}
return doubleArray;
} | 0 |
fa292a8b3dc2833d74414cd458153f8e | cc9e560d19ea234537054e4df62a8928 | 把参数字典转化为mysql参数 | mysql_params = {
'host': None,
'port': None,
'user': None,
'passwd': None,
'db': None,
'charset': self.MYSQL_DEFAULT_CHARSET,
}
if args or kwargs:
for k, v in dict(*args, **kwargs).iteritems():
if... | 1 |
5dcda1d00ee71ddad5c792463305efbf | d5a6fc27376c47ab75111990dce75ea0 | ================================================
请求百度ocr接口
================================================ | {
string expired = Utility.UnixTime(EXPIRED_SECONDS);
string methodName = "youtu/ocrapi/creditcardocr";
StringBuilder postData = new StringBuilder();
string pars = "\"app_id\":\"{0}\",\"url\":\"{1}\"";
pars = string.Format(pars, Conf.Instance().APPID, ... | 0 |
d2c4cc6de36f79c1c3a68955375bab18 | 4e46436d3e0c5b1f2617549c77269b1b | GET: api/IrrigationalsAPI | namespace SprinklerNetCore.Controllers
[Authorize(Roles = "Admin,User")]
public class SprinklerController : Controller
public ActionResult Index()
{
PrepareViewData();
return View(_site.Sprinklers);
} | 0 |
70ac11e8381d87ddc93222d4c17ed516 | 22f1f04c7f944dc61aeee317706981f5 | Get the name of each Wikipedia article linked. | class navigator(object):
def get_linked_articles(self):
return self.linked_articles | 0 |
e25760ea2aaac08e69b7ddbb657b3166 | 895bbb3f276033860f8640297a736686 | 在随机的位置产生随机数 | def random_num(TempTable):
positions = list()
for row,line in enumerate(TempTable):
for col,num in enumerate(line):
if num == 0:
positions.append((row,col))
row,line = random.choice(positions)
TempTable[row][line] = random.choice([2,2,4]) | 1 |
bb6a8f2eac2959407be78ef4308f16cf | 7217309cba76f3a7bdbee3bb616caa2b | Function evaluates the frame that has arrived and executes the correct method according to the sequence number | {
static int frame_expected = 0;
frame r, s;
event_type event;
wait_for_event_reciever(&event);
if (turn == 'r')
{
if (event == frame_arrival)
{
from_physical_layer(&r);
if (r.seq == frame_expected)
{
to_network_layer(&r.info);
... | 1 |
4230384498e74371d5de0cedfb031d22 | 27a17fd7287a3eae21e5168b5ee2a15f | Write conference information to the local storage. | const config = {
"color": window.attentionModul.consoleApp.color,
}
localStorage.setItem('config', JSON.stringify(config))
} | 0 |
26e22a0e9a3df17183c96cfdc06db4c4 | 3b55c73b75e13aa3d9c0a20b445c2bd5 | Override to, at the very least, drop something. | public class TreeInventoryController : InventoryController
protected override void HandleDropError(InventoryError error) {
} | 0 |
8b210130b882e1c7f33ac5828340105e | ceaf5f2f1d37b178f7c39f102e2d3a21 | Photo törlése AJAX-al | {
$image = Image::find($id);
$albumId = $image->album_id;
$image->delete();
Session::flash('success', 'Sikeresen törölted a képet!');
return redirect()->route('album.show', ['id' => $albumId]);
} | 0 |
8bf02e3454592f17c5aea4ffe94291a9 | 38c2c617bef207402d7a6fc10217e306 | @brief Handle Scan Network ioctl | {
ret_code_t err_code;
ble_gap_addr_t addr = p_adv_report->peer_addr;
char address_string[20];
if((p_adv_report->data.p_data[2] != 0x52 && p_adv_report->data.p_data[2] != 0x54) ||
(p_adv_report->data.len != 6 && p_adv_report->data.len != 31))
{
err_code = sd_ble_gap_scan_start(NULL, &m... | 0 |
cdf2aa95689e2200d2927155d80e19da | 6603f078b6c5d91373779d5f4cfd9b77 | Sets the various name fields if they are currently null. | export class NameComponent implements OnInit
public ngOnInit(): void {
if (!this.name) {
return;
}
else if (this.name.suffix && !this.suffixOptions.find(s => s == this.name.suffix)) {
this.name.suffix = null;
}
} | 0 |
82f86500e871fb628afab885c646f180 | eec2a3d45e19f18c369363cdc4217b91 | MDrv_DVI_Software_Reset() is not supported in Euler, Nasa | int8_t ar0144_set_qqvga(void) {
return -1;
} | 0 |
a763e7be5b90d07ccc8c7940999af0d5 | dcd8b106a02c4e3a9518b2623e8342a3 | 转换 以分为单位的 金额格式 | try {
DecimalFormat df = new DecimalFormat("######0.00");
return formatDecimal(BigDecimal.valueOf(Long.valueOf(amount)).divide(new BigDecimal(100)).toString());
} catch (Exception e) {
return "";
}
} | 1 |
31e766aafae4f8a1900570e24b94ee7e | 564ebc40946f8e2b3f60955016a904e4 | 初始化总表为,容量为2的表格(含两个子表) | void init(FPT table[])
{
table[0].pNum = ++number;
table[0].size = 8;
table[0].beginAdd = 24;
table[1].pNum = ++number;
table[1].size = 12;
table[1].beginAdd = 128;
table[2].pNum = ++number;
table[2].size = 8;
table[2].beginAdd = 248;
table[3].pNum = ++number;
table[3].size =... | 0 |
0690985a055b7f8be4880e972ce0c331 | d6c0cd3b0ccc846a9e0a0f03d00650fe | Timered function to disconnect a user from login.
This is done either after auth_ok or kicked by char-server.
Removing user from auth_db and online_db.
Delay is AUTH_TIMEOUT by default. | class RemoteUser(IRCUser):
def disconnect(self, reason, fromRemote = False):
if fromRemote:
if self.isRegistered():
del self.ircd.userNicks[self.nick]
self.ircd.recentlyQuitUsers[self.uuid] = now()
del self.ircd.users[self.uuid]
userSendList = []
while self.channels:
channel = self.channels[0]
... | 0 |
fb0028f9ee6b62e91099fe1fd7f076b9 | e662f64afa16d42d9318ddfa8cb61554 | Destroy sensors and go to sleep. | class Sensor(serial.Serial):
def deactivate(self):
log.debug("issued command deactivate")
self.send_cmd('d') | 0 |
e776dd5d0fc4c13e1050df25e36c0f45 | 8cf6f5ccffee591ccc19da7153d3d4e8 | 通过过滤条件获取Parameter分页数据 | if (parameterMapper == null) {
return Collections.emptyList();
}
return parameterMapper.list(where, appendix, pagination);
} | 1 |
c059b73de0154a076f99c6bc22f57da0 | 333d1ebbe5081093a2b4fb4b976f9474 | 添加到富文本控件中 | @Service
public class PictureService
public void addRichTextPicture(String articleId, String url) {
pictureMapper.addRichTextPicture(articleId, url);
} | 1 |
1c0854be4de0cea49fdb856dc3f47ae5 | 3b125be6d99b432dcfb12ff08e4bae72 | Tells if this is a tagged PDF. | class TiffPage(object):
def is_mdgel(self):
return 'md_file_tag' in self.tags | 0 |
73239110ae7aa3fb42d68ecc2cd90957 | 83ce73d9c4749cdc5371c5cd3a05095a | Creates a job and schedules it for execution. | public class Jobs
public RestJobResponse createJob(ExecutionobParameters body, String tenantName) throws ApiException {
ApiResponse<RestJobResponse> resp = createJobWithHttpInfo(body, tenantName);
return resp.getData();
} | 1 |
897eeaee32ac5ade108e628240b43c7b | f804624868e636b14d7f62385002653d | get the appearence of the yellow object | image = cv2.imread(path)
image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
if show:
plt.imshow(image)
plt.show()
yellow = np.absolute(image[:,:,0] - image[:,:,2])
maskYinf = (yellow > 20).astype(np.int)
maskYsup = (yellow < 100).astype(np.int)
maskY = maskYinf * maskYsup
img... | 1 |
c5ef435bd5b9bf4fdc3735ad7fa1a128 | 60218ee35cbd9fc29cfa7f1afb98d2ed | Retourne la liste des topos | public class Graph
public List<Node> getTops() {
List<Node> roots = new LinkedList<Node>();
for (Node node : nodes) {
if (node.isTop) {
roots.add(node);
}
}
return roots;
} | 1 |
4e67f2c73ad343b757ef5a19da949ae5 | c1618424fa67fdbd0d91e797c85395a5 | Abre a tela de curso/disciplina | {
ViewBag.majors = db_major.GetSpecialties().Select(d => new SelectListItem() { Text = d.SpecialtyName, Value = d.Id.ToString() });
ViewBag.grands = db_grand.GetList().Where(d => d.IsDelete == false).ToList().Select(d => new SelectListItem() { Text = d.GrandName, Value = d.Id.ToString() ... | 1 |
e731e5186b013cd1c1ef84d80beefdfa | 54fd0e78d1ede28e890e0367320e9441 | aggiorna gli account da sito e da crm | public class MSNP implements IComService
private void updateContactList()
{
if (messenger.getOwner().getStatus() == MsnUserStatus.OFFLINE)
return;
MsnContact[] contactsArray = null;
Set<MsnContact> contactsFL = new HashSet<MsnContact>();
contactsArray = messenger.getContactList().getContactsInList(MsnList.F... | 0 |
461308b3be1cea8c6863e2bd2bdf4588 | 8c3f175cbfefdfbe65465bdee6e8f5c9 | Add sales orders tile | class Enterprise_SalesArchive_Adminhtml_Sales_ArchiveController extends Mage_Adminhtml_Controller_Action
public function ordersGridAction()
{
$this->_renderGrid();
} | 0 |
5fa5d38d3fff6f94222afa0c3ae1bc8d | c636f64f635318c04e8b4d7290f84595 | Returns itself. Used as placeholder function. | class _Nothing(Maybe):
def bind(self, _):
return self | 1 |
238809a8d9b5f849297512e7e5fe6f8a | e2b35435ba67b47a5361e493d6283bc4 | @brief Set SDL renderer scale to match map rows and cols | Vector bottom_left = vec_multiply(-0.5, LENGTH_AND_HEIGHT);
Vector top_right = vec_multiply(0.5, LENGTH_AND_HEIGHT);
sdl_init(bottom_left, top_right);
} | 0 |
d1e5d404b5795075c7f5a3e22b1a7432 | 85bdeeb62f7a91acfdd8898ffff23331 | Opens the plugins list dialog | class Window:
def _show_plugin_list(self, plugin_manager=None):
QtPluginTable(self._qt_window).exec_() | 1 |
8ba690e2c06449a06b4dfcf7e0b4fc16 | 4fcd505c420d201f12528f19a4dd5871 | 홈페이지 접속을 해도 바로 /upload로 포워딩함 | @Controller
@Slf4j
public class FileController
@GetMapping("/")
public String index() {
return "upload";
} | 1 |
b3033d64b1b02e1eeb7be6bdaea1f454 | ef8bfc60a0ceed95d60b642f26ab1881 | Delete all managed animation objects | {
for(unsigned int i = 0; i < m_vpAnimations.size(); ++i)
delete m_vpAnimations[i];
m_vpAnimations.clear();
} | 1 |
d84ad549304fef89bfbbfcbb38f34d8d | 36c1bb9ab52a858be3238b7e464b4d3c | 編集中の行を削除する | {
try
{
if (構成品明細リスト == null || 構成品明細リスト.Count == 0)
{
return;
}
int activerow = sp構成品明細.ActiveRowIndex;
var yesno = MessageBox.Show("選択した行を削除しますか?", "登録確認", MessageBoxButton.YesNo, Messag... | 1 |
e5441d61ec0b937294e35a87840cb6a4 | 76f7bb4c87ac9145959026c86a245df5 | 找出两个数组中的交集元素 | public class Test
public static int[] intersect(int[] nums1, int[] nums2) {
HashMap <Integer,Integer > map=new HashMap<>() ;
for(Integer s1:nums1){
if(!map.containsKey(s1) ){
map.put(s1,1);
}else{
int ret=map.get(s1);
map.put(s1,ret... | 1 |
b7b0a2a6fc62e74f4f452162edd54621 | 384225c821c5aa77028708b48b2166e5 | 从数据库中彻底删除文章 | void reallyDelete(Integer article); | 1 |
e2300c135f0f956ee9d39510ce05e11d | 30adbbcfa46c985ce178f8139785b99a | Утверждение, что значение аргумента с именем <paramref name="argName" /> не равно <c>null</c> (<c>Nothing</c> в Visual Basic) | namespace MicroElements.Functional
public static class Contracts
public static T AssertArgumentNotNull<T>(this T arg, string name)
{
if (arg.IsNull())
throw new ArgumentNullException(name);
return arg;
} | 1 |
30f4038cc20b0db77e20f490850387a6 | 848f006db198362c0484688300532a11 | Generating keys and saving them to files | KeyGenerator keyGenerator = new KeyGenerator();
FileManager.writeKeyToFile(keyGenerator.getPrivateKey(), "sk.txt");
FileManager.writeKeyToFile(keyGenerator.getPublicKey(), "pk.txt");
} | 1 |
ee59ea55da4fa82feb781472a809cb89 | 6b1f1182145f6d581ffdfe8e4b957b5b | Returns the number of documents that were actually modified by an update | impl UpdateResponse
pub fn updated(&self) -> bool {
match self.result {
DocumentResult::Updated => true,
_ => false,
}
} | 0 |
b93e318369830d4ccec6f82746944f27 | 70c647dcf049700d39b7b1824c07c018 | @brief Start a SPI transaction. | {
if((pData == NULL) || (Size == 0))
{
return HAL_ERROR;
}
assert_param(IS_SPI_DIRECTION_2LINES_OR_1LINE(hspi->Init.Direction));
__HAL_LOCK(hspi);
hspi->State = HAL_SPI_STATE_BUSY_TX;
hspi->ErrorCode = HAL_SPI_ERROR_NONE;
hspi->pTxBuffPtr = pData;
hspi->TxXferSize = ... | 1 |
b3ed3a9ae7c31686ccda452bff04fece | 67ed5d642c847f5c34618fd8ec73c5ce | Returns the device code endpoint | class GoogleConnector:
def deviceCode(self):
return self._deviceCode | 0 |
bc64b027c6e7f8a908b29eabbf474cd6 | f9bb815bbc45d0c15919ea35f20a924b | Generate the Entry ID. | class LogEntry
protected function generateID() : string {
return md5($this->getRawContent());
} | 1 |
43a2e84caad20ab2c8426ee64f880e9a | 4ee41304e863e6799ce3037738096f48 | After deal, ask a human for two cards to discard to crib | public class Interaction : MonoBehaviour
public void DealCallBack()
{
controller.DealCards();
grab.SetActive(true);
disgrab.SetActive(true);
deal.SetActive(false);
} | 0 |
0b291bbe57a4483bd3619f5ba2885a19 | 3924bb615d53fef885cb0691e906115e | Tell ViewOp how to generate C code for an Aesara Type. | class ArrowTensorType(pa.PyExtensionType):
def __arrow_ext_class__(self):
return ArrowTensorArray | 0 |
2629b15e261dd17e52f8375b239b2dfd | ef38c57534473802443b8673c1b8ff7f | Create a form search that returns forms containing *morphologically analyzed* words.
The goal here is to exclude things that look like words but are not
really words, i.e., morphemes; as a heuristic we search for grammatical
forms categorized as 'sent' or whose transcription value contains a
space or a hyphen-minus.
Th... | form_model = super()._create_new_resource(data)
self.request.dbsession.add(form_model)
(
form_model.morpheme_break_ids,
form_model.morpheme_gloss_ids,
form_model.syntactic_category_string,
form_model.break_gloss_category,
_
) = ... | 0 |
f0973139931fd4df1cc6d80aa27b6ab4 | 094a07316ceb455768519a0911d00315 | @brief Displays the application version and the chip revision. | static eCommandResult_T ConsoleCommandVer(const char buffer[])
{
eCommandResult_T result = COMMAND_SUCCESS;
IGNORE_UNUSED_VARIABLE(buffer);
printf((char *)msg_HWver);
printf("Stepper driver: %s",Stepper_getDriverType()==STPDRV_A4988 ? "A4988":"TMC2130");
return result;
} | 0 |
2b87fa9cf310320e73a0d285e25cb8f4 | ab898e7ace4b769593004462b08b522c | Get returns the integer 42. | fun theAnswer2():Int{
return 43
} | 0 |
7e3644d056ac4d3b9d5de07be9421164 | c58bdd58754bc9e24dc543fc13811813 | Este es el metodo que recoge las coordenadas y las traduce a una direccion. | @Stateless
@ManagedBean
public class ControladorPropiedad
public String ObtenerDireccion(float CoordX, float CoordY){
return ObtenerCalleCercana(CoordX, CoordY) + " " + ObtenerNumeroPuerta(CoordX, CoordY);
} | 1 |
f1718ff11fab5a219f9d9cab5c83ea58 | a0acc113a91a33542a7eb0e9c33d1b58 | Возвращает точные координаты в пикселях по точке в массиве свитка изучений | let {x, y} = point
const remainDerX = x % width
const remainDerY = y % width
if (remainDerX > width/2)
x = x - remainDerX + width
else
x = x - remainDerX
if (remainDerY > width/2)
y = y - remainDerY + width
else
y = y - remainDerY
x = x - (spec / 2 + 1)
... | 0 |
901030946bec88b470883c11c4f3953c | 38e7d5ed2dc50bce8f9bc2385d8821e3 | This is the callback function that gets called from the logger
whenever a new result is available. | Result *res = NULL;
results_mutex.lock_shared();
if (pos < allResults.size()) res = allResults[pos];
results_mutex.unlock_shared();
if (res != NULL)
{
out << res->sdf;
out << "$$$$\n";
}
} | 0 |
81b04cc7a6093516d341b43402ffc038 | ce7954ba937f0833d5781ce8d375fac5 | Function to change decryption key values to match chosen modulus | int options4(int *ptr4)
{
int i;
int temp;
int temp2;
int temp3;
int temp4;
switch(*ptr4)
{
case 4:
{
printf("Decrypting your code\n");
for(i=0;i<SIZE;i++)
{
*(user_entry + i) = *(user_entry + i) - 1;
if(*(user_en... | 0 |
24404c43f51b03cf71e6a0f400281a52 | 5d246f0c9b875b2b8137b3a7b3977885 | 自动清空密码框 | function passwordClear(){
if (confirm(getMessage('js.tt.warn.GLW09'))) {
$('oldAdminId').clear();
$('oldAdminPsw').clear();
$('newAdminId').clear();
$('newAdminPsw').clear();
$('passwordConfim').clear();
$('oldAdminId').focus();
clearError('passwordForm');
... | 1 |
24ba67375e8dec3a6602343bfee97f1f | bec84d30242379f830e5f79e22dc2749 | Transfers execution control to the debugger. The behavior of the debugger thereafter is specific to the type of debugger used. | def break_into_debugger():
return _attach_server().break_into_debugger() | 1 |
75dfb0a0e563c656cf4a64d5ecdbf1e5 | 1e4e366afd0a2cca88706c454d2c1c50 | 用于构造线程安全生成器的装饰器 | class threadsafe_generator:
def __init__(self, gen):
self.gen = gen
self.lock = threading.Lock() | 0 |
c65abae3e5909afa1457310c101fd265 | 7ff4e566e1e323ed75af5362addc0b6b | 十一选五冷热遗漏统计计算 | public class FiveInElevenApp
public static void fiveInElevenAnaylse(String category, String date) {
List<FiveInEleven> list = MysqlDatabseHelper.getFiveInElevenList(category,date);
List<FiveInEleven> adjacentList = new ArrayList<FiveInEleven>();
List<FiveInEleven> consecutiveList = new ArrayList<FiveInEleven>();
... | 0 |
2bc3dd24465f5af6a6d44ebde2ba50fa | f0d800a3c365aca46ce975682b7007c5 | 販社の入出庫履歴の登録・更新をおこなう | {
$uid = (int)($_SESSION[DBWork::sessionKey]);
$co_id = (int)($_SESSION[DBWork::accountKey]);
$close_year = (int)$this->param['close_year'];
$next_year = $close_year +1;
$from_yyyymmdd = $close_year.'0000';
$to_yyyymmdd = $close_year.'1231';
$this->startTransaction();
$sql = "SELECT A.io_item_cd item_c... | 1 |
f967b4d8c374da2843f4ba48befe58fb | 91290877959069cd4af58e471fd7ff7f | 如果初始容量和最大容量都为0 则返回对应空buf | public ByteBuffer acquire(int size) {
synchronized (this) {
if (poolCount > 0) {
if (size <= bufferSize) {
poolCount--;
ByteBuffer result = pool[poolCount];
pool[poolCount] = null;
((Buffer) result).... | 0 |
a9634d29cb4922c3f19b08eb2e6539b4 | 637aecc05577c80cf1dd0d20b65641f0 | Set the secondary colour. | public class MaterialTapTargetPrompt
public static class Builder
public Builder setSecondaryTextColourFromRes(@ColorRes final int resId)
{
mSecondaryTextColour = getColour(resId);
return this;
} | 1 |
0a34171a2a64fed7764e4877bd2f6918 | 0d16766144b8213ac3a553c500fdddb7 | wx.navigateBack封装,支持带参数返回,返回后会触发上一个页面的onBack函数 | wx.navigateBack({
delta,
success: function (res) {
resolve(res)
},
fail: function (err) {
reject(err)
}
})
} | 1 |
0f232f6a77beca2d6c950c3b22fe25f3 | 34f1847dbd84ddb29109d05bc480430e | проверяет, имеет ли элемент указанный CSS-класс | var classes = getClassList(element);
for (var i = 0; i < classes.length; i++) {
if (classes[i] === className) { return true; }
}
return false;
} | 1 |
a3aa2b0b1981c8521256ab153f7c1545 | a06313ceeae09636a4c1f93bd8120967 | Get the string representation of a test phase | {
return String.Format("Conn: {0}:{1} Phase {2}", Element.ElementType, Element.ID, Phase);
} | 1 |
12cd022d80d9d0aa80fba0c8f1a63572 | 7a8141737d074a0e093d95c39cddfc5d | This method supports the accessing of the overlay of the current node. | STDMETHODIMP VwPattern::get_Overlay(IVwOverlay ** ppvo)
{
BEGIN_COM_METHOD;
ChkComOutPtr(ppvo);
*ppvo = m_qvo;
AddRefObj(*ppvo);
END_COM_METHOD(g_fact, IID_IVwPattern);
} | 1 |
23bb928adb33388f8148dbb994b201fb | 6fe7ea79c2ca66298e2772709cec23c4 | add_screen method, capturing the screen where specified and adding it to the generated HTML report | public class Reporter
public static void addScreenshot() throws Exception {
ScenarioUtils.getscenario().embed(WebDriverUtils.takeScreenShot(),
"image/png");
} | 1 |
0f4af81cadb2d20fa3dd21cbd911c37f | eada608f292e7410b612f904e9ffad12 | @brief Update the current video foramt index from the video format list | namespace MFormat.View
public partial class InputDeviceDialog : Window
private void videoFormatComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
if (this.videoFormatComboBox.Items.Count > 0)
{
M_VID_PROPS vidProps;
string name;
... | 1 |
5f1f2c067d006f129c520b3b924a0089 | 958b499bd262327e2299367e1c0dd753 | Enregistrement d'une liste de description de rapport | global $REJREPORTS;
if( !isset($REJREPORTS) ) { $REJREPORTS = array(); }
if( !is_array($report) ) {
$report = array($report);
}
$d = array();
if( isset($type) ) {
$d['type'] = is_array($type) ? $type : array($type);
}
foreach( $report as $r ) {
$d['report'] = $r;
$REJREPORTS["$r"] = $d;
}
} | 1 |
d0a5696e0afd9a1b23496fc5618d9b17 | bcd41b11bf8c5d1573bb2504969a5d1a | 根据blog_ids获取标签map | class Blog
public function getTypeByBlogList($blog_list) {
if(empty($blog_list)) {
return false;
}
$type_ids = array();
foreach($blog_list as $blog_id=>$blog_val) {
$type_ids[$blog_val['type_id']] = $blog_val['type_id'];
}
if(empty($type_ids)) {
... | 0 |
a53cc910158c5d6a88ab0dfcd97b5362 | 834d1a8cd5c3bbc68f1b3570936941b9 | Sets the value of the CC-Request-Type AVP, of type Enumerated. | if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
cpuOvercommitType_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
} | 0 |
4497427deb3bb44b6a998740f3bbc511 | 0b2493bcd17e01d1992fc86a39284e50 | Retorna uma Disciplina, achando ela pelo nome. Null caso a disciplina não
seja encontrada. | class Graduacao
public static function nomeDisciplina($coddis)
{
$query = " SELECT D1.* FROM DISCIPLINAGR AS D1";
$query .= " WHERE (D1.verdis = (
SELECT MAX(D2.verdis) FROM DISCIPLINAGR AS D2 WHERE (D2.coddis = D1.coddis)
)) AND (D1.coddis = :coddis)";
$param = [
... | 0 |
546312101ac86855eb6350c0f50bcf5b | 95862fba6ba1eb65c8f6733a63056ebe | Tests the connection to the filesystem. Local always returns true. | public class LocalFileSystem implements FileSystem
public boolean isLocal() {
return true;
} | 1 |
b51a9d5192eab473e78f63d7786bf73e | e389095f8a10eb7c596d3d39f067a952 | Validates a device public key | val = base58.b58decode(pk_str)
if len(val) != 35:
return False
prefix = val[0]
if prefix != KEY_PREFIX:
return False
sha256 = hashlib.sha256()
sha256.update(KEY_PREFIX)
sha256.update(val[1:33])
s = sha256.digest()
if val[-2:] != s[:2]:
return False
return ... | 1 |
509abeaec5dfd8a61a7396ff75010a3e | b858499363325f6234e720fc746105b8 | 检查当前输入,并决定是否显示提示view | public class EditTextUtil
public static boolean isInputedCorrect(Activity context, EditText et, int type, String errorRemind) {
if (context == null || et == null) {
Log.e(TAG, "isInputedCorrect context == null || et == null >> return false;");
return false;
}
oringinalHintColor = et.getHintTextColors();
S... | 1 |
213f88d011366ae39a03f79548b5672f | 7fc4cb27c1d31caf645c426224759566 | Download a remote file to disk | logger.debug("Downloading file from '%s'", url)
try:
response = requests.get(url, stream=True)
response.raise_for_status()
except (HTTPError, requests.exceptions.ConnectionError) as exc:
logger.error(exc)
raise RuntimeError("Could not open URL '{}': {}".format(url, exc))
... | 1 |
89ea2cab068ecfcebaa75fd557691b8b | 4d0ecedc16d0638fb5178b3af13b4d81 | 获取指定类型的级别最大深度值 | namespace EarthView
namespace World
namespace Spatial3D
namespace Atlas
public class Iclampscenelayer : EarthView.World.Spatial3D.Atlas.Iscenelayer
public virtual int GetMaxLevel()
{
int ret=EarthView_World_Spatial3D_Atlas_IClampSceneLayer_getMaxLevel_ev_int32(this.NativeObject);
return ret;
... | 1 |
2cac364e16794e634a60036ff0679502 | 86c7804e9c9ba3831b43d9ecbb64e812 | Charge la vue principale a partir du flux de lecture ouvert. | class LabelViewer:
def view(self) -> None:
self.frame_index = 0
if self.config.out_dir is None:
self.init_show_window()
else:
self.write() | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.