query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
361ceefbba16e6527fd882d9552a64d9 | bbaa40699b3386b7d0bf90adb7e650a4 | 设置任务之后, 通知run方法, 开始执行这个任务 | public class CompletableFutureTest
@Test
public void thenRun() throws InterruptedException {
CompletableFuture.supplyAsync(() -> {
try {
Thread.sleep(2000);
} catch (InterruptedException e) {
e.printStackTrace();
}
return "hello... | 1 |
d236de1b4c97d0a595f1b77e1e891b7f | 639c0aa65241e83ae598795affd4f269 | Class to hold ice optical property data. | self.W = half_width
self.n = n
self.g = 9.80665
self.rho_ice = rho_ice
self.rho_water = rho_water | 0 |
5946c89b07db7db41cf58d55d712c3a8 | a5e0339d29dc75f95b7c97b000d14234 | Builds an augmented data object to be passed when a template calls another,
and needs to pass both original data and additional params. The returned
object will contain both the original data and the additional params. If the
same key appears in both, then the value from the additional params will be
visible, while the... | class Request
modifiedParams(params) {
let defaultParams = this.defaultParams();
return Object.assign({}, defaultParams, params);
} | 1 |
190eac561776d945976174e816e287b1 | 7da613a692d4702a37f79df4e626588f | Allocation of an interval which value is [-oo,+oo] | bottom_interval = Interval(float("inf"), float("-inf"))
return IntervalAbstractState(
dict({name: bottom_interval for name in self.variables})) | 0 |
d3a71317b4d4b9ed181cca63b0a20228 | 94b6db97f4f7dc4efcd9bcabc00d3e58 | Sets the tags of all queried game objects. | Action<APIMessage> successCallback, Action<WebRequestError> errorCallback)
{
string endpointURL = API_URL + "/games/" + APIClient.gameId + "/tags";
UnityWebRequest webRequest = APIClient.GenerateDeleteRequest(endpointURL,
... | 0 |
46c7853b3974ff61d5aa8a9cce774ac7 | 2a50f23d6c8045b4d47e99dc6b7d063d | convert number represented in base to decimal | result = 0
digit = 0
while number//(BASE ** digit) != 0:
result += (number % (BASE ** (digit + 1))) // (BASE ** digit)
digit += 1
return result | 0 |
7b6890b055777b6eb7a356ddb911c0dd | 6bb9a64e96a8251e63737f4a5f4f2ac1 | 从类型的全名中获取类型名称(不包括命名空间) | namespace Phenix.Core.Reflection
public static class Utilities
public static string ExtractTypeNamespace(string fullTypeName)
{
if (fullTypeName == null)
return null;
string result = null;
if (IsTypeName(fullTypeName))
{
string ... | 0 |
b9cb79fe45c8917817515510e53501a1 | c95e931232bf8f6e8ce9c68cf496481d | Removes any leading whitespace on a string | {
char *cursor;
char *dup;
assert (string);
dup = strdup (string);
if (dup == NULL)
{
outs (RED, "\nError: unable to allocate memory: %s.\n", strerror (errno));
exit (EXIT_FAILURE);
}
cursor = string;
while (isspace (*cursor))
cursor++;
strcpy (dup, cursor);
strcpy (string, dup);
free (dup);
} | 1 |
c382ed4f568378452c94205d28618c98 | ac69ec95b78643685feac809e61bc352 | Get all specified methods from the given object, using the specified binding constraints. <br />
从对象中获取所有指定可访问性的方法信息 | namespace CodingMuscles.CSharpInnoSetup.Generation.Visitor
internal class PascalScriptVisitorContext : Disposable, ICodeWriter
public MethodInfo[] GetMethods(BindingFlags bindingAttr)
{
return _installation.GetType().GetMethods(bindingAttr);
} | 1 |
88d0b13e2dc39be447f61cd033a7f094 | f45c2ada1d788b43848b8e3a57d33d13 | Given a player's name, find the position of the player in the PlayerList (there is only one PlayerList). | for (int i = 0; i < WORLDS.length; i++) {
if (WORLDS[i].getPlayers().contains(playerName)) {
return i;
}
}
return -1;
} | 0 |
fa5e8d20cfcb9fae57737aab9957b3cd | daadccb4a9513b1943a7494a900d6aa6 | 保存关卡(第一种方法: 字符串写入文本) | void save(void)
{
FILE *fp;
fopen_s(&fp, "level.txt", "w");
fprintf(fp, "%d %d %d", map_choose, difficulty, speed);
fclose(fp);
} | 0 |
e9f338422e6cb7ac1ecd6827b627eb00 | bc18d395d855d3a443637224ef4bf5a4 | 修改申请表单的担保公司,修改申请表单的状态为'总行审核通过' | @Controller
@RequestMapping("/propertyCompany")
public class PropertyCompanyController extends BaseController{
@RequestMapping("/applySupper.html")
public ModelAndView applySupper(HttpServletRequest request) throws Exception {
String id = request.getParameter("companyId");
String photoBusinessLicense = "";
Strin... | 0 |
eba9d4ec18c817663d57ccd2ce98c60a | e0305ad01f82d3e8511a22fd0f9bdcd0 | Prune backupsets to only those in the specified range. | String bucketName,
String fromSnapshot,
String toSnapshot)
throws IOException {
throw new UnsupportedOperationException("OzoneManager does not... | 0 |
fd8e1c4f7f3a047d3aab4d9cfc9b2cd5 | 3ac1a93aa039c55f750a83633746be0c | Set the rendered width and height of this text.
Inspired by https: //stackoverflow.com/questions/33777577/javascript-get-actual-rendered-font-height | let { style } = this
const { transform, container: { width: cw, height: ch } } = this
const { content = '' } = style
style = extend({}, this.styleFromParent, style)
style.breakWords = true
style.wordWrap = true
style.wordWrapWidth = size.width
if (style.co... | 1 |
fb8df2a443395e1915058ff5c3337111 | 9cddecf40eb815c6f4eddf7fd7413f1c | 如果假设传入的值为True,那么就会执行后面测试,否则直接停止执行 | def test(a):
if a > 0:
return "aaaa"
return None | 0 |
a2e62bf4324616fd0263858db9a62157 | df0cb8cdb625e3d8310005f7ee898f4c | Direct user to ORCID registration prompt before submitting MS | if not request.user.groups.filter(name='contrib').exists():
raise PermissionDenied("MPFile submission open only to contributors.")
project = request.user.institution
contributor = '{} {} <{}>'.format(
request.user.first_name, request.user.last_name, request.user.email)
try:
from... | 0 |
345b1aaf1e71a423828dbc7144245626 | 0caf9fc5b4540d66cec362f58f311d26 | Initializes new instance of UpdateSignaturesRequest. | api_version: Optional[str] = None,
se: Optional[str] = None,
sig: Optional[str] = None,
sp: Optional[str] = None,
sv: Optional[str] = None):
if api_version is not None:
pulumi.set(__self__, "api_version", api_versio... | 0 |
21eb9e10001cc3297e03a7fc138d51ab | 857772a1aa61ca14c500521ef891ba75 | Returns the seller name of this buy sell products. | public class Order implements Conservable{
public String getSeller(){
return this.purchase.getSeller();
} | 1 |
39f460e66011e3154dcf0f2f7da99177 | 659f78f65dc966db89443c74a768d0fb | Initializes the SNI client. | {
ni.MouseClick += new MouseEventHandler(ni_MouseClick);
ni.Icon = Resources.DisconnectedSml;
ni.Text = "Offline. Connecting...";
ni.Visible = true;
ni.ContextMenuStrip = new ContextMenus().Create();
timer = new System.Timers.Timer(1000);
... | 0 |
5c299644d0d914dbfc8fc21302f79939 | ce3a7c0e7a5a111d2a657da0115f7c3b | Test if code == 0 for successful API call. | def test_api_calling_code():
client = WebClient(token=settings.SLACK_BOT_TOKEN)
api_response = client.api_test()
assert api_response["ok"]
assert api_response["args"]["token"] == settings.SLACK_BOT_TOKEN | 0 |
cfaf0d92d4df701015ac24dcab81f365 | e3dd00b274b22837cbeadece8f853ef9 | Sets the viseme to morph target. | namespace House
internal class House
void synthesizer_VisemeReached( object sender, VisemeReachedEventArgs e )
{
if( VisemeReached != null )
{
VisemeReached( this, new VisemeEventArgs { Viseme = ( Viseme )e.Viseme } );
}
} | 0 |
ddc4c90d80399bc41945c25e8f7eb117 | 005daa23e68389324b46b719a0f24c5b | <p>
Gets information about a workflow run task.
</p>
Asynchronous callback handler for events in the lifecycle of the request. Users can provide an
implementation of the callback methods in this interface to receive notification of successful or
unsuccessful completion of the operation.
Documentation</a> | java.util.concurrent.Future<GetRunResult> getRunAsync(GetRunRequest getRunRequest,
com.amazonaws.handlers.AsyncHandler<GetRunRequest, GetRunResult> asyncHandler); | 1 |
19ca7f46b769fd6409a44949e7016d97 | 43e19b35c6bdf4122807a595539528bb | Load QR Code asynchronously and with a fade in animation | let message: string = '';
this._doQrLoginSubscription = this.loadQrFromCameraAsync()
.pipe(
flatMap((code) => {
message = 'Code has been scanned successfully';
return this.qrLoginService
.resolveQrLoginSessionAsy... | 0 |
da00e9be6bba1f8b591912f3b925ce19 | 352c488a4666ea805e9ed990eb604b4a | 获取所属教室ID | @Table(name = "apartment_week_record_sub")
public class ApartmentWeekRecordSub extends BaseEntity<ApartmentWeekRecordSub>
public Long getSchoolId() {
return schoolId;
} | 0 |
c23e6cd3de7b34ec9efe16a642e451bb | 206742fac1edff9e663eb3825cb42832 | Gets the confirmation details for the specified subscription.
Transactions Per Minute (TPM) per-tenancy limit for this operation: 60. | namespace Magento.Rest.Api
public partial class CustomerAccountManagementVApi : ICustomerAccountManagementVApi
public string CustomerAccountManagementV1GetConfirmationStatusGet (int? customerId)
{
ApiResponse<string> localVarResponse = CustomerAccountManagementV1GetConfirmationStatusGetWithHttp... | 0 |
873cee8d4f4ac990ca747cd359c7d4a0 | 27aa1174cf6f76e97885e18b12850ee6 | textがモニターの外に出ていく動き | public class TitleManager : MonoBehaviour
private IEnumerator MoveAnim_start () {
float time = 0;
float time2 = 0.5f;
while(true) {
time += Time.deltaTime;
time2 += Time.deltaTime * 100;
startText.GetComponent<RectTransform>().localPosition += Vector3.right * ... | 0 |
a40d5d1a529537cf9880f7dee5f5a77c | eed37447672013dee23c9a94e4e8d4b9 | Convert Bytes to MiB | def bytes_to_mb(byte):
return round(byte / 1000 / 1000, 2) | 0 |
19bab5c01e873ab0db80529e3fcadf56 | 128192e0c72ec7159f1a01a4a1870c8c | zipファイルをアップロードする | {
$error = FileUploadError('file');
if($error !== true)
{
return DataReturn($error, -1);
}
$type = ResourcesService::ZipExtTypeList();
if(!in_array($_FILES['file']['type'], $type))
{
return DataReturn(MyLang('form_upload_zip_message'), ... | 1 |
b365e97669acd7e4a1a52831594dc6e4 | fc8e78e3337f7bac88759b1618442240 | This is a do nothing routine.
The routine that used to be here did not work for Swift. | void runSwiftFun(void){
swiftFuncIMP(10);
} | 0 |
82558b218b785a058dc1e9e87c70a639 | ac13eb7ded486e58a7ce5f4564ff5a0f | バイナリからVector2読み込み | fun ByteBuffer.readVector2() = vec2Of(double, double) | 1 |
1e1f8fad35cba18c08b78f703b32382b | 7d9f4ae5a1e1cbfa50a02ac037090f8e | Signed less than | class BigInteger
public function lt(BigInteger $b)
{
$result = $this->cmp($b);
return ($result==-1);
} | 1 |
e9185f1482f9aa148536c4d4ce9c67ca | 4bd42eb20118b8a2ad866062c32cfff8 | Unloads texture without fully disposing. It may be able to be restored by calling ReloadIfPossible | namespace OpenBveApi.Textures public abstract class TextureInterface
public virtual void Unload() { } | 1 |
5c28af3c5e7b8e997a026bd257a72191 | 7fd34e61a136d5bdb28b5203851d7908 | Display list of vragenlijst based on current theme and subject | class QuestionController extends Controller
public function index($theme_id)
{
$questions= Question::all()->where('id_theme',$theme_id)->where('questions.is_private',false)->sortByDesc('id');
$reponses = \DB::table('reponses')->join('questions','questions.id','=','reponses.id_question')->select('que... | 1 |
cff94aac4fe3afa44fcf8d929cf1cb6d | bb6cf40ebc6c11aff3ec8650b2193d51 | *******************************************************************************
NOMBRE DE LA FUNCIÓN: Cmb_Requerido_Validating
DESCRIPCIÓN : Valida que el combo box sea seleccionado un elemento
PARAMENTROS :
CREO : Luis Alberto Salas Garcia
FECHA_CREO : 01/Mar/2013
MODIFICO :
FECHA_MODIFICO:
CAUSA_MODIF... | Lbl_Ecabezado_Mensaje.Text = "Es necesario.";
String Mensaje_Error = "";
Boolean Validacion = true;
if (Cmb_Empleados.SelectedIndex == 0) {
Mensaje_Error = Mensaje_Error + "+ Seleccionar el Empleado para Resguardo.";
... | 1 |
9e7e5e6be018d2392435ae1fba047abd | 0d53aae00baaee08dbd2190c8342264b | Gets the currently configured {@link TypeConverter} for the given context - if any. | class ModelContext
public TypeElement getConverterAnnotation() {
return converterAnnotation;
} | 0 |
bc9d0bb298088723328616ce36500c56 | a1ebc29ff69327cc161d660695b0b753 | Creates an edge object for each unique pair of vertices in this model that share a triangle | {
List<Triangle> listTriangle = new List<Triangle>();
for (int i = 0; i < vertices.Count; i++)
{
Vertex v = vertices[i];
if (v.DistanceNeighbours.Count >= 2)
{
Triangle.AddTriangleToList(v.IndexInModel, v.Ind... | 0 |
00ec17084bea68ab98f8a379bfa6bb5b | 2339dc8cbbe953eaaefde751eda63882 | Get the IF frequency of the SSB
Input:
None
Output:
IFfreq [GHz] | IF_offset = np.mean(np.arcsin((IF[10,:5000]-self.a1)/self.b1)*180/np.pi)
IF[10,:] = np.arcsin((IF[10,:]-self.a1)/self.b1)*180/np.pi
IF[11,:] = np.arcsin((IF[11,:]-self.a2)/self.b2)*180/np.pi - np.mean(np.arcsin((IF[11,:5000]-self.a2)/self.b2)*180/np.pi)
IF[12,:] = np.arcsin((IF[12,:]-sel... | 0 |
53526e204c60bf1af869db048d617e46 | 394484406e060ddac3e057d530d63bdf | Create a count cache table with dbDelta functionality. | static char* queries[] = {
"BEGIN",
"CREATE TEMPORARY TABLE items (refcount, proc UNIQUE, name, url, path, "
"worker, options, variants)",
"CREATE TEMPORARY TABLE indexes (file, name, attached)",
"COMMIT",
NULL
};
sqlite3_create_function(db, "REGEXP", 2, S... | 0 |
caa3d3a90b4fc22a6f4ee0384b5132b1 | 1a1170bc0d23e57dc133c36d36da3ab3 | Gets the version number of the cached data with remote regions. | class MutableData extends h.NetworkObject
getVersion() {
return lib.mdata_get_version(this.app.connection, this.ref);
} | 1 |
1a7462dac34311b5676210ce0d59b58c | 5d3aca37f298efaf11b304996f208afd | Populates all ministries. | def populate_base():
for nickname in NICKNAMES:
db.session.add(NickName(**nickname))
db.session.add(PartyType(party_typ_cd='FIO', short_desc='Incorporator', full_desc='',))
db.session.add(PartyType(party_typ_cd='DIR', short_desc='Director', full_desc='',))
officer_type1 = OfficerType(
of... | 0 |
4ecb137c1b1a75cb337c546e62ae750c | f19f38fe0b4b6e86d767ce0499671bc9 | 对一个概览页完成遍历处理之后的事件.可告知当前采集计划的进度总量信息(对于组合遍历时可大致告知总体进度) | namespace Leo2.View
public partial class frmMain : DevExpress.XtraEditors.XtraForm
private void ShowCompleteInfo(object sender, BaseRule.ScanCompleteEventArgs e)
{
if (this.InvokeRequired)
{
this.BeginInvoke(new BaseRule.SiteScanCompleteEventHandle(ShowCompleteInfo), ... | 0 |
7866497af68a4c3b926c49d66d68a72a | 1ccf44f4f01b4c61d5b00eb493e2690c | Кватернионное умножение | Kvaternio Kvaternio::operator*( const Kvaternio& k ) const {
return Kvaternio( w*k.x + x*k.w + y*k.z - z*k.y, w*k.y + y*k.w + z*k.x - x*k.z, w*k.z + z*k.w + x*k.y - y*k.x, w*k.w - x*k.x - y*k.y - z*k.z );
} | 1 |
4b014c8700a129c737226255bd2d9b85 | 423845e59bcd4560734868f5f7e991b7 | update the map that contains jobs and subsurfaces that need to be summarized | public void updateMap(); | 1 |
45e34e82cb1c8efef1245e8631a59719 | 2d37b436f99df9aeac39c1d9eddf45e4 | 获取进程的内存块区域 | unsigned long wing_get_memory(int process_id)
{
struct proc_taskallinfo info;
int ret = proc_pidinfo(process_id, PROC_PIDTASKALLINFO, 0,
(void*)&info, sizeof(struct proc_taskallinfo));
if (ret <= 0) {
return 0;
}
return info.ptinfo.pti_resident_size/1024;
} | 0 |
f8e6caa4f2f6ef89637837fab125a911 | 6e4195983a556a7d9eefdcb19b5844de | Removes all but the selected PDFs from the list. | export class DatacartComponent implements OnInit, OnDestroy
removeByDownloadStatus() {
this.selectedData = [];
this.cartService.removeByDownloadStatus();
this.updateCartEntries();
this.dataFileCount();
setTimeout(() => {
this.expandToLevel(this.dataFiles, true, 1);
}, 0);
this.isVisibl... | 0 |
09c5aa9153340294132a78a6fc299007 | b4beff3bcd3ef3d17638e6dd3e860853 | 清除数据,释放指针 | void CanDataProvider::Release(){
if(m_pmapAnalogData){
m_pmapAnalogData->clear();
delete m_pmapAnalogData;
m_pmapAnalogData=NULL;
}
if (m_pmapDigitalData){
m_pmapDigitalData->clear();
delete m_pmapDigitalData;
m_pmapDigitalData=NULL;
}
if ( m_pmapDigAD... | 1 |
2cd9eb5a46b6e64958d6b7d8b172a664 | ea1c193f402453bf5067af0d48fcaa91 | Checks whether the session has changed. | class Session extends Component implements SessionInterface
protected function check()
{
if ($this->data === null) {
$this->reload();
}
} | 0 |
428b62594cd6dfc27e0549ee3bc39832 | 2be8635e8a8e25f360739dc1e3f65d86 | 最近七日支付订单 | class Finance extends Common
public function WeekOrderDetail(){
$params = input();
$number = 10;
$nowTime = time();
$params['pay_time'] = $nowTime - 7*24*60*60;
$where = FinanceService::OrderDetailWhere($params);
$total = FinanceService::OrderDetailTotal($where);
... | 1 |
9670ea5c9690c8326cb2c5daf3ea6a82 | 87ed0decdc15e6270a366d7756785272 | Вычисление углов по матрице поворота | class Orientation:
def get_angles_from_rot(rot_mat):
sy = math.sqrt(rot_mat[0, 0] * rot_mat[0, 0] + rot_mat[1, 0] * rot_mat[1, 0])
singular = sy < 1e-6
if not singular:
x = math.atan2(rot_mat[2, 1], rot_mat[2, 2])
y = math.atan2(-rot_mat[2, 0], sy)
z = math.at... | 1 |
ce150beddcbdba8e49b59e8af411c9a6 | e1602b211199a847b0c1714587c44689 | 기존에 값이 없는 것만 넣는다. | class Labeling(Frame):
def noBtn_cmd(self):
for i in self.tree.get_children():
self.tree.delete(i)
with open(self.dirpath + self.savefname, 'r') as f:
all_data = f.read()
all_data = all_data.split()
cnt=0
tmp_images=[]
self.original_images=self... | 1 |
2e7c6f2f928fcc7eb01bf7a27ea700a7 | dda30b2a5f98112bf8eb24a47daefbbc | The number of local songs in the list. | int getItemCountLocal(); | 1 |
076568d6ee5d1af2316185cd9024b032 | ad7204a58c2d7963a3c9b2189a70c4ba | 设置刻度短步长 | public class TapeView extends View
public void setSpace(float shortSpace) {
this.shortSpace = shortSpace;
axis.setShortSpace(shortSpace);
axis.calculate();
postInvalidate();
} | 1 |
fc0daed86ea84fd1f0033b1e79034da7 | 25c592e13b344000ab2ea9cf84db77f2 | Increases or decreases the recording menu value | def ToggleRecording():
PressKey(VK_MENU)
PressKey(VK_R)
ReleaseKey(VK_R)
time.sleep(1)
ReleaseKey(VK_MENU) | 0 |
e2fa4eb0278e4178782150620ce4ad20 | 717ebe24100392840df046be506fde66 | Set the absolute location of the Actor on the Map. | namespace UnrealEngine.Engine
public partial class AActor : UObject
public void SetActorRelativeLocation(FVector newRelativeLocation, bool sweep, ETeleportType teleport = ETeleportType.None)
{
Native_AActor.SetActorRelativeLocation(this.Address, ref newRelativeLocation, sweep, (int)teleport);
... | 0 |
493da23c1608e30b34edd048914a9418 | 18b2ceb68201ee8c754b4afde854e587 | 蚂蚁金服笔试题:通过反射调用对象某个方法,包括私有方法 | public void test1() throws Exception{
DemoClass demoClass = new DemoClass();
Class cls = demoClass.getClass();
Method privateMethod = cls.getDeclaredMethod("demoMethod", String.class, Integer.class);
if(privateMethod!=null){
privateMethod.setAccessible(true);
... | 1 |
d24ab9f9cd0a1ac48fe570c9c0dd6cc8 | 22ebc153fe7876788441e53d810b2f42 | Internal method to validate legal IDB options | def validate_idb_names(do_repair = 0):
return ida_nalt.validate_idb_names(do_repair) | 1 |
1e6c8694c746046c0ff36e36937d11b7 | 29f36321cdb9f50e5ab98c06e13df000 | Toggles the current state of a GPIO. | static void toggle_cb(void* arg)
{
uint32_t *pin = (uint32_t *) arg;
hal_gpio_toggle(*pin);
} | 1 |
9f307e1e68546d01efee5b9df15a9d4b | cfcd6bcc2a980639ce7fff22099aa489 | 获取拾取图片数量限制 | export class EditRecordPage implements OnInit,OnDestroy
getLimitCount():number{
return 9-this.viewData.updateForm.imgPaths.length;
} | 1 |
da9eda9f3a5a004d924489f1e4ff1a9b | caf166a4e8959c0d589e4536493b8942 | update the next object to be picked | public class MainGameCode : MonoBehaviour
public void NextObject()
{
if(activeObjectIndex < playObjects.Count -1 && timeLeft > 0)
{
playObjects[activeObjectIndex].transform.position = originalPositions[activeObjectIndex];
playObjects[activeObjectIndex].rigidbody.velocity = Vector3.zero;
activeObjectIndex+... | 1 |
1e6719540a5a0a4704663a39e0545ec2 | 403074403f7ee7a623a9e7e8070dac61 | 当前step追加log | class AllureRestLogExtension extends Extension
public function stepAfter($e)
{
$requestData = $this->getRequestInfo();
if ($requestData) {
$this->addToLog($requestData);
}
} | 1 |
d6700e3ce50669b47c39a04123f47904 | 478d9b25be30a9ea626a8b0f96b9fc6f | New - returns initialized server | func NewServer() *Server {
server := &Server{
Server: rpc.NewServer(),
}
server.Auth(DefaultAuthorizationFunc)
return server
} | 1 |
1e3cf1b4bffdaffe14a5954ef3c700ac | 833fc293b897de5711b98cbf82c2ab39 | Cut path into two pieces by point in between nodes | void Stationing2::cutPart(PolyLine2& source, PolyLine2& result, double parameterBeg, double parameterEnd)
{ assert(parameterBeg >= 0);
if ( parameterEnd > source.paramMax() ) parameterEnd = source.paramMax();
assert ( parameterBeg <= parameterEnd );
result.points().add(source.getPoint(parameterBeg));
... | 0 |
8fedbb878f4454e4096b20646c068556 | 74c3850385d7dc761fae43be0248ba11 | returns the count of digits of n | def digitCount(n):
return (n == 0 and 1) or int(math.log10(abs(n))) + 1 | 1 |
e243193484a7d54844d2a4bf3724fa3d | 2b3c53b97f11873a9c463f0a9ae98747 | 根据物资编号查询调拨/领用信息 | @Service("productionService")
public class ProductionService
public PageData findProductionTowrowByNO(PageData pd) throws Exception {
return (PageData) dao.findForObject("ProductionMapper.findProductionTowrowByNO", pd);
} | 1 |
866024efbe1a71a063607b6eef7665bd | 77c43aa0ba5e24c8b3e465986c15bf41 | Returns names of the 'category_bits' bits. | public String[] getCategoryNames(); | 0 |
4f2f81089fda933c6f053ef26dec82d7 | c6d55f5c164c4dc31dc898fcd72e4045 | 1、获取所有学校,让学生选择 | throws ServletException, IOException {
List<School> schools = this.schoolService.getAllSchool();
request.setAttribute("schools", schools);
request.getRequestDispatcher("importUser.jsp").forward(request, response);
} | 1 |
c048989d1853e3b1b65f7b68876444c9 | 1ce6ebb41d5491200064ee72e2ca4067 | When called the <img> will become a picture of a dog | namespace MovingCatNoahV
public partial class frmMovinCat : Form
private void mniCat2_Click(object sender, EventArgs e)
{
this.picCat.Image = Properties.Resources.cat2;
} | 0 |
ddbfe657845932d02b8b81fec6d3f0a4 | a73021d75f95bc0d0229e846c73b309e | Retorna o array de pedidos e clientes. | {
$return = array();
foreach(Solicitacoes::all() as $key => $value){
$return[$key]['id'] = $value->id;
$return[$key]['cliente'] = Contact::find($value->id_contacts);
$return[$key]['pedido'] = Cardapios::find($value->id_cardapio);
}
return response(... | 1 |
072a1d9c6276e8a2c985ddd96aeb7d9c | b6a07467b0a45a5e1f3bf2e5c7548430 | Adds a line to the fragment shader code which modifies the color by
the specified color filter. | const char * outputVar,
SkXfermode::Coeff uniformCoeff,
SkXfermode::Coeff colorCoeff,
const char* filterColor,
const char* inColor) {
SkString colorStr, constStr;
blend_term_string(&colorStr, colorCoeff... | 1 |
7a32c171fb8ceab806d97688f4eeeb6d | f971f7fdc70ef65d72bffbeea7b2e40d | Gets the validator with the specified node identifier. | namespace NeuroSpeech.UIAtoms.Controls
[StyleTypedProperty(Property="ItemContainerStyle",StyleTargetType=typeof(AtomFormItemContainer))]
[AtomDesign(
DisplayInToolbox = true,
ToolboxTabName = "Atoms",
DesignTimeProviders = "NeuroSpeech.UIAtoms.Design.Form.AtomFormMenuProvider"
)]... | 0 |
78c6887ff3811834e99e6aae5b8bcd5f | fa30b401e4137841851f2aa775615d1c | Convert forward propagating detection vector into a backward propagating (time-reversed) source vector. | class LinearChainCRFTagger:
def _compute_backward_vectors(self, sent, tag):
backward_vectors = np.zeros((len(sent), len(self.total_tags)))
for i in range(len(sent)-1, 0, -1):
if i == len(sent)-1:
if tag[i] == STOP:
backward_vectors[i] = np.ones(len(self.to... | 1 |
1c93036c0cc146da27d4984459295b8c | 7ce5d8fe07ee21269b9eb92f8231627a | 过滤炸弹 | export class SendCard
private doBombArr(list:Array<number>):Array<number> {
var blist:Array<number> = this.getBombArr();
var i:number = 0;
var len:number = list.length;
var j:number = 0;
var jlen:number = blist.length;
var insertid:number = 4 * Mat... | 1 |
3a9e5bbac3d87cc4ad0631743d5d24ea | 8ea7e9ac27537d4f85ce0e2f9fad9afe | 0-forceless, 1-normal, 2-protected | let force = 0;
const regex = /[$-/:-?{-~!"^_`[\]]/g;
const lowerLetters = /[a-z]+/.test(p);
const upperLetters = /[A-Z]+/.test(p);
const numbers = /\d+/.test(p);
const symbols = regex.test(p);
const flags = [lowerLetters, upperLetters, numbers, symbols];
const passedMatches = flags.filt... | 0 |
642db36176e7a4119702cd6c08da6e5b | d85ca4a4b6759d28079014bc2fc6fdb4 | 将合并范围字符转换为偏移后的新范围字符 | {
string str = myStr;
str = str.Replace(displaceA, displaceB);
return str;
} | 0 |
8e2d18d7e0de675add31b1187d4f7d42 | 1b90409deeb755e8c6bd3468be17de85 | Return descriptive information about this Service implementation and the
corresponding version number, in the format
<code><description>/<version></code>. | String getVersionInfo(); | 1 |
202c4b443f10b412ca36d4807448ccd6 | c12441299157cfd69daa5a8df41eff69 | 获取接口地址:合同查看接口 | QueryFilter filter=new QueryFilter(getRequest());
String contractId = getRequest().getParameter("contractId");
String url="";
if(!"".equals(contractId)){
String projectId = getRequest().getParameter("projectId");
String businessType = getRequest().getParameter("businessType");
String htType = getReques... | 1 |
5a5cb8eb2c7150a344eb17c1fdbb4ada | 222e8228057939779ad9e0c328d4c028 | Função para tentar buscar algo primeiro na rede e, caso não tenha conexão, tentar buscar em cache. | function cacheStrategyNetworkFirst(request, activeCache)
{
return fetchFromNetwork(request, activeCache ? activeCache.getName() : null)
.catch(e => console.error("[ServiceWorker]", e))
.then(response => response || fetchFromCache(request));
} | 1 |
ae3db354ce0ef8f382800d9702d68469 | 11cf23a2c72d0b2ea8ffa403ed7f6424 | Fires a PUT request to the specified URL path of the base URL with the specified request data. | {
HttpContent? requestBody = default;
try
{
if (body is HttpContent content)
{
requestBody = content;
}
else
{
requestBody = DefaultContentBuilder(body);
... | 0 |
100374c01419a7f4cfb06e66cbc80982 | 08acf8a4cec1dd3a834baa0c59619fdd | 如果是存在Object.create方法,那么__data__是通过Object.create(null)的方法创建,不会有原型链。
所以直接去key值就好。这里可key值要求的是本身自带的,不是通过原型链获取的值。 | function hashHas$1(key) {
var data = this.__data__;
return nativeCreate$3 ? (data[key] !== undefined) : hasOwnProperty$3.call(data, key);
} | 1 |
df7bce60c0165d0b9e2397e9daae2c6a | 8c50d3a37e8ea0471f91d1cea1f1fa2f | Save命令的Excuted事件处理函数 | {
if (CommandCanvasList.GetOwnerCursor() == Cursors.Wait)
return;
string path = ShowSaveDialog();
if (path is null)
return;
SaveXml(path);
} | 1 |
a903331628d1784f026573dfc3934f7c | 1d2304c1cfcadabe0c7b4f40ad94a231 | Creates Explore Data Structure | {
$data = $this->get($num_page);
$data['controller'] = 'users';
$data['cf'] = 'users/explore/';
$data['views_folder'] = 'users/explore/';
$data['head_title'] = 'Usuarios';
$data['head_subti... | 1 |
d09fbb7f9c51d83e6f070fc639ad3944 | adfbfac567792996adcfe3ec42a66bc5 | 測試一篇文章能夠辨別相同的標題,並產出不同的title、slug. | class PostCRUDTest extends TestCase
public function testUpdateCategoryDuplicatedSlug()
{
$author = factory(Author::class)->create();
$post1 = factory(Post::class)->create([
'slug' => 'slug-1',
'author_id' => $author->id
]);
$post2 = factory(Post::class)->creat... | 0 |
537018a25382ab5efee45ccf9be0e121 | bfc256397631cc9b56b2b2f1ddc3fe31 | Checks the SD card, initializes it if not already, and draws the status icon. | void SdStatusUpdate (void)
{
Int32U Data = _CardRCA;
_SdDskCtrlBlk.WriteProtect = _SdWriteProtect() |\
_bSdPermWriteProtect;
if(!_SdPresent())
{
_SdDskCtrlBlk.DiskStatus = DiskNotPresent;
_SdPowerDown();
return;
}
if((_SdDskCtrlBlk.DiskStatus != DiskCommandPass))
{... | 1 |
7cea4babd35fcca71f63bd2e06578426 | 9a5588a97e996f9cf699d81dec2d02f8 | Считается ли текущий раздел админстративным? | class Manager
public function isAdminZone()
{
if (!isset($this->is_admin_zone)) {
$uri = strtok($this->http_request->server('REQUEST_URI'), '?');
$this->is_admin_zone = \Setup::$INSTALLED && $this->admin_route->match($this->host, $uri);
}
return $this->is_admin_zone;
... | 1 |
b2c79cb4fcbb7217b102a9565b6ea3bc | 9d913d5349db3e04a9ae98d67c3b6395 | Erase any existing saved combustion mixture if detonation gas type changed. | {
if (comp == null) throw new ArgumentNullException(nameof(comp));
if (comp.Network == null) return;
DestroyNet(comp.Network);
CreateSlurryNets(comp.GetAdjacentSlurryComps());
} | 0 |
5200d279489f25e6b3a55bf53471dfb5 | 662dd9fc38aec6127a31a6fe95f0e041 | Returns the random consistency index (RCI)of the matrix | double f_RI(int Strouve[],int Sref[],int N)
{
double comb = 1.0;
for (int i=N; i>=(N-2+1); i--)
{
comb*=i;
}
comb/=2.0;
double a=0.0;
double b=0.0;
for (int i=0; i<N-1; i++){
for (int j=i+1; j<N; j++){
if(Sref[i]!=Sref[j]){
if(Strouve[i]!=Strouve[j]){
b++;
}
}else{
if(Strouve[i]==Stro... | 0 |
1d7870a6b79f79c1703d06eb9312f59c | ecbe41437e3b3e55b046848e382d44c8 | Test if there are virtual nodes | public boolean hasNodes(); | 0 |
211e70a14a647fdc8906dddde472c738 | 5b23d6d2666532f0ce0c37e3c2920df7 | Getter for accessDevice | public class UsbHub{
public UsbFlash GetDevice(){ return device; } | 0 |
f38e11b1b67730970b55c51e579d953b | 306daa777e75df5565961acba24b8d36 | Creates and initializes a new {@code Callback} object.
<p>Use {@link #dcbFreeCallback FreeCallback} to destroy the {@code Callback} object.</p> | Oas30Callback rval = new Oas30Callback(name);
rval._ownerDocument = this.ownerDocument();
rval._parent = this;
return rval;
} | 1 |
e6bbdda859f3debb908f6b888bb65ed9 | d03fdefcc0c7446f830c52c9c08b360f | 获取去年最后一个月 | public class NewDateUtil
public static String geyLasterYearMonth() {
return LocalDate.now().minusMonths(12).format(MONTH_FORMATTER);
} | 1 |
7757836a6d73f198c188a82b66a94ea3 | cd8c93b0129b2c739a7ad9f2371c900c | 读取hdfs上的csv文件,返回pandas的DataFrame | def reade_csv(file_path):
df = pd.read_csv(file_path, encoding='utf_8_sig')
return df | 0 |
7afe3230a78e7812d53df559e731bf6d | b4e823cb477c98601dfb6ce3ccadb6d0 | 通过数组定义来引用类,不会触发此类的初始化 | {
string str = "hello world";
int[] array = new int[5];
for (int i = 0; i < array.Length; i++)
array[i] = i;
var Array = array;
var String = str;
} | 0 |
89d4399cf4c17e277ce1b819fc79ca0a | 12ad40637e2eb76ca41b23402f79972e | 更新学员签到记录并且更新长期班卡票剩余次数 | namespace Fantasy.SmartTraining.Business.Course
public partial class CourseClassBusiness
public static void ClassStudentSignIncrease(string classIds, IDbTransaction tran = null)
{
CourseClassDao.ClassStudentSignIncreate(classIds, tran);
} | 0 |
89ad9b08b8ba9a72672e214a0bc71750 | 16b40b070c08b8266e680573257c318d | turn on/off oscillator
on - boolean, Osc on if True, else - Osc off | if not self.off:
self.off = True
else:
self.off = False
if onoff is not None:
self.off = onoff | 1 |
6e5c7d2a3d28d53abcf67c544768d724 | 4a238c5df6d7494c116a8c46c72c296a | @brief Get first entry from the TX packet generator table. | void *rfnv_tdscdma_b34_rx_item_table_get( void )
{
return( (void *) &rfnv_tdscdma_b34_rx_tbl );
} | 0 |
ba3e939bbccc0277b7d7507f63347399 | 7f25eb9e0f45934b976575313c634bfa | Method stub - does nothing | public class DummyInputWindow implements InputWindow
@Override
public void open() {
} | 1 |
4f0da583185bd87a57e8220b962ba2d5 | e133a8776b9210052c59ec6a79e865ac | Stream file and close server on success or error. | class Server_File:
def close(self):
self.stream.close()
self.stream = None | 0 |
84a5a58837c9a32d83c9945aac12c99d | 51ac776523515c42249c2f259bbffb4d | Creates the Vertices of graph and returns them as an ArrayList<Vertex<String>> representation of the
Vertices of g. | public List<Vertex> getVertices() {
List<Vertex> result = new ArrayList<Vertex>();
for(Integer i : vertices){
result.add(new Vertex(Integer.toString(i.intValue())));
}
return result;
} | 1 |
e062f63ce3900047b753fc8d199cb3de | b25edbddbb5704026de2fa9b180077d0 | Indicates whether the refresh argument for this handler has been
set to yes. This is used to force a refresh of the cached graph so
that we don't show inconsistent state to the user.
Returns:
a boolean indicating whether this handler should refresh the graph | class RefreshPropertiesAttribute(Attribute,_Attribute):
def IsDefaultAttribute(self):
pass | 0 |
73e9a70c85f296e052f2a9cba4bdf7f1 | 3de967e4ac7ec503a68db9e7492e6510 | .................................................................................................................................
Desallocation d'un etat sauvegardes
Arguments en entree :
IdentifiantEtat : Identifiant de l'etat Mascaret sauvegarde par SAVE_ETAT_MASCARET qui va etre supprime
.......................... | class Cell:
def _del_etat(self):
try:
del self._etat
except:
print("Variable état mal supprimer") | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.