query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
6d377dae87ea59e46a5a3b3c7ea0298b | c00d2c040f634166d3de4dd17f39bb05 | Метод проверяет ячейки переданной строки на одновременное равенство всем критериям. | public class Grid
public void assertCellsValueContains(String subStringInCell, int colNumberSubString, int colNumberCellToRead, String cellValue) {
assertCellsValueContains( subStringInCell, colNumberSubString, colNumberCellToRead, cellValue, false);
} | 0 |
eca8139f84a20f9e63092f45d2713d2f | 50b5d0587ff3a125099a1c8776d158e5 | 每次有客户端连入都实例化一个Connecter类 | func NewConnector() *Connector {
return &Connector{
connections: make(map[int]Connection),
}
} | 0 |
ccb925e2ab2083f51cfa823ef8478d5c | 124d6aafb3070c562136a48ee5027b7c | Taps the units in defensive lane. | for (int i = 0; i < heroicUnits.length; i++) {
if (heroicUnits[i] != null) {
heroicUnits[i].untap();
String[] unitName = heroicUnits[i].toString().split(" ");
InfoPanelGUI.append(unitName[0] + " is tapped: " + heroicUnits[i].getTap());
}
}
} | 0 |
a52c338791d2b48fe2a5e433d2794aff | eb96722e58f4cdbaeda8dff2cb1f981c | 添加store组件成员 | class Member extends BaseStore
public function __construct()
{
parent::__construct();
} | 0 |
cbcf2029fe4ac1af82cbd237a5efc753 | 99a0b2887adc364c9d680e9b30e32c50 | Überprüft ob der Wert über einem bestimmten Mindestwert liegt. Wenn nicht, wird der Mindestwert zurückgegeben | {
return (value >= min) ? value : min;
} | 1 |
4ce3b662229f574e43454e9c655a69a5 | 8a0455e152209559861b3e944d34ed74 | Casts typed <see cref="IPropertyRenderer{T}"/> to untyped <see cref="IPropertyRenderer"/>. | => o switch
{
TTo res => res,
_ => throw new InvalidCastException()
}; | 0 |
1f2c7f960e935cfa875412454c8274f4 | 3417ab4c3366f77ece97f2b4780d115e | Asigna el codigo del mensaje a mostrar como resultado de la operacion
y establece el tipo de resultado como: ERROR.
Se utiliza cuando la operacion no se completo correctamente o genero error,
y se quiere desplegar un mensaje de error al usuario. | public class PublicPanel implements ActionListener
public void setOpResultError(String text) {
this.setOpResult(text, this.OP_RESULT_TYPE_ERROR);
} | 1 |
44297b1187a112c1c6631d7602b9f41b | eb4551887dc02ef216e58777f7576ea5 | Check that predictions exist. | class CONFLICT(data.Dataset):
def _check_exists(self):
return os.path.exists(self.root + self.training) and os.path.exists(self.root + self.testing) | 0 |
43f1f6255b7e5db09dfd93d0821066f3 | 3ea7ad49a1f6405ef69ac2d558f81375 | Получение списка дежурных инженеров | List<Engineer> listEngineer(); | 0 |
22c7f20385b90b9abb631fcf9d33ac5d | ba91d77aaeeac43c5de50a8e331aba5f | Includes abstract classes. | open abstract class AbstractClass
open abstract fun abstractMethod() | 1 |
1533ad398826f5f00c4cce1c3eb4e4e3 | 5adcdbb0f2c1a24e4902c8cce5ca19ae | Return the transposed matrix | class Matrix(OperationNode):
def t(self) -> 'Matrix':
return Matrix(self.sds_context, 't', [self]) | 1 |
357c9dc6d8fa9844bf3232faa92d9d2b | e568d3fb2c157a474e502a72e73eca52 | 从model中获取user<br>
返回肯定是User对象,不会为null.因在本类的getUser(...)已将User对象放入到Model中<br>
判断返回的User的对象的id是否为空可判断用户是否登录 | public class UserUtils
public static User getUser(){
UserPrincipal principal = getPrincipal();
if (principal!=null){
User user = get(principal.getId());
if (user != null){
return user;
}
return new User();
}
return new User();
} | 1 |
fa0f2b8136a2eaf1348d2b752f912b25 | da587b1f7c1756f18824d5f4230eeb72 | randomly position and size the objects in world space | public class GameWorld extends Observable{
public void init() {
gameObjectList.add(new Base(this,baseSize, 1,500, 500));
gameObjectList.add(new Base(this,baseSize, 2,100, 800));
gameObjectList.add(new Base(this,baseSize, 3,400, 400));
gameObjectList.add(new Base(this,baseSize, 4,1000, 125));
gameObjectL... | 1 |
49d6ec026a300d76f163e73df9dd1b58 | 7c7a0c8530472c03d88df7f254f9972c | This function initializes the device count value to zero.
In none
Out none | int myd_init_disk_structure(void)
{
atomic64_set(&g_dev_count, 0);
INIT_LIST_HEAD(&g_dev_list);
return 0;
} | 1 |
689a24c6442a9b61fd2508d52dfcc7fb | dd1db5f4edf08932f9d43aec308f1d9e | 机器人是否有地图 | for (const robot of this.robots) {
if (robot.role === ROLE_SCOUT && robot.x === -1 && robot.y === -1) {
return true;
}
}
return false;
} | 0 |
3115bbd9eb0bc9400398c3395af6fb72 | c1a09344c139688cef778d5b12ab790b | Check to see if HealthCheckConfig property is set | namespace Amazon.GlobalAccelerator.Model
public partial class CreateEndpointGroupRequest : AmazonGlobalAcceleratorRequest
internal bool IsSetHealthCheckPort()
{
return this._healthCheckPort.HasValue;
} | 0 |
d6e4b069008be44c9a84556ccffa5519 | 308a88eb467f47d48c6613199f47bc6a | 測試取得ref_id區間內的假現金明細和其總筆數 | {
$client = $this->createClient();
$start = new \DateTime('2012-01-01');
$end = new \DateTime('2013-01-02');
$parameter = [
'opcode' => ['1001', '1002'],
'start' => $start->format(\DateTime::ISO8601),
'end' => $end->format(\DateTime::ISO8601),
... | 0 |
fc2e88bcab22ba84c90ec826bee2620b | 927db7b1b41c90d3bf78e73358dbc465 | Contruct and transmit an Unnumbered Information (UI) frame | {
LOG_INFO("%{public}s", __func__);
size_t size = 0;
uint8_t pf = newCredits ? 1 : 0;
uint8_t addressCR = (session->isInitiator) ? 1 : 0;
uint8_t header[RFCOMM_DATA_HEADER_LEN_MAX] = {0};
uint8_t len = 0;
if (pkt != NULL) {
size = PacketPayloadSize(pkt);
}
header[len] = EA | ... | 1 |
7a722aad98a595e4d618d7f197b7b40d | 9ce7bf2698676230ad81cddece988f58 | Method used to verify that all chunks have been retrieved | public class MDFSFile
private boolean hasNextChunk(JSONArray responseArray) {
try {
URL getChunkDataURL = new URL("http://" + MASTER_IP + "/nextchunk/" + filename + "/"
+ currentChunkNum);
URLConnection getChunkDataURLConnection = getChun... | 0 |
6362a0c62242fb0ca248f24c5df25e77 | 91064bff8659b42ccd864f44934e754a | Gets a story path from serialized data | namespace Assets.Script
class GameManager
public static string GetStoriesPath()
{
return Application.dataPath + storiesPath;
} | 0 |
0ae3dc762f756b154e2220f27037f5fd | b1f827dbb9b946fb3545a7c04b45693a | Submits the settings from the "Shortcuts" tab of the settings dialog. | {
foreach (var it in shortcutListItems)
it.ApplyChanges();
Globals.MainForm.ApplyAllSettings();
ShortcutManager.SaveCustomShortcuts();
} | 1 |
0cad074da2ad1963c3a06959032092b9 | 6b08b4a502e134f8151653c1dd8eae07 | Sets the popup menu used by this text area.
The popup menu. If this is <code>null</code>, no popup menu will be displayed. | public class JBasicPopupMenu
extends JPopupMenu
public void setStyle(IStyle style)
{
PopupMenuPainter painter = new PopupMenuPainter(style);
setPainter(painter);
} | 0 |
ac4f78fdcb1c943afd71a8b710f8c87c | dcf4c602389adb3df6561681a9625966 | Calls a gauge's method with the same name | namespace Bonio.Editor
public abstract class DecoratorEditor : UnityEditor.Editor
protected void CallInspectorMethod(string methodName)
{
MethodInfo method;
if (!DecoratedMethods.ContainsKey(methodName))
{
var flags = BindingFlags.Instance | BindingFlags.S... | 1 |
d5e6587de64cbfacb1285dd173e7a5d8 | e3e85cbb814e03b07be12c0762315128 | Returns the amount transferred that is recorded in this block | {
if (transferCount > 0)
{
return count - transferCount;
}
return count;
} | 0 |
19900247d267a0b9e92d3c0ebc714321 | 8cee9d0dc13860e16983d566534db1d3 | Method invoked after receiving a <see cref="HttpResponseMessage"/> from the server.
Useful to log the response or validate HTTP headers. | namespace Solid.Http.Abstractions
ISolidHttpRequest OnResponse(Func<IServiceProvider, HttpResponseMessage, Task> handler); | 1 |
b401cedb3dd375f4b0442c1b67dd7a1f | 54f5d640b9cefcc8ed7f8a24841659a1 | NGWordAPIでテキストをチェックする | {
if (empty($this->_existsNgWord)) {
return false;
}
list($name, $message) = $this->_splitText($text);
foreach (array_keys($this->_existsNgWord) as $ngWord) {
if (strpos($message, $ngWord) !== false) {
return true;
}
}
... | 1 |
2a6f07395f9f9e55cb2b101b4c4ce87b | f715592190019d96fafc9d30a405b884 | 搭乗中かどうか | public boolean isSittingIn(); | 0 |
4196ecda2a83509828f7caca03d13a0c | 9e6d66f242d245d9a81db184dfacfd17 | 将查询结果映射到Teacher类中,添加到list中,并返回 | public class TeacherDaoImpl extends BaseDaoImpl implements ITeacherDao{
@Override
public List<Teacher> getDataList(ResultSet rs) {
List<Teacher> datalist = new ArrayList<Teacher>();
try {
while(rs.next()) {
datalist.add(new Teacher(rs.getString("Tsn"),rs.getString("Tname"), rs.getString("Tsex"),rs.getString... | 1 |
ce6487556aba18e163fa682151373035 | 5dfe7f7a6ad0260f29931716ec736443 | Calculates on which side the other <see cref="Vector2"/> is<para>1 means the other <see cref="Vector2"/> is clockwise from this <see cref="Vector2"/>, -1 means anti-clockwise</para> | {
return this.X * other.Y - this.Y * other.X;
} | 1 |
062085de66648eadc43b9a5713f771d3 | 698d8783b2aceaf9d9c390ad85e534d7 | prompts a user to select a move from a list
of possible moves, selects the current action | public class GUI
public int chooseAction(String player) {
int choice = 0;
PlayerPrint p = new PlayerPrint().fullBuild(player);
System.out.println("~"+p.name+", what will your next move be?~ MOVES REMAINING: " + p.actionsRemaining());
System.out.println(" 0: Move (1 action)\n 1: Give Card (1 action)\n 2: ... | 1 |
54e482ffab00259ba10829f0a266cb48 | 010889abf769416550a2cbb3028c627e | 숫자 패드 범위인지 확인 | def is_valid(num, right_num):
if num.isdigit():
if 1 <= int(num) <= right_num:
return True
else:
return False
else:
return False | 1 |
69b144a8bb7246702f24c52983bd295a | c2fcacfdebb033f5c372a5d100172c27 | 自动根据纵向类型获取y位置 | let upX = x - colLeft;
let w = colWidth - upX;
let by = colWidth / 2;
let z = by > w ? c + 1 : c;
return z;
} | 0 |
e791dc572d598c7d3a4e788b83b2a219 | e64a0f2d467057e65de002023594c0d6 | Generate url for coap client. | @Component
@Slf4j
public class DLCenterFileManager
private String getCoapRelativeUrl(String fileId) {
return String.format(DOWNLOAD_CENTER_COAPURL_PREFIX, fileId);
} | 1 |
cf774a81007a502593a5d767b39df2ae | b8f1962a5e67550350b77ea3c12459e8 | Exclude reverse zones | class ZoneManager(models.Manager):
def exclude_reverse(self):
return self.exclude(zone__endswith=IP4_ZONE_SUFFIX) | 1 |
9d3fc6b3351b765297f4580a6999c6a9 | 192e046b35248d69c87961826f8e1e71 | 处理导入用户时的用户与考勤机的关联 | {
$info = [
'total' => count($data),
'success' => 0,
'error' => 0,
];
$updateMachineUser = [];
foreach ($data as $key => $value) {
if (empty($value['user_id'])) {
$info['error']++;
$data[$key]['import... | 1 |
9ecac268c6bcbf2aad9782bf542dae91 | a0ff335a46ea1a56bf4b50bd94deb70a | Adds new mode in the existing region, either in upper half or in lower half, depending on
whether drop happened above or below midline of region mode occupies. | class Visualizer:
def add_mode(self, ev):
self.mode_label['text'] = "[ADD]" | 0 |
2d24923467680adfb2eb4e1bf7615990 | 138b04a9d782dc3e53401bfcaee89856 | Set the rof tva. | class DecTva
public function setAz1050($az1050) {
$this->az1050 = $az1050;
return $this;
} | 0 |
0222ed542454718ed98c8361c256ef57 | bdf343a7536979955eabb772b0500e87 | ボタンを押されたときデータベースに教室名と機器番号を登録する | namespace LunchTimeApp
public partial class ViewForm : Form
private void InsertButton_Click(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(this.ShopNameTextBox.Text))
{
MessageBox.Show("店舗名を入力してください。", "エラー");
return;
}
... | 0 |
9edad0ba5cac285ecebbe9cc7efab63f | 77c97d4059a25a7e0468a9d28cf2b831 | Runs a WQL query and exposes the results as an observable sequence. | {
WorkItemStore store = this.TfsServer.GetService<WorkItemStore>();
string wiql = String.Format(wiqlQueryFormat, args);
return store.Query(wiql);
} | 0 |
c11a64cdd87fdeec9c166a659a594cd1 | e7d34dc2ef0891e66e0757b1bc8f3fcb | An extension function that populates database by a given generator | class PopulateBase(metaclass=abc.ABCMeta):
def populate(self, *args, **kwargs): | 0 |
614ab8b168b1cb76fef0b825c87b37ae | d6186eaff1df8388f37652b4e49852fa | Transformer consists of the encoder, decoder, and a final linear layer.
The output of the decoder is the input to the linear layer and its output is returned.
enc_padding_mask and dec_padding_mask are usedd to mask out all padding tokens.
look_ahead_mask is used to mask out future tokens in a sequence. As the length of... | dropout: float, name: str = "transformer_decoder_layer"):
inputs = tf.keras.Input(shape=(None, d_model), name="inputs")
enc_outputs = tf.keras.Input(shape=(None, d_model), name="encoder_outputs")
look_ahead_mask = tf.keras.Input(shape=(1, None, None), name="look_ahead_mask")
... | 1 |
98a4533dfeb45ad79b1b6f94f2e7e56a | 1249c23e61d3c1845f5db81d4d3df859 | Runs one iteration of pagerank on the existing data. Not thread safe. | def iterate_pagerank(corpus, damping_factor):
pagerank_iteration = dict()
temp_pagerank = dict()
for site in corpus:
pagerank_iteration[site] = 1 / len(corpus)
end_loop = False
while end_loop == False:
for page in pagerank_iteration:
value = 0.0
for site in co... | 0 |
f74642050fa5cee8ac56c6987c391222 | 7f2e6e52ff8b79705d0b4983fa02da53 | Get calls for the current or given account. Optionally take the $start and $limit parameters for paging.
Optionally takes the $conditions parameter to support filtering the results. If these parameters are empty,
the method returns all of the calls for the given account. | $created_to = null, $type = null)
{
$this->_application->getCurrentToken()->checkLevel(Token::L_USER);
$dt = new \DateTime();
$created_from = ($created_from == null) ? "2000-01-01" : $created_from;
$created_to = ($created_to == null) ? $dt->format('Y-m-d') : $created_to;
$... | 0 |
42a38b56bfd716e442a0e9d3754520b4 | 6e58609c710468f1faf1500f26088ec0 | License serving for HLS (HTTP Live Streaming) content. Used for the following devices:
PlayStation The DRM server is a separately deployed server that is hosted by xxxx. The
architectures are similar for FPS, HLS, and FlashAccess. PlayStation is different from the
other license servers because we check the PlayStation ... | return {
drm: {
servers: {
"com.widevine.alpha": "https://widevine-license.vudrm.tech/proxy",
"com.microsoft.playready": "https://playready-license.vudrm.tech/rightsmanager.asmx"
}
}
}
} | 0 |
3898bead1129da2bde7f53d3c8047e13 | 8e266121572d6c50d4b4a79c5a1116da | MethodNo 置值. | public class RouteInfoDO extends BaseDO{
public void setNoNumB(java.lang.String noNumB) {
this.noNumB = noNumB;
} | 0 |
9895af1b3ab60c34dac4e1414212064a | 97e758458f2444453057f5e2be3791ca | distance between two array points in xz plane | int GetDistanceXZ(DWORD SourceX, DWORD SourceZ, DWORD TargetX, DWORD TargetZ)
{
float DifX, DifZ;
DifX = (float) SourceX - (float) TargetX;
DifZ = (float) SourceZ - (float) TargetZ;
return Float2Int((float) sqrt(
pow(DifX,2) +
pow(DifZ,2)));
} | 1 |
e960bdbb2eac7012223cd7822d1fa8e3 | 41982e929e9dbfefedefa60f7183b6ee | requests
Display details on any web requests currently being processed by
the WSGI application. | class NoLogRequestHandler(WSGIRequestHandler):
def log_request(self, code='-', size='-'):
pass | 0 |
db43db6d3bf0bd800b3527534628c54a | 50bd8c3bd97442e2b506c2ed37fb6538 | Returns number of newlines removed | function countNewlines(text) {
var match = text.match(REGEX);
return match ? match.length : 0;
} | 0 |
67e3985d0f2c94986216b7d921f76bc4 | 0ebf0a27a67fe2f9bf8425207bbeaa00 | 将中间件的状态同步到路由器 | if (!routeState.activeRoute) return;
var stack = this.middleware[routeState.activeRoute.path] || [];
stack.forEach((fn) => {
fn(routeState);
});
} | 0 |
acaa60d759b30b715b037d715aed4d20 | e3ab7727b3ce777f6c69dbcc46187312 | Split polygon into non-intersecting polygons | {
if (this.plane == null)
{
return polygons;
}
IList<Polygon> _front = new List<Polygon>();
IList<Polygon> _back = new List<Polygon>();
for (var i = 0; i < polygons.Count; i++)
{
this.plane.splitP... | 1 |
88abee8bd1f95cc7c7ad2bbae072874e | c392fb028722f936ef847dc40bbe568f | Returns the meta object for class '{@link org.xtext.gameuno.unoDsl.RegleJeu <em>Regle Jeu</em>}'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | EReference getRegleJeu_Exigence(); | 0 |
fdf9644442f46a33401864a650a9ee70 | ae2aa5c711cf0d7d727e983b416b47ec | Get price of delivery between two cities. | public function getRate(
Location $origin = null,
Location $destination = null,
Package $package = null
); | 1 |
415808eabc30e1d0f3e7c4da5e532b93 | 63b97c724b31d1eecae3476f52b917a2 | This function assumes a linear correlation between frequency and spindle speed. This isn't correct but
is a close enough approximation for my purposes. This is a possible area for future development. | public class Shooter
public void setRpmFromDistance(double distance, double voltage)
{
double d = distance;
double rpm = 0;
d/=100;
rpm = -12.581*d*d*d*d + 219.61*d*d*d -1198*d*d +2675.3*d -2109.8;
targetRpm = rpm;
setRpmBackspin(targetRpm);
} | 0 |
4e257026595ac5921e5bd53c06c45cde | b013f4dd1629a583c9bcc3b9add7a40d | Evaluate an interpolation polynomial.
This function uses barycentric evaluation for
stability. The data values are assumed to be real. | def _interp3d(ix, iy, iz, a):
assert len(ix) == len(iy) == len(iz)
output = np.empty(len(ix))
x0 = ix.astype(int)
y0 = iy.astype(int)
z0 = iz.astype(int)
x1 = x0 + 1
y1 = y0 + 1
z1 = z0 + 1
x1[x1 == a.shape[0]] = a.shape[0] - 1
y1[y1 == a.shape[1]] = a.shape[1] - 1
z1[z1 == a... | 0 |
c2937660ea5e4e40ae4620f9286519cd | eef0dbcd9f82b4a9ac5fca1d38280d8b | display only a 'limit' amount of authors from the authors trie | names = {}
for q in data:
if q['author'] not in names:
names[q['author']] = 1
else:
names[q['author']] += 1
return sorted(names.items(), reverse=True, key=operator.itemgetter(1))[:limit] | 1 |
3010f94d0e7842f31e66ded97eae5c1d | 8f0749575b3f9685823edf07101ec0c7 | Same process as getStartHour except for the end time of an event | $date = get_field('djgigs_event_start_date');
list ($startdate, $starttime) = explode(' ', $date, 2);
return $starttime;
} | 0 |
af2aaa11de486958cdbe47c934ca1f13 | 891f2dc975f55c18b116bf13bc73cb97 | Vratí zda-li šifra používá IV | class PhpCrypt_Mode_CBC extends PhpCrypt_Mode
public function requiresIV()
{
return true;
} | 1 |
ce99121d4d0a680d617869da20386aa3 | dbb47e8a95a8bbaf2a0cf5373a21ac6b | 判断工作票填写窗口选项是否输入 | var ticketType = Ext.get("workticketTypeCode").dom.value;
var ticketSource = Ext.get("sourceId").dom.value;
var repairSpecail = Ext.get("repairSpecailCode").dom.value;
var chargeBy = Ext.get("chargebyname").dom.value;
var permissionDept = Ext.get("permissionDept").dom.value;
if (cbxWorkCondition.disabled ==... | 1 |
813c9406773b19a16ed188bf882b440b | fd74c6856b2ed723d3462fb4bd52f597 | 10-meter air temperature [K].
Air temperature at the observing site 10 meters above ground
at the preset time and for the preset realization. | @Entity
@Table(name = "wheat_internet")
public class WheatInternet
public void setAirTemperature1(String airTemperature1) {
this.airTemperature1 = airTemperature1;
} | 1 |
963bc85f789a55ebd3161392c31e293d | b8a0ddd588bf75f6ee140df311867289 | summary of preprocessing ^^^ all functions above | def preProcessData(path):
folders = ["/train/pos", "/train/neg" ,"/test/pos", "/test/neg" ]
for folder in folders:
print("preprocessing folder: "+path+folder)
for filename in glob.glob(os.path.join(path+folder, '*.txt')):
with open(os.pa... | 1 |
1912d053ea97a012ae0870128b76e1aa | 905de5aa8482e8e059cdf7f1d1cd66bd | Выполняет этап наивной группировки запросов | class FeatureTemplateAdapter
_groupQueries(uncachedRegions) {
for (let i = 0; i < uncachedRegions.length; i++) {
let r = uncachedRegions[i];
this._computeRegionSize(r);
}
let groupSize = 50;
let queriesLists = [];
while (uncachedRegions.length > 0) {
... | 1 |
630d795609e174044cfb8487db462dd6 | 9386f99b8f370bae1d17121f2a702439 | Sets the value for <b>url</b> (Retrieve URI (0008,1190))
<p>
<b>Definition:</b>
WADO-RS URI where Study is available
</p> | public org.apache.axis.types.URI getSURL(); | 0 |
2c247fc7fe90edd536220518daec9e1a | c41f1be6dba8e6b7a95f147a60f21573 | Insert the specified values before the position(s) matchign the specified predicate. | namespace DigitalPlatform.Marc
public class MarcQuery
public static void insertBefore(
MarcNodeList source_nodes,
MarcNodeList target_nodes)
{
if (source_nodes.count == 0)
return;
if (target_nodes.count == 0)
return;
... | 0 |
e76cd17465520d32be2d35508b63771b | 7280f13082a175010029895ad9e814b1 | Standard Home/Landing Page Fields | class GFCapsuleCRM extends GFFeedAddOn
public function standard_fields_for_feed_mapping() {
return array(
array(
'name' => 'first_name',
'label' => esc_html__( 'First Name', 'gravityformscapsulecrm' ),
'required' => true,
'field_type' => array( 'name', 'text', 'hidden' ),
... | 0 |
a02c538c52dc090b1d96d5023df0ebb8 | a08725815769d1f72477f17b69b0e8c8 | Set statusStart | namespace CunaApi.Interfaces
void SetStartStatus(Guid id); | 1 |
8259c2cadb57cdd3f59292707fd48c01 | b9af1cf0656825a558b822c925871ec4 | Check is Zip file
Return false : if it is not zip
Return true : if it is zip file | class CKSCommander extends CBaseList
function IsZipFolder($path)
{
$pos=strpos($path,'.zip/');
if($pos!==false)
{
return $pos+5;
}
else
{
$extension=substr($path,strrpos($path,'.'),4);
if($extension=='.zip')
{
return true;
}
}
return false;
} | 1 |
75ba454b7ac941da2fe7ba18479ac9c0 | 0bd47399fe9ccf4509110e686091b94c | This bot tries to distribute it's stones onto as many fields as possible | public class CostAI extends Player implements AI
@Override
public Field Turn()
{
ArrayList<int[]> possible = PossibleTurns();
if (possible.size() == 0)
{
return null;
}
int max = 0;
int maxIndex = 0;
int index = -1;
for (int[] turn : po... | 0 |
c5e141cbb33a0f79fbd0e09f63f32c49 | ddd6ba54c05c29d59a61f7bae619f8fa | 경고창 보이게하기 | function warning(){
$('.warning').css("display","none");
$('.canvasImg').css("display","block");
} | 0 |
bbfb20f9f3a8c81951a6d9b226feade6 | 0250fc5609779216d8f5f2fc1c0e9976 | Tạo bảng lưu thông tin thời gian vào/ra được quy định | {
Schema::create('timetables', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('ar_timetable',50);
$table->string('en_timetable',50);
$table->string('description')->nullable();
$table->time('on_duty_time');
$ta... | 1 |
c7148214f8e92fe23b00db9bb0d160f3 | 72d114dd54d44ab6cd3d82f9bb8e7c96 | Easy select query to transform triples to javascript objects | function objectifyAQLXmlResult(xml) {
console.log("ObjectifyAQLXmlResult, xml is xml: "+$.isXMLDoc(xml));
var responseData = [ ];
var resultSelector = "result";
var bindingSelector = "binding";
console.log("--1");
if ($.browser.mozilla) {
console.log("EEE-utils.js - ObjectifyAQLXmlResult: Firefox detected");
... | 1 |
d208f049cd321e8dc477560455432048 | cf852453cac97b72c6a2088418f2715e | Validate file violation, if it contains ../ (directory navigation) | function validateSimpleFilePath(filePath) {
if (filePath.search(/\//g) != (-1)) {
return false;
}
if (filePath.search(/\.\./g) != (-1)) {
return false;
}
if (filePath.search(/\\/g) != (-1)) {
return false;
}
if (filePath.search(/\:/g) != (-1)) {
return false;
... | 1 |
fa58c051515521e1e19cc3b7fd71789f | f35a44bc3e65b04e1a1d50dcaa90afef | for PC we'll get something like '0x400e0db8 <gpio_set_direction>' | gdb.attach(p, '''
set disassembly-flavor intel
b gets
b printf
c
x/50x $esp
b *0xffffd18c
''') | 0 |
94a85a3ab032738ccfdfec98e9fc44ac | ec2bda24df5803c1fcbaa5a9b735e069 | Overriden to make it appear as if there are no subpackages.
This is to make imports mandatory and optimize library inclusions. | def test_pure() -> None:
src = Path(__file__).read_text()
assert re.findall('import ' + r'my\.\S+', src, re.M) == []
assert 'from ' + 'my' not in src | 1 |
16a824d07503654d2d183165f3375fe2 | cbc7a69252707efa02ba77a039acf50b | 네트워크 시작 | interface INetworkManager : IPlayerManager
fun start() | 1 |
e8c632a3f0d1836a6f8faab4320a61ef | 1c62c165a2ba15602b6db789a8f2ca96 | Associates the car to the parking slot. | public int park(Car c, String entryPoint) throws ParkingNotAvailableException; | 1 |
945baedccf7aa67d4b865a72f80b6b4a | 11e7d716af3180433cdb5a0138af4692 | Registry of externally-stored data | class Externals(Collection):
def __init__(self, monitor):
super(Externals, self).__init__(monitor)
self._meta_data['allowed_lazy_attributes'] = [External]
self._meta_data['attribute_registry'] =\
{'tm:ltm:monitor:external:externalstate': External} | 1 |
c0c4d2b34756c803bfd4fa0096110810 | 3ccbe8ed5d96b35a86a465f0511a0157 | 非同期でロードバランサーの定義を作成します。 | namespace Microsoft.Azure.Management.Network.Fluent
internal partial class LoadBalancerImpl
LoadBalancingRule.UpdateDefinition.IBlank<LoadBalancer.Update.IUpdate> LoadBalancer.Update.IWithLoadBalancingRule.DefineLoadBalancingRule(string name)
{
return this.DefineLoadBalancingRule(name);
... | 0 |
836d545b3afeff0b9d0d1e944671cff0 | 5541694e02316e97dcca311d82c722c2 | Ascii码转字符串 | namespace Moe.Lib
public static class ByteUtility
public static string ASCII(byte value)
{
return Encoding.ASCII.GetString(new[] { value });
} | 1 |
3196974762b614db63231ba6dc7ad687 | 5d8d8239d9d0d476d966e32e9a079015 | Unsets the "maxValue" element | namespace Infragistics.Controls.Editors
public class ValueConstraint : DependencyObject
// SSP 3/24/10 TFS27839
//
, INotifyPropertyChanged
, ISupportPropertyChangeNotifications
[EditorBrowsable( EditorBrowsableState.Never )]
public void ResetMaxInclusive( )
{
this.ClearValue( MaxInclusiveProperty );
... | 1 |
639e834f88301fa6d8fd40f02096d102 | 66a3998abd8a7b64cba7322decf0a8c7 | Gets PacMan direction | {
if (m_direction.x == 0 && m_direction.y == 0)
return Default;
else if (m_direction.x < 0)
return Left;
else if (m_direction.x > 0)
return Right;
else if (m_direction.y < 0)
return Up;
else if (m_direction.y > 0)
return Down;
} | 1 |
15ce0eb6deebb473b1e1b63555f44c65 | 27a313bde40f2034c849d9304ce3f69b | Establece si el campo aceptará más de un fichero.
'false' para que sólo acepte uno | public function setMultiple($multiple); | 1 |
4cff46ca8a501d613d1749189f69bf2b | 54b32fd5fbf6ed7942d546823087b5b3 | Registers a localized keyword to a predicated that will be used when the
keyword is encountered. | namespace CSProlog
public class EmbeddedPredicateStore
public bool LoadPredicate(EmbeddedPredicate.EPBase ep)
{
preds[ep.GetKey()] = ep;
return true;
} | 0 |
27c0a95e3779f1a98673956aa31413d9 | 9b1ac10c378a42a38ec9e0040b885f32 | Prints statistics about vector rewards where the index represents
that episode and the value represents the value at the end of that episode | def log_rewards(logger, iter_cnt, rewards, evaluate=False):
msg = ('Iter {0}: max(reward)={1:.2f}, '
'mean(reward)={2:.2f}, '
'min(reward)={3:.2f}, '
'sd(reward)={4:.2f}'.format(iter_cnt,
np.max(rewards),
... | 1 |
f5d59c9c2d3e426accbeea23bdb746de | b23ac267f0305368dfbeab79854cbe26 | Event action execution callback.
Create and event and log it. | $name = $this->levelNames[ $event->level ];
print ( sprintf( "%s [%-7s] {%s} %s\n", $event->datestring, $name, $this->contextName, $event->message ) );
$expStr = implode( "\n\t", $event->getExceptionBlob() );
if ( $expStr ) {
print ( $expStr . "\n" );
}
} | 0 |
dc1be62bd98b4a4344c3ec38a1788f3f | da85f1e19df425322c23434333335e3e | convert a datasource name into the key value used by the datasourcedictionary cache | public class RepositoryConnectionManager extends org.apache.manifoldcf.core.database.BaseTable implements IRepositoryConnectionManager
protected static String getRepositoryConnectionKey(String connectionName)
{
return CacheKeyFactory.makeRepositoryConnectionKey(connectionName);
} | 1 |
0585af014ef722ad13afc35c2550d622 | f693b95a633d2b75474bef54fd306932 | 根据实时股价触发短信发送给股民 | class Events
public static function sendStockMsg($client_id,$myStock){
$new_message = array(
'type'=>'stockMsg',
'myStock'=>$myStock,
);
return Gateway::sendToClient($client_id,json_encode($new_message));
} | 0 |
2390f57c43454dddf3f2c064cdb2f69d | 310c015cc3c03bd48b4a339b6871d8c8 | Dump features | images = it.imap(io.imread, args.images)
screen_info = screens.d[args.screen]
index_function, fmap = screen_info['index'], screen_info['fmap']
f0, feature_names = fmap(next(images))
feature_vectors = [f0] + [fmap(im)[0] for im in images]
data = pd.DataFrame(np.vstack(feature_vectors),
... | 1 |
029526d0c2d97b96bc4012eacb4caed5 | dfead0cd88dc90755e3b1563fa969eed | Prints the given string and writes it to the given log file | class Extractor:
def print_log(self, txt):
print txt
self.log_f.write(txt + "\n") | 1 |
ee960a9e1dc7c3104183108ae0c27960 | 02c6b0516cdf5b12bbfee1dc07ad71f5 | 角度限制在-360~360 | let a = value;
if (a <= 0) {
a += 360;
}
return a;
} | 0 |
67e040c1ab83e6afb23b69b41b371666 | 862853d2ffdfd6f8db43dbc7bda15bc2 | Perform static API analysis on packages and their dependencies.
This identifies suspicious API calls (e.g. rmdir). | const findPackage = (name, version) =>
_.find(this.packages, pkg => pkg.name === name && (!version || semver.satisfies(pkg.version, version)));
const hasPackage = (name, version) => Boolean(findPackage(name, version));
const { hoist, nohoist } = this.options;
if (hoist) {
tracker.verbose("ho... | 0 |
8644ef74a95efc48fe94fd0da94ca12e | f00be2383a91badb8988373603caf4ed | 从XML节点加载对象数据,在加载对象数据前将重置所有的数据 | {
if (objectTypeNode != null)
{
ObjectType = objectTypeNode.Attributes["name"].Value;
XmlAttribute columns = objectTypeNode.Attributes["columns"];
if (columns != null)
{
Columns = DataHelper.GetNotEmpty(columns.Value, Columns);
... | 0 |
438989b5ae07d3ac1f4f38fb2ab84975 | b53b98ad0428cbf1d76e0a81347ad078 | 实时在线-最高在线人数 | {
$ds = Wekit::load('online.PwOnlineStatistics');
$maxUser = $ds->getInfo('max_user');
$maxGuest = $ds->getInfo('max_guest');
$time = $maxUser['created_time'] > $maxGuest['created_time'] ? $maxUser['created_time'] : $maxGuest['created_time'];
$number = $maxUser['number'] + $m... | 1 |
749275c4c6fb81e8b597a89200c70237 | cdd609707a3002ef2b54a4d85e2a96d8 | 设置牌可以触摸 | class CSCardItemView extends IBaseView implements ExpFromImpl{
public setTouchState(canTouch:boolean = false):void{
var self = this;
var curRound:number = self.cardView.getCurRound();
if(curRound<=0&&canTouch){
self.playClickableEffect();
if(self.cardState==CombatConstant... | 1 |
3b218d858858a19e5d3b2d3f998b984a | 84c922b628793e352ad15fb83131c506 | delNode(n): remove the node n, if present. | class Graph(object):
def delNode(self, n):
self_o = self.o
self_i = self.i
if n in self_o and n in self_i:
arcCount = self.arcCount
if n in self_o[n]:
del self_o[n][n]
arcCount -= 2
if n in self_i[n]:
del self_i[... | 1 |
a3cc1c2f4dbdd44835ee9fb1f5166c5b | 9148039846c2663390756fb48adc58d7 | This method will bring the librarian to the edit current resource page. | @Named("detailsAction")
@SessionScoped
public class DetailsAction implements Serializable
public String prepareEdit(Details detail) {
current = detail;
return "Edit?faces-redirect=true";
} | 1 |
199c7777a7f1e6a33c66e5a0082d4bc9 | 6a3f5675ae6e05b27b729e88beace900 | 获得目录中所有图片文件列表 | public class AlbumActivity extends AppCompatActivity
public ArrayList<String> getImgListByDir(String dir) {
ArrayList<String> imgPaths = new ArrayList<>();
File directory = new File(dir);
if (directory == null || !directory.exists()) {
return imgPaths;
}
File[] files ... | 1 |
8408dfbe2bb17e475fd563f120efaaec | bba782217a295f73c0fab97ced6a442e | Adds a click log of the asset currently displayed | namespace RCE.Modules.Library
public partial class ImagePreview : AssetPreview
private void AddAsset_Click(object sender, RoutedEventArgs e)
{
this.OnAddingAsset();
} | 0 |
5533a77534c051cd6f67f7d3d28f6f13 | 02aae3599ad6e9d8777fd6abb25a66c2 | 获取当前的WebBrowserTab | function getCurrent() {
return chrome.tabs.getCurrent();
} | 1 |
6a3a7d4a12257cbdd8d28a8a2537bd3c | 2481b633e71442b2aec725f416e7bc93 | 输入文件名前缀,从服务端获取文件下载链接 | public class SecurityTreeManagerUI
public String getAttackFilePre() {
return attackFilePre;
} | 0 |
929a5ee5ab9e845f4151f14f30b8053e | 47f3044b82a85c31d3f80306cf4f4f9e | if linked into a DLL, the threadpool shared instance will be
destroyed at DLL_PROCESS_DETACH, at which stage joining threads
causes deadlock, hence this dance | namespace dlib
namespace threads_kernel_shared
~threader_destruct_helper()
{
thread_pool().destruct_if_ready();
} | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.