query_id
string
corpus_id
string
query
string
code
string
label
int64
92a9f3c3b81076d5df6583cbe1c55b84
33be3cfcbb0e8127821681e8b739f4cb
This function reads the encoded output file and outputs it into a splitted list.
class FileHandler: def read_from_output(file_path): file_object = open(file_path, 'r') lines = file_object.readlines() data_points = [] for i in range(len(lines)): points = lines[i].split() if points[0] == '%': continue else: ...
1
ecbba222700bd6f61c67696d8bcd5681
f406e9f1ed394610d9f27bbbd6307535
将byte数组转换成 base64码str
public class JdUtil public static String encode(byte[] bstr) { String edata = null; try { edata = (new BASE64Encoder()).encodeBuffer(bstr).trim(); } catch (Exception e) { e.printStackTrace(); } return edata; }
1
94120220259fd134df9126591d4e7f28
785d75ae6842f2076c76f1ff0afaaf36
Unpickle a pickled instance of numpy.array
class NumpyType(TypeDecorator): def process_result_value(self, value, dialect): return pickle.loads(zlib.decompress(value))
1
9ab71df8cef020bb347485d75096498f
ace3188ea3675cf921470e744c6116b8
DAO层添加一级分类的代码
public class CategoryDaoImpl implements CategoryDao @Override public void add(Category category) throws Exception { QueryRunner qr = new QueryRunner(DataSourceUtils.getDataSource()); String sql = "insert into category values (?,?)"; qr.update(sql, category.getCid(), category.getCname()); }
1
2ac29a88b46e64a22a1a55bdba02d276
5dce869cb6ad4a8af80c0f2a46221889
ログイン済みならマイページに飛ばす
var title = '登録にはログインが必要です'; var msg = 'マイページタブのログイン画面へ移動しますか?'; Alloy.Globals.UI.Alert.showSelectAlert(title, msg, function() { Alloy.Globals.State.trigger('request_move_my_page'); }); }
0
878b43ff47a1bfe9722e0f598cc74a98
6b430a97ff3b7a02cae4bd2ccdcc833c
Replaces the current node by a new node defined by an HTML tag.
class HtmlNode public function replaceWith(DOMNode $newNode) { if ($this->node->parentNode) { $this->node->parentNode->replaceChild($newNode, $this->node); } }
1
d64af9eb6f60a60975955e36ce635c45
68ae6152bf104cf2474b3cec1b51aca9
find complex norm^2 of a vector of complex numbers
{ int i; int j; double value; value = 0.0; for ( j = 0; j < n; j++ ) { for ( i = 0; i < m; i++ ) { value = value + pow ( real ( a[i+j*m] ), 2 ) + pow ( imag ( a[i+j*m] ), 2 ); } } value = sqrt ( value ); return value; }
0
d35403ce12e8d4328f8e3e08a375eeb3
2a840db46e228395a4f0ea49d6b99631
Gets the features. The array of GeoJSON Feature Objects matching the geospatial query.
org.landxml.schema.landXML11.FeatureDocument.Feature[] getFeatureArray();
0
f3765ec835bf35905ffba3c54f66291d
e3be01ee5e91bbea74424404ff30bb0a
从t_entity根据id获取实体
if (tId == null) { return null; } return em.find(objectClass, tId); }
1
b377467c1c4469e41a5564e82bd2f741
9e9ec76bfb4cc692a3af822171ec3d90
Funcion creada para retornar a que aplicacion debe redirigir cada rol de usuario
$role = auth()->user()->role->name; switch ($role) { case Role::ADMIN: return '/admin/dashboard'; break; case Role::MANAGER: return '/manager/dashboard'; break; case Role::REVIEWER: return...
1
38170acb69baf7e8ca1dad1ad71eb179
253ef9069b53a2666dc67455a649168f
Get a password from the password file. Return value is malloc'd.
class bruteforcer: def _getPassword( self, user ): passwd = None if self._passwordsFD == None: self._eofPasswords = True if self._eofPasswords: self._specialPassIndex += 1 if len( self._specialPasswords ) > self._specialPassIndex: passwd = self...
0
c7705f5e0f17c0cb6c083a43249be333
a2be2076711ddb4b3d410587e02db18f
Given the visible rectangle that the user is viewing and the layer controller's page size, returns the dimensions of the box that this corresponds to on the page.
{ try{ var box = new Object(); box.visible = box.left = 0; if (beginTime>viewportRight) { box.visible = 1; } else if (endTime<viewportLeft) { box.visible = -1; } else { box.visible = 0; box.left = Math.round((beginTime-v...
0
d240704c0726eb681c36c07eed6e897a
a541400f01323be92bda6e031dac162c
Test if the detailed type definition other is indeed other detailed type definition for the given type, i.e. return true when (other != type) and (other not in ancestorTypeList) and (other not in descendantTypeList), otherwise return false. <p>Here, we assume that ancestorTypeList is the list of ancestor types of the g...
public class CouplingCalculationUtil public static boolean isOtherDetailedTypeDefinition(DetailedTypeDefinition other, DetailedTypeDefinition type, List<DetailedTypeDefinition> ancestorTypeList, List<DetailedTypeDefinition> descendantTypeList) { if (other == type) return false; if (ancestorTypeList != null) { ...
1
9a878c4654bebbff70eedd4ec4b17cdc
da210f2a603433db9e4b54524b09d482
установка онлайн/офлайн пользователя
namespace Hvylya_Worker public partial class frmMain : Form private void cbtnOffline_Click(object sender, EventArgs e) { set.main.Offline = !set.main.Offline; ApplySet(); }
1
42655ab477321fb856a9586c22e1a166
ac23a99b9e4684373999fa5126eb1769
Sets (as xml) the "shipto_fax" element
public class Traits extends ValueMap public Traits putFax(String fax) { return putValue(FAX_KEY, fax); }
0
5707a297b7471036d50ac19190fc1f8a
17bdb8bf7b10866443f683d5fe133076
获取插件的PluginPackageInfo信息
namespace TribeLib.Events.ServerEvents public class ServerPluginLoader public PluginInfo getPluginInfo() { return this.Info; }
0
9b657dcc0f10f499a17e4257339b371d
22134e5ca1a6a703fa1bd50d1b45f1c2
If a cell's state has been changed by the model, update the displayed tile
CellBehavior cell = Grid.getGrid().getCell(position.x, position.y); if(cell.isBug()) state = State.DEAD; else if(cell.hasWon()) state = State.WON; else state = State.PLAYING; }
0
35c2e4507d1327581796c56c23470e7b
2eb839009f0070b5d0ccb4b5aced4617
微博数据刷新失败通知
void onRefreshFailure();
1
fbf521e2b0308813540de3ae03990a88
bf9a7590a1ca5b883f7e9b68bf830214
查询训练类型和训练项目
Long queryTrainProjectNum(Map<String, Object> params);
0
9e56e44d0156ce4e7774f5960d162406
f9eb3d259d41f3fe10ca548515a74269
@brief get asset name and texture files from current opened file
void btgGetTexture(char* filename, udword* thandle, sdword* width, sdword* height) { }
0
ac2b5c067d01e3f9e5422b43f5daf04a
de08591c4d4d9998d8f5a34ef2e50749
Reinicia o contador de faixa de tempo
class Cronometro function resetar() { $this->inicio = microtime(true); }
1
f712a2e07effbbc4750dc8c7da585fbb
856e58c7ffbc8599fddb2881afaa7978
{EV_TEXT_FIELD_IMP}.align_text_center
{ GTCX EIF_POINTER tp1; RTCDT; RTLD; RTLI(1); RTLR(0,Current); RTLIU(1); RTGC; *(EIF_INTEGER_32 *)(Current + O10762[dtype-1476]) = (EIF_INTEGER_32) ((EIF_INTEGER_32) 2L); tp1 = *(EIF_POINTER *)(Current + O10761[dtype-1476]); gtk_entry_set_alignment((GtkEntry*) tp1, (gfloat) (EIF_REAL_32) 0.5); RTLE; }
1
9d1e3668cec04b71f4effbc9689de611
e92b1faffab1104ef209fd1b6b89d3a6
验证用户交易密码是否正确
$resp = $this->buildResp(); $req = Arr::extract($this->query, array("userid", "openuuid","trade_password")); $check = DB::select('id')->from('user')->where('userid','=',$req['userid'])->where('trade_password','=',$req['trade_password'])->execute('mkmoney')->current(); if($check == NULL){...
1
0b8397d0b7099bf24e9236a0d1106c84
fd7603bd01f98a58da345f468f73b4b2
Removes cylced references and closes the file handles of the parser objects
namespace MusicSyncProgram class CSVFileParser public void CleanUp() { reader.Close(); fileStream.Close(); }
1
58f0c75c96b2d0c8c582269e68a128ed
7206b0fa8e8f2eee1cd468beb0c981a4
Removes dead ends by linking the deadends with neighbors
namespace Implementation public class DeadEndFill : TraversalType protected override bool Search() { int NodeCount = Map.Nodes.Sum(x => x.Value.Count); while (true) { Parallel.ForEach(Map.Nodes, row => { var DeadEndNodes...
1
d0b260cf0f08101d20b78ea5f5ec8c8f
b56810417b1addbe2d3ebedb3890208a
Moves an element one slot closer to the beginning of the collection.
class Collection implements CollectionInterface final public function prev() { prev($this->_collection); $this->_index = key($this->_collection); }
0
cd1fa0990e9861625fcd539055059830
575c540887349f5eb96c5445038fffa0
通过个人中心页面返回状态码来判断是否登录 通过allow_redirects 设置为不获取重定向后的页面
def is_login(): url = host + '/user/profile' login_code = session.get(url, headers = headers, allow_redirects = False).status_code return True if login_code == 200 else False
1
3822267be263c2340a0e18a7db607d93
daf23f5cfe61e29366a811de70383cd3
2つの資源レコードの数値が等しいかどうか比較します
{ return r1 == null || keys == null || keys.Count == 0 ? false : r1.CompareTo(r2, keys) == 0; }
0
3719be9c7e0f511ebb245877517cbb5d
0bebcf6a4108c6f17bec62771338a7ce
get file name excluding extension
def get_name_no_ext(file_path): filename_no_ext = os.path.splitext(os.path.basename(file_path))[0] return filename_no_ext
1
9a9e5313a3f22c06ff8c355d7ecdfd8c
f5caeebeb2eda404395101d87e53aea8
Returns a list of dicts with the fields of interest passed from a github repository
original_repo_count = 0 total_watchers = 0 forks = 0 languages = [] repo_topics = [] for item in loads(response): original_repo_count += 1 total_watchers += item.get("watchers", 0) forks += item.get("forks_count", 0) languag...
0
ae871eb3adb29c606f027a943443be14
a223aee1cf5f950fe37b8b4ebe8ec9bb
Call get profile API. https://devdocs.line.me/en/#bot-api-get-profile Get user profile information.
namespace Line.Messaging public class LineMessagingClient : ILineMessagingClient, IDisposable public virtual async Task<UserProfile> GetUserProfileAsync(string userId) { var content = await GetStringAsync($"{_uri}/bot/profile/{userId}").ConfigureAwait(false); return JsonConvert.Deser...
1
e8a5a85e7fca3eb13f1f231802015628
2bc895aa99be7dee5ebb1a57af6adeda
Set if frame starts can be identified. This is set by default and determines whether seeking based on bitrate averages is possible for a format/stream.
namespace MaSiRoProject namespace Format public class VMD_Format : VMD_Format_Struct public void SetStartFrame(int startframe) { if (VMD_Format.StartFrame != startframe) { VMD_Format.StartFrame = startframe; } }
0
906b5c64e4cb2c40df34993f30b03df2
a0bf5e8327f1e106f623d278b4876b80
Flips all the disks that were captured by the move.
for row = 1 , self.rows do for col = 1, self.cols do local coin = self.grid[row][col] if coin and (not coin.isWhite) then coin:flip() end end end end
0
5119d28c487e36e4b1af25e54190af66
ac66f8af8444e48d6d3cf8ab0b51277b
returns the same message as the user sent, just without the first word (command name)
{ return msg.StartsWith(command + " ") ? msg.Substring(command.Length + 1) : ""; }
1
f4e3b7b86296c8e0e021bf4e9f0e94e1
6da55c5a0dcba6b34605e3ca18b0927b
Competitiveness features 1: relative_rank_pos
class PostRankOptimization(object): def __init__(self, balanced=False, visual_expansion_use=True, re_score_alpha=0.15, re_score_proportional=True, regions=None, ve_estimators=20, ve_leafs=5): self.subject = -1 self.probe_name = "" self.probe_selected = None self.ta...
0
bfe1b85798af68aca7cb56603cf20b04
113b7b9b20dcc46295b9fd6eb1ca62f1
Is param a JWT?
{ return 3 == count($paramBundle) && 'q' === $paramBundle[0] && Tokens::PARAMS_KV_SEPARATOR === $paramBundle[1]; }
0
a8635a3f6b32d8ea85713d2d1441bae1
62d3b44a601a70676b6ba0099549289b
Akce přidává položky do ceníku úkonů
{ if (inParams==null) return false; using (var dbAct = new dbProjeceCookEntities()) { try { foreach (var setDish in inParams) { dbAct.Dishes.Add(setDish); ...
0
fd0a9ef5eced5f3582b708b94f496384
13a47bda94bc52f9979d9dec06ebb7f8
Helper function to construct a redhat-release string for a specific RHEL major and minor version. Only constructs redhat-releases for RHEL major releases 4, 5, 6 & 7
def alpine_release_v() -> str: maj, min, _ = alpine_release() return f"v{maj}.{min}"
0
aa558c60f89610a7e603191571cb8522
acc3a8fd17c643b3bd7d2db5c20c2155
Verify invariants for 'run' and 'i'.
len_run = sum(i == runs) len_current_mask = len(current_mask) if len_current_mask > len_run: raise IndexError( f"sample_mask {i + 1} of {n_runs} is has more timepoints " f"than the current run ;sample_mask contains {len_current_mask} " f"index but the run has {len...
1
7a9f5fb9e941e38eb428a83ad84f3154
7e7d18c5337f61c8d1375e49c77cf947
Function to read sendgrid configurations
def read(): with open(HOME_DIRECTORY + '/Body/global.cfg', 'r') as f: config_settings = json.load(f) config_settings['CLIENT_SECRET'] = os.environ.get('CLIENTSECRET') return config_settings
0
dc192d04d1b9cbb8483a554a4d937e31
ef4a9a5bf9fbad95181d1117b52cd8b7
区域多点找色
var boundary = new BMap.Boundary(); boundary.get(name, function (rs) { var count = rs.boundaries.length; if (count === 0) { return; } var pointArray = []; for (var i = 0; i < count; i++) { var ply = new BMap.Polygon(rs.boundaries[i], { ...
0
5ef6e95b94d232a399685102735ed475
b77ab28cffc33306c00179879a419f99
按大小顺序合并数组
public class ArrayUtil public static Integer[] mergeByArray(Integer[] a, Integer[] b){ Integer[] c = new Integer[a.length + b.length]; int i = 0, j = 0, k = 0; while (i < a.length && j < b.length) { if (a[i] <= b[j]) { if (a[i] == b[j]) { j++; ...
1
b8809e1f27011f7090228680b118579b
7b4510277508e2d918b500494b7f4ab2
Gets the name of the Eloquent user model.
class UserController extends Controller protected function getModel() { return 'App\Models\User'; }
1
ea070b4c5d4fa6b0ae0f515c6a27d36b
a3294f74d11cd9b21524092d058fa816
设置执行时使用小于结束日期+1天
public class ContractDetailView extends ActEntity<ContractDetailView> public void setCreateEndDate(Date createEndDate) { if(createEndDate!=null){ Calendar c = Calendar.getInstance(); c.setTime(createEndDate); c.add(Calendar.DAY_OF_MONTH, 1); this.createEndDate=c.getTime(); }else{ ...
1
9fd6cd1fe3698724168f7edd2613c0e2
9b7c4c338537e08c9800eb1f388edbd3
Object representing an attached USB webcam
IApplication.__init__(self, device) self._camera = None self._camera_name = "camera2" self._arguments = None self._capture_number = None self._sleep_time_between_capture = None self._flash_mode = None self._screen_mode = None self._execution_file =...
0
1d7f56b78d94370fc4b4981beff6246e
9a3dc5f53c72b6cc8a4c4096904a80cc
Calculates and returns the first quartile of the data
class Dataset(collections.UserList): def q1(self): if "q1" not in self.__central_tendency: dataset = self.sorted_data() top_length = len(dataset) top_median_index = -(-top_length // 2) if top_length % 2 == 0: first_half = dataset[:top_median_inde...
1
53cd26866e0b3244cd7583f210236791
f75fc0adfd8e946caf16805a97b442d0
Function to save the sprite data to a file on a physical file system.
{ var savedState = spriteSheetDoc.activeHistoryState; var sheetFile = new File(exportFolder + "/" + sheetFilename + "_" + size); var saveOptions; if(fileFormat == "PNG") { saveOptions = new PNGSaveOptions(); saveOptions.interlaced = false; } else { saveOptio...
1
7d5e4f7f466b30183a367db5ca3fd81a
35e7b9730771dfc5f4524df318aefe68
Gets total cancelled jobs.
public int getCancelled();
1
6237881964f89b1222b5b1d86d92bde8
c5f0025f8c64eb7802aeedd58c340495
Deletes contact group by ID.
{ try { GroupContactDTO GroupContactDTO = new GroupContactDTO(); GroupContactDTO.ContactId = ContactId; GroupContactDTO.GroupId = GroupId; GroupContactService.DeleteByContactId(GroupContactDTO.ContactId, GroupContactDTO.Grou...
0
3e9c3d0a23ad44b63c2bccac5f6f959f
d743aa2892e51805694710994e467b83
根据标签名改变显示的值
var $li = $(".g-list li"); if (!val.length) { $li.show(); return; } for (var i = 0; i < $li.length; i++) { var elem = $li.eq(i); var isExist = elem .find(".label") ...
1
354dd898ee9a126d669a974ef5a9946d
adf91b49a6fd5b625c92ecdfb56ce969
Méthode qui met le tableau à vide, c'est-à-dire que les cours sont remplacés par des blancs
public class ClassPaymentTableModel extends AbstractTableModel public void clearTable() { this.classPayments = new ArrayList<>(); this.fireTableDataChanged(); }
1
f17d54e6626e183d11684c8015fac0ef
8aebc5492e77761b795744a814775747
Make sure we can properly play a land.
class SoundManager: def play_land(self): self.sounds['land'].play()
1
f79f5a5df407c68dcb6d615ad129277b
8c401b11148f71eb2c123920eb764f87
Fully reads the characters from the request input stream.
{ m_PeekPosition = m_CharsRead; int BufferSize = m_Buffer.Length + DEFAULT_BUFFER_LENGTH; if (BufferSize > m_MaxBufferSize) throw new InvalidOperationException(); char[] TempArray = new char[BufferSize - 1 + 1]; Array.Copy(m_Buffer, Tem...
0
dcfba8c43c9ddae93614547ec01b36c0
3ee83d54149313d7b5fa7e7dd86146c7
Define scrolling parent (usually Panel). If parent is not defined, client side will try to resolve it.
export class Control extends Component public setParentPanel(hParent: HTMLElement) { this._hParent = hParent; if (hParent) { hParent.appendChild(this._hPanel); } }
0
1e1534873d653bd32ba7fe0136c9758c
7523f95b780a834473e7b695ab3d38e5
Creates a call to the given list of contacts.
final class StringHelper public static function contact($items) { return join("", func_get_args()); }
0
721faeb26ad2954ad4a911ebb4241e94
0770a9b2b3bf40d05e8746eba606d67a
Puts an integer into the buffer as 4 bytes, big-endian.
public class DCEBuffer public final void putInt(int ival) { if (m_buffer.length - m_pos < 4) { extendBuffer(); } DataPacker.putIntelInt(ival, m_buffer, m_pos); m_pos += 4; }
0
9d7f46acafd8fa0efc50734a32a5d65d
555cdffdba9caed26ea972d315bd77a8
Clicks the nothanks button.
namespace HomeBuying.Ios.AcceptanceTests.Pages public class TermsAndConditionsPage : IosPage<TermsAndConditionsPage> public void ClickNoThanks() { _noThanksButton.Click (); }
1
59f1186e33a7cd090caf528e9e06e67f
4804643cdc2674686d353150cba94489
verifies that the path provided refers to a sensor that exists
{ _isValid = false; var command = new RootCommand { new Argument<string>( "sensor-path", "The path to the device to read the sensor data") }; command.Description = "Server is reading serial data ...
0
595af2034c6ece951f21cd4dad8bb9c2
8a1d04aa1f1e42f261c0b723c13d1c99
根据当前页码和最大页码刷新分页区域
function refreshPage(totalPages, currentPageNo) { $(".pageDiv").createPage({ pageCount: totalPages, current: currentPageNo, turndown: 'false', backFn: function(p) { getList(p, louStatus); } }); }
1
23e9970b4220b006ca55ac651e915059
537ca95b445531ce72324e76d44b7cc1
Verify that data associated with a sub tree can be retrieved using the <c>path/$fullsubtree$</c> syntax.
namespace Kubernetes.DotNet.Test [TestFixture] public class V1VolumeMountTests [Test] public void SubPathTest() { }
0
fac592017283005f3e93ef71878c03a1
04f30973784e7997a5bf60b4512776e7
Evaluate the Binomial likelihood function on a grid of alphas.
lf = self.submodel.makeLikelihoodFunction(self.tree, bins=['low', 'high'], sites_independent=False) lf.setParamRule('beta', bin='low', value=0.1) lf.setParamRule('beta', bin='high', value=10.0) simulated_alignment = lf.simulateAlignment(100)
0
3c2591bd9c624653c5be9f4156178cc3
bedea52b09e7f817f122c98e0b467572
Calculate Brier score.
def brier_score(y_true, y_pred): return np.mean(np.square(y_pred - y_true))
1
98386b403775bcc24bbf47a63e173119
794adcbaade5a117b14d30963326f4e2
Created article saved in the database
this.articleService.createArticle(this.author.id, article.title, article.content) .subscribe(newArticle => { this.authorService.addArticleToAuthor(newArticle, this.author); this.articleService.addArticles(newArticle); this.savedNewArticle = true; this.router.navigate(['../../a...
1
80495227a9a388c3f26c4532f5dea5c9
d246fb4dfeb03d9338e7b7ca6dca7c5e
Selects the region of the image to send to OCR engine.
class Magick{ public function setting_region($x, $y, $width, $height){ $x = $x >= 0 ? '+'.$x : $x; $y = $y >= 0 ? '+'.$y : $y; $this->commands[] = "-region {$width}x{$height}{$x}{$y}"; return $this; }
1
2a0b3bb7b1dd6956808b475cc06f3e0c
988f72c33f42d865bfbfcd64ac8f16fd
另一个异步通知方式,通过BackgroundCallback实现
public class Example1_1Activity extends AppCompatActivity public void asynckTask() { new AsyncTask<String, Integer, String>() { @Override protected String doInBackground(String... strings) { return null; } }; }
0
30747819adb0ac3a10bd296a3834d4b9
812640a6ea5c965eb4306d71e28688bf
Performs all queued interrupt actions.
namespace LibLSLCC.CodeValidator public sealed class LSLSyntaxListenerPriorityQueue : ILSLSyntaxErrorListener, ILSLSyntaxWarningListener public void InvokeQueuedActions() { InvokeQueuedErrors(); InvokeQueuedWarnings(); }
0
15d59d4fdc046f7227476158ccf1dea1
2984754cf0440b6e7a69d00735daa4e2
Makes sure valid register params are there
func registerValid(reg asm.Register) error { if reg > asm.R9 { return errors.Errorf("invalid register %v", reg) } return nil }
1
c124b277e60a31760ef80b7a38b26b45
fcdf31a1d9a8a7dace6a6dbe41cbfff4
Aplicar filtro a data grid por texto en Razon Social
class ProveedorFilterSet(filters.FilterSet): def search_by_razon_social_cuit(self, queryset, name, value): if value: queryset = queryset.filter(Q(razon_social__icontains=value) | Q(cuit__icontains=value)) return queryset
1
54032093419e4530ddd789bc9568111b
da8a8cf9991e59c98f539818b27c89e2
验证扫描的SN范围计算的数量和设定的数量是否一致
{ if (Verify_Frame_Validity(4, 15, false, false) == true) { Serial.println("A013 <Set_SN_Area_Channel>"); Serial.flush(); Get_receipt = true; if (SN.Save_SN_Code(&gReceiveCmd[10]) == true && SN.Save_BKP_SN_Code(&gReceiveCmd[10]) == true) { Serial.println("Set SN code success... <Set_SN_Area_Channel>"); ...
0
ab4cab633d78a5a68bb71ff00363c321
369980b6646c0ab53fb8183fa80622b5
Get top individuals
def get_top1000(group): return group.sort_index(by='births', ascending=False)[:1000]
1
8f45011e64e4c119fbf04d8b7d15d53b
d8784694559563702e77a575eda4ec38
Get the entity that this controller is responsible for.
public function getEntity();
1
b2aca6f301b55823c6b08b9e20d32e12
07ff0793fe5c707cb97ce5ec0aa976ed
修改规则文件名称
class SnortFileModel: def renameRuleFile(self,old_filename, new_filename): try: os.rename(self.snort_rule_file_path + old_filename + ".rules", self.snort_rule_file_path + new_filename + ".rules") rst = self.createRuleFile(old_filename) if not rst[0]: return [F...
1
90ac664b6cbbdefcdd705ac734833d38
4eff9622b04207764f8d1e02383b8eaa
Take function (A) -> b and applied this function on current box value and returns new box with mapped value.
@Immutable public final class IdBox<T> implements KeyedObject public <R> IdBox<R> mapValue(Function<? super T, ? extends R> function) { return create(id, function.apply(getValue())); }
1
cab3c4522135fe1229f3cc2f8047f4e1
38f9b5c63eac5697397eb44ce10e966a
Deletes all selected acls.
foreach ($data as $acl) { unset($acl['option'], $acl['id']); self::db()->delete($this->table, $acl); } return true; }
1
3a1688a6a2b0a9979af2707767c79ae0
831f6d6d3cd579e9c22cde656b9bc9bf
Pobiera informacje na temat konkretnego użytkownika @param userID - unikalny identyfikator użytkownika @return ServerAnswerRecievedUser
namespace AskMonaNet public partial class AskMonaClient public UserProfileResponse GetUserProfile(int u_id) { return Call<UserProfileResponse>(@"http://askmona.org/v1/users/profile" , new Dictionary<string, string> { { "u_id", u_id.ToString() } }); }
1
62a2cccc980ce09e039ff0c57bb0af0f
f823e2c2a80c5a9a13768f4b0e457bba
This method will block until all the data from the last retrieve method call has been loaded into the DataStore's internal buffer.
{ for (int i = 0; i < numRetrieves; ++i) { var retrievedBytes = this.longDictionary[this.lastKey]; } }
0
0a5f89b32941fd70d489ed52fcc98c3f
11f98a80a61c898e0a157277bfad386e
@brief Checks for carry, sets appropriate flag
*output = (!*bita & !*bitb & *carryIn) || (!*bita & *bitb & !*carryIn) || (*bita & !*bitb & !*carryIn) || (*bita & *bitb & *carryIn); *carryOut = (*bitb & *carryIn) || (*bita & *bitb) || (*bita & *carryIn); }
1
fbcb1ba04fef7906a20210a1205244c7
9eaa89081aaed773345760bb2b8ca128
Glavna funkcija kontakt kontrolera U slučaju GET metoda prikazuje formular za dodavanje poruke, u slučaju POST metoda radi obradu formulara i dodaje novu poruku ili izveštava korisnika o grešci. U slučaju da je korisnik autentifikovan, email parametar treba da pokupi preko sesije. Inače koristi korisnički unetu email a...
class CCGuestbook extends CObject implements IController public function Handler() { if(isset($_POST['doAdd'])) { $this->SaveNewToDatabase(strip_tags($_POST['newEntry'])); } elseif(isset($_POST['doClear'])) { $this->DeleteAllFromDatabase(); } elseif(isset($_POST['doCreate']))...
0
6d56e77ff2e0a4b228338b2b75ef284d
62b2420516b8ac93fae35ab7990bd3ec
not implemented due to external tool
STDMETHODIMP CVCToolImpl::SetPrimaryOutputForTool(IUnknown* pItem, BSTR bstrFile) { return S_FALSE; }
1
222ac1c996d1220d042815884f72deea
5a1496cb038d73b4f366c7b9fd40520d
List L2IsolationDomains by resource group. <p>Displays L2IsolationDomains list by resource group GET method.
{ return Task.Factory.StartNew(s => ((ILabsOperations)s).ListByResourceGroupAsync(odataQuery), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); }
1
08402c3b63122425bd4e59bccf8e1743
01601112933554b33f57642bcdf6444f
Sets the date and time when the operation was performed.
namespace Xpandable.Practices.Authorization [Serializable] public abstract class TokenEventArgs : EventArgs public void SetCreatedOn(DateTime createdOn) => CreatedOn = createdOn;
1
a7209c46db66cf13532448fd00dadd0a
df5f9d46824d01cd0ccb40a315aecbc7
Printa os pontos dos jogadores do jogo
public class JogoDaVelha public static void imprimePontuacao(int pontoJogador1, int pontoJogador2) { System.out.println("Jogador 1: " + pontoJogador1 + " X " + pontoJogador2 + " Jogador 2\n"); }
1
b7b2116478843430f79477af7b302cdb
4e9f4b58202f5e59149680a19ec587ce
根据进程名获取句柄
{ Process[] process = Process.GetProcesses(); foreach (Process p in process) { if (p.ProcessName == myProcessName) { return p.MainWindowHandle; } } return IntPtr.Zero; }
1
ccb831194cdc9f2fcd7e0c49ed83ce7b
d9b521d7d8cbf235737e9db2cb77bf12
Check to see if ConfigurationItemMD5Hash property is set
namespace Amazon.ConfigService.Model public partial class BaseConfigurationItem internal bool IsSetConfigurationItemCaptureTime() { return this._configurationItemCaptureTime.HasValue; }
0
8f3b6b5f8b627b43c51054f3bf35467f
e0c30d1d9edaed837157b6fac188ab29
R eturn list of values that may be dereferenced for indirect read. For example, suppose this list is [t1, t2]. Then, this command may be reading the value of the ILValue pointed to by t1 or the value of the ILValue pointed to by t2.
IList<IAtomicValue> valueList();
1
c202576b1070662f40eb8802b6dd4b5b
c2dfa6a79b37c324813e3af02c4b245d
Returns the minimum image distance in going from r1 to r2, in this system's box.
double WaveFunctions::r_ij(double *r1, double *r2) { return sqrt((r2[0]-r1[0])*(r2[0]-r1[0]) + (r2[1]-r1[1])*(r2[1]-r1[1])); }
0
8cd389e2e8ce60f44def4175a3df21e6
695ec89300da1173f09c147435627117
função que lista o slider
class SliderController extends Controller public function index(Request $request) { if(!$request->ajax()) return redirect('/'); $sliders = Slider::orderBy('id','desc')->get(); return[ 'sliders'=>$sliders ]; }
1
5495a8d74eb81214befb9db9f7ba9ba6
7bb3b5663973d813c03d4d98108414a6
Method to get the specified related list Returns api response with related list instance
class SAFRSRestRelationshipAPI(Resource, object): def get(self, **kwargs): parent, child, relation = self.parse_args(**kwargs) if kwargs.get(self.child_object_id): if child in relation: result = child else: return 'Not Found', 404 else: ...
1
fa6d07ab00c1c7af85e2eeed21f7f1b7
69fff3786f3008f6fec0dba10a05e799
抓取KD电子书信息
public void kdlbookProcessor() { try { kdlBookProcessor.setInterval(700).setThreadCount(3).execute(meBookPipeline, null); } catch (Exception e) { e.printStackTrace(); log.error("抓取KDLBook电子书异常=" + e.getMessage()); } }
1
7146f4ab3d77544bb670c9bc43b5e4ef
75482c4040e3502cfae118028bdab5ec
Create the constraints that ensure the dispatch of a unit fcas is capped by its availability. A constraint of the following form will be created for each unit: bid 1 dispatched + bid 2 dispatched +. . .+ bid n dispatched <= availability
class UnitCommitmentModel(BaseComponents): def define_constraints(self, m): def fixed_capacity_discrete_rule(m, g, i, n): return m.FIXED_D[g, i, n] == m.d[g, i, n]
0
0b32d70a5d85659d3ef12c371e854715
b156d701fca90dad3f3fd829f28f41d6
Generate commands for shuting down and undefining base images
class Docker(TaskTracker): def clean(self): return SystemCommand(self.cmd.clean)
0
e8cd50e7fa6b6cbf1696a757097afbce
fd318388d9fe9ddbd40943504d6341d4
Egal wie wir den ADC-Wert per SPI auslesen, wir konvertieren ihn immer auf die gleiche Weise zu Celcius...
double Tardis::getTemp() { double kelvin = analogRead(_tempPin); kelvin = 1023 / kelvin - 1; kelvin = T_SERIESRESISTOR / kelvin; kelvin = kelvin/ T_THERMISTORNOMINAL; kelvin = log(kelvin); kelvin /= T_BCOEFFICIENT; kelvin += 1.0 / (T_TEMPERATURENOMINAL + 273.15); kelvin = 1.0 / kelvin; return (k...
1
fc937010e216edbede801d26b6d75106
bdba01523c2cfbaf48335b666f4b524f
R""" 大文字Aを小文字aへ変換するsedコマンド呼出
def run_sed_A2a(line): proc = subprocess.Popen( ['sed', '-e', 's/A/a/g'], stdin=subprocess.PIPE, stdout=subprocess.PIPE, ) proc.stdin.write(line) proc.stdin.flush() return proc
1
d5dd2ffecd3eeedfe78ea67048e2983b
47501bedcb2cc51620f043c7889480c4
在派生类中重写时,计算对指定数目的字节进行解码时所产生的最大字符数。
namespace UltraPlayer public class CustomCP1256Encoding : Encoding public override int GetMaxCharCount(int byteCount) { return byteCount; }
1
b2c2f5e401d4756aea3e457c2412efbd
3f76a243f2b706048cca49d1c2ff601a
超级管理员删除普通管理员
{ $map['id'] = I('get.id'); if( $_SESSION['adminInfo']['username'] != 'admin'){ $this->ajaxReturn('只有超级管理员才有此权限'); } $manager = M('manager')->where($map)->field('username')->find(); if($manager['username'] == 'admin'){ $this->ajaxReturn('超级管理员不能被删除'); ...
1
4e609c52d1cc130b836efde0c3b1e938
02a0b07fd900bb435d645afa1a4063a2
交叉验证Test数据并返回结果
def get_test_data(given_divide_list, train_no): provide_train_data = [] for index_no in range(div): if index_no != train_no: provide_train_data.extend(given_divide_list[index_no]) return provide_train_data random.seed(0) random.shuffle(sentences_list) ...
1
d9a67fbcf5027168623569746d12a356
01819537905c13144a142dfd02c88f03
This function implements the horrible JavaScript abstract equality comparison
function objs_is_equal(a, b) { if (a && b) { var a_is_arr = a instanceof Array; var b_is_arr = b instanceof Array; if (a_is_arr != b_is_arr) return false; var a_is_typed_arr = a.buffer instanceof ArrayBuffer && a.byteLength !== "undefined"; var b_i...
0
d7374d39a1c44b731a70ffac838386d6
3e7ba464188a14e441e8fa2bde8e95cd
Getter for <code>sys.io_global_by_wait_by_bytes.total_read</code>.
@Generated( value = { "http://www.jooq.org", "jOOQ version:3.7.3" }, comments = "This class is generated by jOOQ" ) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class IoGlobalByWaitByBytesRecord extends TableRecordImpl<IoGlobalByWaitByBytesRecord> implements Record13<String, ULong, String, String...
0
61c5cfb378320825d04371f1c9c1838e
5ec743e0f8a6b8efbb1854b1155b7500
Close the input session. Frees all data allocated for the session, dequeues any pending requests, and closes any sockets allocated for the session. Returns 0 on error, 1 otherwise.
{ SU_DEBUG_9(("soa_deactivate(%s::%p, %s%s%s) called\n", ss ? ss->ss_actions->soa_name : "", (void *)ss, NICE(option))); if (ss == NULL) return -1; ss->ss_active = 0; return ss->ss_actions->soa_deactivate_session(ss, option); }
0
4280255569462622cc6cefd544394b03
3055a0a492b3f051109490e84719fc25
Increment the current player index (looping back to 0);
void Model::incrementPlayer(){ currPlayer_++; currPlayer_ %= NUMBER_PLAYERS; }
1