query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
4a23438e2a61de048951a5674336820b | dd864577b616cd9c9fd6d720cf1138df | Tests unauthenticated user creating a quote. | class TestContributor:
def test_get_quote_contributor(self, quote):
resp = self.actions.get_quote_contributor(quote.id)
assert_valid_status_code(resp, 403) | 0 |
30398f999b8ad2eef8b611e6ee7904e5 | 4e4cee3360c60c293b6270ab952dd7e7 | 动作按钮点击事件(回调) | void VisualWidgets::buttonClicked(Button* button)
{
if (bts[STARTANDPAUSE] == button)
{
if (isStop)
isStop = false;
else
isStop = true;
setImgOfStartBt(isStop);
}
else if (bts[STOP] == button && !isStop)
{
if (AlertWindow::showOkCan... | 1 |
0ad69dc6c7015d6e7ac5a2f68ac99878 | ee30706f594bc058230d4a8e17534f74 | функция проверки корректности разделителя '-' значений даты | date_first = check_date('2015-11-03 13:21:02.071381', '03.11.2015', '20.11.2015')
date_second = check_date('2015-11-03 13:21:02.071381', '01.11.2015', '02.11.2015')
self.assertTrue(date_first)
self.assertFalse(date_second) | 0 |
2da8d5ee18619a9b68e9864893a7dd0f | 43f67a71da8b250b18732d813201102c | 判断字符串长度是否小于等于最大长度 | public class StringUtil
public static boolean compareMax(String value, int max) {
return !(value == null || value.length() > max);
} | 0 |
c16e03243eeec36bea81cd68c1d139ac | a3bfc930215ebb2a4fdddcaf3198d90b | Sets card org name. | class Card implements Location
public function getOrgName()
{
return $this->orgName;
} | 0 |
3936333d08391f23464e210bb78c9102 | 13378e2c252346279409a795a77121c2 | Recursively renders the data from a surface and its blocks. | {
LayerPixelData target;
target.PixelData = new PixelData(geometry.TargetTextureSize.X, geometry.TargetTextureSize.Y);
target.Atlas = new List<Rect>();
Point2 targetTilePos = new Point2(0, 0);
for (int tileIndex = 0; tileIndex < geometry.SourceTileCount; tileIndex++)
{
if (tileIndex >= tileData.... | 0 |
f38b93d16e162c26a6dc7537574a1875 | f29bd3c5970ba20dcfe163fc4427ea96 | 临时脚本,清理帖子内容 | post_list = mdb.baidu.post.find()
for p in post_list:
print "[url]%s==================="%p['url']
print "[title]%s"%p['title']
cover_img = p.get('post_cover_img','')
if cover_img:
res,err = qiniu_img_info(cover_img)
if res:
if res['fsize'] > 10240:
... | 1 |
3289235218cdbc05dfa683aaec617a40 | 4af48825743fb4df07a9d36a9c5315c9 | Use igraph to compute degree parameters. | inline void Graph::getDegrees(igraph_vector_t *nodes, igraph_vector_t *degrees) const
{
igraph_vs_t vids;
igraph_vs_vector(&vids, nodes);
igraph_degree(&G, degrees, vids, IGRAPH_ALL, 0);
return;
} | 1 |
2b9a1375593e5b12c4889ab8319a54f4 | 9ca9fcbc9b56e6552e45dbba5b9724e1 | Remove docs/_build folder. | def clean_docs(c):
_run(c, f"rm -fr {DOCS_BUILD_DIR}") | 1 |
9203ee2a4ba5c90f00f7c108ab2e6645 | 67914131ed8d5867df87948c21b10504 | Parses a TBL option line | ll = line.split ('=')
if len (ll) < 2:
print "Cannot parse option " , line
sys.exit()
result = (ll[0].strip() , ll[1].strip())
return result | 1 |
a70dde0a3ffece2ec221162c48e7595e | acbb927f5baeecb1aaaccbc496aed610 | Unique ID of the Datatype used for registration | class data_type_t(object):
def register(self):
return _idaapi.register_custom_data_type(self) | 0 |
fd36e4416fb1687fb6dffc1e3d645924 | 152cee7199726fc10f4293db4971dcb1 | 创建动图任务,用于将完整的视频文件或视频文件中的一部分转换为动态图文件,暂只支持输出GIF文件。
待转动图的视频文件需要存储在与媒体处理服务同区域的OBS桶中,且该OBS桶已授权。
Please refer to HUAWEI cloud API Explorer for details. | namespace JDCloudSDK.Vod.Client
public class VodClient : JdcloudClient
public CreateVideoUploadTaskResponse CreateVideoUploadTask(CreateVideoUploadTaskRequest request) {
return new CreateVideoUploadTaskExecutor().Client(this).Execute<CreateVideoUploadTaskResponse, CreateVideoUploadTaskResult, CreateVid... | 0 |
78e126a894da2d63f4931af5a2861aed | c70f9b2d9c968236e7cf63772bd01ec5 | Gets standard deviation of path loss exponent or null if unknown. | @SuppressWarnings("WeakerAccess")
public class WifiAccessPointWithPower extends WifiAccessPoint implements
RadioSourceWithPower
@Override
public Double getPathLossExponentStandardDeviation() {
return mPathLossExponentStandardDeviation;
} | 1 |
36bb8a78e3258ebc5581ac5f149ca0ca | 1a8d5d9c8661fb97eb26537bb8366aa5 | Reads a single single-precision floating point number at the current position and increase the position by 4. | namespace WebPFileType.Exif
internal sealed class EndianBinaryReader : IDisposable
public unsafe float ReadSingle()
{
uint temp = ReadUInt32();
return *(float*)&temp;
} | 1 |
0925ec48617e14634934664524d0d179 | ed005b3dcea4fcb477affac2762b620f | 是否能作废出库单 | {
bool flg = false;
int notoutstouckCount =
Context.Sql(
"select count(1) from SoOrderItem where OrderSysNo=@OrderSysNo and Quantity>RealStockOutQuantity")
.Parameter("OrderSysNo", sysNo).QuerySingle<int>();
if (notou... | 1 |
56d351cb0aa066fdc49e23c7b81b351f | 32cac1f723c75c7b2338e800c8204700 | Construction récursive d'un arbre BSP selon une liste de facettes | void
BVH::build(Objects * objs)
{
ObjectsWithBoxes objs_boxes;
std::transform(objs->begin(), objs->end(), std::back_inserter(objs_boxes), [](Object *o) -> ObjectWithBox
{
ObjectWithBox res;
res.min = o->minVector();
res.max = o->maxVector();
res.obj = o;
return res;
... | 0 |
890f29be7fee9cbd052c3bb91a1cfa88 | 710947b7aeafd4d1817a8e3de3a2413c | 向EditView中填充数据 | public abstract class BaseActivity extends AppCompatActivity implements ActivityCallback, FragmentInstallable,SaveDataCallback{
private void setViewData(){
LinkedList<TestData> dataList= DataManager.get().getViewData(DataManager.get().currentActivity().getLocalClassName());
if (dataList==null||dataLis... | 1 |
530162a42c0d270ea12c56ca42390f0a | 969b4b7dea51b8bd5532f96ca792833b | Test case for serviceBoardsIdTypesTypeIdPut
. | class TestDefaultApi(unittest.TestCase):
def test_members_id_custom_board_backgrounds_id_background_put(self):
pass | 0 |
1105b8bfb7fab6898a5b7f8eed6f3d0a | ec52008c82f8974da4be2d9f7542ff35 | Очистка списков, ListView и стоимости. Обнуление переменных | {
Number = "";
Floor = "";
RoomNumber = "";
ClearRoomTypeList()... | 1 |
3049006307a336fe1137d028cac09a6a | 0f1bf7801d4b0bbd5f358351b429ad2a | Смена статуса у указанного пункта меню | class Menu_model extends Model
public function activate_menu_item($item_id, $status=1){
$attrs["status"] = intval($status);
$this->DB->where('id', $item_id);
$this->DB->update(MENU_ITEMS_TABLE, $attrs);
} | 1 |
f05b8240d9fb96628ff3d2d2a71d2fd0 | 4f0f0deeb4ae3a79ffa28bcb656f1ff4 | 启动WRL服务并进行初始化操作 | val zooKeeper = connectServer(ZkConstant.ZK_CONNECTION_STRING, ZkConstant.ZK_SESSION_TIMEOUT)
publishService(remote, rmiHost, rmiPort, rmiUrl)
createNode(zooKeeper, rmiUrl)
} | 1 |
9eb5ceb7989bec9aa28a99c21c13ed56 | f39a180b00bd3737b6eea53b6949d28d | 抽象方法(限定子类的方法只能叫这些名字),没有代码体 | public class InterImpl implements Inter{
@Override
public void abstractMethod() {
System.out.println("abstractMethod");
} | 0 |
1fc364e1ee35fb1e097e8cec1e9f941d | 88bf8956cff0a823d4267b8591bb7d9a | Checks to see if there are sufficient funds in your account to run this sample. | {
bool sufficientFunds;
if (totalAvaliableCoinage <= 0)
{
sufficientFunds = false;
return sufficientFunds;
}
else if (totalAvaliableCoinage < EnoughCoins)
{
sufficientFunds = false;
... | 1 |
3565d2ef03fdc2cd9f0a5b49b6c21f74 | ba1bc0f62b422cf87d8acb973bc04e9b | Retrieves activity logs for tool with given ID | namespace HNHUWO2.Classes
public class WO
public static List<LogActivity> GetLog(int ID)
{
WOLinqClassesDataContext db = new WOLinqClassesDataContext();
return db.LogActivities.Where(l => l.wID == ID).ToList();
} | 1 |
2ef2bb7df992f5000d584681068e4ac4 | 3b901f49c7c76e7d61351d89e339431f | Group a list by a key or a classifier function
from ftool import groupby | class FINQ(Iterable[T]):
def group_by(self, func: Callable[[T], T2] = Identity) -> 'FINQ[TList[T]]':
return FINQGroupBy(self, func) | 1 |
7c1023a8e83ea1c172e30de15c74c420 | 4a18ce0753d22dc6c8c0d3691c8488b8 | Includes the XML comment file if it exists at the specified file path. | namespace Scout.Ntcb.WebServer
public class SwaggerXmlComments
public static void SetCommentsPath(SwaggerDocsConfig swaggerDocsConfig)
{
string executablePath = AppDomain.CurrentDomain.BaseDirectory;
if (string.IsNullOrWhiteSpace(executablePath)) throw new InvalidOperationException("... | 1 |
105526d6c3a3db184c95092367a16dc6 | d7a5c86e23bfd6cec9329d919bb7be5b | If there is a policy selected, fires the Policy_Delete event passing in
the first selected policy | namespace Idera.SQLsafe.Application.ManagementConsole
[Serializable()]
public class PolicyWizardModel
: IPolicyModel, IPolicyStatusManager
private void Delete(SqlConnection connection, SqlTransaction transaction, bool notify, bool save, out int lastState)
{
lastState = -1;
del... | 0 |
af1975a734ee07ea47e53d62bfbea3fa | 1b96e1bbe8d817bc94a480b41ddd2f4c | Allows users to register a country. | class CountryController extends Controller
public function create(Request $request)
{
$request->user()->authorizeRoles(['Admin_user', 'Super_admin']);
return View::make('admin.country.create');
} | 0 |
896673c948d2d457e57d037502e7ad0a | f5a16e0bcf6ee60b6f84ffc763e807f3 | Ekran wyświetlający sie przy wyjściu z gry, zapraszający do ponownej gry. | void game_over()
{
system ("cls");
ramki();
gotoxy(13,5);
cout << "******** ****** ** ** *******";
gotoxy(13,6);
cout << "* * * * * * * ";
gotoxy(13,7);
cout << "* *** ******** * * * *** ";
gotoxy(13,8);
cout << "* * * * * * * ";
gotoxy(13,9);
cou... | 0 |
23ffbb6d81f00feedbdd3ba28b75f7bd | b9ae0aa68a1b3ccd395f117fbd5235b9 | 判断一个文件是否重复,重复了创建副本,如果副本有了,创建副本的副本,依次叠加,直到没有 | if (createNewFile(f))
return f;
String name = f.getName();
String body = null;
String ext = null;
int dot = name.lastIndexOf(".");
if (dot != -1) {
body = name.substring(0, dot);
ext = name.substring(dot);
} else {
body = name;
ext = "";
}
String newName;
for (int count = 0; !createNe... | 1 |
a721160fb9fdbd8506b0a0a04bd59f41 | 9e0c17855c49eeefacddc2906540d001 | 有两个排序的数组A1和A2,内存在A1的末尾有足够多的空余空间容纳A2。请实现一个函数,把A2中的所有数字插入到A1中并且所有的数字是排序的。
因为使用数组没有通用性,所以改用切片 | i, j = 0,0
ret = []
while i < m and j < n:
if A[i] >B[j]:
ret.append(B[j])
j += 1
else:
ret.append(A[i])
i += 1
while i < m:
ret.append(A[i])
i += 1
while j < n:
... | 0 |
f0181f241af877bdb9a6c4e5228ca131 | 1b10927ff2019e839f783e220fb48691 | 插入发票状态更新记录 | public void Insert(int InvoiceSubTableAuditID,int? InvoiceSubTableID,int? InvoiceNumber,int? ChargeType,string Detail,int? OldValue,float? NewValue,bool Vat,decimal? VATAmount,DateTime? DateAdded,int? AddedBy,byte[] Ts)
{
InvoiceSubTableAudit item = new InvoiceSubTableAudit();
item.InvoiceSu... | 1 |
73e72d6efa37c45bd0e0183ed03e06a3 | f76dd2405b594f767413bbe9f4dd35ff | Ignore duplicates | class DedupList(list):
def append(self, x):
if x not in self:
super(DedupList, self).append(x) | 1 |
e16225c4a50144f3969c554feda4a39b | 4c9b1917ccee42aa4f4273348e72a92c | 是否已收藏过该书签 | @RestController
@RequestMapping("v1/users")
public class UserController
@RequestMapping(value = "{id}/books/relations", method = RequestMethod.GET)
public JsonResult isCollected(@PathVariable String id, @RequestParam Integer bookId) {
return UnifiedResult.result(ResultCode.NOT_FOUND, favouriteService.isFa... | 1 |
810cf0b10c6ab82ad09d0cb85ff9e6d6 | c6e3426abe7af0cb0e5efb722f11d167 | Remove all images this screen is parenting. | const numElements = this.container.children.length;
for (let i=0; i<numElements; i++) {
pixiBackend.removeChild(this.container, 0);
};
} | 1 |
839efbb6b0fe35094c89022dd136f482 | ba4fac0cea766fcba96c74195020c50f | Returns a new {@code StreamEx} which consists of possibly-overlapping
sublists of given source list having the specified length with given
shift value.
<p>
This method calls {@link List#subList(int, int)} internally, so source
list must have it properly implemented as well as provide fast random
access.
<p>
The shift v... | if (size <= 0) {
throw new IllegalArgumentException("Invalid Split Size");
}
final int listSize = list.size();
if (listSize == 0) {
return Stream.empty();
}
return IntStream.rangeClosed(0, (listSize - 1) / size)
.mapToObj(n -> list.... | 0 |
235203dbcbc6537c00933d35192b513a | 79e5b234198e9252156a365c8f8a0077 | Функция повреждения корабля | var draggable = ui.draggable;
var draggableName = draggable.attr('name');
var dropEl = $(this);
var classes = $('.ships_dislocation > div').map(function (index, element) {
return $(element).attr("name");
});
for (var e = 0; e <= classes.length; e++) {
... | 0 |
48c0063086c6ef2eff2c2eb9f7dd3890 | 4c877bcecb8e8ddad46a9d58d196592d | 自动加载路由 并做token权限拦截 | @Configuration
public class SaTokenConfig implements WebMvcConfigurer
@Override
public void addInterceptors(InterceptorRegistry registry) {
registry.addInterceptor(new SaRouteInterceptor((req, resp, handler) -> {
List<String> ignoreUrls = ignoreUrlsConfig.getUrls();
SaRouter.match(Co... | 1 |
262ac126210d30b7f998de25fb362505 | b5d9e005fd5a8f765e21bd694caa2172 | Returns the meta object for the containment reference '{@link br.com.maisha.wind.terra.OperationProperty#getValidValues <em>Valid Values</em>}'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | @XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "ReferenceValueSetsSchemaType", propOrder = { "aliasTypeValues", "areaCodeValues", "areaCodeTypeValues", "calendarTypeValues", "countryValues", "countryRelevanceValues",
"decisionMakingBodyValues", "detailReferenceValues", "detailTypeValues", "docNameStatusV... | 0 |
d58a19806c5d0221a9c4917457bca314 | 62f22f7ee537f900d73d8f9aefc34467 | Returns deque's usage ratio. | class Pool:
def status(self) -> float:
return 1 - self.__pool.qsize() / self.__size | 1 |
c238379f9b32c64f2b178d9066e6bfde | a10eb9cf39fa78814fa91460917f81d2 | Should convert celsius into kelvin. | class TemperatureModule: LocationListener
fun convertCelsiusToKelvin(temp: Float?) = temp!! + 273.15f | 1 |
ecac423a6fe7ab5e7a17f9d8da4b8abc | 7025b7b78661601093308502af798938 | === Help === | def helper():
print('')
print('Help')
print('--------------------------------------------------------------------------------------------')
print('1) Download all the chapters of a manga pass only the url of the manga')
print('# python downloader.py <manga-url>')
print('-------------------------... | 1 |
61e0990c71e234247eb93620de97de1a | ed24d0a85760fa1cadd72a84c4b03fb6 | validate username and pwd with predefined credentials | if name == cls.NAME and pw == cls.PW:
return True
return False | 1 |
b48a937bbfa4bc057225d3a91c26c8fc | 1133724252e10cbf7d9a33440c1adbdd | Gets a request builder for the RiskyServicePrincipal collection | namespace Microsoft.Graph
System.Threading.Tasks.Task<RiskyUserHistoryItem> GetAsync(CancellationToken cancellationToken = default); | 0 |
084d62fc51ad22c6fa615f1faee437fb | 03f70fd98d60b19418f35284d21d0443 | Gets the enabled breadcrumb types | class Happyden_Breadcrumb extends Widget_Base
public function get_categories()
{
return ['happyden'];
} | 0 |
e26121965477c9cef8d40c44317abe17 | 9872aeb177615b3437453851a3820f64 | Method to save the com.ohmuk.folitics.jpa.entity.Category object using
com.ohmuk.folitics.jpa.repository.ICategoryRepository.save | @Service
@Transactional
public class CategoryDAO
public Category save(Category category)
{
CategoryEntity categoryEntity = providerConverter.categoryModeltoCategoryEntity(category);
categoryEntity = categoryRepository.save(categoryEntity);
return providerConverter.categoryEntitytoCategoryModel(categoryEntity);... | 1 |
2a34b3db22bd871c9f11b7d79dccb262 | c961be3f113a0857988adc6b1dd657bb | Add service to a service manager associated with a particular Property owner | {
try
{
var sm = ServiceManager.FromPropertyOwner(propertyOwner);
Debug.Assert(sm != null);
return sm.GetService(ref serviceGuid);
}
catch (Exception)
{
return null;
}
... | 0 |
202f894617dcc80bcb49d4ccce8ba550 | 1803e2c7a03bebecae7c4e20fc5b5766 | Locates an Item in the inventory. | int _num = System.Array.FindIndex(cInventory, a => a == null);
if(_num != -1) cInventory[_num] = new Item(_item);
return _num;
} | 0 |
8290b74fcdeb2a0d186e67ad914e152c | d7f4d35159df48f028dfa5be0479a83a | converts to 16 bit number | {
unsigned int lsb32(0);
lsb32 |= (mMsb17 & MASK_16BIT) << 16;
lsb32 |= (mLsb16 & MASK_16BIT) << 0;
return lsb32;
} | 0 |
eed61b9aef960ba1f42ce216552c4fc5 | ce967f3e30d882d3a2bf51b9b274873d | Actualiza una EstadosDelProceso, se basa en el identificador para actualizar el objeto. | ICAFlujoEstados estadoInicial = new ICAFlujoEstados();
String estado = JournalUtil.getRootParseValue("estado", article, LocaleUtil.getDefault().toString());
if (estado != null) {
estadoInicial.setIdEstadoOrigen(Integer.parseInt(estado));
estadoInicial.setIdEstructura(structureId);
estadoInicial.setUrlOri... | 0 |
efe91ecd10edc41def7e5f9a1f111905 | ec152b3a836aa50416233502a5766a2e | https://api.playfab.com/Documentation/Server/method/WriteTitleEvent | PlayFabAuthenticationContext customAuthContext = null, object customData = null, Dictionary<string, string> extraHeaders = null)
{
WriteClientPlayerEventRequest request = new WriteClientPlayerEventRequest()
{
EventName = EventName,
Body = Body,... | 0 |
f922c92a9255a7aac5b9d016b156b399 | c51fd69b115cd917e87f7483d679e7d3 | ユーザーが出す手を表示するためのメソッド | function text() {
$("#right_column").text(status + "の手番です。");
} | 0 |
bc1e143af3492bc29c02a8c817b19b90 | 97d71d69ebaed7bf0ceda77ab535a1a6 | The ARN of the application. | class AttributeGroupAssociation(pulumi.CustomResource):
def application(self) -> pulumi.Output[str]:
return pulumi.get(self, "application") | 0 |
2c73a46e98d20efa218094fd9a7d00fa | 5400ebbd625e04b746781a5e633a2a37 | Finds the highest ID for an account. | public int findMaxID(); | 1 |
064781d122559b1aec709059ae641343 | f30fa298d8b2c6ab68fb59821dd3789c | Add the value 'element' to the matrix entry A(row,column) and store the
result back in the matrix. | public class Matrix implements java.io.Serializable
public void setElement( int row, int column, double element )
{
( ( Vector )matrix.get( row - 1 ) ).
set( column - 1, new Double( element ) );
} | 0 |
1e9e7bdaada41f6d28db3c84a80d5f1e | 6d86c45da2cf3ea8ba62cadcc54ca2b6 | Metodo que permite controlar el pacman con las acciones del teclado | global control
if control:
global siguiente
if key == Key.esc:
rospy.signal_shutdown("Escape")
return False
else:
if key.char == 'a' or key.char == 'w' or key.char == 's' or key.char == 'd':
mensajes = {'a':3, 'w':0, 's':1, 'd':2}
siguiente = int(mensajes[key.char]) | 1 |
514e3eb002b96f7e79d89f617e946bd0 | a2572399bb13cf39796ce9b3401bd224 | 得到关闭广告栏的时间戳 | function getEndTokenTime (){
return wx.getStorageSync('endTokenTime')
} | 1 |
eff0b9d569742011c3cc1ae4b03172d7 | d7ec40e20b205b2ed11137a284dd97b3 | This is the relevant special folder for the given scope plus "IsolatedStorage".
It is meant to replicate the behavior of the VM ComIsolatedStorage::GetRootDir(). | {
return IsolatedStorageFile.GetStore(IsolatedStorageScope.Domain | IsolatedStorageScope.Assembly | IsolatedStorageScope.Machine, (Type) null, (Type) null);
} | 1 |
b86d80b16682dcbeb868d6aa16dce20c | 1978f4b49ee1192a339c79aad3c8ef7e | Enable caching behavior for the decorated function. | def wrap(*args, **kwargs):
self = args[0]
name = "_" + f.__name__
if not hasattr(self, name) or getattr(self, name) is None or kwargs.get("reload", False):
try:
del kwargs['reload']
except KeyError:
pass
setattr(self, name, ... | 1 |
5ccfd054a53b1713e8c7535356f80d1f | ea731d99f4f6bf3f454423302300ec8f | Метод Крамера | {
if (matrix == null)
{
throw new ArgumentNullException(nameof(matrix));
}
if (matrix.Count != matrix[0].Count)
{
throw new ArgumentException("Matrix is not square!!!");
}
int n = matrix.Count;
... | 0 |
b1265aa9d17c8837651103dc0284232b | f447cb0ce80e1ccda412895800a794a1 | 通过网络DNS获取本机Host名 | namespace OSLibrary.网络
public class Network
public static string GetHostName()
{
return Dns.GetHostName();
} | 1 |
015ebccd12d03a2dc47783c8701c1863 | 68cb8367d319be75948bb83b575e19b2 | 获取所有敌方的部队(左侧敌方部队提示使用 基于线) | function dimensionalWarFightVoApi:getTroops()
return self.troops
end | 0 |
7b07f781e8bb92fafad426525910ba91 | d59ab92e5ca70a9c2ab388007303c32e | Return true if the date is active | class Day extends Field
public function hit(\DateTime $ts)
{
$transformer = $this->getTransformer();
return $this->isActive($transformer->format($ts, 1));
} | 1 |
506b3e7b59e8b5ba3a62d0c5bf896bd2 | e9f0586cd32303adf743b22899e6f862 | Returns the current selection.
<p>
Note that as of 3.2.1 and 3.3, the common viewer caches its selection.
Clients must not set the selection of the viewer's tree control directly.
</p> | public class PackageExplorerPart extends ViewPart
implements ISetSelectionTarget, IMenuListener,
IShowInTarget,
IPackagesViewPart, IPropertyChangeListener,
IViewPartInputProvider
private ISelection getSelection() {
return fViewer.getSelection();
} | 1 |
57cb394e9310c0db3ab90a8c50733b60 | 6557177931c48a2a7cef71fa4ae7c69b | Bind unloading events | {
m_handler_unload = m_wallet->handleUnload(std::bind(&NotifyUnload, this));
m_handler_status_changed = m_wallet->handleStatusChanged(std::bind(&NotifyKeyStoreStatusChanged, this));
m_handler_address_book_changed = m_wallet->handleAddressBookChanged(std::bind(NotifyAddressBookChanged, this, std::placeholder... | 1 |
449a576f76aa967c8fc655339a0b1091 | 75be3ac0ee5127f84dfaf5d4f6147e74 | Initialize all the collision handlers between different Pymunk objects. | class JLChainMesh(object):
def __init__(self, jlobject, cdprimitive_type='box', cdmesh_type='triangles'):
self.jlobject = jlobject
for id in range(self.jlobject.ndof + 1):
if self.jlobject.lnks[id]['meshfile'] is not None and self.jlobject.lnks[id]['collisionmodel'] is None:
... | 0 |
f3c86ffec20561bb457f3b0f6db7e776 | ed9c6fcf5f63e0e0c3787992812d9ea0 | Função para Imprimir em Pós-ordem | if(raiz == NULL)
return;
if(*raiz != NULL){
posOrder_ArvBin(&((*raiz)->esq));
posOrder_ArvBin(&((*raiz)->dir));
printf("%d\n", (*raiz)->info);
}
} | 1 |
0f4404e9395e741ba36cb0f3b81b07c7 | ca63f20ec6212056f079cf72bb9e3337 | 名前(名)を取得します。 <BR> | public abstract class RM11AC0202RequestFormBase implements Serializable
public String getKanaName() {
return kanaName;
} | 0 |
36896765e9604c9390981810de302f47 | 0484284a91f8c3eea41645197daf2b63 | Creates a FileSystemWatcher for the specified directory path and
attach it to the specified event handler. | namespace ImageService.Controller.Handlers
public class DirectoyHandler : IDirectoryHandler
public void InitializeWatcher(string dirPath)
{
m_dirWatcher = new FileSystemWatcher();
m_dirWatcher.Path = dirPath;
m_dirWatcher.NotifyFilter = NotifyFilters.LastAccess | NotifyFi... | 1 |
46a534b3b208484dd3bd7811f19e5bed | 482c3806a8bbc1de46959187f12c128c | 设置分红状态 | class Coin extends Base
public function setStatus()
{
$data = input('post.');
if(empty($data['id']))return SKReturn("参数错误");
$users_coin = Db::name('users_coin')->where(['id'=>$data['id'],'hasFee'=>0])->field('id')->find();
if(empty($users_coin)){
return SKReturn("该数据不存在或... | 1 |
12898fd6facb6c165ed735783b5ef955 | 638e72b59e4b32df061039b978350a05 | # estimateur PWM pour les parametres de la GPD | dat<-d[j,c("y","r",paste0("x",1:4))]
mumod<-glm(y~.,data=dat,family=gaussian)
dat$r<-1;muhat1 <- predict(mumod,newdata=dat)
dat$r<-0;muhat0 <- predict(mumod,newdata=dat)
meanPT<-mean(muhat1-muhat0)
dat<-d[j,c("y","r",paste0("z",1:4))]
mumod<-glm(y~.,data=dat,family=gaussian)
dat$r<-1;muh... | 0 |
9cda7e256c9bbe0a21eaf3d5233abd10 | 725eb1eb1b057fdc0493ff8f90c6fcf3 | Convert DIB to Bitmap. | namespace TwainWeb.Standalone.App.Twain
internal sealed class DibToImage
public static Bitmap WithScan(IntPtr dibPtr) {
BITMAPINFOHEADER _bmi=(BITMAPINFOHEADER)Marshal.PtrToStructure(dibPtr,typeof(BITMAPINFOHEADER));
if(_bmi.biCompression!=0) {
throw new ArgumentException("In... | 1 |
83854c058bdd7dfb369b559fb08ecd03 | 81c8ee83837308f71d556ae213b6b53c | 文字列をダブルクォートで囲む。 | namespace LifeCalendar.Utils public static class StringExtension
public static String Quote(this String str) {
return "'" + str.Replace("'", "''") + "'";
} | 0 |
eaa66963e34a5f2059e2e5d4b1a799b4 | dfa86637d8bf7b700a36f718237f492e | get the MPU9250 configuration | {
uint8_t rawData[6] = {0, 0, 0, 0, 0, 0};
uint8_t selfTest[6];
int32_t gAvg[3] = {0}, aAvg[3] = {0}, aSTAvg[3] = {0}, gSTAvg[3] = {0};
float factoryTrim[6];
uint8_t FS = 0;
uint8_t reg;
uint8_t d[2];
I2C_HandleTypeDef* Handle = I2Cx;
uint8_t mpu9250_address = DataStruct->MPU9250_Address;
d[0] = MPU9250_SMPLR... | 1 |
2a56732277851ea7fec6d000e71d1d6a | 37845847b6cf58575b07e6501f77ce83 | 设置保留最近通知条数。 | class JPush
static setLatestNotificationNumber(params: {notificationMaxNumber:number}) {
if (Platform.OS == "android") {
JPushModule.setLatestNotificationNumber(params)
}
} | 1 |
dc1b73078ec60ce7e53e08da488aa54e | 4b630c598991c086c279dc4deea015f4 | PrettyJson marshals an object in a human-friendly format. | def PrettyJSON(obj):
return _json.dumps(obj, indent=2, sort_keys=True) | 1 |
59a0a4309a56886d93d589a9537d88be | bce09f766cee3666d69dd8bd56357b16 | 根据首字母来获取对应歌手信息列表 | @Controller("VideoController")
@RequestMapping("/kuke/dc/common/video")
public class VideoController extends BaseController
@ResponseBody
@RequestMapping("/getPersonByft")
public Object getMusicianByFirstLetter(Integer typeId,String ft, Integer pageNo, Integer pageSize){
if(StringUtils.isBlank(ft)){
ft = "A";
... | 1 |
06507f00bf819b20ea669cc9c17a7643 | f28f093d8f905484c41ca59e67e981c3 | Gets the first value in the array of all latest partitions | public class MappedPartitionUtil
public static MappedPartition getFirstMappedFile(final CopyOnWriteArrayList<MappedPartition> mappedPartitions) {
MappedPartition mappedPartitionFirst = null;
if (!mappedPartitions.isEmpty()) {
try {
mappedPartitionFirst = mappedPartitions.get(... | 1 |
b83dbb9d9da624a7cd2b03d6aca90a1e | 371a1d763267c87c56f46710f08583fe | Initialize the v1 api
/api/v1 | def create_blueprint_v1():
bp_v1 = Blueprint('v1', __name__)
user.api.register(bp_v1)
book.api.register(bp_v1)
return bp_v1 | 1 |
40c7728c4a47ad6d2f823fe91b8f1abc | a5785569323109692c493aff702047c8 | Hanning window. | def Hann(N,k):
return (1-math.cos(2*math.pi*k/(N-1)))/2 | 1 |
e1424f9be53688bba59518ad98c3a684 | 192715a26c012c79d46f9df299382efb | A* algorithm to find the shortest path between two generic points. | {
Node startNode = nodes[(int)startTile.Position.x, (int)startTile.Position.y];
Node targetNode = nodes[(int)targetTile.Position.x, (int)targetTile.Position.y];
List<Node> openSet = new List<Node>();
HashSet<Node> closedSet = new HashSet<Node>();
openSet.Add(startNode);
while (openSet.Count > ... | 1 |
6d767c7393fd598d2683890c9273d3af | fa4eef758ecf1bddc9c3a97c91fc0758 | switch between starting point and destination | updateStartPosition();
updateDestinationPosition();
if (isMapMode) {
switchToMap();
} else {
switchToManual();
}
} | 0 |
23ea5f1c1fb5a2a8e50ec5ec4baa3578 | d1bdfabe3d94db7d18399e981fa3830e | Returns the current sample unpacked, iterates to the next one | {
uint8_t x = (iter->samples[0] >> iter->shift_amount) & iter->mask;
iter->shift_amount -= iter->bit_depth;
if(iter->shift_amount > 7)
{
iter->shift_amount = iter->initial_shift;
iter->samples++;
}
return x;
} | 1 |
ae2bac908006c43a4d9c8a9526bd146d | d3a7821c0ed4b6263268d04ea045c0af | 生成日志分类的XML文件 | namespace N3C.Site.WebServ
public class MetaWeblog : XmlRpcService, IMetaWeblog
protected void GenCategoryXml()
{
XmlDocument xmlDOC = new XmlDocument();
xmlDOC.AppendChild(xmlDOC.CreateXmlDeclaration("1.0", "UTF-8", null));
xmlDOC.AppendChild(xmlDOC.CreateElement(null, "... | 1 |
99b95604d775790e725311e8c2bab8c9 | 57b9134e545141fe6624b0f65fca5e8d | 关闭主菜单 | public class UIManager : MonoBehaviour
public static void CloseFuncationMenu() {
if (FuncationMenu.activeSelf) {
FuncationMenu.SetActive(false);
isNone = true;
}
} | 0 |
647271fae2d77fbf21f57fedee92fb5d | e711c363e2184864d2a9478c9242d4c0 | Sets facility id. | public class FacilityAssignmentWrapper implements FacilityAssignment,
ModelWrapper<FacilityAssignment>
public void setFaciltyId(long faciltyId) {
_facilityAssignment.setFaciltyId(faciltyId);
} | 1 |
0fc12d4b9155ece3427e902b6906f2b7 | 3b46f697a11aa637dde441ba224c984e | Set which Match to use. This can be any positive number, indicating the exact
match to use, or <code>0</code>, which is interpreted as meaning random.
The number of the match to be used | @XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "userMatch", propOrder = {
"matchtype",
"matchvalue",
"matchwith"
})
public class UserMatch
public void setMatchwith(int value) {
this.matchwith = value;
} | 1 |
490ed3cfa39204d5db9c78751cf472e8 | c7383d591dd1815e640ee7c8e2c601af | Swaps the tiles at the two indices. | public class Board implements Serializable{
public void swapTwoTiles(Tile t1, Tile t2){
int tempVal=t1.getValue();
t1.setValue(t2.getValue());
t2.setValue(tempVal);
t1.setSelectedFlag(false);
t2.setSelectedFlag(false);
} | 0 |
354b193ab8c726464fb66ccea2189c3f | c26618cbb920f8bcbafea19d2b08188d | Converts it back to original format. | class SmartUnit:
def original(self):
return self.raw_number, self.raw_unit | 1 |
badc2a74a4a0ffa7960fca26a3d17d83 | b9e66e9e6eebc6aa94bd65bf73886c0c | 对于广播接收的数据做分类处理 | namespace CSharpVAST
public partial class Game : Form
private void ReceiveBroadcast()
{
while (true)
{
UInt64 from = 0;
uint size = 0;
IntPtr ptr = Vast.VASTReceive(ref from, ref size);
... | 1 |
739fdcbc3c4f5c2b931575b5c6c8ef8e | bb7ba2b4c57c1cfc0ae97859c64c5bd0 | Returns True if filter is applied, otherwise returns False.
Tries to find its argument(s) in request querystring. | if self.get_process_filter() is None:
return False
else:
return self.get_process_filter_re().match(value) is None | 0 |
eb5adb71c4a1c0f7a624f796e4b2c1de | 0c644b7929dbd2370c4105c46c0e0504 | Get clear title without tags | class Apnews extends Plugin
private function get_title(string $tags): string {
return 'AP News: '.str_replace(',', ', ', $tags);
} | 0 |
bad13179fa0e513d51279d7aee971b06 | c4a7b691ee686bd35d409d94fef4c369 | Returns the buy button | class GoodsDetailPage():
def buyButton_ele(self):
element=self.EO.find_element(('xpath','//*[@id="wmContainer"]/div[3]/div[2]/div[2]'))
return element | 1 |
e9371ea47b1840e8b493ab236077d344 | 4ab24616643a40fdb27e5c3a69c2489c | Adds the completed selected ballots to the aggregate ballots file. | {
string navigationParameter = "navParam?groupId=" + SelectedGroup.Id;
_navService.Navigate("AddAndEditBallot", navigationParameter);
} | 0 |
2de02b3262b8b14344031d7348ba531e | 1d24f9e11a7e013cc47a95c36f33b9a4 | Удаление вектора скорости и сопутсвующего текста, если таковые присутствуют | velocity_columns=[x for x in team.columns if re.match(r".*_vx$|.*_vy$|.*_speed$",x)]
team.drop(velocity_columns,axis='columns',inplace=True)
return team | 1 |
b14de47c2d3687bb121ea0eeb93aca8d | 3d0bfce49ed6cd31d5a7d14242e74ab2 | Function called from the MainMenu scene to continue the most recent save | void
MCMainMenu::continue_clicked(CCObject *aSender)
{
MCGameState::sharedGameState()->load();
MCSceneController::sharedSceneController()->loadSpawnScene(0.0f);
} | 1 |
91e6c16659a422a78cb827357fcbd3aa | 031ba517a215520b95d5563800a7fdd1 | bind threads to processes | {
pthread_t SampID,ProcessID1,ProcessID2,ProcessID3,ProcessID4,MonitorID,ProcessID5,ProcessID6;
struct sched_param param;
pthread_attr_t attr1,attr2,attr3;
pthread_attr_init(&attr1);
pthread_attr_init(&attr2);
pthread_attr_init(&attr3);
param.sched_priority = 99;
pthread_attr_setschedpol... | 0 |
fff785affb91d16a31206f2524ebfbcd | bb7130c166567d8124d088b5c6aff419 | > Test when no intersection between point and circle. | point_a = (0, 0)
point_b = (0, 0)
point_3 = (0, 0)
assert find_center_point_of_circle(
point_a, point_b, point_3) == (
None, np.inf) | 0 |
a75fe9b17ddb8cea9e1a0cf3462a6b92 | a6d7a8d3aaad7d9fe5cd658dbdbdef8a | Busca o menor elemento nas chaves das celulas da lista | class BinarySearchTree(object):
def min(self):
if self.isEmpty():
raise ValueError("min() foi chamado com arvore vazia")
return self.__min(self.__root).key | 1 |
bcec2ca89d5e408ce069ed75143357e1 | 26de923b828d81ef4d5b843a0d2095fb | Update form counters | {
$form = $this->getFormId();
$counter = isset($this->cache[self::COUNTER])
? $this->cache[self::COUNTER]
: [];
if (!isset($counter[$form])) {
$counter[$form] = [];
}
$count = isset($counter[$form][$field_name]) ? $counter[$form][$field_name] + $increment : 0;
if ($increment !== null) {
$counte... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.