query_id
string
corpus_id
string
query
string
code
string
label
int64
211f55297215e0f6c5a938a31da1a434
96b30a71026e5a3d9b4a55387d4f4a15
Reads whatever's in the FPGA outbox
class SX1278: def read_fifo(self, length=0): return self._spi_ctrl.read_bytes(self.REG_FIFO, length)
1
53a54471c7e05504afa0b1339ab11fe4
735192cd2448cbd79e96437154dcb1fd
retorna a quadrupla representada por s
def s_to_pair(s): return ord(s[0]) - ord('A'), int(s[1])
0
747c17aa3c888218aecb4c3031c41a77
30c246487ce4ed727e12def64524da96
Ask the API to display the device property page. This page is implemented by the driver.
namespace Kwyjibo public class VideoInput public void DisplayPropertyPage() { var source = ((VideoCaptureDevice)Source); if (source != null) source.DisplayPropertyPage(IntPtr.Zero); }
1
4f047b4099e21417475453d6241fe749
8e03c1fd318c82e876f4b9904359d132
Normalize the given font size based on the system DPI.
final float fontScale = Resources.getSystem().getDisplayMetrics().scaledDensity; return pxValue / fontScale + 0.5f; }
1
3022464ae07e0c6e7ecc996498f413d7
f117fce358ff5c0ca85814d4ac834767
DISPLAY NO COMMUNICATION ON THE INTERFACE
void displayOff() { spi_slaveSelect(0); spi_write(0x0C); spi_write(0x00); spi_slaveDeSelect(0); }
1
d84282692b6dd0d3b95d89085a3cf777
645a7db3079ca66286e55b13b13565b1
linear interpolation - 3-dimensional case
{ float s = lerp1d(x, v0, v1); float t = lerp1d(x, v2, v3); return lerp1d(y, s, t); }
0
71b8013045882eb29e2077fe0af325a1
996d8c8f6ab75e6a4271d7c05097c036
Check whether issue collection is enabled
class Data extends AbstractHelper public function isEnabled() { return $this->getConfig('enabled'); }
1
2dfbd7f0bcf10cee6c4ab9a1fcec8834
1a521929922d6a176dc2d945682e5d3a
处理四要素验证
Map<Integer,String> responseMap=new HashMap<Integer,String>(); Map<String,Object> params = wdParamService.GetFourElement(entName,entMark,name,cardNo); JSONObject result = (JSONObject) JSON.parse(wdzxService.getResponse(params,WDIDEnum.COMP_FOUR_IN,WDIDEnum.COMP_FOUR_PRO)); if(((String)re...
1
3a4e9a9cb7584b9c0b19ba69011d9c62
058028cb998b8f452c2b617da768b521
Superusers cannot delete committees.
models.new_user(username='delegate', password='user', user_type=User.TYPE_DELEGATE) self.client.login(username='delegate', password='user') response = self.get_response(self.committee.id, params=self.params) self.assertPermissionDenied(resp...
0
a88e18b58757fa47499419355c453d3d
939c160fbf6897b88d3a66c650474ab7
Zeigt einen modalen Bestätigungsdialog zum Löschen an.
dialogService.open({ viewModel: DialogConfirmation, model: { title: title, content: content, ok: "Löschen", okIcon: 'fa-trash-o', okClass: "btn-danger", cancel: "Abbrechen", cancelIcon: 'fa-ban', cancelClass: 'btn-normal', }, lock: true }).whenClos...
1
8a2481bf75a12e916eede4b3780ea4e2
5779910c92e797b82b57b5806deea163
Wait for the correct guessing game answer.
class Game: async def wait_for_guess(self): self.logger_inform_phase() if self.quick_delete: self.phase_handler.start_task( Phase.clear_messages, preserve_groups=[Group.other_bot, Group.user_chat], preserve_keys=[Key.summary, Key.abort, Key.sho...
1
baf83b9505b10b0c7ffd073cff0cb5f3
3003698184f9e23c3a151ad25499c3db
REST API for retrieving icloud caching data for iCloud widget
class Caching_controller extends Module_controller public function caching_icloud_widget() { $obj = new View(); if (! $this->authorized()) { $obj->view('json', array('msg' => 'Not authorized')); return; } $queryobj = new Caching_model(); $sql = "SELEC...
1
4b1b806275955d92d1bc2d3ebd81c8e9
dcd6c7f439541671a5bc4287bd04ad4f
\brief Handles a "SEND ENCAPSULATED COMMAND" message.
static int hci_le_enc_cmd_handler(ke_msg_id_t const msgid, struct hci_le_enc_cmd const *param, ke_task_id_t const dest_id, ke_task_id_t const src_id) { struct ke_msg * msg = ke_param2msg(param); msg->id = LLM_E...
1
a7ec80b4186abaddb1631ac9ebd22cfa
8686f264dc00ca7701820f3cab7bb345
The handler for the 'tabCloseRequested' signal.
class TomographyPlugin(base.plugin): def tabCloseRequested(self, index): self.ui.property_table.clear() self.ui.property_table.hide() self.centerwidget.widget(index).deleteLater()
1
814ff6b103fecbd533d6015c33e0b52d
e1e407641103b401fa9f987393ce7f2f
Runs the actions list asynchronously, one by one.
{ running_ = true; while(sequence.Count > 0) { Action action = sequence.Peek(); while(IsPaused()) yield return null; while(!action.IsCompleted()) { if(!action.IsRunning()) yield return action.StartAction(); else yield return null; } if(sequence.Count > 0) { sequenc...
1
e9fa5a943a2e70fd4705488369902dd2
dafdbbebd7c83de0a0351e940b546fc8
Return items for newsticker
function getNewItems($atts) { extract(shortcode_atts(array( "num" => '', "cat" => '' ), $atts)); global $post; $oldpost = $post; $myposts = get_posts('numberposts=' . $num . '&order=DESC&orderby=post_date&category=' . $cat); $retHtml = '<ul class="news-list list-unstyled">'; foreach($myposts a...
1
fca19c257411590b7e86b3851016cbe1
5ec24df0abe0389258e952437ede37c5
获取一般续打展现数据
getRenewData() { const detailId = this.ctx.request.query.courseDetailId || 0; const studentId = this.ctx.request.query.studentId || 0; const detail = yield this.service.courseTableDetail.getById(detailId); if (detail == null) { this.fail('要续的课程不存在'); ...
1
4967b752cf804c83e002f9b54de6a660
357a51b9b1dca70e746ab6d56ee9240e
Save the inputted lst to the filepath. Save the list of dictionaries to the filepath location, using the inputted format (default is csv). Fill nulls with the passed in argument if specified.
def printlst(lst, string): if string == 'stdout': for item in lst: print(item) else: with open(string + '.txt', 'w') as file_out: writer = csv.writer(file_out) writer.writerows(lst) return None
0
41c68cf1036c0539a5465eebcceb6955
6362fbf13e69267fe15e56e6cc0bb9c9
gets the name of the file not including the file extension
function getName(filename) { return filename.substring(0, filename.lastIndexOf(".")); }
1
475a5b46afd4ad78e255c06b632d1810
dc93d2a36b67b1a13258e30b7dcf9a52
Kontrola samotneho prikazu nesmi nic nasledovat
if(strcmp(cmd, "help") == 0 || strcmp(cmd, "h") == 0){ if(argc > 1) return -1; help(); } else if(strcmp(cmd, "dir") == 0 || strcmp(cmd, "d") == 0){ if(argc > 1) return -1; dir(); } else if(strcmp(cmd, "quit") == 0 || strcmp(cmd, "q") == 0){ if(argc > 1) return -1; freeAll(); return 1; } else if(str...
1
c447f5629905756a82a848f57da18deb
4f37633bc1222a127cd78b0c01a7d948
Renames the resource package folder.
ContentUpgrade doRename(String newName);
1
6789d72c332fbc41596f4fa8751390af
8bba84c75dffeac5417cf1e5ff1e0194
Helper method to change process execution properties
{ $bind = array('process_id=?' => $processId); $this->_getWriteAdapter()->update($this->getMainTable(), $data, $bind); return $this; }
1
0d14a33c329d08e52ae78f6261c24d17
87238380bffa8da928bcbb5153d358d7
Функция ожидания элемента пока не появится
public class Functions extends Utils public void waitingAppearanceVisibility(By bySomething) { WebDriverWait wait = new WebDriverWait(driver, 20); wait.until(ExpectedConditions.visibilityOfElementLocated(bySomething)); }
1
8e76020f21a0c2c7b7db45448a28f887
73d79588e77fb29a85400482c0f6368b
Signal that the participant has completed use of the resource
public void participantsComplete();
1
3f98a1f16144b2b18470d96178d11beb
74a2ccf99af710b4aa6cc5293438a3f0
Exit a parse tree produced by {@link decafParser#and_op}.
class PigListener(ParseTreeListener): # Enter a parse tree produced by PigParser#parse. def exitAnd_cond(self, ctx: PigParser.And_condContext): pass
0
14174e94aa567d1a7187fdcbb63551bc
ee72b9f9c32481f30a5225c5610b3ce5
Returns whether CSRF token changed
public function isChanged(): bool;
0
d05f43d56e1f9491eeb400e3d35ac315
fa97dba7fdac67fed8058ecdaceb9c52
Method that used to clean the archive storage for testing
filesToDelete = new ArrayList(); ac = archiver.createArchiveCreator(); ae = archiver.createArchiveExtractor(); }
0
2e7cc01bb0aca9c9796761306a497442
0e2ece9b111273fe204e81b96c615880
增加常量注解
void addEnumConstant(String name, String value);
0
9853362ccde6204f76eefc3a642c4595
c4daa030d69ab2c304cda371c0c2bb9a
获取文件中的稀疏数组
File f = new File("D:\\sparse.data"); String s=""; InputStream in=null; try{ in=new FileInputStream(f); byte[] b = new byte[10]; while(in.read(b)!=-1){ s+=new String(b); } in.close(); }catch(Exception e){...
0
58a5bc52ef65c00338ce52a471f392b8
6cedd8552a00c462571a792af80c71e2
以字节数组的形式返回指定的字符串
namespace AimaTeam.WebFormLightAPI.httpUtility internal sealed class EncodingUtility public static byte[] get_bytes(string str, Encoding encoding) { return encoding.GetBytes(str); }
1
56ba550e6b86d4402e1b7ab6fd906661
4c16d4c0a0617ea61f5fe1b07baf4f21
Read handler for the IIR register.
serialRegIirRead(PDEVSERIAL pThis, uint32_t *puVal) { *puVal = pThis->uRegIir; return VINF_SUCCESS; }
1
93e266c8eb899a1d6fd6b87d5bcccc7d
fd50c56d882acffb5e111da8b5b65181
Creates the intent to launch Activity with [getScreenClass] or [getScreenClassPath] class. You should override this method if you need custom behavior (system intents, choosers, etc)
@JvmOverloads fun getComponentIntent(packageName: String, className: String, bundle: Bundle? = null): Intent { val intent = Intent(Intent.ACTION_VIEW) if (bundle != null) intent.putExtras(bundle) val cn = ComponentName(packageName, className) intent.component = cn return inte...
1
6f1dd06688b53df5be45f78fe5921253
863e5a2bb6245ba7bac4ae076e60f6c5
đăng bài
class user extends Controller public function postSignup(Request $request) { $check = ''; if(Models\users::count() > 0) { if(Models\users::where('username', $request->username)->count() > 0) { $check = 'Bị trùng username. '; } } if(empty(trim(...
0
6ff0da87121a9ab78990d338aa84f521
8b65f02d35181589262109087af78caa
Called when the left-mouse is used to drag a point on the VOI.
class PolygonControlPoint(ControlPoint): def OnBeginDragLeft(self, x, y, keys = 0, attachment = 0): self._shape.GetEventHandler().OnSizingBeginDragLeft(self, x, y, keys, attachment)
1
02d0d1ce755be4ece6dc004899cecbd3
f8c382ade0cb10a6d46db0ed53ee7637
根据输入的各元素权重,计算原参考文献与证据参考文献相似度
double up = 0.0, prototypeDocDownAllSquare = 0.0, inputDocDownAllSquare = 0.0; for (map<string,double[3] >::iterator it = inputDoc.map1.begin(); it!= inputDoc.map1.end(); ++it) { if(mode =="MIN"){ double inputDocWeightTerm = it->second[0]; double prototypeDocWeightTerm = prototypeDoc.map1[it->first][0]; up...
1
fda6365982cf3edddd162de471f805c3
671365dc7e248b0361d18bc7f04e73e0
Поиск по ФИО+ДР
$name = strtolower(trim(toAscii($name))); $surname = strtolower(trim(toAscii($surname))); if (strlen($name) > 2 && strlen($surname) > 2 ){ $user = DB::table('users AS u') ->select( 'u.name AS name','u.surname AS surname', 'u.id AS id', 'u.email AS email', ...
0
c03682f518b2300d390830637c20c6be
2a64757219be42278cf0ea1c8bf7348b
Determines the user's locale from ``Accept-Language`` header. This is similar to tornado.web.get_browser_locale except it returns the code and not a Locale instance. Also this will return a result weather a translation for this language was loaded or not. See http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14...
class RequestHandler(object): def get_user_locale(self): return None
0
ba509bb57060d7ca385c474ca7d637d5
0d0be05f28b817db8e2e5ea88a0f3e2f
List of files sorted by size descending.
class Explore(): def list_files(self, *args, **kwargs): kw = {'only_files': True, 'sort_by': 'size'} kw.update(kwargs) df = self._get_filtered_data(**kw) if kw['sort_by'] == 'size': df.sort_values('size', ascending=False, inplace=True) else: ...
1
41293fbb4793b6640eb9aeeabb57000e
3cab87cec4d5a20aa9ae4df37d3bbbd5
查询最近3条记录
class News_model extends MY_Model public function recent() { return $this->db->order_by('time', 'desc')->limit(3)->get($this->table_name)->result_array(); }
1
8f053214e8ef1aed8488003c90fafc74
ed9f43a6af167a0711bff5c4306bd41a
初始化全部课程和全部教练相关View
String[] weekStr = {"星期六", "星期日", "星期一", "星期二", "星期三", "星期四", "星期五"}; Calendar cal = Calendar.getInstance(); int year = cal.get(Calendar.YEAR); int month = cal.get(Calendar.MONTH) + 1; int day = cal.get(Calendar.DAY_OF_MONTH); int dayOfWeek = cal.get(Calendar.DAY_OF_WEEK)...
0
8360a7c26304bc4a7934490c4e125aa2
2bd94798c4452f24997d6b39c0b87318
Change wiring attribute for a map/virtual-address pair.
inwox_vir_addr_t AddressSpace::mapAt(inwox_vir_addr_t virtualAddress, inwox_phy_addr_t physicalAddress, int protection) { size_t pdIndex; size_t ptIndex; addressToIndex(virtualAddress, pdIndex, ptIndex); return mapAt(pdIndex, ptIndex, physicalAddress, protection); }
0
c84c7388e02d77efdd27baec52bdbfd2
cabfb71dacd4f70231a9ee59a6b7b163
Register a friend in the database
class TestPresenter(private val repo: TestRepo) fun addFriend(uid: Long) { val user = repo.loadDbValue(uid) user ?: return friends.add(user) }
0
cfe206c5af2b22014028cc25ac9be9ac
3875ea9ef5222d4c776f2543874c6fd2
An internal method used by operations to save their results for advanced users.
Transaction transaction, OperationData metaData, OperationData undo, OperationData redo, object operationContext, long stateProviderId);
0
8d24875b1ca90ce78a86a867cc99aa17
6e6048280778e653adf89cee5b54986e
Read follower relationship in an app
{ $data = Follower::paginate(5); $response = [ 'success' => true, 'message' => null, 'data' => $data, ]; return response($response); }
1
fe241600984dbd56c95a00f24e9d70d6
564277091f97ee414e69847838628646
通过腾讯证件库进行活体检测
class UserIdentityController extends Controller public function checkIdcardFromTianchuang(Request $request) { $data['userId'] = $request->user()->sd_user_id; $data['face_status'] = UserIdentityConstant::AUTHENTICATION_STATUS_FACE; $realname = UserIdentityFactory::fetchIdcardinfoById($data); ...
0
5797f4e5986ca24a800f61b0426e0c04
0ab565d6df10c97fa408086e0b82294a
회의 저장
class MeetingsRepository implements MeetingsRepositoryInterface public function regist($request) { $user = Auth::user(); if ($request->file('meeting_image') == null) { $picture = null; } else { $path = $request->file('meeting_image')->store('public/img'); ...
1
125fa372a3a27d72592b93c6bd9ed519
474209ff09578a1619ca3bb09db6163a
新規作成するプレイリストをDBに保存できるかを確認。
def create_playlists(category): create_response = youtube.playlists().insert( part="snippet,status", body=dict( snippet=dict( title="【{0}】週間カラオケランキング".format(category), description="DAMのカラオケランキングを元に週に一回自動更新されます" ), status=dict( ...
0
79b434e9b590b1cd3cbcea5349050111
c56f2be76a24aca5d7b5b8d38f8def40
convert keys to symbols
class Hash def symbolize_keys! map_keys! { |k| k.to_sym } end
1
9a53fa00f8ed6a772179752acb9306ba
bb603ef5055001f9a2167fa09a144ea9
给该任务包含的机器下发所包含的文件
random.shuffle(self.test_list) chunks = np.array_split(self.test_list, len(machine_names)) for chunk, machine_name in zip(chunks, machine_names): file_name = get_task_path(machine_name) os.makedirs(os.path.dirname(file_name), exist_ok= True) with open(file_nam...
1
d7989f1f51680865839c190fa847a515
b4ba62b0d93fffe13aa15c8b44cb7b7c
Comprueba si los ninjas murieron
if (comoara[2] == 0) return false; else return true; }
0
f12dc2a50a201d05048c5854eee2dce5
cd7a069fa0897d2ee7976fe495c2be21
Splits the children nodes. This should only be used when initializing the model with multiple parameters.
let splitNodeData = []; let fixedIndex = childNodes[0].parent.numberOfFixedChildren; let fixedNodes:[] = childNodes.slice(childNodes.length - fixedIndex); let scrollingNodes:[] = childNodes.slice(0, childNodes.length - fixedIndex); splitNodeData.push(fixedNodes,scrollingNodes); return splitNodeData; }
1
064615665ccbd0dcae806a844bb720c3
28700510b257c2933d62b90bd75bfb77
Reveals parts of the secret word that were guessed correctly. Non guessed parts will appear as underscores.
new = "" for letter in secretWord: if letter not in lettersGuessed: new += "_ " else: new += letter + " " return new
1
69f6507cb5969cc34119148feed790ed
f472d10dd8d7f9927f91ae1244020863
Taking out the NaN values from the catalogs
nanInds = [] for i in range(0, len(y)): if np.isnan(y[i]): nanInds.append(i) y = np.delete(y, nanInds) X = np.delete(X, nanInds, 0) return y, X
1
c4d19159f0bb48a843390361337ca34e
16f9df3de2de4d545173bb16e646b939
Sends user's move choice to the model for board state changes.
public class MatchView : MonoBehaviour private void OnMoveSelected(int col) { MoveSelected?.Invoke( new FutureMove(col, selectedShapes[(int)board.Turn])); }
1
5d98c8a7abb354d7187d6dbb2abec530
3a797c701e86628fcb6c01a6dc2fadbd
执行供应商售后列表导出任务
$us = new UserService(); if (! $us->hasPermission(FIdConst::DAILY_SELL_ITEM_EXPORT)) { $this->ajaxReturn($this->noPermission("导出业务员excel")); return; } $params = array( "date_from" => I("get.date_from"), "date_to" => I("get.date_to"), ...
0
acd874e7eca1f6d7fbf64d13d929fd49
389bb22730d2819845e7833e7ca96ed3
最新ブロックを取得
return this.apiService.get('last_blocks', { num: 1 }).pipe(map(blocks => { return { seq: blocks.blocks[0].header.seq, timestamp: blocks.blocks[0].header.timestamp, hash: blocks.blocks[0].header.block_hash, }; })); }
1
6797cd40d799056622e25eda941706e8
871f13269bb01323ab74971250d2b277
Reverts the seat change.
class CreateSeatSessionsTable extends Migration public function down() { Schema::dropIfExists('seat_sessions'); }
1
ecea53b8b496e001a2629305bade86c5
b997f2aadada4dffa3b4f8849791851e
Sets the series down-sampling threshold value
public class GlobalPreferences public void setDownSamplingThreshold(int downSamplingThreshold) { this.downSamplingThreshold.setValue(downSamplingThreshold); }
1
866994243c196dbf57690881fecf4971
5c7db7c6f2781cc79f9ebd4d95e8531a
This returns the shortest delta between the given angles (between -Pi and Pi).
namespace P.Particles public static class Mathf [MethodImpl(MethodImplOptions.AggressiveInlining)] public static float DeltaAngleRadians(float current, float target) { var num = Repeat(target - current, 2 * MathHelper.Pi); if (num > MathHelper.Pi) num -= 2 * M...
1
e977b98412f51cf5a9ef91138aad512a
5d56c0414fde74b709d4a2e3fb3df247
Constructs the consent url.
namespace Identity.Server.Controllers.Views [Authorize] [SecurityHeaders] [Route("/[controller]/[action]")] public class ConsentController : BaseViewController [HttpGet("/consent/")] public async Task<IActionResult> Index(string returnUrl) { var viewModel = await this.BuildViewModelAsync(returnUrl); if (v...
0
9839acc888596cd8bd8b503a7d55dfdd
cf4b0a1522778ee6397982fb2d881f29
позиції, які покриває даний захист
public class SceneLayout : MonoBehaviour public List<Transform> GetGuardPositionList(Level.GUARD_POSITION distribution) { List<Transform> returnList = null; switch (distribution) { case Level.GUARD_POSITION.RIGHT: returnList = _guardSpawnPositionsRight; ...
1
0821c8416c179654c3e30bc6d39271d7
3db4fa8963ff67a874aa8467b86aeb09
문자열이 모두 *인지 확인하는 함수
int check_star(char arr[]) { if(!strcmp(arr, "*")) return 1; else return 0; }
0
9611eee121bb5bae177ae4ca119e1a1b
708070ee85d67d19694b12b57ba40247
立方体数据转换为数据点
class CubeRenderer : BaseGLRenderer(){ override fun initPoints() { mVertexPoints = PointsUtil.getCubeCloudPoint(PointData.allCloudPoint, cubeArea).toFloatArray() mFrontFacePoints = PointsUtil.getCubeFacePoint( arrayListOf(frontLeftTop, frontLeftBottom, frontRightBottom, frontRightTop)) ...
1
a852a9535bcea3ba08218bde617d4227
07c4b24efed4b56b808ec35a0d6a0cfc
Очистка полей "пробег" и "цена" от лишних символов
namespace Storonkin.CalculationPaints public partial class MainWindow : Window private void textBox_TextChanged(object sender, TextChangedEventArgs e) { if (doorheight.Text.StartsWith("0")) doorheight.Text = doorheight.Text.Substring(1); if (doorheight.Text.StartsWith...
0
6fab3252bd3512ac2d09bc3ddd642aaa
ca2e5b00a084ed8fa0d7dda2ffca15a6
Merge the old record with the new one.
class BaseResource(object): def process_record(self, new, old=None): new = self.preprocess_record(new, old) return new
0
bf807d639c12bdccd975c26c9b71710d
7017cc1f6d3e885e5285b1278c1739b0
Sends a virtual inline transaction to another contract. This method is only available to system smart contract.
namespace MCWrapper.RPC.Ledger.Clients Task<RpcResponse<string>> SendAsync(string blockchainName, string id, string to_address, object amount_or_asset_quantities, [Optional] string comment, [Optional] string comment_to);
0
adf13b984988c09b74a83496524642ca
9f28f73abc8fbe4fc2cf2f4870f371ac
:result: Sets the vertical scrollbar to the middle of the selected area in the picture (keep it visible)
class ScreenshotDialogUI(wx.Dialog): def fullScreenSelectedArea(self): self.updateFirstAndLastPoint(wx.Rect(0, 0, self.__grabBmp.GetWidth(), self.__grabBmp.GetHeight())); self.updateDCRect();
0
36e7e7dd4633923a64391552ee444959
d4869738e4641a3d0027c4763e447fd3
检查点(x,y)是否在棋盘上
def isOnBoard(x, y): return x >= 0 and x <= 7 and y >= 0 and y <= 7
1
d34007ff71e83d11eea3df877ce2e816
bb1fc0ad58dd91f1f01888e15664859d
Get the Point coordinate for all the Queen on ChessBoard //layout[size][size]
Point *result = malloc(sizeof(Point) * (size*size)); int resultArrIndx = 0; int row = 0; for( row = 0; row < size; row++) { int col = 0; for( col = 0; col < size; col++) { if(layout[row][col] == 1) { result[resultArrIndx].x = row; result[result...
1
e5009b578e7f74533deb5ff7af074958
18bfb95f7b47be8868b200c000559d9c
generates phrase for cloudy weather
def genTwo(): gen = ['пиво фигня квас топ','погнали квас пить ребята','Хочу лидского...','Пью квас и вам советую','Здарова, квасолюб!','выпил квасок- хватай бабу за сосок','квасок- в счастье последний мазок','Бахнем квас еще пару раз?','Выпил квас- не п*дорас!','Я из Африки приехал...','Я бот кваса- гляжу в оба гла...
0
76d4a9fbc8a134e20226f5382408a11b
d107d74eb55efec9729c71f1f3ec8185
Searches each line in @filename for the substring specified in @substring.
return fs.readFileAsync(file_name, 'utf8') .then(data => data.split('\n') .filter(function(line) { return line.indexOf(line_sub_string) > -1; })); }
1
37e268d132b61cce592dbb428f9bf68a
9747fd8f93f73cd98ad6a1ed43c4bb01
Swap needed fields in font info record to put in 630 format on 3B2.
STREAM s; s = rdp_init_data(8); out_uint16(s, 0); out_uint16_le(s, 0); out_uint16_le(s, seq); out_uint16_le(s, 0x32); s_mark_end(s); rdp_send_data(s, RDP_DATA_PDU_FONT2); }
0
add9cb8a46e6ebd4665d12c0b379dee2
70498c32f9891c7ef5fca8bf30a31cb8
Search and filter Lead based on search text.
{ IList leadList; try { IQueryable query = (IQueryable)EntityFactory.GetRepository<ILead>(); IExpressionFactory expressions = query.GetExpressionFactory(); IProjections projections = query.GetProjectionsFactory(); Sage.Platform.Repository.ICrit...
0
885769cf36302c3b6c1b7ca8efbd3065
b523c72ae3d1b539bdc1785ab388ae9d
Функция колбэк
function callbackFunc(result) { if (result.response !== undefined || result.response != null) { let arrayOfFriends = result.response; let countOfFriends = arrayOfFriends['count']; if (countOfFriends == 0) { let textNoFriends = document.createElement('p'); textNoFriend...
1
d1acb2d793b80a7aee9b6f2349b13823
6d710072f0c38c8dedb5f1157a060add
DecodeJWT decodes a JWT and returns the payload as a map[string]interface{}.
rawToken, err := GetRawToken(r) if err != nil { return nil, err } return Validate(rawToken) }
0
517439e0a42b62074260740094b5826a
3b7e9fb46c29d5abab1e1a62e925451a
If a test fail, some jobs might not be deleted correctly, try to cleanup all created jobs here.
def delete_clean_failed(scheduler): ret = [] for job in scheduler.get_jobs(): if is_failed_job(job): ret.append(job.id) job.remove() return {'removed': ret}, 200
1
0123583e4b69b29cc19000d4bd532738
7fd1216b305fe327b0bd95d4d840219a
Animation chains are great for consecutive animation blocks. Each chain can take the same options that UIView##animate take.
function ChainSelector() {}
0
553270f921a496888b059b60b1c8b77a
31f3f2c4bf957cb3940993cd773ecbf7
Tests that creation of the document failed
$this->drupalGet('/entityprint/pdf/node/1'); $this->assertSession()->elementContains('css', '[aria-label="Error message"]', 'Error generating document: Exception thrown by PrintExceptionEngine'); $this->assertSession()->pageTextNotContains('The website encountered an unexpected error'); }
1
fc085f272cca3958179db5b2c7f8322c
4c5dee6a3c974a212546fe59a39bc01a
получить ключи статистики для активных подарков
class GiftRegistry public function getActiveGifts() { $giftIds = $this->getStorage()->getGiftIds(GiftStorageInterface::STATUS_ENABLED); return $this->getGifts($giftIds); }
0
f9255dde43e0b519361be4c948ac1cb6
a23d2ab94b428744b16d473cf9c5cbc8
Get User extended value after checking read permissions against current Editor
{ if(!$this->config->isPermissionCheckEnabled()) { return true; } $permissions = $this->getUserPermissions(); if($entityTypeName === \CCrmOwnerType::CompanyName) { return \CCrmCompany::CheckReadPermission($entityID, $permissions); } elseif($entityTypeName === \CCrmOwnerType::ContactName) { r...
0
e225c26277eb47b8014b0ae42d9cd9fe
59bb03c02c6542af02fa1adcc83cf0ce
根据项目Id获取财务年度到帐记录
public OverdueFeeDTO getOverdueFeeByProjectId(int projectId) throws TException { OverdueFeeDTO overdueFeeDTO = repaymentMapper.getOverdueFeeByProjectId(projectId); if (overdueFeeDTO==null) { return new OverdueFeeDTO(); } return overdueFeeDTO; }
0
9df6fe9dc258a4b8b9890985d284c030
c5b06950cf137f5498e0c1a8e77c9102
将协议的字节转化为本机的Int16类型
namespace Moons.Common20.ProtocolImplements public abstract class ByteProtocolImplementBase protected virtual int ProtocolToHostInt32( IBinaryRead reader ) { return ProtocolToHost( reader.ReadInt32() ); }
0
1d3bf9d277ce67d96190b253acd7a449
7bafc26e693914bd1b314be6552fc29f
게시판 글/댓글 삭제
function YB_delPost ($bo_tableName, $no, $mb_no, $mb_group) { global $yhBoard, $sql, $yh; $bo_tableName = $sql->real_escape_string($bo_tableName); $no = intval($no); if (gettype($mb_group) == 'string') $mb_group = explode(',',$mb_group); $q = "SELECT * FROM `".$yhBoard['prefix']."` WHERE bo_tableName='".$bo_tableN...
1
b42cd3d10b646ca388342d0044cb86ab
59ee351e72b4a4f891ecfe9a76de9d45
Получить статистику пользователей по странам или городам
$this->module->updateFilter(); $sReturnMode = getRequest('param0'); $thisHost = Service::DomainDetector()->detectHost(); $thisLang = Service::LanguageDetector()->detectPrefix(); $thisMdlUrl = '/' . $thisLang . '/admin/stat/'; $thisUrl = $thisMdlUrl . __FUNCTION__ . '/'; $thisUrlTail = ''; if ($s...
1
47b6d7aff42bda732b17546705aae4c7
0cb4d6ef84c8e018ba9c2941cca5da41
Принимает html текст и парсит вакансии с hh.ru
base_url = 'https://api.hh.ru/vacancies/' query = ( 'search_field=%(field)s&per_page=%(per_page)s' '&order_by=publication_time&period=1&text=%(term)s' % { 'term': 'python', 'per_page': 500, 'field': 'name', }) resp...
0
77d1e270815f744c6091c0fe38129b1b
709d487586f00ee15f6abf500c7ea640
Takes multidimensional arrays produced by simulation and flattens them for use in dataframes
flat = [] for i in x: for ii in i: flat.append(ii) return flat
1
e4e965f2643877349730434adc9415fd
668c3582383fb0e244ce822de604a1cf
Return a fully-qualified billingAccountLocationBucketView resource name string.
class ConfigServiceV2GapicClient public static function logViewName($project, $location, $bucket, $view) { return self::getLogViewNameTemplate()->render([ 'project' => $project, 'location' => $location, 'bucket' => $bucket, 'view' => $view, ]); }
0
8bfae231afa1ea77ea60b4109a1e2549
c7c9d754ff327553e197bb75a9e9f138
Returns true if the surface is ready to handle events and draw.
public class SurfacePaint implements ActionListener, MouseListener, MouseMotionListener public boolean getEnabled() { return m_bEnabled; }
1
6b488cd1ef5b8de83f0d211e4073f7a2
079ba31b744e568055d2d9e641d2831b
Creates a new wrapper model that consists of multiple replicas of the original model placed on different GPUs.
class TestCallbackTrainer(ModelTestCase): def test_trainer_can_run_multiple_gpu(self): class MetaDataCheckWrapper(Model): def __init__(self, model): super().__init__(model.vocab) self.model = model
0
606a1d5c43cd99f80441e4e39151fc61
81fe6dc1b865c5e93065a9de8b7f18e9
创建session,保存到数据库
if (empty($data)) { return false; } $session_id = $this->db->insert_data($data, 'session'); if (!$session_id) { return false; } $this->ender_session($session_id, $user); return $session_id; }
1
eef871518f7bae51e45ceb82f41a1792
1f95d6f3fdd41801e41eaa52925b2f56
● UI-设置按键提示精灵
def init_ui @sprite_bg = Sprite.new @sprite_bg.z = 200 set_sprite_bg(@sprite_bg) @sprite_bg_info = Sprite.new @sprite_bg_info.z = @sprite_bg.z + 1 set_sprite_info(@sprite_bg_info) @sprite_hint = Sprite.new @sprite_hint.z = @sprite_bg.z + 20 set_sprite_hint(@sprite_hint) @viewport...
1
d156fad4455b68877d92eaac3717bd67
f022fdc595692932aff1cb7a34c9d27f
Executes a Blue Magic Ball attack.
public class PlayerMagicManager : NetworkBehaviour public bool MagicExecute() { var slot_blinking = sprite_.IsSlotBlink(); var reel_playing = sprite_.SlotTrigger; if (IsCoolDown() || slot_blinking || reel_playing) return false; cool_time_ = MAGIC_COOL_TIME[MagicType]; MagicType = -1; sprite_.Mag...
0
d7792cc6ed7d0b636c453027f9735cb9
6689810615e4c37fc4635941b2995111
Gets all characters in a circle area.
CCharactereWorld* CRegion::GetCharactersInArea(const C2DPosition<>& start, const C2DPosition<>& end) { CCharactereWorld* first = 0; CCharactereWorld* last = 0; CCharactereWorld* charactere = 0; std::list<CCharactereWorld*>::const_iterator it = _characters.begin(); for(;it != _characters.end(); ++it...
0
b906636dc36874e5e48e8482509cd3b5
09cb4cfc7647fa6eb42bfd3e882db548
Realiza o teste para recuperar o proximo dia util.
Utilizacao utilizacao = new Utilizacao(); utilizacao.setUso("Utilizacao"); utilizacao.setData_inicial("09/04/2017"); utilizacao.setData_final("10/04/2018"); return utilizacao; }
0
9a545046d89cff5574e3bcf05cbe8cae
89c316086f58291e423acc89cf889229
@brief Set result code presentation mode
public class MposUiConfiguration public void setDisplayResultBehavior(ResultDisplayBehavior displayResultBehavior) { mDisplayResultBehavior = displayResultBehavior; }
1
3e95c21fc911541fae995258d93c581c
87ac357f4d3b2956edbc7fea4bf79436
moves an Image form one layer to another
{ var newLayerOffsetSpecified = (newLayerOffsetX.HasValue && newLayerOffsetY.HasValue); if (newImg.Width <= baseImg.Width && newImg.Height <= baseImg.Height) { var backgroundColor = ImageMagick.MagickColor.FromRgba(255, 255, 255, 0); if (newLay...
0
f5950c69831023f2a28df6d1b8fcbe2b
41388cc633855bfe5b12f5878a9daf55
Returns log2(x) rounded down to the nearest integer.
namespace MaxMath unsafe public static partial class maxmath [MethodImpl(MethodImplOptions.AggressiveInlining)] public static int8 floorlog2(int8 x) { return (int8)floorlog2((uint8)x); }
1
138f2df51b79acddd6c9d2431d75f75f
dc5cd042bdf976f3929ada48d1cafbf0
Getter for the list of error statuses of this class. This implementation returns an empty list. process.
public final class ProcessorDTOBuilder extends AbstractComponentDTOBuilder<ProcessorDTOBuilder> public Collection<String> getValidationErrors() { return validationErrors; }
0
56752d29130c6268377bee7a4f5ed6bf
4fa2d509f4a3d9f609835f5760851904
Convert a date string of the format "%Y-%m-%dT%H:%M:%S.%f" to a datetime object
def str_date_to_datetime_01(str_date: str) -> datetime: return datetime.strptime(str_date, '%Y-%m-%dT%H:%M:%S.%fZ')
1
a873e597a40b771f50c8dee0f7cb4549
3709d9f66e051384ac30a8efcbbc77bb
清空已选择的通道
namespace IntegratedDisplay public class WaveformMaker public void ClearDragItem() { foreach (var item in _selectedDragItems) { _waveformDataList[item.SelectDragDataIndex].ChannelList[item.SelectDragChannel].LineWidth = 1; } IsSelectedChannel =...
1