query_id
string
corpus_id
string
query
string
code
string
label
int64
16414874e4ba668a5631b6caa10b423d
6e75be427b2a46597b19b071d71117e7
Set persist to nill (currently the same as reset)
class Redis implements Persist public function clearPersisted() { }
0
2f480067d1862df056f0ec8ecb1059a4
8b06dd03f82a683568652dd9d710a3f3
get the first word (all characters until the first space) of a string
static char *getWord(char *pstr) { char *p1 = pstr; char *p2 = pstr; while(*p2 != ' ') { p2++; } char *pword = (char *)malloc((p2 - p1 + 1) * sizeof(char)); memset(pword, 0, (p2 - p1 + 1) * sizeof(char)); strncpy(pword, p1, (p2 - p1) * sizeof(char)); return pword; }
1
ded875f6e06d8c8e9b92a0efc20909d9
191eecd3bdd84134845b364349c1a8ce
https://gist.github.com/battmanz/e28311f765a18fc6a841201912422d60
var base64 = ''; var encodings = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; var bytes = new Uint8Array(arrayBuffer); var byteLength = bytes.byteLength; var byteRemainder = byteLength % 3; var mainLength = byteLength - byteRemainder; var a, b, c, d; var chunk; ...
1
8d99dbccc43864075f01af4da9cc3bf4
0f53a05d2e28a2fc6b2315e9e7269e22
The source server id to restore from.
public static AzureMysqlServerRestoreSettings SetSourceServer(this AzureMysqlServerRestoreSettings toolSettings, string sourceServer) { toolSettings = toolSettings.NewInstance(); toolSettings.SourceServer = sourceServer; return toolSettings; }
1
6491067ff8fe749dfe71dca94f66f8a9
46eeb2688f0278b877a36071b3a16889
Convert a logical plan to a protobuf representation
const id = getPbId(pb.id); return new Plan( id, pb.name, unbufferize(worker, pb.role), pb.tags, pb.description ); }
0
2c1b9ac3d29d3330c62252eedd5b4f7e
0985dd9b1b1d49fe75bb25039754c7d8
获取29天前的日期
var date = new Date(); date.setDate(date.getDate() - 30); var dateMonth = date.getMonth() + 1; if (dateMonth >= 1 && dateMonth <= 9) { dateMonth = "0" + dateMonth; } var dayDate = date.getDate(); if (dayDate >= 1 && dayDate <= 9) { dayDate = "0" + dayDate; } var oneMo...
0
9a9c4d1b40026653e847308f56ef406d
afb39c07f734cf7622bd2e78c557e252
Gets the authorization decision for a given access token to access a resource ID access_token (string): end-user access token from openidc session resource_id (string): resource ID to evaluate permissions { } returns false if user is denied access
class Kount_Access_Service public function get_decision ($session_id, $user_id, $password) { $endpoint = "https://$this->__server_name/api/decision"; $u = hash('sha256', $user_id); $p = hash('sha256', $password); $a = hash('sha256', $user_id . ":" . $password); $data = array ( ...
0
b1b6657062e36bf658dfb246955f6609
4467566021b994f08c12eeec0a74ebec
Sets billing_price
$price_billing_t3 = strtoupper( $price_billing_t3 ); if ( ! in_array( $price_billing_t3, array( 'D', 'W', 'M', 'Y' ), true ) ) { $price_billing_t3 = ''; } return $price_billing_t3; }
0
5086365c0c1d8270607ce9be05cbe23c
6860a0bb8e22880e3ef5483a56122e93
載入選擇的文件
namespace PopUps public partial class Form1 : Form private void LoadButton_Click(object sender, EventArgs e) { richTextBox1.LoadFile(listView1.SelectedItems[0].SubItems[1].Text); }
1
f95883cd3dd94adfbad60c565dd47ddc
17acafc8f8225206ed261e7a1907531c
取当天是当年第几天
public class SystemActualParams public static int getDayOfYear() { return LocalDate.now().getDayOfYear(); }
1
cf28394cdfff3fe4ce56fcf213fac259
b895965a6d90c16d9b4615efd081baa8
冻结账户,查询账户的状态
if self.acct_status != 1: print('账户不允许解冻') return self.acct_status = 0 print("状态已解冻")
0
b89f1a71260bf6c09556369d661399d9
01f5e134ca83cf3caee123401e65096c
Gets f_name_starts_with
def ln_fi_get(name): if f_letter.search(str(name)): return f_letter.search(name).group()
0
d96dd518205ec1124f6a1f92410266bc
23fc50de34df00f4479111e84b3ad517
Parse the xml output for the device serial number
selector = Selector(response=response) device_id = selector.re(r"var device_id = '(\d+)';")[0] return device_id
0
fa66bbdc09ba257a412b0dd43c73808e
f2b2f56e1f6b3cf49a12518b7c74ce58
input: matriz de la parte lineal output: w vector de los autovalres y v vector que tiene los autovectores en columnas
w,v = LA.eig(matrix) print('Los autovalores son ', w ) print('Los autovectores son ', v[:,0], ' y ', v[:,1]) return w,v
1
6390cec641e2c421fcf6893a8382ece7
1594000b1532c9907fb7f5324b557110
updating the values for accelerometer, sensor fusion and quaternion and computing the counters for quaternion, sensor fusion, accelerometer
get_imu(); x_accel = (int16_t)((raw_data[0] << 8) | raw_data[1]); y_accel = (int16_t)((raw_data[2] << 8) | raw_data[3]); z_accel = (int16_t)((raw_data[4] << 8) | raw_data[5]); x_gyro = (int16_t)((raw_data[8] << 8) | raw_data[9]); y_gyro = (int16_t)((raw_data[10] << 8) | raw_data[11]); z_gyro = (int16_t)((raw_dat...
1
4d901b7d4b78c2cbe37e03eacab6bf03
f50e42c0c4a3e741bef3c26f7697348a
更新AdminToken
{ try { $patchData = file_get_contents("php://input"); $patchData = json_decode($patchData, true); if(isset($patchData['token']) && !empty($patchData['token'])) { if($token = $jwtToken->refreshToken($patchData['token'])) { return $this->sendSuccess([ ...
1
d5ad40104a0eef2cb387bffc5dc51c73
1bc95bf2c46c81163d1a4675ca565009
薪酬发放登记条件查询
public void queryForCondition(Page<PayApportionType> page, Map<String, Object> parameter) { apportionTypeDao.queryForCondition(page, parameter); }
1
fb53c9621926e10fb88474755556b679
773d25e626a676e6701ff9517f38489f
Exchange the content of the two fields because rotation of the cultures increases the fertility of fields.
{ if (first == second) { return; } JsonValue firstValue = _fields[first].Value; JsonValue secondValue = _fields[second].Value; GetFieldAt(first).Value = secondValue; GetFieldAt(second).Value = firstValue; ...
1
c146ae925d72715ea624e1e8015f4bf4
d570d11b6d02e22fa9fe7d4586bae94a
Group pawns based on status
for (int x = 0; x < this.getTotalSize(); x++) { for (int y = 0; y < this.getTotalSize(); y++) { if (this.isEvenNumber(x) && this.isOddNumber(y)) { this.grid[x][y] = new Square(x, y, Status.FENCEPOSSIBLE); } else if (this.isOddNumber(x)) { ...
0
2819823bbef2e108ac462848a7a97611
bd8888fe63382f5f2c946df178e371b0
Teleport camera and head to correct locations
new_loc = self.trajectory[-1]["location"] new_rot = self.trajectory[-1]["rotation"] res1 = self.request('vset /camera/0/rotation {:.3f} {:.3f} {:.3f}'.format(*new_rot)) assert res1 res2 = self.request('vset /camera/0/location {:.2f} {:.2f} {:.2f}'.format(*new_loc)) assert...
1
58072df7e3004f50c554ed42c66f9945
a7424f0245ff25784c429562d8d5ac24
Rename bound variables to &1, etc.
vars = [] for line in self.code: if line.operand1[0] == '$' and line.operand1 not in vars: vars.append(line.operand1) if line.operand2[0] == '$' and line.operand2 not in vars: vars.append(line.operand2) if line.assign[0] == '$' and line...
0
b3b41f53f4b9d46f70681a0731d04951
330fdc7193a0520a2ecfd6e7d55e83cd
Unmap the SDCC HWIO access register from the virtual address NONE NONE
static inline void mesh_flush_io(volatile struct mesh_regs __iomem *mr) { (void)in_8(&mr->mesh_id); }
0
ce3119b579da3a58ce28cce6866f8a88
628a990a27a0ad950c395c3213bc00be
Returns value of 'custom2' property
class MetricRequest2Dividend: def custom_field27(self): return self._custom_field27
0
4210d69219f1f9601539098b2e8449a5
0a0da5014bc1581da11be145dd2e1091
Go forward in zoom history
public class ChartDirectorDemo extends JFrame private void onForwardPBClick() { if (lastHistoryIndex > currentHistoryIndex) tree.setSelectionPath( new TreePath(history[++currentHistoryIndex].getPath())); }
1
2af0f8ca5bf3339653cc67aec1d903b0
c9348bb1f722e280857a04e5f8e6db15
Returns amount of wheat per stack
public class Player public int getWheat() { return resources.wheat; }
0
17e4fff5120ae03e51b2ef40ff8a282a
776d829892c1f4378209b936b31a2f17
Increase the segment index, keeping it within the upper bound.
public class SPosition protected final int incIndex() {return ++_bufIndex;}
0
bd2b3269400253daa960a47ec758bff5
13876739fbe51660ab520569e747493a
Updates in transactional mode are automatically retried by default, but this can be switched off.
@PersistenceCapable(identityType = IdentityType.APPLICATION, detachable = "true") public class UserMap public boolean isAutoRetry() { return Boolean.valueOf(getFeatureValue(Feature.Name.AUTO_RETRY)); }
1
87ed47c2de44903ea96e01445edb58c1
cb388e2482b8f6966c684f373fa68e54
Find symbol in list of symbols by id. If list doesn't contain the search symbol return null, otherwise, it is returned a symbol.
namespace MensaApp.Service class ServingMealOffer private static ObservableCollection<InfoSymbolViewModel> MatchInfoSymbolIdsWithInfoSymbolsFromSettings(List<string> symbolIds, ObservableCollection<InfoSymbolViewModel> deserializedInfoSymbols) { ObservableCollection<InfoSymbolViewModel> resultIn...
0
5f7533af011f7822fe34369ef996be38
844f2fc9b7b794ceabd27a97dfaa4afd
Method for generating capture objects.
{ $captureRequest = new CaptureRequest($url, $method, $timeout); return $captureRequest; }
1
905f891af315c4a9eace9e4b6a368973
ca4d067c564be8e2731c6a4a5b6bade5
Determinar o centro de carga aproximado de um circuito secundário. Ver <b>Centro de carga</b> em <b>Locação de postes.odt</b>. atribuição feita em <b>modifiedKmeans()</b>.
if len(self.init_points) == 0: idx_data = np.arange(data.shape[0]) D = np.full(data.shape[0], np.inf) p = np.full(data.shape[0], 1.0/data.shape[0]) self.init_points = np.zeros((self.c, data.shape[1])) for i in range(1, self.c): ...
0
6ffe4936dd3ffa63b5ebf5a361c9eace
e40a882f1e3cbe637ff81c9add0c068d
恢复删除的词条
class ContentAction extends InitAction{ public function recover(){ $ids=$_POST['ids']; $res=D('home://Content')->del_recover($ids,'recover'); echo $res?'1':'0'; }
1
1c874aa51fc22adaffb8feead21e4442
4511b365145696f523a93bbda1d4ec63
produce a monitor for a callback
func newMonitor(s *Sandbox) *monitor { monitorLog = monitorLog.WithField("sandbox", s.ID()) return &monitor{ sandbox: s, checkInterval: defaultCheckInterval, stopCh: make(chan bool, 1), } }
0
9ac1897011de751cdca58ece6e08e808
4198c677c35b6370be06f264adbe86c3
利用 blob 轉成可下載的物件。
class Canvas createDownloadElement(blob, filename) { let downloadElement = document.createElement('a'); let href = window.URL.createObjectURL(blob); downloadElement.href = href; downloadElement.download = filename; return downloadElement }
1
cdcd34d33ff6b59a5cdafb398818d074
a927308a3b29f2eca466dfeef78fa83e
Split character sequence into a list of lpsz strings. This function uses space as a delimiter and it honours spaces in double quotes. Main use for this code is to produce list of C-compatible argument values from command line.
ToLists(const std::string &szString, const char * lpChar) { return SplitString <LIST_STRING>(szString, lpChar, _tag_split_string<LIST_STRING>()); }
0
3e401fc4e78443458f1679ca81ec6af3
a45d502d03fc1a59366f6d1e550005db
Shows the stats of a project
if not 'user_id' in session: return redirect(url_for('logout')) db = get_database() request.project = db.load_project(project_id) request.tasks = db.load_tasks(project_id) request.low_complexity_count = 0 request.medium_complexity_count = 0 request.high_complexity_count = 0 reque...
1
9c92794083b6188f7408fb76c203e746
150ebcbc8dded217b2ac684084d18ca1
GET: EmailContentInformation
namespace SCTimeSheet.Controllers public class SendEmailController : BaseController public ActionResult Index(bool isSuccess = false) { ViewBag.ToErrorMessage = ""; ViewBag.FromErrorMessage = ""; ViewBag.MessageErrorMessage = ""; ViewBag.Message = isSuccess ? ...
0
3842a1ad452db0c2385466e1b6361f46
123e0ceff443392f891c311bc816e350
Gets whether the Users Online functionality is enabled
static $result; if (isset($result)) { return $result; } $result = true; if (elgg_get_plugin_setting('include_existing_users', 'newsletter') == 'no') { $result = false; } return $result; }
0
67b9a87fe325448593a06fdbeaa8a641
498d225295ee146cb539a01fcd977a30
Función que devuelve un operador de condición correspondiente a un texto
function traducirCondicion($condicion){ switch ($condicion) { case 'igual': $resultado="="; break; case 'mayor': $resultado=">"; break; case 'menor': $resultado="<"; break; case 'diferente': $resultado="!="; break; case 'mayor_o_igual': $resultado=">="; ...
1
d06e23b0c9a67ac544b4f06e7c9de504
f7f02e1543c84e2787266885145ec1e4
Clear tastant lines
{ struct tbox_line *line, *tmp; util_list_iterate_safe(&tb->line_list, line, tmp) { util_list_remove(&tb->line_list, line); l_line_free(line); } tb->tbox_ready = 0; tb->line_cnt = 0; }
1
d4c9976381c35f2801837d742b82d1cc
b125bc2b1455803749ab782f448ce326
Desviación típica de las demoras para nuevas solicitudes de pista (cuando pistas ocupadas)
number_intervals = len(wait_times) total_times = [] for i in range(number_intervals): for times in wait_times[i]: total_times.append(times) number_elements = len(total_times) total_average = self.__average(wait_times) numerator...
1
799c3690912e72be6ffb1881c55067a6
2fcbac6d844243106f5079c6568c2abb
GET: MasterCurrencies
namespace AccountingSystem.Controllers public class CompanyCurrencyController : Controller public ActionResult Index() { return View(); }
0
75e05bd0b3dc99bdf26d2c9d60d653d9
49bd2a545c0dfecf568092486889450a
判断b是否true,会进行判null处理
if (null == a && b != null) { if ("".equals(b)) { return true; } else { return false; } } else if (null == b && a != null) { if ("".equals(a)) { return true; } else { return false;...
0
642df44e460d7c681e58b7e5b83a2509
aa61d5f35bfe00442f149270544e6e29
call draw on each mesh
{ for (GLuint i = 0; i < m_OGLMeshes.size(); i++) { m_OGLMeshes[i].draw(program); } }
1
ee8cf079b1e5b1f7c3d54f1aa38bd2ed
384c569afec93f16d5403909d260fa5e
初始化客户端,并将其加入到客户端的内核链表
int MGR_InitClient(MGR_RegCallBack regInfo);
1
d2e22615a650ad5eeed16f9ca160e5ac
593ac0b3e8d65d6b248725abd7188e17
商品ジャンルを設定します。
public class JisekiCategoryList_SearchForm extends KitSearchForm public void setShiteibi(String shiteibi) { this.shiteibi = shiteibi; }
0
6981cccbf0a90fba1be5fa6fe9d19a1c
c88e2dc1ed25125f259f19a6bf725546
推送并且at全体群员
sendAtMsg(msg) { var time = new Date().getTime(); var bodyContent = JSON.parse(JSON.stringify(msg)); var showText = bodyContent.showText.split("@%1Ss"); var inviter = showText[0]; for (var i = 0; i < bodyContent.userIds.length; i++) { if (bodyContent.userIds[i] == "allMember") { ...
1
577aa9779a0ee053d083f666af3226a8
a9fd54d6aa583f86fd64815fbec81fd5
Returns: workspace path of the Avro IDL, schema or protocol files to compile.
class Blade(object): def get_build_path(self): return self.build_path
0
1dd779bf8351c7a506eaec75e4ee3fbe
2c5a8aa6da9ee4f79875cf61453e4366
Constructs a `tff.Type` for the accumulator in sample aggregation.
class ValueTypeInferrer(beam.CombineFn, ABC): def create_accumulator(self) -> Dict[ValueName, ValueType]: return {}
0
7998bc6f04943f3eeb6e5bccfa00d477
0ac407a89b453d68edf0fa07ce225f73
Evento para resetear los bits de NUR
namespace gagFIS_Interfase public partial class Form4Cargas : Form private void button2_Click(object sender, EventArgs e) { ArrayDesde.Clear(); ArrayHasta.Clear(); ArrayRuta.Clear(); ArrayLocalidad.Clear(); ArrayCantConex.Clear(); Recor...
0
db1c74038166a96e14ee840e967b401b
f07b04a29637229dec9ae9153f994a22
Creates a single image, by appending all the images in the collection horizontally (+append).
imgs = [Image.open(img) for img in plot_images] height = imgs[0].height + imgs[2].height width = imgs[0].width + imgs[1].width + imgs[4].width final_img = Image.new('RGB', (width, height)) final_img.paste(imgs[0], (0, 0)) final_img.paste(imgs[1], (imgs[0].width, 0)) ...
0
ee00281e0be6b2bdfb06e0d41f2d0725
e4c534f885eb284ae7315769bf7ca16c
根据会员编码查询绑卡列表
public ApiResponse<IEnumerableResponse<MemberBankCardResponse>> QueryMemberCard([FromUri]QueryMemberCardRequest request) { if (request.MemberId <= 0) throw new ArgumentException("会员ID为空"); if (request.BankId <= 0) throw new ArgumentException("银行ID为...
1
f3427d19b411207301cc66521840627d
066e6d5a9dfb4b787c99a56fc6581fc3
Set the function to be called when the user enters a bad (illegal) value into this field. The function will be called with a single parameter: a reference to the input field which caused the problem.
class __ValidationRuleComponent extends __UIComponent implements __IPoolable, __IValidator public function setOnInvalid($on_invalid) { $this->_on_invalid = $on_invalid; }
1
56a8af89501f9b1e94ce0d3535588ab7
05ea5dc366dec5b7f0fcf685a8592907
Push current local settings to the remote manager
internal class SessionsSettings( private val localOverrideSettings: SettingsProvider, private val remoteSettings: SettingsProvider, ) suspend fun updateSettings() { localOverrideSettings.updateSettings() remoteSettings.updateSettings() }
0
67f0bd11093a80d39fac7dcf6a1715b2
b4bd960a6be1f1f2edb2e9b2e0d3873b
Starts moving the camera to desired room coordinate
public class EnterRoom : MonoBehaviour void MoveToArea(GameObject myPlayer) { myInsideCamera.transform.position = myNextCameraSpot.position; myPlayer.transform.position = moveTo.position; }
1
cee15cd6329fa6b8a159f425937260d9
babb6b01688a6017786c9b079e38f3bc
Minimum required balance for this account, as read-only property
class Pamm extends BaseModel public function getMinimalBalance() { return $this->minimalBalance; }
1
d1b7227f25d21c591651a93ab6f0f166
9ab6877b7b1a9d7aa0e7714c7471deb1
根据控件的坐标范围随机模拟点击(京东用) 京东任务按钮有圆角,通用的随机点击方法容易点出圆角外导致点击失效,此处做修正
if coor_x == 0 and coor_y == 0: return action_time = random.uniform(0.1, 0.7) pyautogui.moveTo(coor_x, coor_y, action_time)
0
d27a6c9af97c64101fe51cf74486f92d
f3372967a57b69b5e384e147c80f6cbd
Called from RP0KCT when adding vessels to queue to validate whether all the currently selected configs are available and unlocked.
Map<Long, ValidationResult> validatePreEnqueue(Collection<LabVessel> labVessels, MessageCollection messageCollection);
1
f8864b69aa02b8cead8108b3c893665d
29b5d7ea914960332c84e0e9eb05dccc
采用二分法去查找当前应该播放的字幕
class Captions implements PlayerComponent private _search(tracks: Cue[], currentTime: number): number { let low = 0; let high = tracks.length - 1; while (low <= high) { const mid = ((low + high) >> 1); const start = tracks[mid].startTime; const stop = tracks[m...
1
2d31c7a4a46043dbc590ef4d72845560
b2105f88205b2b38454d31bc6ef9203e
函数介绍:获取书名函数 函数功能:获取书名 函数参数:无 函数返回值:字符串类型书名
string& Book::getName() { return name; }
1
ace3a820470642ad1419e1a210a9599c
4790ae5a2404970326180e5d3093d68a
Adds hook for processing of extra global markers
$params = [], $wikiTags = [] ) { $params = $this->mergeParams( $wiki, $suffix, $params, $wikiTags ); $this->extractGlobalSetting( $setting, $wiki, $params ); }
0
bd120aa89a7533215fac4af594d8f74c
6e3b3d1a2b07fd2409c4f6996744413c
######################################################################## Class - museFileAU (AU File Interface for the digital mixer) Member - PausePlay (Pause the AU playback.) Pauses writing. ########################################################################
PUBLIC AUD_ERR_T aud_CodecWM8960TonePause(SND_ITF_T itf, BOOL pause) { return AUD_ERR_NO; }
0
3d41298953dd82ba9620b0f66fc9f3dc
b5b050efd6ef9558ed6e762b5c46b2c3
show symbols and their codes
{ #define PRINTABLE_STR "%c\t%d\t" #define UNPRINTABLE_STR "=%d\t%d\t" printf("Symbol\tFreq\tCode\n"); int i; for (i=0; i < LOOK_UP_SIZE; i++) { if (t[i]) { char* outStr = isgraph(i) ? PRINTABLE_STR : UNPRINTABLE_STR; printf(outStr, i, t[i]); printCode(s[i]); printf("\n"); ...
1
84eaf3f5853ef6197080db0c70dd4a6e
6aedbffc0a763dd981f3f42b9fe0e355
Deselect contacts
function ContactsController($scope, $mdSidenav, Contacts, User, msUtils, $mdDialog, $document, $rootScope, Upload, FileUploader, $translate, api, $mdToast)//,Upload,FileUploader,$translate, api, $mdToast //FileUploader,$mdDialog,$rootScope,$scope,// function deselectContacts() { vm.selectedContacts ...
1
fb4b003e1622aa4575ff824073ae42bf
0e00d8eb101cda5fc0235f199067e3e4
设置正交投影参数
public class MVP public static class Project public void setOrtho() { MatrixState.setOrthoProject(left, right, bottom, top, near, far); }
1
e86738ecd50e971de155b2939c217b7e
a11d6d915680f45e752ce7d5dd927924
Test if make_id generates unique ids.
def test_unique_id_1(): id1 = tasks.unique_id() id2 = tasks.unique_id() assert id1 != id2
1
5466571f4a995047413823014cb77f36
1870d2d0094cbf099ac7620589a50772
サウンドノベル風とウインドウ風の切り替え
void WINDOWNOVEL() noexcept { if (ConfigData.soundnovel_winownovel == 1) { SCREEN_CLEAR(); background.DrawGraph(0, 0, true); static const auto windowColor = GetColor(0, 0, 0); DrawBox(0, 400, 640, 480, windowColor, TRUE); charactor.DrawGraph(charactor_pos_x, charactor_pos_y - charactor_pos_y, true); backgr...
1
70fb484a9ebd7e25682d080b6894d64f
2f936bb3b2dfb5ae480afd82c3ae573c
Odstrani vsechny polozky z tohoto seznemu
class Cart extends ActiveRecord public function removeAllItems() { foreach($this->items as $item) { $item->delete(); } return true; }
1
707f303eb0f51855cfe0c812ee076d83
5b58d9f454909af557ae99e4bfbf499c
Convert a Java array of boolean to a managed array of System.Boolean.
public final class ArrayUtils public static Boolean[] wrap(boolean... values) { final int length = values.length; Boolean[] array = new Boolean[length]; for (int i = 0; i < length; i++) { array[i] = Boolean.valueOf(values[i]); } return array; }
1
995a0465687b752879fa5aa0a5be6b1e
ffd879e8fc868a5a25f6336b26368998
Adds the specified key,value pair at the end of the linked list present at the position corresponding to the key.
{ KeyValuePair<TKey, TValue> newNode = new KeyValuePair<TKey, TValue>(key, value); Add(newNode); }
0
f6b79584c11a5ce1477e7c8f91dc108b
0048d582e7a7bbdfec93e62c1c220933
Verifica iterativamente se due grafi sono uguali, per vertici e archi, a prescindere dalla loro implementazione
if sous_graphe1.number_of_nodes() != sous_graphe2.number_of_nodes() or sous_graphe1.number_of_edges() != sous_graphe2.number_of_edges() : return False noeuds_vus = [] for noeud1 in sous_graphe1.nodes() : ok = False for noeud2 in sous_graphe2.nodes() : if noeud1 == noeud2 ...
1
35b6c5aa584534516858168d24757c96
c558019c5d5dc7e6c9d0067068aa5ea9
Creates a new department
@RestController @RequestMapping("/api/v1") public class DepartmentController @PostMapping("/departments") public ResponseEntity<Department> createNewProtocol(@Valid @RequestBody Department department, HttpServletRequest request){ return departmentService.createNewDepartment(department, request); }
1
1697dfe69d4944fce7f60ab6af8668ec
569655b15e103d65f507131fd377ab6e
Найти статьи за определенный период времени.
public List<PostDto> getPostsByDate(String date, Integer offset, Integer limit) { Pageable pageable = PageRequest.of(offset / limit, limit); return getPostsDtos(postRepository.getPostsByDate(date + "%", pageable)); }
0
cf456d11bb60fc2c66fb10e9bffe7181
6db1cf197f5e604ec043832301343906
Regla que identifica un id y actualiza la pila de operandos
global symbol_table, r_dim, operator_stack, pila_dim temp_current = current_func if symbol_table[temp_current]['vars'].get(p[-3]) is None: temp_current = 'global' if symbol_table[temp_current]['vars'][p[-3]]['isArray'] is not False: r_dim = 1 operand_stack.pop() pila_dim....
1
203b91804af1d699a5536d73e34acd17
e4411c7c32030e9f809077d3d824ba36
Counts chars, returns True if strings are permutations.
class StringQuestions: def IsPermutation(strOne, strTwo): charDict = {} if len(strOne) != len(strTwo): return False for c in strOne: try: charDict[c] += 1 except KeyError: charDict[c] = 1 for c in strTwo: try...
1
4026ef681e34381fda09efa40d4bed73
53c80cc1fbef13e084a8ba02c584308b
Metoda koja se poziva kada liječnik promijeni checkbox "Brzi unos"
namespace Domaci2 public partial class Form1 : Form private void rbRaznostranicni_CheckedChanged(object sender, EventArgs e) { StranicaBtxt.Enabled = true; StranicaCtxt.Enabled = true; }
0
322cc1164cf6e1f36aaa7f67f9a80aa0
0850384522a98216f07bba1695c86035
Prepare a single line string for display to HTML
if (strcmp(trim($str), '')) { return str_pad('', $recursion * 2, ' ', STR_PAD_LEFT) . $gnyf . ($valueStr ? '<font color="#6666FF"><em>' : '') . htmlspecialchars(\TYPO3\CMS\Core\Utility\GeneralUtility::fixed_lgd_cs(preg_replace('/\s+/', ' ', $str), $this->maxLineLengthInSourceMode)) . ($valueStr ? '</em...
1
99a184a1c374bd4e33d16825cff2c84a
cbc1d2092fa0a24202b980912bd71d63
get a list of captions of fields within a data set
{ List<string> slField = new List<string>(); List<string> slCaption = new List<string>(); { slField.Add("WORK_ORDER"); slCaption.Add("Work Order"); slField.Add("WOSTATUS"); slCaption.Add("W/O Status"); ...
1
03b215efb50adfda5a7ee8c7e1973e50
0c87e6a2de8ce502e7409877631eb2ae
Gets the ModelVersionsClient object to access its operations.
class VersionClient: def __init__(self, *, http_client: HttpClient, log: logging.Logger,) -> None: self.http_client = http_client self.log = log.getChild("version")
0
a5dd4e789159d3eb65016625fecf6119
0636c76fea455c1ca20df79cd30f97d9
Verifica se um numero existe em determinada coluna
class [[cheerp::jsexport]] ModulosExportados bool UsedInCol(int grid[N][N], int col, int num) { for (int row = 0; row < N; row++) if (grid[row][col] == num) return true; return false; }
1
c2578dbea3bbaa3350c919b4e2e6b69f
bfd4484c4cab25dcaf14c1027684ffef
通知客户端哪一个是客户端玩家
namespace Photon.LoadBalancing.Handler class SyncPlayerHandler : BaseHandler public override void OnOperationRequest(OperationRequest operationRequest, SendParameters sendParameters, RedirectedClientPeer peer) { List<string> usernameList = new List<string>(); foreach (RedirectedClien...
1
42a6a6fccf0ae8216967e154112c37ca
c8a02917a26bbfc945c461efe436a5ee
Verifies if a given value is greater than zero, if it isn't, throws an exception with a custom message.
{ if (value <= 0) { throw new ArgumentOutOfRangeException(argumentName); } }
1
66f977322c372f0c52d330ab976bc99b
326d2e735e057afa6dd50305b499929d
Returns a reversed copy of the provided byte[]. While some use cases would certainly benefit from an in-place reversal of the bytes in the array itself rather than creation of a new byte[], always creating a new, reversed array is the easiest way to avoid unexpected modification.
public class ArrayUtil public static int[] reverse(final int[] array) { return reverse(array, 0, array.length); }
0
48511a49b549210f6c32e75bc958a205
10b3650ddcdc913e14f5befb06a4c22f
Given the name of a file, will add all n-grams with frequencies to the dictionary.
Boolean success = false; BufferedReader reader = null; try { reader = new BufferedReader(new FileReader(fileName)); String line = reader.readLine(); while (line != null) { String[] sequenceAndFrequency = line.split(":"); String[...
1
9a74a8820789663d53f647a0c7186572
ec3c63bbcf118e81efddf439d2b1348d
Energy change if a spin (i,j) flips.
energy = 0.0 for nbh in nbhs[site]: energy += spins[site] * spins[nbh] return -J * energy
0
464451c551001e17ae8b395761689b00
19ecb920f68859d4909605656ca15fc8
查找指定账户所有未结清的杂费
public List<Map<String, String>> selectYhqxjg(String accountName);
0
26334ce91ac857e83841ffb70567b371
3a1d55aaff25606d5d1bf4ad29e3a7fe
拒绝关系绑定
{ flag = true; msg = ""; string result = ""; int bindcardfalg = 0; object[] _paramters = new object[3]; _paramters[0] = openid; _paramters[1] = linkmanid; _paramters[2] = bindcardfalg; result = string.For...
1
cc20b18ee83c272ee2d5a7a83f566a5e
4e15970ed61d60166abef3af11f31784
Successful search for unique object, returns object.
public T getUnique() throws NotUniqueException;
1
ee87745a824026d614b0161e2dec75b0
922985ba4255c31a32eb4198360644b5
Gets the person who created the story
export class HelixClip async getCreator(): Promise<HelixUser> { return (await this._client.helix.users.getUserById(this._data.creator_id))!; }
1
123dcf32c1f49e3de695634c44ba9f67
a86539ff201e430f5870cd5928117e41
获取骑牛token
header = {"Accept":"application/json, text/javascript, */*; q=0.01","Content-Type":"application/json","token":token} r = requests.post("http://192.168.5.111/customer/qiniu/getQiNiuToken",headers=header) d = r.text s = json.loads(d) return s["data"]["qiNiuToken"]
1
193f3ccb7b0b7b292f46d982a01e22d1
0a30ec608361a7d4702271f509adb0cd
Returns a file format for text files where each line is a {@code String} data item. This variant allows you to choose the character encoding. Note that the Hadoop-based file connector only accepts UTF-8.
namespace FLink.Streaming.Api.Environments public abstract class StreamExecutionEnvironment public DataStreamSource<string> SocketTextStream(string hostname, int port) => SocketTextStream(hostname, port, "\n");
0
77529ff0a452c1bba595e6eeb09dbae7
ce40b7f6a94b49f9da2663a45c04fc38
Markdown filter that replaces all images with thumbnails.
class ThumbController extends Controller public function indexAction(Request $request) { $image = $request->query->get('image'); return $this->container->get('liip_imagine.controller')->filterAction($request, $image, 'thumb'); }
0
3dcf113eac340eee217e643898a09185
e696f8d3231cdde8b0a6a14534d80b8f
Convert an Unreal rotation value to Unity format
public static class ExtensionsDIRECTION public static Vector3 toRotationVector(this DIRECTION dir) { float val = (int)(dir.toDir2()); if(val < 0) { val = 0; } val *= 45; return new Vector3(0, Mathf.Round(val), 0); }
0
4de6e7cf01c7ea00151aaf133ffde6ca
5adf37dc1c05296fdb0e682f89ccff4b
Set the value of Confirm Return Message
class WxPayReport extends WxPayDataBase public function SetReturn_msg($value) { $this->values['return_msg'] = $value; }
1
ca1486906edd88688cac73dfa050237f
41bb1e78fe8d26ac5b7ee76c56d24347
外部内存管理器销毁接口,调用内部内存管理器销毁函数
int32 SystemManager::OnDestroy(void) { return 1; }
0
c6513a89acc831c598a8f0e2ffddaaee
5fa4ecf4880ffa3ea031ef9aeb4e848c
Create a notification type <b>Permissions Needed:</b> NOTIFICATIONS_ADMIN
namespace DotNetNuke.Services.Social.Notifications void CreateNotificationType(NotificationType notificationType);
1
873c0bebc61ce5fcb8ab56d271ab6ac8
1a70e787017e4632062cb78bab38d045
遊戲是否有伺服器存活檢查機制
def checkAlive(): try: global s s = socket.socket() host = socket.gethostname() s.bind((host, 65500)) return False except BaseException , e: log.error('guard server is already running') log.error(e) return True
1
151b7064722d342967618ab07a6fecb8
844e82ef4e1e38212acbd193e0a4008b
Обработка номеров регионов соседних пикселей для 8-х связной области
int sender; switch(direction) { case 0: sender = north; break; case 1: sender = east; break; case 2: sender = south; break; case 3: sender = west; break; default: sender = -1; } if(sender!=-2) { if(direction%2==0) { int row = direction==2?0:local_image_size[1]; unsigned char*...
0
8b150362407c5271ea465cc51829003b
1803d51eb4a353abd22b36576111ec8f
Delete a pool.
func DeletePool(poolName string) error { deletePoolStr := []string{"destroy", poolName} stdoutStderr, err := RunnerVar.RunCombinedOutput(PoolOperator, deletePoolStr...) if err != nil { glog.Errorf("Unable to delete pool: %v", string(stdoutStderr)) return err } return nil }
1
6c1dc8f19c0f46f828ad6beb9df50a92
5f640c7ae9d2108d0408c6c365861de2
@brief Returns a pointer to the available devices
const TD_SENSOR_GATEWAY_Device_t *TD_SENSOR_GATEWAY_GetDeviceList(void) { return DeviceList; }
1
d2c1a19b1a29eaa5820187a7a6e2defd
5361251b6633a4002627a353ff708b0f
根据点赞数查出热游排行的游戏
namespace WoGame.Dal public class dalFlashGame : BaseDAO<FlashGame> public List<FlashGame> GetHotList() { Query query = new Query(); query.AddOrder("PlayCount", true); query.SelectRows = 10; return List(query); }
0