query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
a8872b12a74b08a2ffc782a044263e55 | badb1f714099ff0b28df2d0b6f9e95c5 | 查看某资源的最后一个监控数据点(目前只支持机柜电流) | namespace JDCloudSDK.Monitor.Client
public class MonitorClient : JdcloudClient
public LastDownsampleResponse LastDownsample(LastDownsampleRequest request) {
return new LastDownsampleExecutor().Client(this).Execute<LastDownsampleResponse, LastDownsampleResult, LastDownsampleRequest>(request);
} | 1 |
fb3a9b759ed8c891c942cd0e9ac96b2e | 96f4fec6e3136d742267b35fb25fd898 | For responsive design. Makes things stack instead of side by side | if (window.innerWidth > 768) {
if (body.firstElementChild !== nav) {
body.insertBefore(nav, body.firstChild);
}
if (headerContent.firstElementChild === headerMobileImg) {
headerContent.removeChild(headerMobileImg);
}
introText.appendChild(assessmentHeader);
if (assessmentMoblCont.f... | 1 |
d2a9f514c99878ea3b2c6b17975441b4 | 7be8fcd85d8df2cceef23d3f77e0a69d | 벨만 포드 알고리즘 응용 -> 그래프상 음의 싸이클 존재 판단 함수 | stack = [ ]
visitedAry = [ ]
current = 0
stack.append( current )
visitedAry.append( current )
while len(stack) !=0 :
next = None
for vertex in range(gSize) :
if g.graph[current][vertex] != 0 :
if vertex in visitedAry :
pass
... | 0 |
2a3450d710a6d2683015a15a16b2a9d5 | 2cfbf3c390da3fa4b22191d94835e40d | 根据交易规则委托量标识返回单笔委托量 | namespace ManagementCenter.BLL.WCFService_Out
[ServiceBehavior(InstanceContextMode = InstanceContextMode.Single, ConcurrencyMode = ConcurrencyMode.Multiple)]
public class FuturesTradeRulesService : IFuturesTradeRules
public List<Entity.QH_ConsignQuantum> GetAllConsignQuantum()
{
try
... | 0 |
1ece9cb71346fb2e77b55e1dd47486a3 | ac37825e0ec0f9f9d721d8b2545f1b12 | Choose a page based whether or not a Gist ID and token have
been entered | github = request.args.get('github', 'jhacks')
first, last, github = hackbright.get_student_by_github(github)
projects = []
projects = hackbright.get_project_grade(github)
print projects
print type(projects)
html = render_template("student_info.html", first=first, last=last, github=github, p... | 0 |
5568015979b62df9127cc1c8554f3b63 | 4add6e2b6a91471a06000294f8b8d21f | 获取celeba的人脸数据 | def getFacesData1(folder, isDebug=False, isPCA=True):
trainData = None
trainLabel = None
testData = None
testLabel = None
for personFolder in os.listdir(folder):
if os.path.isdir(folder + personFolder):
currentLabel = int(personFolder.replace('s', ''))
if isDebug:
... | 0 |
6345bde3bbe8cfbcadbbee54502971d0 | b1368f89c719d1e1893b01cd73c4ec2b | Sets new customers history since ID | namespace barsroot.Controllers
[AuthorizeSession]
[IsPartinalRequest]
public class CustomersController : Controller
public ActionResult CustomerUpdateHistory(int id)
{
return View(id);
} | 0 |
8bc6577216dc0231156ce9d84ca409b6 | 4a25b7e8c2fdd7d1d0cf9ea39b40f0e8 | Получение списка файлов и папок в текущей директории | namespace FTPUtils
public class FTPClient
public string[] GetFilesDirectory(out bool isOk)
{
string method = WebRequestMethods.Ftp.ListDirectoryDetails;
var statusCode = FtpStatusCode.DataAlreadyOpen;
FtpWebResponse response = CallFTP(method);
return ReadByLin... | 1 |
f2ecbe10f9e84cd0fe7df7393f0165b8 | 27c9681c52978baf86532d5b4f4a977a | 请求激励视频 | RewardVideoAdParams rewardVideoAdParams = new RewardVideoAdParams.Builder()
.setFetchTimeout(3000)
.build();
mRewardVideoAd.loadAd(rewardVideoAdParams);
Log.e("xm123456", "请求DD加载视频广告");
} | 1 |
65c6da43f329f667257b927ea27d5f77 | 22fb65ac46f353f8174242ae804ad80e | Traitement du vote d'une soumission | try {
if ($this->request->hasPost('id')) {
$doc = $this->couchdb->getDoc(Couch::STD_DOC_PATH, $this->request->getPost('id'));
if ($doc->isCurrent() or $doc->isSubmittedForPeerReview()) {
if ($this->user->isAdmin)
$value = isset($this->config->review->votesNeededToPassRevi... | 1 |
7939276f7a7e3d91d6938d86c8e0690d | 485d9ccf09374b407112b268f9ec59b1 | 根据代理id获取代理账户余额 | @Service
public class AgentInfoService
public AgentAccount getAccountByAgentId(Integer agentId) {
return agentAccountMapper.selectByPrimaryKey(agentId);
} | 0 |
5504bbf98affbedfdf1da3349a62ca34 | 53525af49171e20eee5bce17a3b245ed | Get the level combo box. | public class LodLevelPropertyControl<C extends ChangeConsumer> extends PropertyControl<C, Geometry, Integer>
@FxThread
protected @NotNull ComboBox<Integer> getLevelComboBox() {
return ObjectUtils.notNull(levelComboBox);
} | 1 |
5d7dac50f131592f528868f0f4d60a6b | 0dfb4c00182f4f2ecf12924b35c098de | A `bool` attribute to descibe if the nRF24L01 is a plus variant or
not (read-only). | class WidgetV2(object):
def is_extended(self):
return self._is_extended | 0 |
4d228dadf7715bf141205c0bf7fa89e7 | 7db0514b43f55c69918d166ad95b524c | RFC3339形式あるいはISO8601形式の文字列からCalendarクラスのオブジェクトを生成する.
日付のみ、時間のみの文字列には対応していない。 | public class DateUtils
@NotNull
public static Calendar getCalendarFromString (@NotNull String dateString) {
if (dateString.length() == 10) {
int year = Integer.parseInt(dateString.substring(0, 4));
int month = (Integer.parseInt(dateString.substring(5, 7))-1);
int day = In... | 0 |
00263af37cb143f83aef1b49776798b3 | 0c2d8f5378147564511a56654ca77c55 | 客户满意度统计添加不固定列方法 | public bool AddSatisfactionDistribute(V_Satisfactions addView)
{
if (!string.IsNullOrEmpty(addView.Satisfactionrequireid))
{
using (SatisfactionDistributeBll addBll = new SatisfactionDistributeBll())
{
return addBll.AddSatisfact... | 0 |
5426d4ab904e6c538efc6b378c32e7e5 | 3572a7c0a8056282d255cb75c8d06af3 | normally have appeared on `stdout`
Configure whether the built-in log functions
(g_log_default_handler() for the old-style API, and both
g_log_writer_default() and g_log_writer_standard_streams() for the
structured API) will output all log messages to `stderr`.
By default, log messages of levels %G_LOG_LEVEL_INFO and
%... | class Swift_Log /*interface*/
function isEnabled() {} | 0 |
a91c190d4fc2454c4e0e4300a447195b | 1839e74302b59447673f0b86c05a068d | Plots the policy as a color map over all the states. | value_dict = self.parse_file_for_dict(key, state_value_file, agent_num=agent_num)
value_arr = np.empty((WIDTH, HEIGHT))
for i in range(1, WIDTH + 1):
for j in range(1, HEIGHT + 1):
if (i, j) in value_dict.keys():
value_arr[i - 1][j - 1] = value_dic... | 1 |
8dc9af224faf53172ca28ad645ab566e | 53aa845278f6f07cac5d18fcc7aa02a8 | Return the starting monthly wage of the employee | public class VC public static class PersonnelModel extends Model public class SalariedPerson extends Person
@Override
public double getInitialMonthlyWage() {
return salary/MONTHS_PER_YEAR;
} | 1 |
1f2bc6035296576459270dd417e3398f | eee056f1298a3e243dc8e5581c12974b | Invalidate this object. The location area code and the cell id are set to -1. | vm.loc.nonValidatedAddress = true;
vm.nonValidatedAddress.show = false;
vm.PA.$valid = false;
vm.PA.$invalid = true;
vm.PA.invalidaddress = true;
vm.loc.Location.Latitude = null;
vm.loc.LocationId = null;
vm.loc.Location.Longitude = null;
vm.loc.ClientLocationId = null;
} | 0 |
afc25c02aaa0cd39db8420e766028c0b | bf4bbd58ee56d38c08db9a82753013e2 | اعلام نظر درخواست کننده | class CommentController extends Controller
public function destroy(Comment $comment)
{
$comment->delete();
$notification = array(
'message'=>' نظر مورد نظر تایید شد',
'alert-type'=>'success'
);
return back()->with($notification);
} | 0 |
209e9d615ce90a88041367467e1d648d | 7a0121560a7715dc45b1d1be09f69682 | Hromadně vygeneruje potvrzení o zaplacení. | {
$oznac[$id] = "checked=\"checked\"";
$result =
"
<input type=\"radio\" name=\"zam_vyuc\" value=\"true\" {$oznac[1]} />{$this->var->jazyk["ano"]}
<input type=\"radio\" name=\"zam_vyuc\" value=\"false\" {$oznac[0]} />{$this->var->jazyk["ne"]}<br />
";
return $result;
} | 0 |
fddfac0a2ac3d2b983b61ed324489ba0 | 4cc50981d2af59ad4928444c8a98bc3f | Deletes teh Blob container if it exists | namespace AsureRunService.Utilities
public static class KeyUtilities
public static void DeleteBlobContainer(string keyId)
{
if (null == keyId)
throw new ArgumentNullException(nameof(keyId));
Trace.TraceWarning($"DeleteBlobContainer for {keyId}");
CloudBlob... | 1 |
b099cc22c5da59e33e648e0e32a579f2 | 6c053251844e46b53da4fd6066964c3c | https://gist.github.com/pib/240957 | function array_merge_recursive_new() {
$arrays = func_get_args();
$base = array_shift($arrays);
foreach($arrays as $array) {
reset($base);
while(list($key, $value) = @each($array)) {
if(is_array($value) && @is_array($base[$key])) {
$base[$key] = array_merge_recursive_new($base[$key], $value)... | 1 |
bf35a733f48c7c65c2128ff629472d5d | ec4001689648543ac4573527b8bb99a0 | 设置副标题数据每行最多几列 | public class MSupperTabView extends RelativeLayout{
public void setMaxWidth(String title){
int setWidth = 0;
setWidth= title.length()*12;
parent.setLayoutParams(new RelativeLayout.LayoutParams(setWidth, 200));
} | 0 |
6e8e98e8239d8f30ff2599b4a188968f | 08175704b2c8f2e91b5cd7411f427f4d | Given a tree and the index of a node within the tree, return whether
or not it is a leaf | public class IdxTree implements Iterable<Integer>
public boolean isLeaf(int idx) {
if (idx >= 0 && idx < getSize()) {
if (children[idx] == null)
return true;
if (children[idx].length == 0)
return true;
return false;
}
throw new ... | 1 |
2bf62bfc7adf041a92aa1fe2501a2d80 | 25fec2293a8774971c790b8e004c83c9 | Reconstruct a NAF Article from a dict | n_article = dict(zip(nouns_list, articles_list))
data_read = (line for line in open("%s.txt"%(lookup_sentences_file), 'r', encoding='utf-8'))
for line in data_read:
for word in n_article:
strip_line = line.strip('\n').split()
if word in strip_line:
if n_articl... | 0 |
9d69795f3a0ced7339cffc1ab3505a0c | b1716b563083f1b95470b480f2addc3f | # computes row by row the pairwise distances between two sets of vectors. | m=nrow(X)
distance=c()
for (i in 1:m){
distance=rbind(distance,tapply(X[i,-i],y[-i], mean))
}
return(distance)
} | 0 |
e2e3ebd8fe5adaa0375d0003b9217316 | 86ef0b5577ad3c05e41aaedd1bb5ebab | 根据aid uid获取文章点赞状态 | class Article extends Model
public function like($aid)
{
$map['id'] = $aid;
$map['status'] = 1;
return $this->where($map)->setInc('likes');
} | 0 |
31f81c1aa8510004e9abbab5ac794b51 | a3370e2656f7421e229e20fcd1e4a2a9 | Handle an incoming ADD_LVNF_RESPONSE message. | SSH_FSM_STEP(ikev2_state_info_responder_out_add_notify)
{
SshIkev2Packet packet = thread_context;
SSH_FSM_SET_NEXT(ikev2_state_info_responder_out_add_conf);
ikev2_info_add_notify(packet);
return SSH_FSM_CONTINUE;
} | 0 |
64d1fa8fdad2cdfca4b05ee3f1006587 | 4fb5ca5860879abc05c0210568361772 | Пропадает сообщение об успешном добавлении | namespace Balisunrise.Core.Services
public class ServiceResult : IServiceResult
public void AddSuccess(string text)
{
AddMessage(MessageKind.SUCCESS, text, string.Empty, string.Empty, null);
} | 0 |
9a3de9a872597c950db3ce3fe074ec1c | b306b6db2e4e5b949899ab66159e5368 | No damage if already stunned | public class ChargeEliteGoal extends AbstractEliteGoal
private void tickStunned() {
if( !mob.swinging ) {
if( swingOffhand ) mob.swing( Hand.OFF_HAND );
else mob.swing( Hand.MAIN_HAND );
swingOffhand = !swingOffhand;
}
if( attackTime <= 0 ) {
curre... | 0 |
417af7c4c34bf6eb6e2bcc2848156f69 | 0e46187eb836bbcc29f24332d09f2745 | Método encargado de confirmar la solicitud de anulación del mantenimiento por el usuario | $this->db->set('estado_mant', 'Mat_Term');
$this->db->set('fecha_termina', $fecha);
$this->db->set('usuario_termina', $usuario);
$this->db->where('id', $id);
$this->db->update("mantenimiento");
$total = $this->contar_Manteniminetos($inventario);
if ($total == 0) {... | 0 |
e24287b561759299dda3a73df5033050 | af73e701332334a2f1ad731478f24609 | Get the animation handler object | [RequireComponent(typeof(Animator))]
public class AnimationManager : MonoBehaviour
public Animator GetAnimator(){
return m_Animator;
} | 1 |
ae34b3f8ee1fee20890d75ffd033d97c | 3e8c19cae8dac05f90ee4a8b351d5e6e | vytvoří a uloží do podadresáře $subpath z obrázku $img jeho kopii o zadaném maximálním rozměru $maxsize
v případě úspěchu vrací relativní cestu vzhledem k adresáři img
pokud je uveden identifikátor záznamu z tabulky content - $i, pak se tvoří jméno obrázku pro soutěž | class Image
static public function EnsureSize( $cesta, $sirka_max, $vyska_max )
{
if(!is_file($cesta))
{
return $cesta;
};
$nahled=Image::GetResizedImageSize( $cesta, $sirka_max, $vyska_max );
$sirka=$nahled[0];
$vyska=$nahled[1];
$nahled_sirka=round($sirka);
$nahled_vys... | 0 |
41694beffed2c4e02258e8a0edf60379 | 3210c4948a89919dec9348877ea5ea93 | 根据Node Id查找对应的PageNode | namespace BesAsm.ModelData.Data.Bases
public abstract partial class ModelNodeProviderBaseCore : EntityProviderBase<BesAsm.ModelData.Entities.ModelNode, BesAsm.ModelData.Entities.ModelNodeKey>
public BesAsm.ModelData.Entities.ModelNode GetByNodeId(int _nodeId, int start, int pageLength, out int count)
{
return Get... | 1 |
0925de79554da2c326b95ca9df11f53a | 5ababc64a5b1e492a065a21686714a84 | deregister the item in zookeeper /list/
itemtype must be a Zooborg constant
item_id must be a string | class Controller(object):
def delete(self, id):
self.ghost.execute_delete('%s/%s/' % (self._type_name, id)) | 0 |
3558da682c9f8c66f0503e73429f4bf8 | 3d6e47694d082b98d42845334f613731 | Initiates a Sequence Selection Activity | public class ShoppingActivity extends DibosonActivity
void StartSelector (MethodDefinition<?>theMethodDefinition,MethodDefinition<?>theImageHandlerDefinition)
{
Intent intent = new Intent (getBaseContext (),Selector.class);
intent.putExtra (StaticData.PARAMETER_OBJECT_TYPE,StaticData.OBJECT_SELECTOR);
intent.put... | 1 |
bf3a373ef3034ae651ab6b4722fc975b | 3b022c8b13959b752d839747b0671d62 | 重复发射三次数据 | public class RxCreateActivity extends Activity
private void repeat() {
Observable.range(1, 10)
.repeat(2)
.subscribe(new Consumer<Integer>() {
@Override
public void accept(@NonNull Integer integer) throws Exception {
... | 0 |
ae73fef21deeed267a199c822c1a3905 | 7906eff187484d7b43e5919b42949922 | Action effectuée lors d'un test d'égalité du type a==b | var value2 = eval($( "#boiteDeDialogueEnvoi" ).val());
var typed2 = typeDD(boiteDeDialogueEnvoi + ' = ' + value2);
} | 0 |
a1229a5b1d367d556f9889d7f66eec0e | 53334e407f38cd1c1c1ff9a99114b766 | 批量新增参会人 | @Service
public class AttendGroupServiceImpl implements IAttendGroupService
@Override
@Transactional(propagation = Propagation.REQUIRED,isolation = Isolation.READ_COMMITTED)
public Integer addPersonsForAttendGroup(Integer groupId, String persons) {
int status = 1;
try {
if (StringUti... | 1 |
1cec2c8c47ad3805b37745fd26f8f1f7 | 79d82966b6bf0d6a3d577cb4674863b7 | 如果界面设置为选择模式或显示数据!!禁止编辑 | namespace CvnPdm.Archive.WinForm
public partial class Frm_S_MatersFu : ArchivesTemplate
private void ShowEditForm()
{
if (this.dgvMain.Parm_CustomizeView.IsFilterRow(this.dgvMain.Parm_CustomizeView.FocusedRowHandle))
{
return;
}
if (this.dgvMai... | 0 |
1b2761a4ab47bf1fe8a3d677eb36d915 | f56d5ab6c5ff4b7fb8b5ca6f2691a533 | 获取源表字段列表 | namespace JDCloudSDK.Dcap.Client
public class DcapClient : JdcloudClient
public async Task<DescribeDataSourceTableFieldResponse> DescribeDataSourceTableField(DescribeDataSourceTableFieldRequest request) {
return await new DescribeDataSourceTableFieldExecutor().Client(this).Execute<DescribeDataSourceTabl... | 1 |
16763243a28826cffa71dce91bb99381 | a9c0c0e800af347161df8a145404fdd4 | Repeatedly runs the garbage collector and finalization method of the JVM runtime system until the used memory
count becomes stable or 500 iterations occur, whichever happens soonest. If other threads are active then this
method is not likely to work as the used memory count will continually be changing. | fun interface GcTrigger
fun runGc() | 0 |
074918db54e9138898a22c09d49c5329 | 07b5dbf0c7c359a549ba3a140979f3f5 | An alternative implementation of the linear tracing algorithm but
with some adaptations to work with circular dna molecules | def dtw_cyclic_rec(D, S, P, l, left_path, r, right_path, solutions):
M = D.shape[0]
N = D.shape[1]//2
if r > l+1:
k = (r+l)//2
jstart = k
jend = jstart + N
S = -1*np.ones_like(D)
P = -1*np.ones(D.shape, dtype=int)
dtw_constrained(D, S, P, jstart, left_path, ri... | 1 |
8184bbe1603f90141a7dd64dd031189c | e69740568b4653a6f729fde2f2af075a | Cancel the running export operation. This method blocks until the export
is cancelled and the exported file (if any) is deleted. If the export
completed by the time this method is invoked, the export file will be
deleted.
canceled. | public class ExportDialog extends AppCompatDialogFragment
private void cancelExport() {
Intent cancelIntent = new Intent(getContext(), ExportService.class);
cancelIntent.setAction(ExportService.ACTION_CANCEL_EXPORT);
getContext().startService(cancelIntent);
} | 0 |
00b7311368441a71f43a1fc107743777 | afd46cc874c9bc35e2d349cb4a8bd4dd | This function generates a parking slot for a vehicle based on it's availability and updates the slots variable. | ParkingSlot findAvailableParkingSlot(ParkingSlotTypeEnum type) throws NoParkingSlotAvailableException; | 0 |
1ccf7ff6cbf8f0144282e60303d49e2f | 5c9ecefd579782b4bbdeed95a8573f41 | 以摄像机看向的位置为中心,以默认半径,显示城市区域 | function CityNearControl() {
this.defaultAnchor = BMAP_ANCHOR_TOP_RIGHT;
this.defaultOffset = new BMap.Size(10, 10);
} | 0 |
b31d6868a30b3783766a323944f59b68 | 03b57c7c8dfd322fa54009ca40dc145e | 短按 Home 键的处理逻辑 | public class DeviceHelper
public void pressHome() {
driver.pressKeyCode(3);
} | 1 |
6c3047d45b86bf04ed7deeb64774cd93 | 6301c8e1ded5eadb05511d1e9906fb11 | Ensure we can create a new lecture. | class LectureTests(TestCase):
# 前提条件: すでに1つだけ授業が登録してあり、ユーザーが認証済み
def test_add_existing_lecture(self):
j_lec_add2 = sc.access_lecture_add_view(
self.client, name=u'Software Test', code=u'76036')
self.assertFalse(j_lec_add2['created']) | 0 |
bdf0d6872273d5408ad650d82a291cfb | 1f73761d8a166260765b5be7ae8960db | Create a new application appSettings using the provided whitelist
on behalf of a user. | public class OrganizationApi
public ApiResponse<OrgWhitelistSettings> putOrganizationsWhitelistWithHttpInfo(OrgWhitelistSettings body) throws IOException {
return putOrganizationsWhitelist(createPutOrganizationsWhitelistRequest(body).withHttpInfo());
} | 0 |
2cc868da9e6ed1539bf989e012cf1344 | b41689cedf1190015f00aeb862ec8e7a | make stamina hud bar flash red | namespace Actor
public class HPBar : MonoBehaviour
private void DoRedHeat()
{
if (redheat_running_) return;
image_.DOColor(Color.red, 0.5f).SetEase(Ease.InOutCubic).SetLoops(-1, LoopType.Yoyo);
redheat_running_ = true;
} | 1 |
3239b6f6a25a32be999bf080d574c88b | 46038ebe25f22b857782402c3563bf54 | Create an instance of {@link Zppf015 } | @XmlRegistry
public class ObjectFactory
public B053 createB053() {
return new B053();
} | 0 |
380c4c0954ef8b173cd5f831768c59a1 | c102e45b60fe5a020c2c87cc50fd2478 | Check if there is some not selected values in comboboxes. | return (gui.GUI.spinBox.value() != 0 or \
gui.GUI.spinBox_2.value() != 0 or\
gui.GUI.spinBox_3.value() != 0) and \
(gui.GUI.spinBox_4.value() != 0 or
gui.GUI.spinBox_5.value() != 0 or
gui.GUI.spinBox_6.value() != 0) | 0 |
4f97a1f47136923bb7e737a350ddd817 | 19ec7cff6390523323b5c99e689a8aa6 | 检查角色等级是否>=配置等级 | public function hasLevelOrGreater($level)
{
return $level >= $this->level();
} | 1 |
d75d7d6efa30df34d47f13b9548db04b | ae0329f18495b160ed7c65cbaaba943e | 执行任务,返回false表示任务执行错误,需要回滚
本案例中根据线程名字包含Thread-8判断是否回滚 | public class TaskExecutor
public static boolean execute(AbstractTask task) {
ThreadTypeEnum threadTypeEnum = task.getThreadTypeEnum();
if (threadTypeEnum == null) {
return false;
}
ExecutorService executorService = null;
switch (threadTypeEnum) {
case CPU_... | 0 |
ef6a66a387ab61f7d3218d55fcc1a93c | 3ec8e1315ddef5c821752b417f5d2aff | View responsável pelo envio de imagens do Produto | const url = `${environment.API_SUBASTA}/api/upload/product`;
const formData: FormData = new FormData();
if (files.length > 0) {
formData.append('img1', files[0]);
formData.append('img2', files[1]);
formData.append('img3', files[2]);
}
return this.http.post(url, formData, { headers:... | 1 |
18e3322fc56a995592e62882ff549aae | 8d6469f9d13423977159f258d5f60173 | Queue up selected working order rows to be moved. | namespace FluidTrade.Guardian
internal class DebtCross : IExchange
private static void OnWorkingOrderRowChanging(object sender, WorkingOrderRowChangeEventArgs workingOrderRowChangeEventArgs)
{
if (workingOrderRowChangeEventArgs.Action == DataRowAction.Commit && workingOrderRowChangeEventArgs.Ro... | 1 |
9f31806e6589512e8776ff72be3a9d1a | 888771be28c50917f08d7bdf93823661 | 格式化ebay运费 | class ISC_ADMIN_REMOTE_EBAY extends ISC_ADMIN_REMOTE_BASE
private function formatFee($fee, $currency)
{
if ($currency !== false) {
$formattedFee = FormatPrice($fee, false, true, false, $currency);
}
else {
$formattedFee = number_format($fee, 2, GetConfig('DecimalToken'), GetConfig('ThousandsToken'));
}
... | 1 |
6ad74a5e44be1d1ab1c4f2aeb77ee411 | a7a1fcbee6ce1099f0b54e439d554822 | Get DiscoveredNodes. | Set<DiscoveredAdapter> getDiscoveredAdapters(); | 0 |
1be062b78412f468f998868c3b0f2299 | f34319b6fcef5364edbaebd7780f6064 | =====格式化X轴数据(定制单位)===== | if(XAxisValue != null){
StringAxisValueFormatter xAxisValueFormatter = new StringAxisValueFormatter(XAxisValue);
horizontalBarChartManager.setXAxisValueFormatter(xAxisValueFormatter);
}
} | 1 |
9211b5e2896a19bc5d7b6bc144991796 | d4b3e7ede1bfeb0b7695d6bab2da5ade | Delete model version by model name and version in Model Center backend. | class ModelVersionsAPI(APIClient):
def delete_model_version(self, model_name: str, version_name: str) -> None:
url = "/modelhosting/models/{}/versions/{}".format(model_name, version_name)
self._delete(url) | 1 |
95228c1ff495730d4d3ac6671435b63b | 613929e4a73077dd0a7678c0792221d1 | needs to be taken.
Increase the reference count to a GID attribute to keep it from being
freed. Callers are required to already be holding a reference to attribute. | GSettingsSchemaSource *
g_settings_schema_source_ref (GSettingsSchemaSource *source)
{
g_atomic_int_inc (&source->ref_count);
return source;
} | 1 |
ea9ca0caceacee99aae7f44f8e31ecc1 | 10a575d1534271e3ce345248d321e6cf | Initializes the set of SDK installs | synchronized(qtSDKList) {
qtSDKList.clear();
IPreferenceStore store = QtProjectPlugin.getDefault().getPreferenceStore();
int count = store.getInt(PreferenceConstants.QTVERSION_COUNT);
for (int i = 0; i < count; i++) {
String nameKey = PreferenceConstants.QTVERSION_NAME + "."
+ Integer.toString(i... | 1 |
553999cd9dd90e1d0075d1da502aa4da | 8b66560f8cb47517aa0af918f4626eb8 | Decodes an encryted message created with a substitution cipher.
This solution uses letter and diagraph frequency analysis to break a
susbtituion cipher. | class EncryptedSubMessage(SubMessage):
def decrypt_message(self):
permutation_list=get_permutations('aeiou')
maximum=0
decrypt=''
for code in permutation_list:
dictionary=self.build_transpose_dict(code)
text=self.apply_transpose( dictionary).strip("!@#$%^&*()-_+={... | 0 |
570a21054f96e54e443652ddf6271db5 | 85b501a3ccede94d7fc3fe147dc94190 | Setze das Logoutdatum | @Entity( tableName = "user_data")
public class UserData
public void setLastLogin(GregorianCalendar lastLogin) {
this.lastLogin = lastLogin;
} | 0 |
1273afa2e46420f9d3b31dc8082ef1df | 00a5729f004e2ee5fc99fee9fbf9f45a | 下移组件 | var selectDownVal=$('option:selected','#childModules').eq($('option:selected','#childModules').length-1).val();
var nextIndex=0;
$('option','#childModules').each(function(index){
if ($(this).val() == selectDownVal){
nextIndex=index+1;
return false;
}
});
var n... | 1 |
f73376a6f9a45a6f5762d920114a494b | ad4c83a654e997dda77ae722a53968fa | Accessor for the latest time that acceleration has been recorded
Returns:
last time that data was recorded for acceleration, in seconds | class Datafile:
def get_last_time(self):
return self.data['t'][-1] | 1 |
2dc3248ca585ddff9aa2924e468a4b79 | 948b7fe59b2a064c3d4d6644d19112ce | Will return a contact with the specific id, or an empty optional if no match could be made. | Optional<Contact> findById(Long id); | 1 |
3428cec7291b3e8a01f4b9f34c621b2e | 00c9e86c542f3340a900559ee950bb64 | Deletes the reminders (logically) with the the given IDs. | List<int> idList = GetListOfIDs();
for ( int i = 0; i < idList.Count; i++ ) {
string query = "DELETE from Reminders WHERE id=" + idList[i];
using ( SqlConnection cn = new SqlConnection(Properties.Settings.Default.ReminderDBConnectionString) ) {
... | 1 |
43ff921e2895458db9065efef3c2a2fe | 41c838381c1ed56f89e03a939d3db2a4 | Converts STL, OBJ, PLY (binary or ascii) to Three.js mesh and adds it to a scene
Dependency async.js | {
std::map<int, std::list<MeshVertex*>> vertexlist;
std::vector<vec3> coordlist;
std::vector<vec2> texcoordlist;
std::vector<vec3> normallist;
bool computeNormals = true;
std::string usemtl = "";
std::ifstream inputStream;
inputStream.open(objfilename.c_str(), std::ifstream::in);
if ... | 0 |
2b5aaf9e8f141c3de459c37bdf16596a | 3990ac342f288888bfbf83a56cd7a0cc | 计算一个点是否在一个矩形内,不包含边沿 | class Utility(object):
def is_in_rect(point, rect):
return point[0] >= rect[0] and point[0] <= rect[2] \
and point[1] >= rect[1] and point[1] <= rect[3] | 0 |
e76c9f2b7c04ef3c9118b49002a9dc4f | afed59b2ee6e6623703cc0ec88328ea5 | @brief Initializes the parameters necessary for the bush generation | struct parameters *params;
params = (struct parameters*)malloc(sizeof(struct parameters));
params->mu = 1;
params->lambda = 4;
params->evolutionaryStrategy = '+';
params->mutationRate = 0.05;
params->recurrentConnectionProbability = 0.0;
params->connectionWeightRange = 1;
params->shortcutConnections = 1;
para... | 1 |
aa847203e5b927ea1fd727e74cc68385 | 3d71aaa7b8974913ea8f805ba8156807 | The volume roll finder can look for data up to a week before the given
date. This test asserts that we not only return the correct active
contract during that previous week (grace period), but also that we do
not go into exception if one of the contracts does not exist. | VCR.use_cassettes([
{name: 'icg_in_range_success', options: vcr_options},
{name: 'icg_late_returns_empty', options: vcr_options},
{name: 'icg_late_returns_b', options: vcr_options}
]) do
assert AchClient::ICheckGateway::AchStatusChecker.in_range(
start_date: Date.ye... | 0 |
403a67e94f6640d7715ea7cf70c4ea63 | 459a8c7917ea0f77f036deb01d892bd4 | 농가의 정보 수정처리 후 리다이렉트 한다. | public void farmModify(HttpServletResponse response,@ModelAttribute Farm farm) throws IOException {
farmService.farmModify(farm);
response.setContentType("text/html;charset=utf=8");
response.getWriter().write("success");
} | 0 |
34f7e9feba1dce925a1ae3662e36cd0a | 47b833710ae238e570a1a7150c0356d3 | constructor that defines member variables and attaches to specified program | CProgram::CProgram( ) {
} | 0 |
a6717964c339f67099c361d66e7a8f38 | 56399b9a4bb50306b087d7c9fc1a1d96 | NewResponseWriter takes a response writer and wraps it. | func NewCodedWriter(w http.ResponseWriter) *CodedResponseWriter {
return &CodedResponseWriter{
ResponseWriter: w,
}
} | 1 |
e20dd1a5d03f3cc41bbe4b8fe22a1c10 | 3fe881f69685a7a4c60e428b1a7281c6 | 根据项目名称和企业名称进行模糊匹配,并筛选出在公示日期区间内的公共分摊用水用电公示 | public String queryRegWater(String dgfieldbegin,String dgfieldend,String comStcd
,Integer pageNo,Integer pageSize) throws Exception; | 0 |
7e086b4a440b044a737cdce1e224823a | a7994d01f0633e96d643b7dc3d57bcb1 | 判断string 是否包含非空格字符 | if (s == null || s.trim().length() == 0) return false;
for (int i = 0, len = s.length(); i < len; ++i) {
if (!Character.isWhitespace(s.charAt(i))) {
return true;
}
}
return false;
} | 1 |
f4aa0b7024492db30cc009abb6bd6456 | e2a538949c67bc5e609aaf6c382d77b4 | 当爬虫开始的时候打开chrome | class WangyiSpider(scrapy.Spider):
def __init__(self):
self.bro = webdriver.Chrome(executable_path='F:\爬虫日记\day_9scrapy框架\chromedriver.exe') | 1 |
170593555a63270552db3bc7bf3b44de | ce7aaffa65a3396462ade428175c4204 | 获取可用存储空间大小 若存在SD卡则返回SD卡剩余空间大小 否则返回手机内存剩余空间大小 | @SuppressLint("NewApi")
public class FileUtil
public static long getAvailaSize(Constant.MemoryType memoryType) {
StatFs statfs = null;
try {
switch (memoryType) {
case MEMORY_U:
if (usbStorageExist()) {
statfs = new StatFs(Constant.U_PATH);
} else {
return -1;
}
break;
case MEMOR... | 0 |
558ccdfb4a342ecd5b71c5c792de0326 | d232a62a95c3c77e463bfc95bc38fed0 | 若队列不空,则删除Q的队头元素并用指针传回e | Status DeQueue(LinkQueue &Q,QElemType &e)
{
QueuePtr p;
if(Q.front==Q.rear)
return ERROR ;
p=Q.front->next;
e=p->data;
Q.front->next=p->next;
if(Q.rear==p)
Q.rear=Q.front;
delete p;
return OK;
} | 1 |
678cc3358b369fe6e2c2fd9a20201b1a | 6c6f9e3acbf7ffb1e269d97bedc78957 | 查看单链表长度 | {
int count = 0;
LinkNode *p = s;
while (p = p->next)
count++;
return count;
} | 1 |
6c1515d0f5d9f3181fa7efddc39c922c | 35d564fa4de45967edab371f14246469 | 新しいノードをリストの末尾につなげる | void append( LinkedList *list, GraphNode *graphNode ) {
Node *inNode = newNode( graphNode );
Node *last = list->tail->prev;
last->next = inNode;
inNode->prev = last;
inNode->next = list->tail;
list->tail->prev = inNode;
} | 0 |
bacdffdcb1d85c64f82c107932ee829c | d802a1228a69b5c1f3548ac5686b5ae4 | Convierte un array de strings a formato String JSON | String arr[] = array;
String statusJSON = "[";
for(int i=0 ;i<arr.length;i++){
arr[i] = unescapeJS(arr[i]);
statusJSON += "'"+arr[i]+"'";
}
statusJSON += "]";
return statusJSON.replaceAll("''","','");
} | 1 |
d1756d904101c0d22608e3f8f23356ab | a12539f03eeed5fc46e6a50143a2ca2d | 获取树的层数,以确定y轴长度 | namespace XFramework.UI
public class Tree : MonoBehaviour
public float GetTreeHeight()
{
return m_RootTreeNode != null ? m_RootTreeNode.GetItemCount() * NodeTemplate.GetComponent<RectTransform>().sizeDelta.y : 0;
} | 0 |
2bc8898e24fb2e1660ad6cf68a3e4390 | 3d82644aa9fbc2b9b3ec9853b27aa28a | Create a where clause for the filter nameFilter. | class User_List extends oxAdminList
public function _prepareWhereQuery($aWhere, $sQueryFull)
{
$aNameWhere = null;
if (isset($aWhere['oxuser.oxlname']) && ($sName = $aWhere['oxuser.oxlname'])) {
$blIsSearchValue = $this->_isSearchValue($sName);
$sName = $this->_processFilter(... | 1 |
a00d42fa70333aad14c01e6369379f52 | 8de8c912c7318669b2ec7c35304a7ea8 | get the list of encounters from the API | class Game_Map
def encounter_list
return @map.encounter_list
end | 0 |
ceec066804ff740e7da724af9a0a3e71 | 649b62f3787a390eda374ad3a6d48628 | 鼠标进入当前slot,显示tooltip | function GiftSystem_MouseEnterBoxSlot(args)
local rect = CEGUI.toWindowEventArgs(args).window:getPixelRect()
if 0 ~= mChooseBoxId then
createItemhint_gift(mChooseBoxId, rect, g_MainUIWindows, 0)
end
end | 1 |
2f214c1c976c79f212a25de40e17d440 | 764cca79361290d94c7110dcf9ea3f23 | A factory for creating MutualFractal objects. | class _MultiFABWrapper(object):
def __init__(self, mf_name, level, include_ghosts=False):
self.mf_name = mf_name
self.level = level
self.include_ghosts = include_ghosts
self.dim = libwarpx.dim
ix_type = self.mf.box_array().ix_type()
self.overlaps = self._get_indices([int(... | 0 |
b62ca2d97e70f1c65d5948a8d2aabb9f | d37f89ccbc4dc9323ca6714ef2004520 | 抓取股利分派情形主程式 | df = pd.read_csv(gbbq_input, index_col=0, dtype={'code': str})
df = df[df['category'] == 1]
df['exchange'] = df['market'].replace(0, "sz").replace(1, 'sh')
df['symbol'] = df['exchange'] + df['code']
div_list = [(name, group) for name, group in df.groupby(by=['symbol'])]
tic()
multi = True
... | 1 |
70f14c5a5d3c6d844fb6bc18b31f6382 | fd59c560d2bbeec8f305049cca51e25c | Sends a request to a user to download a resource pack. | if (sha1 != null) {
player.setResourcePack(url, sha1);
} else {
player.setResourcePack(url);
}
} | 0 |
8ecc27f17e5d414235215e4d5a77b5f2 | e60962a0d8b0d3fe8cbce3c9db5d5047 | Error handling for checking whether a matrix is positive definite. | if not isinstance(matrix, np.ndarray):
raise TypeError("matrix must be a numpy.ndarray")
if len(matrix.shape) != 2:
return None
if matrix.shape[0] != matrix.shape[1]:
return None
if not np.array_equal(matrix.T, matrix):
return None
w, _ = np.linalg.eig(matrix)
if ... | 1 |
bd31cfddaba71b989a069738cca79e8f | ff1f65c83be35c4ad8a1a36ce6f5b418 | 숫자와 알파벳 및 '-'만 등록되도록 체크 | function check_number(value)
{
var reg = "1234567890";
var i;
var c;
c = value.charAt( 0 );
if((c != '-') && (reg.indexOf( c ) < 0))return false;
for( i = 1; i < value.length; i ++ )
{
c = value.charAt( i );
if (reg.indexOf( c ) < 0) return false;
}
return true;
} | 0 |
26543d70a7ef7681e266765ebd46a2e6 | 53326050433c11a89b2bd7bf1abb9065 | Sends the input to FFmpeg-process. | if frame is None:
return
height, width = frame.shape[:2]
channels = frame.shape[-1] if frame.ndim == 3 else 1
if self.__initiate:
self.__inputheight = height
self.__inputwidth = width
self.__inputchannels = channels
if self.__... | 1 |
644230f44a46e56a7d355c0464814d38 | 157ef963225b3340cac94416742d356b | You're deleting this object with a background thread while there's an update
pending on the main event thread - that's pretty dodgy threading, as the callback could
happen after this destructor has finished. You should either use a MessageManagerLock while
deleting this object, or find some other way to avoid such a ra... | AsyncUpdater::~AsyncUpdater()
{
jassert ((! isUpdatePending()) || MessageManager::getInstance()->currentThreadHasLockedMessageManager());
activeMessage->shouldDeliver.set (0);
} | 1 |
a68590e2141cc30a1a3f2cdbbf13414f | 5ec876d4f606470d31948dd9b949bb8c | 接口使用,根据合同号查询车辆资产信息 | public class Contract4ChargerServiceImpl extends
DefaultCrudService<Contract4Charger> implements
Contract4ChargerService, ApplicationEventPublisherAware
public Map<String, Object> findCarInfoByContractId(Long contractId) {
Map<String, Object> queryMap = null;
queryMap = this.contract4ChargerDao.findCarInfoByCon... | 1 |
266aa503645c6b34fce38b30b7bf7a49 | 23d0089edd030b3980f156ef5a6921e5 | Returns the chart visualization class.
Most charts are part of the "corechart" package. | def get_chart_type():
return impl.get_chart_type(**locals()) | 0 |
0148beebc4133e6662c4d73e08940923 | b3b01de4707521ca1bd452eeeb7ea9ce | Gets a list of sub-signatures, such as nested signatures or counter signatures. | {
var type = Type.Resolve();
if (type is null)
return Enumerable.Empty<TypeSignature>();
return type.Interfaces.Select(i => i.Interface!.ToTypeSignature(false));
} | 0 |
d76358520fcf809161aabffdccae4f1b | fa32a534cf5c65af15d438d5c9f4a2dc | 调用重写过的方法,调用的是子类的方法 | public class AccessMethod03 extends AccessMethod01
public void callOverrideMethod()
{
super.fly();
} | 0 |
d1d654d1493a16cac81fae35ffa1d1c4 | 3891d8c6adddff89dc69ba5d3a579ea2 | Display a single unidade.
GET unidades/:id | class UnidadeController extends BaseController
public function show($id)
{
$unidade = DB::table('Unidade')->where('id',$id)->first();
$servicos = DB::table('Servico')->where('id_unidade',$id)->get();
return View::make('unidades.show')->with('unidade', $unidade)->with('servicos', $servicos);
} | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.