query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
023403aa8bb49591cc69493c09ef5e11 | ce852b4f8934aba8d06f45efdc6f1a49 | @brief Convert RSSI to dBm | static int8_t rf_rssi_convert (uint8_t rssi_reg)
{
uint8_t RssidBm = 0;
RssidBm = ((rssi_reg) >> 1) - 118;
return(RssidBm);
} | 1 |
4df1ec605df5d36ad2c2a3a66a70afe3 | 609b6bdf9462e35d5c121fe9abda0303 | 开启分时信息的分析程序 | namespace FFPVideo
public partial class Video : VideoControl.Video
public void Analyze(bool open)
{
this.isAnalyze = open;
if (this.isAnalyze)
{
if (this.ThreadStartCruiseAndAnalyze == null || !this.ThreadStartCruiseAndAnalyze.IsAlive)
{
... | 1 |
de5d56fc83b8c9bc6c091a1c8cf99cf5 | 90307cea5e63e94030124866422b9f4a | Checks for missing prices in the history of prices | for (Pair<String, SkuPrice> skuPrice : skuPricesForOneSku) {
if (skuPrice.getSecond().getSalefrom() == null && skuPrice.getSecond().getSaleto() == null) {
allPrices.add(skuPrice);
return true;
}
}
return false;
} | 0 |
97a35c128ad196f72c6f5ab963e560c9 | 6f62a69dd8b5a6d3ae08f641c7cb0a3d | Initialization of OpenSAML Library | namespace sunlogin
public static class slapi
[DllImport(dllName, EntryPoint = "SLInitialize")]
public static extern bool SLInitialize(); | 0 |
0c0c0fe76275995df0d10553cf6c65c1 | ae657af06c1e4309cc8b191c13385c94 | 主键生成,yyyyMMddHHmiss + 6位随机数 | StringBuilder primaryKey = new StringBuilder(GlobalConstantConfig.UNIQUE_PRIMARY_KEY_PREFIX);
primaryKey.append(CommonUtils.defineDateFormat(System.currentTimeMillis(), "yyyyMMddHHmmssSSS"));
primaryKey.append(DefineRandom.randomNumber(6));
return primaryKey.toString();
} | 1 |
d7d34be8c4f5d5d493cd5720c17181b4 | fb698fb4627b4fac8b0203ba255194ae | Bu method Dinamik olarak, sadece ingilizce harfleri içeren bir klavye oluşturur. | namespace project_3
class kisi
public bool ingilizceMi()
{
return yabancidil == "ingilizce";
} | 0 |
db9ff27a13b9a93bef0fc1195e24a60e | e7e3d762b1ff67800d683c8b7b206f31 | RenderTexture转Texture2D | {
Texture2D tex = new Texture2D(rt.width, rt.height, TextureFormat.RGB24, false);
RenderTexture.active = rt;
tex.ReadPixels(new Rect(0, 0, rt.width, rt.height), 0, 0);
tex.Apply();
return tex;
} | 1 |
98f9ff4dbc1b53b6e4ac22ffda684192 | fc17fa65e7cfce56509cb155adc92a62 | Update all values in model to reflect selections in view widgets. This should be called before
the beginning of any MCMC run (or file save) to make sure changes are reflected in model. | self.Ep = self.Ep.get()
self.Em = self.Em.get()
self.Ez = self.Ez.get()
self.Bp = self.Bp.get()
self.Bm = self.Bm.get()
self.Bz = self.Bz.get()
self.Jp = self.Jp.get()
self.Jm = self.Jm.get()
self.Jz = self.Jz.get()
if self.use_pml:
... | 1 |
76251cff11b2384e72ae2bcefe3e4587 | 2ba027d9dd29812b983c73ca51c4cc31 | Verifies that requests for too large or too small ones are refused | class CS531A4(HTTPTester):
def test_large_range_not_satisfiable(self, report):
self.check_status_is(report, 416)
self.check_payload_empty(report) | 1 |
5a0b0fab87848534a7c45a593b3b7bd2 | 57d21972c228f65fbeaf737afb645a22 | 更新置顶到期的帖子 | $check = $this->actionInit ( 'allow_all_tip' );
$commend = intval ( $_POST ['commend'] );
$topic = $check ['topic'];
$tid = $check ['tid'];
if (count ( $tid ) < 1) {
$map ['tid'] = $tid;
} else {
$map ['tid'] = array ('in', $tid );
}
switch ($topic [0] ['top']) {
case 0 :
$top = 2;
brea... | 0 |
bb3d6e253fcb70c6b0b3927eea207447 | 59ee780547e35aa1f820665688661cfb | checks the position of the player to see whether or not the cached entities should
be updated | namespace ShakyTrackerCore
public class CacheCore : IDisposable
public void QueuePlayerForUpdate(long id)
{
bool queued = Task.Run(() => PlayersToUpdate.Contains(id)).Result;
} | 0 |
010b40d7d199f7b8eeb9519fbd35b43b | b581d2013da522690ac819b057e89bca | Edited from https://stackoverflow.com/a/2409054 | let result = '';
while (true) {
if (!haystack.length) {
return result;
}
const index = haystack.indexOf(needle);
if (index === -1) {
result += haystack;
return result;
}
result += haystack.substr(0, index);
... | 1 |
ea77e044373eb2dc8a7e287c69525233 | f5792137783c1c91d081cb0cd713bc1b | 将权限的DataTable转成二维数组 | {
List<Permission> list = null;
using (dr)
{
if (dr.HasRows)
{
list = new List<Permission>();
while (dr.Read())
{
Permission model = new Permission();
... | 0 |
b5082aff84494eb188cf3bd68a36d635 | 979495505b22e444688e0da063448090 | 向指令流中写入1字节 并返回写入的索引 | public virtual long Write(ushort value)
{
var before = _writer.BaseStream.Position;
_writer.Write(value);
var after = _writer.BaseStream.Position;
return
after - before;
} | 0 |
faf79d399da8781cfd1ff917fb31b37c | 3e7fec1a9df903942589c7b68ad21775 | 对每一组数据进行上报,上报成功就清除对应的缓存,不成功就等下次触发批量发送时再上报 | SparseArray<ArrayList<AppLogBean>> groupArray = divideGroup();
if (groupArray.size() > 0) {
for (int i = 0; i < groupArray.size(); i++) {
ArrayList<AppLogBean> typeList = groupArray.valueAt(i);
if (typeList != null) {
if (mFlushListener != ... | 0 |
3cc08f7ecd4166fd1a1bbf65434289e9 | 71c2c3e7788b6d31d96b8df6129a0e60 | получить список названий параметров для данной подгруппы | def getFields(dictGroup):
parameters=[]
for i in dictGroup:
parameters.extend(i.keys())
parameters=list(set(parameters))
return parameters | 1 |
5dad7ff1889a7f1a571e1e6244839de0 | 657cfd0a4b7d54b8e327f61f0bdf8454 | convertToTimeSeries
Converts the given file to an array of floats.
The array itself represents the time series data. | rawList= []
resultList= []
for colCnt in xrange(0,len(columnList)):
resultList.append(rawList[:])
lineCnt= 0
headerLines= 2
try:
tssFile= open(tssFileName)
lineCnt= 0
try:
for line in tssFile:
if header and lineCnt < headerLines:
if lineCnt == 1: headerLin... | 1 |
255e0c701fb35a6a6cd99075169a454a | 006da7c7814c5de24bf310ca6b2e4313 | @brief 获取entry所在的路径 | class CacheBusterService extends BaseApplicationComponent
public function entrypath()
{
return $this->settings->getAttribute('entrypath');
} | 1 |
56969ec8cfc7382306bb78c0f13452b2 | 273d93570d8066f6994b1af955fcc13b | 获取所有部门以及所有该部门下的用户人员 | PageData reslut = new PageData();
try {
List<PageData> datas = new ArrayList<PageData>();
List<PageData> deptList = deptService.listAll(null);
for(int i=0; i<deptList.size(); i++){
PageData dept = new PageData();
dept.put("nocheck", true);
dept.put("name", deptList.get(i).get("DEPT_NAME"));
... | 1 |
bb4ab963f6fb2625fd9950bcc43f256b | 3a81dacde2aef3612bdf53144933911f | 对List进行Linq分页 | namespace BasisFrameWork.Extension public static partial class LinqExtension
public static IEnumerable<TEntity> PageBy<TEntity>(this IEnumerable<TEntity> source,int skip=0,int take=10)
{
return source.IsNullOrEmpty() ? source : source.Skip(skip).Take(take);
} | 1 |
af35e490e93ac0303139cc78ae500a74 | 0678557689e3e566de1cb2490d31eeb4 | @brief Optimized function for checking channel enable status en masse with less round trips to the scope | METHOD(channel_is_enabled) {
ASSERT_ARGC(1)
struct iio_channel *cha;
ASSERT_EXTERNAL(args[0], cha)
bool flag = iio_channel_is_enabled(cha);
napi_value result;
ASSERT(result, napi_get_boolean(env, flag, &result))
return result;
} | 0 |
f20a73db8803cca9342794b1940013e6 | c27c9189c6383595b4ccf1ede3a15796 | 根据Example条件更新实体`record`包含的全部属性,null值会被更新,返回更新的条数 | public int updateByExample(T record, Object example); | 1 |
3f330ef22963c6075b135d9a42017dd4 | d9d891ea00b24d2bb241012b2ed5478d | Get the center point of the tank (anchor/pivot center) | return {
x: this.body.position.x - this.width / 2,
y: this.body.position.y + this.height / 2
}
} | 1 |
92071e86731c2771528b78761398686a | 525dc4e2afd11fa72d91fd5c519b0c2d | Verifies whether pathA is a subdirectory (or the same) as pathB | namespace CapuchinSync.Core.Interfaces
bool IsSubPathOrEqualTo(string directoryFullPath, string possibleSubPathFullPath); | 1 |
a690b1edb33dc65ca9c111e057b9ca32 | cbe8da06683f92ce018881b0f56375c8 | Widget's color getter. | class PyDMByteIndicator(QWidget, PyDMWidget):
def onColor(self) -> QColor:
return self._on_color | 1 |
58331262c4f99364899139565bc6d091 | fc51aba87a7ef02756cf4ca43932f7f6 | 学生端 PK对手信息列表 | public List<Map<String, Object>> getNetStudentList(NetParams para) {
List<LinkedHashMap<String, Object>> studentList = this.studentServer.getPageStudent(para);
if (studentList == null) return null;
List<String> outArray = new ArrayList<>();
for (LinkedHashMap<String, Object> map : st... | 0 |
7dfa983781f4bafef4f680f8f285e237 | f380d17f9a772ab46a1a9ef0bb075e44 | Maximum (ink) height of accent base that does not require raising the accents. | class Phonetic(object):
def accent_syllable(self, word):
default_accent = (self.syllables_count(word) + 1) // 2
return self.accents_dict.get(word, default_accent) | 0 |
a332f0e89013b306f21ff5e5f2398dfe | 534558390e43bc369c84a099003812cd | 한 번에 읽을 수 있는 데이터의 크기이다. | class Node
get readDataSize() {
return this._readDataSize;
} | 1 |
43c7e0dcd5ea276abbf295a1abe763cc | 8616e3fa3d1a798c0f33e41a81273099 | 获得界面的url或匹配规则的id | class Url
protected function getRuleUrl(array $rule, array &$vars = [], string|bool $allowDomain = ''): array
{
$request = $this->app->request;
if (is_string($allowDomain) && !str_contains($allowDomain, '.')) {
$allowDomain .= '.' . $request->rootDomain();
}
$port = $requ... | 0 |
a7d49a345142bb823b611ab987d6b746 | cd80f90527dc864bd107be65c809076a | Sets the last_px of this OrderSummary.
The executed price for the last fill # noqa: E501 | class OrderSummary(object):
def last_px(self, last_px):
self._last_px = last_px | 1 |
6203e9fb512314529b318b8caee97d1b | c0a1b5335f865a9c8e5a0c46b29c7e7a | Retrieves the window handle to the active window attached to the calling thread's message queue.
Note: <see cref="GetActiveWindow"/> will only return if the calling thread is in focus. | namespace Vsip.VsPackage
public class EditorPane : EditorForm,
IVsPersistDocData,
IPersistFileFormat,
IOleCommandTarget,
IVsWindowPane,
IVsDocDataFileChangeControl,
IVsFileChangeEvents
[DllImport("user32.Dll")]
static extern int GetActiveWindow(); | 1 |
9172b82818f914e44463ca45012a1db5 | 2d3fe0efa565f456e84614d83ed8c38e | проверка, выходят ли эти координаты за размеры игрового поля. | namespace lab6
class OldFunctions
public static bool out_of_PB(int x, int y, ref Bitmap bmp)
{
return x <= 0 || y <= 0 || x >= bmp.Width || y >= bmp.Height;
} | 1 |
8d89e1c33927f02649b814895270bc2f | 694e493608ac661005938733a1a7b344 | Initialize deviceId with developer provided device id in configuration or with Random generated Id and Cache it. | namespace Box.V2.Config
public class BoxConfigBuilder
public BoxConfigBuilder SetDeviceId(string deviceId)
{
DeviceId = deviceId;
return this;
} | 0 |
10d1eb89784533fe026d5da63fa3a6e5 | 56f42ed0b8f184454ae1a34e0d962d48 | 复制站点 | {
if (!isset($params['id']) || intval($params['id']) == 0) {
return array('error' => _e('Site Info Id Needed', true));
} else {
$siteinfo = SiteInfo::find($params['id']);
}
if (!isset($params['new_site_url']) || empty($params['new_site_url'])) {
re... | 1 |
0f67032f03adb7cc7b63a23035c0fef7 | c5f2b5c45faf90184fab6b20d7e19dd2 | Returns the Translated Level3 ProductCode from the Sku Group | String pf = StringUtil.checkVal(row.get("Product Family"));
if (pf.length() > 0) return pf;
pf = StringUtil.checkVal(row.get("SOUS - Product Family CMF"));
if (pf.length() > 0) return pf;
pf = StringUtil.checkVal(row.get("SOUS - Product Family Spine"));
if (pf.length() > 0) return pf;
pf = StringUtil.chec... | 0 |
e909dc056ddd45d711ec7610a9ea507c | 94eda03ea287233fdfc06874780dd658 | - get(key) - поиск и извлечение значения по ключу, или None, если ключ не найден. | class FIFOCache(BaseCaching):
def get(self, key):
if key is None or self.cache_data.get(key) is None:
return None
if key in self.cache_data:
res = self.cache_data[key]
return res | 1 |
2ccd80d9329c0c852648cfb9585a4038 | c06b257d1b8b8f99d5c1d30276fa3e04 | Fetch a JSON representation of an entity by its name. | public abstract class NameEntityService<T> extends EntityService<T>
public T fetch(String name) {
return dao().fetch(getEntityClass(), name);
} | 0 |
f2eee89da9a985a0a44018e3cec75750 | e8084c3632dc58f9a42a9941e0057e3c | # Transformer based classifier model | network <- keras::keras_model_sequential()
network %>%
layer_dense(units = 64, activation = "relu", input_shape = dim(train_cell_data)[2] ) %>%
layer_dense(units = 32, activation = "relu" ) %>%
layer_dropout(rate = 0.1) %>%
layer_dense(units = 1, activation = "relu")
network %>% keras::compile... | 0 |
44d002628bb6407b9a936c71363f1307 | 1444f053fbeb746f5836c76e8a9ba1db | Página de cadastro de nova equipe | class EquipeController extends Controller
public function create()
{
return view('equipe.add');
} | 1 |
d5c0aab5822e0763dcfc09f0c71ee15a | 9f0778e22329350a5c95a2f25fb9d9f8 | 绘制boss血量条 | function FightTouchPad2:InitBossBar(monster)
if self.mBossBar then
return
end
local name = getDictionaryText(monster.mRoleData.mInfoDB.Name)
local headpath = DB_ResourceList.getDataById(monster.mRoleData.mInfoDB.Monster_Icon).Res_path1
self.mBossBar = WidgetProgressBarBoss.new(headpath,name,... | 1 |
27979a98c39713168dc80e5de8dd0aea | 10b50b018b1ce950d30ee50597cee37e | 将timestamp转换成本地时间 | func time1() {
datetime := "2015-01-01 00:00:00"
timeLayout := "2006-01-02 15:04:05"
loc, _ := time.LoadLocation("Local")
tmp, _ := time.ParseInLocation(timeLayout, datetime, loc)
timestamp := tmp.Unix()
fmt.Println(timestamp)
datetime = time.Unix(timestamp, 0).Format(timeLayout)
fmt.Println(datetime)
} | 1 |
3398197823874305544ead3400ec84b1 | aab6a3463daff8f645609ffecd84e0e7 | A framework with an invalid modifier should fail. | obj = self._run_create_op()
op = Operation(constants.kOperationModify,
obj,
[])
with self.assertRaises(ElementsError):
op.runAsTest([],
SimpleArguments(config_component="",
... | 1 |
5b58f8ef3a7bf922ed010d346e0f4447 | 4f86ead3571f5cd1bbd9141de95aedc7 | open link to create account for teacher | public class TutorOrStudent extends BaseActivity
@OnClick(R.id.btnTutor)
public void onTutorClick() {
showLoading();
Map<String, Object> user = new HashMap<>();
user.put(KEY_ACCOUNT_TYPE, TYPE_TUTOR);
getFirebaseStore().collection(getString(R.string.db_root_all_users)).document(getFi... | 1 |
c1c6bb2fc414bc3403cdf97b58840408 | 8a09e842b3b7e76b9ec75ae9cc62e60e | 移除专家组内专家成员 | namespace MyWork.WebSite.Controllers
public class ActivityController : BaseController
[HttpGet]
public JsonResult RemoveExpert(Guid ExpertGroupId, Guid ExpertId)
{
return Json(this.ActivityService.RemoveExpert(ExpertGroupId, ExpertId), JsonRequestBehavior.AllowGet);
} | 1 |
fe8058fb1c67135e1e4f712a42458591 | a6e3ce4dc7635a9b7d283900a281cc02 | 役職配布 | String result = ERROR;
WeeklyEarningsIndicateDAO dao = new WeeklyEarningsIndicateDAO();
figureList = dao.distribute("フィギュア・人形");
brockList = dao.distribute("ブロック");
playHouseList = dao.distribute("ままごと");
programmingList = dao.distribute("プログラミング");
result = SUCCESS;
return result;
} | 0 |
fdb94d794b540e9f90c7bb2f33e3513c | 68f91fbec64d877cee2baac78c484dd2 | Returns true if the generator should map all primary key columns as
ObjAttributes. | public final class EntityColumn implements Comparable<EntityColumn>, Serializable
public boolean isAutoAssignKey() {
return this.isPrimaryKey() && GenerationType.AUTO.equals(this.getGenerationType());
} | 0 |
a02385825ff654347982872dd7aa1517 | f863cd20f782f2f4551a98667eb9704f | 监听checkbox的开关事件并存储起来 | if (props.target.checked) {
filters.push(props.target.name)
}
else {
var index = filters.indexOf(props.target.name);
if (index > -1) {
filters.splice(index, 1);
}
}
} | 1 |
b082aaccb561e23e124074570e7e5c2c | f3d5679af14202362d008ab5639e87cb | # sparse piecewise constant | Cnextp <- function(m,C,M){
mtp1 = M[,ncol(M)]
ctp1 = C[,ncol(C)]
c = rep( 0, length(m) )
end = length(mtp1)
iAbove = m >= mtp1[end]
slopeAbove = ( ctp1[end]-ctp1[end-1] ) / ( mtp1[end]-mtp1[end-1] )
c[iAbove] = ctp1[end] + ( m[iAbove]-mtp1[end] )*slopeAbove
iBelow = m <= mtp1[1]
slopeBelow = ... | 0 |
6aba3c02cebc0fdd0a225054e73d8cbb | 07ed809ceafc5b9ccb676fcfdfc81849 | Instantiates the wide&deep Network architecture. | super(WNet, self).__init__()
self.encoder = UNetEncoder(num_channels=num_channels, num_classes=num_classes)
self.decoder = UNetDecoder(num_channels=num_channels, num_classes=num_classes) | 0 |
b0a75867829c449ce31f4a9d4ff0d3c1 | c370115f85b8b41c00ad64ef4a6e4f31 | Color (interpolated) scaling: 2x upscaling | D3DXCOLOR CHeightMapGridMesh::OnGetColor(int x, int z, void* pContext)
{
D3DXVECTOR3 d3dxvLightDirection = D3DXVECTOR3(-1.0f, 1.0f, 1.0f);
D3DXVec3Normalize(&d3dxvLightDirection, &d3dxvLightDirection);
CHeightMap *pHeightMap = (CHeightMap*)pContext;
D3DXVECTOR3 d3dxvScale = pHeightMap->GetScale();
D3DXCOLOR vIncid... | 0 |
1868115a0fbaf9025d7a16de0904cee3 | 62e1cd70cfab8f1d14fe483706988e18 | Skip to 10 seconds in the current song | namespace MediaPlayer
public partial class MainWindow : Window
private void Click_Skip15Sec(object sender, RoutedEventArgs e)
{
MediaE.Position = MediaE.Position.Add(new TimeSpan(0, 0, conSkip));
} | 0 |
e624b71adaf4b2961ee6a8bd37cbf1dd | c60b510a1e250031e45307eac8622545 | Test case for data_context_namevalue_name_get | class TestTapiPathComputationController(BaseTestCase):
def test_data_context_path_computation_context_pathuuid_namevalue_name_get(self):
response = self.client.open(
'/data/context/path-computation-context/path={uuid}/name={value-name}/'.format(uuid='uuid_example', value_name='value_name_example'),
... | 1 |
463141cc7d8bd306b65d918dd1268f78 | dbb5601dddc3fcc231e5f79c9cb1f2f1 | CHOICE 5 | if (document.getElementById("answer2-button").checked){
correct_answer++;
}
if ((document.getElementById('answer1-button').checked == false) && (document.getElementById('answer2-button').checked == false) && (document.getElementById('answer3-button').checked == false)){
document.getElementById("error_msg").inner... | 1 |
1636a13d741f7924deeebb2c4103e072 | 40833f06b97484b17864a7e0e3ca60d7 | Agrega una accion a este paso. | public class Command : MonoBehaviour
public void AddAction(IActions addedAction) {
actions.Add (addedAction);
} | 1 |
4d4492afd1faedd781fd1a083df7d0a4 | 97e052bf0d3cb8f1701aefe0320af686 | This function takes an input string - likely from gatherer itself - and converts mana symbol-tags to curly-bracket notation | $new_text = str_replace( '{\+', '\[\+', str_replace( '+\}', '+\\\\]', $text ) );
$new_text = str_replace( '{', '[', str_replace( '}', ']', $new_text ) );
$new_text = str_replace( '\[', '{', str_replace( '\]', '}', $new_text ) );
return MLAData::mla_parse_template( $new_text, $markup_values );
} | 1 |
288307b018c917d2043744c1a3488af7 | d53725f2d6ff1b94d1ee2ed84a02d5d6 | Unit test driver. | int main(int argc, const char * argv[]) {
Utilities utilities;
Driver driver(&utilities);
try {
for (int i = 1; i <= 3; ++i)
driver.testFile(to_string(i));
}
catch (const exception& ex) {
if (utilities.debugStream) {
utilities.debugStream << "Exception:" << ex... | 1 |
561f784dd327cd3a8f760c795b4a96cd | aeb208c6b084f563549f5f1e22ad97eb | 取相对webroot的文件存储路径,每个块记录用独立的目录存储上传文件,删除记录时需要连同目录及文件删除
目录规则设id=abcdefghi,存储路径:BASE_PATH/abc/def/ghi ID长度不足前面补0 | public class FileUploadServiceImpl implements FileUploadService
protected String getFilePathDefault(long uploadId) {
int dir = (int) (uploadId % 256);
StringBuffer sb = new StringBuffer(fileUploadConfig.getSavePath());
sb.append("/").append(dir).append("/").append(uploadId).append(".").append(fileUploadConfig.get... | 0 |
0cd74d2794b2b469ada44bde9c643ec8 | 05fbaa18df40e9f5cbe158535a902d6b | 删除离职人员回访记录api | {
if (Request.HttpMethod == "POST")
{
Response response = new Entity.Response();
if (data != null)
{
Request<int> request = new Request<int>();
request.Data = data.JID;
request.Req... | 1 |
6b21f9ea7bac731234cf95217a881d63 | 719097ec113e7959305c4866e72ab9aa | If the input data is already demultiplexed before upload to MMEDS it will provided as a zip.
This step is for unzipping that archive to prepare for import into Qiime. | {
mJobParams.AddAdditionalParameter("runtime", "Tool", "Sequest");
var mageObj = new MageAMFileProcessingPipelines(mJobParams, mMgrParams);
RegisterMageEvents(mageObj);
var sql = GetSQLForTemplate("JobDatasetsFromDataPackageIDForTool", mageObj);
OnDebu... | 0 |
c46f049bf9e6319f9a23c526bcd0d395 | 12c2427fdcef2c639fe09ed638b62272 | 拷贝wap图片 | $_c = file_get_contents($p_url);
if (isset($_c) && strlen($_c)>0)
{
$_p = dirname($p_imgFilePath);
if (!is_dir ($_SERVER['DOCUMENT_ROOT'] . $_p))
{
@mkdir ($_SERVER['DOCUMENT_ROOT'] .$_p, 0777, true);
}
try {
... | 1 |
024b8636b2f0502a242caa73bae3b9b7 | 87314507018c165f1779ef30068244b6 | Является ли данное исключение прерывающим поток | namespace ETACO.CommonUtils.WinService
public abstract class ServiceWorker
public bool IsInterrupt(Exception e) { return (e is ThreadAbortException || e is ThreadInterruptedException); } | 1 |
1bebc4c0e880b4535f5f01337d5e4ce1 | 92a9c9be8886edde463115937ff2e505 | 指定のカテゴリ ID を再スクレイピングして表示する | var articles = _articles[category_id];
if(articles == null){
$.ajax({
url: '/v1/article/all',
type: 'GET',
data: {'category_id': category_id},
success: function (data) {
_articles[category_id] = {};
for(var i in data.art... | 1 |
ca2e7a1b92a785d40c0610266ab23b4d | 83d0a9095a1950d48a218711aade611a | Callback method from {@link MainInfoListFragmentControl.Callbacks}
indicating that the item with the given ID was selected. | public class TodoListFragment extends DIListFragment implements
LoaderManager.LoaderCallbacks<Cursor>
public void onItemSelected(Uri id); | 0 |
3eb082ba2a75b401848d8f95d66e3382 | 184f6c3aeaf9d65a2ea1b213b3d364eb | Funzione per la creazione della lista dei biglietti acquistati | hideError("");
const heading = document.querySelector('#heading');
heading.style.display = 'table-row';
const flightTable = document.querySelector('#flightTable');
const flightRow = document.createElement('tr');
flightRow.style.backgroundColor = 'rgba(13, 40, 121, 0.856)';
flightRow.style.co... | 0 |
e716b14116536c00de378690014bd36a | 31e6de5a728a843a6ee9e8c2e3c9015c | Scrape the articles from a given list of categories on the NOS website. | response = self.__request_web_page()
soup = BeautifulSoup(response.content, features="html.parser")
article_table = soup.find('div', class_='articletable')
self.__scrape_table_column_headers(article_table)
self.__scrape_table_rows(article_table) | 0 |
f1b3d0e8a0f6d5e5d5b73098ca644307 | 384e9078e9cdbe017dc842db640e2586 | 显示,可以传入单个或者数组 | var param1;
if(arguments.length < 0){
return this;
}
param1 = arguments[0];
param1.show();
} | 0 |
95a729cb1a9fb0d99026b2c9ce0a1129 | dd97c19d8e89ad2fe398638b767fd2c1 | Transform every trace in the log file, which is represented as a json,
in a array that we will have easy access to times for every event in a trace
and the sequence of these events. Also uses standarization to transofrm
the time values per activity. | activities_all = log_attributes_filter.get_attribute_values(log, "concept:name")
activities=list(activities_all.keys())
dataVectors=[]
sequentialData=[[] for i in range(len(log))]
for outerIndex,trace in enumerate(log):
times=[[] for i in range(len(activities))]
previousTime=trace.at... | 1 |
21112e563ccb904cdf6dd876470d2bd6 | ef346eeb9ea5f2f2ca2aff1bbb8c37b3 | Tests Linear 32-bit stream writing | public async Task WriteLittleEndian()
{
await AssertWriteLittleEndian32(new byte[] {0x78, 0x56, 0x34, 0x12}, 0x12345678);
await AssertWriteLittleEndian32(new byte[] {0xf0, 0xde, 0xbc, 0x9a}, 0x9abcdef0);
await AssertWriteLittleEndian64(
new byte[] {0xf... | 1 |
851ae3589e744be6ef5960815fa0f1cb | a86af105f7c99b77120d98cb01b53497 | 잎 그리기 | void start()
{
int x, y, i;
for (i = 0; i<30; i++)
{
x = i;
for (y = x; y<R - x; y++)
{
setfillcolor(BROWN);
fillrectangle(x*SIZE, y*SIZE, x*SIZE + SIZE, y*SIZE + SIZE);
}
x = (R - 1 - i);
for (y = i; y <= x; y++)
{
setfillcolor(BROWN);
fillrectangle(x*SIZE, y*SIZE, x*SIZE + SIZE, y*SIZE + ... | 0 |
dc600708b82ab46e3a65e34ec9f2ae8c | 791dbd5e7ff71e0fe367a84f2a67b27d | 委派日期元件事件 | {
if (getCfg(CBox_Date.SelectedIndex))
{
CBox_Copy.Enabled = true;
Btn_Copy.Enabled = true;
}
} | 0 |
f326b67558ac0cee145a2b88e5961f70 | 1e9a77cc2660b5c050f244bb529ef655 | 添加学校荣誉 | mHonorLayout.removeAllViews();
if (null == mHonorLists || mHonorLists.isEmpty()) {
addSingleAddBtn("+ 添加荣誉", mHonorLayout, mHonorTag);
return;
}
for (int i = 0; i < mHonorLists.size(); i++) {
EducationBGBean educationbg = mHonorLists.get(i);
RefersBean bean = new RefersBean(educationbg, i, mHonorT... | 1 |
495518da349a4d76011afa2be8bbd9b2 | 35c81c021f99678381d19cc79cdb2393 | Método para imprimir Contrato | {
$contrato = Contrato::find($codContrato);
$usuario= User::find(Auth::user()->id);
$html = View::make('layouts.documento',compact('contrato','usuario'));
return PDF::load($html, 'A4', 'portrait')->show();
} | 1 |
bb8186345d0c4b6196e22667d6e512d5 | b433329a0bfd013bff4d420c6953eb63 | Удаление задачи (и подзадач, если есть) | function DeleteTask(t) {
let id = t.parentElement.parentElement.getAttribute("id");
if (id !== null) {
let subtasks = t.parentElement.parentElement.parentElement;
let s = null;
if (subtasks !== null) s = subtasks.querySelector("#" + id);
if (s !== null) subtasks.removeChild(s);
} els... | 1 |
d9e31a0861bc335d5f9f1febea644fc1 | e6fd51cba1db2e2afc896153df6db2ca | 颜色面板隐藏 | public class Tab3View extends ViewDelegate implements AnimatorUpdateListener,OnItemClickListener{
public void shadehidden(){
condtion_status=0;
ValueAnimator setDuration = ValueAnimator.ofFloat(alpa_float,0.0f).setDuration(alpa_anim_durtion);
setDuration.addUpdateListener(this);
setDuration.start();
} | 1 |
eb45691368172a426142eadbae9ff148 | 90e835917306616a9c7fe2d21044b16f | convert RC_STRINGLIST to a lua table on the stack | {
int top = lua_gettop(L);
KVType *kvt;
size_t kl, vl;
unsigned int nkey, nval;
char *temp;
void *uval;
lua_Number number;
size_t i;
int ret;
const char *cur = (char *)src;
const char *end = cur + *size;
#define ERROR_RETURN(code) do { *size = cur - (const char *)src; lua_settop(L, top); return code; } while... | 1 |
791f3f69f0ff4971d5e9e20e763154d8 | e4b2d7665ee12f7d1ea09c9df7c54747 | 回复高级搜索 | class Company_Model extends Basic_Model{
function high_search_company($keyword='',$pid_com='',$cid_com='',$xid_com='',$business='',$product='',$exb_business='')
{
$where = " where ";
if(!empty($keyword))
{
$where .= "name like '%".$keyword."%' or tags like '%".$keyword."%' and ";
}
if(!empty($exb_busines... | 1 |
999eda5f16b0184c354c1e292eedfd83 | b0e5d5d64fff2435c9491078bf8bbb72 | Destroy an lldp neighbour | nm_lldp_neighbor_unref (NMLldpNeighbor *neighbor)
{
g_return_if_fail (NM_IS_LLDP_NEIGHBOR (neighbor));
if (--neighbor->refcount == 0) {
g_hash_table_unref (neighbor->attrs);
g_free (neighbor);
}
} | 1 |
36eafb12014ecd5708452205bdddcab4 | 30eba742348d2a18d34b2d3afd30849c | calculates the fourth power of a given value | {
if (!is_numeric($i)) return 0;
return $i * $i * $i;
} | 0 |
1d58e01656501774daf1ca806f5038f0 | cd5662aee48a5138cd197f2fe2963cb2 | 测试传统实现类的方式 | public void test() {
UserServiceImpl userService = new UserServiceImpl();
userService.defaultMethod();
UserService.staticMethod();
} | 1 |
30c3dd7869e0dec7b58f6fb900bc9c84 | 38a3f1e5f841e3b8ad65a5b4fdffc845 | Unset default page flag on all other items on the tree | class Page(mixins.TranslatedMixin):
def save(self, *args, **kwargs):
if self.is_default:
query = self.__class__.objects.all()
if self.pk:
query = query.exclude(pk=self.pk)
query = query.update(is_default=False)
return super(Page, self).save(*args, **kw... | 1 |
156feb138b95f9951ff8732ecdc086ec | 59bd142fedba68f347df5ef63bfde947 | Get the number of times a task resubmitted itself. | class Task
def submitted_count
self.user_tasks.count
end | 0 |
b820079ca997d7638efc2ce5fd59c5f9 | 0ec42f1b3ce9a4dab4621abc14b6b87c | List the forum replies for a person | {
$this->db->select("*");
$this->db->from("forum_reply");
$this->db->join("forum_topic", "forum_reply.topic_id = forum_topic.id", "");
$this->db->where("forum_topic.cat_id", $id);
$this->db->order_by("forum_reply.reply_date ASC");
$this->db->group_by("forum_topic.id");
$this->db->limit($max_threads);
... | 0 |
c99758bd7282ca325041e5a88c420c44 | 8df7bfa480c87833fbfe9b0c5d1649b3 | Calls into Numba jitted code and propagate error using the Python
calling convention. | class numpy_call_wrapper(abc.ABC):
def __call__(self, *args, **kwargs):
array_lib = self.get_awkward_lib(*args, **kwargs)
if array_lib is awkward:
return self._call_awkward(*args, **kwargs)
elif array_lib is dask_awkward:
return self._call_dask(*args, **kwargs)
el... | 0 |
23d44d05c37ee502a128722f416770b2 | e5fec1538a0bd369f2ed32012a7961f7 | Get a Vector2 for how the player should move | {
Vector2 movementInput = new Vector2(Input.GetAxisRaw("Horizontal"), Input.GetAxisRaw("Vertical"));
movementInput.Normalize();
return movementInput;
} | 1 |
ff37df69cc1a209f24fedef2f38d8f6d | a23ec35efe37fb163f3fd2f4168fe0f0 | Returns an estimated byte size for this decoder based on the data provided to {@link
#setData(GifHeader, byte[])}, as well as internal buffers. | public int byteSize () {
if (changedData) {
byteSizeUpdate();
}
return byteSize;
} | 1 |
e448d3c295a585dcd7b899a53e491c85 | d0ba001a26ccf9490a1356f555cd8402 | Initiates destruction animation of tile which leads to the object being destroyed | public class BrickDestructionAnimation : MonoBehaviour
public void requestDestructionAnimation ()
{
executeDestructionAnimation = true;
} | 1 |
804a7b79db4662046ef36af8e9bbe628 | 72a1c9ca675e448f9eecfd47f2a14ead | 三角形雷达图 | export default class spatialQueryLayer extends baseLayer
drawRadar(iDeg, ctx, obj) {
ctx.save();
let piex = obj.piex_center;
let radius = obj.piex_radius;
ctx.translate(piex[0], piex[1]);
ctx.rotate(iDeg / this.rotate * Math.PI);
for (let i = 0; i < 270; i++) {
... | 0 |
a90073c3045f7c83c30d2e665ba7e6c6 | 965ee03b554dfd6bdedc99ca8568d544 | Liefert eine Auflistung aller Galaxie Objekte | public class Galaxy : MonoBehaviour, IBreadthFirstSearchInterface
public List<GameObject> getListOfPlanets() {
List<GameObject> planetList = new List<GameObject>();
for (int i=0; i<listOfPlanets.GetLength(0); i++) {
for (int j=0; j<listOfPlanets.GetLength(1); j++) {
planetLis... | 0 |
51f92f4c497c63a9e357fb58c1f7cdec | d6cb6ff6a20b992770aeab7ce4900b5b | Assign class member pointers to incoming memory addresses. | void dsa::BilateralFilter::init() {
d = &d_;
sigmaColor = &sigmaColor_;
sigmaSpace = &sigmaSpace_;
borderType = &borderType_;
} | 1 |
00705fd819977c403c376a05dff597c9 | bff8e67b318dd3d136fbb0b970b8244b | Notifies the service to re-send the confirmation email that was sent when the account was
first created. If successful, the service will send an email to the specified email
address using the template provided, or the default template if none was specified. | namespace FortuneLab.WebClient.Service.API
public class AccountApiClient
public static ApiResponse<string> ResendConfirmEmail(string email, Guid? userId = null)
{
var query = new CoreQuery() { ParmsObj = new { email, userId } };
return ApiClient.NExecute<string>(ApiUrl, "accounts/acc... | 1 |
c04c05e83dab6df67ed879645670fa81 | 599f17cc38167407380d406d7c5e3701 | https://github.com/jpscaletti/base36/blob/master/base36.py | def to_base_64(input_as_bytes):
alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
padding = len(input_as_bytes) % 3
input_as_bytes += b'\x00' * padding
groups = [input_as_bytes[i:i+3] for i in range(0, len(input_as_bytes), 3)]
b64_list = []
for group in groups:
... | 0 |
1c7a58cdd21d8a93ef301aef749bb6c5 | 8d26822a7b01a3eba9543a329af20248 | Implements a constrastive loss using intra batch
negative mining. | class Retriever(tf.keras.models.Model):
def call(self, contexts, responses, labels):
contexts_out = self.outputs_contexts(contexts)
responses_out = self.outputs_responses(responses)
l2_contexts = tf.nn.l2_normalize(contexts_out, axis=-1)
l2_responses = tf.nn.l2_normalize(responses_out, a... | 0 |
08c2cc9c933e4159a8759608fee92621 | 125f931f4bb7f9f1acba99f5c4776bab | https://stackoverflow.com/a/1165052/6923555 | function copyTextToClipboard(text) {
var textArea = document.createElement('textarea');
textArea.style.position = 'fixed';
textArea.style.top = 0;
textArea.style.left = 0;
textArea.style.width = '2em';
textArea.style.height = '2em';
textArea.style.padding = 0;
textArea.style.border = 'no... | 1 |
0284c7a61f897f9b37f82788fd8c2d3e | a3c07e39d1d679d6d180c5ab0e903c00 | Returns all values of a cubic Hermite interpolant of the `anchors` at time `t`. | adj_knots = T.stack([knots[..., :-1], knots[..., 1:]], axis=-1)
adj_v = T.stack([values[..., :-1], values[..., 1:]], axis=-1)
adj_d = T.stack([derivatives[..., :-1], derivatives[..., 1:]], axis=-1)
adj_vd = T.concatenate([adj_v, adj_d], axis=-1)
yh = T.matmul(adj_vd, _HERMITE)
if samples.ndim ==... | 1 |
2ecdf3fbe3b4acf53655f7f06e191f83 | e15551352d137f0811b060250705a1cd | Etablit une référence unique dans la scène à ce script, pouvant ainsi être appelé par tous les autres scripts. | public class GameManager : MonoBehaviour
private void Awake()
{
instance = this;
} | 1 |
067ccc4ecf2013af42bbd1fe85d2dd90 | 6fc7fd30979d6097b5a08b0d47608e21 | Detruit les tirs | class Bullet(pygame.sprite.Sprite): #classe balle
def destroy(self):
Bullet.bullets.remove(self)
del self | 1 |
e5224c8cda98bc6ed6bce08a44ad1890 | 13da7891cf633caa36160ea5eb359619 | transform patterns that contain ** into multiple, simpler patterns | if "(" in pattern:
token_list = tk.filter_spaces(tk.tokenize_string(pattern))
builder = []
sb = []
i = 0
while i < len(token_list):
text = token_list[i]
if text == "(":
builder, sb = _finish(builder, sb)
item_list = []
... | 0 |
9e49017ac3d4a8ed4a901ef6b8f58f2f | 345bef0b7ae41f912ed2e5f93145f383 | Read GT9XX register | {
uint32_t regAddress = 0;
uint8_t rxBuffer[3] = {0, 0, 0};
uint8_t txBuffer[3] = {0, 0, 0};
uint32_t regValue = 0;
uint8_t i = 0;
int32_t ret = 0;
regAddress = ad9680_READ + registerAddress;
txBuffer[0] = (regAddress & 0xFF00) >> 8;
txBuffer[1] = regA... | 0 |
62ed7f8b762700ff82cb7511dcfacde1 | 6fb792ac1a8f2be71c823dfc166a2961 | 上传卷宗资料 | @Controller
public class LatentSuppController
@ResponseBody
@RequestMapping("/docPaperUpload")
public RestCode docUpload(@RequestParam(required= false,value="file")MultipartFile[] files,String direCode,String linkNo,String docCate,String linkId){
InputStream is=null;
Directory dire = directoryService.getDireByCo... | 1 |
413fa9a5b45a2702cb767468a5d36793 | 495fb76f22ef5aefaaca2f83761771a3 | 开奖时间结束自动进入结算 | {
if (!is_cli()) {
header('HTTP/1.1 405 fuck u!');
$this->return_json(E_METHOD, 'method nonsupport!');
}
if (empty($gname)) {
wlog(APPPATH.'logs/bets/'.$dbn.'_'.$gname.'_settlement_'.date('Ym').'.log', '游戏信息无效!', true);
return false;
}
... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.