query_id
string
corpus_id
string
query
string
code
string
label
int64
481ac525ffbd73459f239fcd2bfee301
8fdd435af03444888ca5e20424dbf297
Valida que un segment by Agency cumpla con los filtros actuales
class ImiModel(object): def valid_seg_filter(self, seg=None ): if seg is None or seg == {}: return True if type(seg) == type(""): seg = self.seg_filter_string_to_array(seg) if seg == "": seg = {"seg_type":"sic","filter":None} if type(seg) is not type({}): return False if "seg_type" not in seg or "...
1
6e59d11000954a0f4a8c6812f5d788a6
0fd37709def2df61e4d4731b350849d7
Add Category invalid case: blank category name
{ $this->expectException(CreateCategoryErrorException::class); $params = []; $categoryRepository = new CategoryRepository(new Category); $categoryRepository->create($params); }
1
53ab2d0bf8b8230cc9aaa8a955598d72
82a6d264a9efa128faf05b98075c94c2
获取浏览器可见区域宽高
if (document.compatMode == "BackCompat") { return { width : document.body.clientWidth, height : document.body.clientHeight } } else { return { width : document.documentElement.clientWidth, height : document.documentElement.clientHeight } } }
1
eb94726e5cf44c0af0d5c3670b76c097
b0a0086f1b5fad0d70f05c89edfe38ca
根据type、status和canDeleted获得对当前Personal_CI或II_Instance的操作。canDeleted表示获得的结果中是否包含Delete、Deactivate命令
namespace SonyCMS_Model public partial class CMSService public List<Personal_CIPack_SM> GetPersonalCIPackSM(string type, string status, bool canDeleted) { string owner = ""; switch (type) { case "apply": owner = "('User')"; break; case "app...
1
ff64a1d61041d91fe6aa226239c1301f
9a9f2bbd6e071b2580ee22cd61f5355d
@brief Allocates memory for a double pointer array.
ARRAYPTR temp = malloc(sizeof(DATA) * capacity); if(temp == NULL){ printf("Ran out of memory!"); } return temp; }
0
9e94931b405ab4a9c97aff0a323374e1
7a44b9aae3a0d0aecec25e93ac571151
Метод возвращает адресс устройства, на котором находится Юнит, например /192.168.0.12
public class Device public byte GetDevAddr() { return this.dev_addr; }
0
ad8c3f375b30fa5fc52b895ff6cef753
42e4073a14023f2ff7fc356631e40d2b
@brief Deinit streaming data
{ usb_status_t status = kStatus_USB_Error; usb_device_endpoint_callback_message_struct_t message; uint8_t count; if (NULL == audioHandle->streamInterfaceHandle) { return status; } for (count = 0U; count < audioHandle->streamInterfaceHandle->endpointList.count; count++) { ...
1
d19dd5cc0b713abe2766ee5cf88d209e
e8d689383213eefe4c3ea438dfc30608
Removes duplicates from an array of date strings and then returns a list of the unique dates.
def get_unique_dates(entries): unique_dates = [] for entry in entries: date = entry.date.strftime(DATE_FORMAT) if date not in unique_dates: unique_dates.append(date) return unique_dates
1
65a6f10674637e20590a95d070ccfb79
40f1bd2d48ac01b25e7f64657b9fb553
获得地点信息(不带条件)
namespace PDBM.ApplicationService.Services.Map public class MapService : DataService, IMapService public PointObject GetPointByPlace(Guid placeId, Guid areaId, string placeName, decimal lng, decimal lat, int profession) { PointObject pointObject = new PointObject(); pointObject.DataT...
0
d6eccf623cefb7dbf94ce8afc3f5218a
28862b6f5a23a1da82ae50d5f279c963
Routine to automatically determine the filter slide A/D count positions. This is done by driving the filter slide between the two limits, noting at what position A/D counts the filter indexer is set.
{ double scrollTo = filterSliders.ElementAt(filterIndex).Margin.Left; scrollValues["scrollOld"] = scrollviewer_equalizer.HorizontalOffset; double offset = Math.Min( Math.Max( scrollTo + rectangle_selected.Width - scrollviewer_equalizer.Actu...
0
e9e54bf04472b1041550b5516043bddc
110dd52f4383b4a735a9e62f1f44e1b9
一步式开户绑卡
export default class Card extends AbstractBlueTooth{ getStepTwoKey(notifyData, mac_id, manage_id){ return new Promise((resolve, reject) => { if(notifyData.id=="06"){ if(!notifyData['10'] && !notifyData['11']) return reject(1095); let data = { mac_...
0
2d9640a1d881d347e09409b2bacfa774
bee5e73062a62d83d818ca10b4caf42c
將db讀出之日期(ex:2014/12/29 上午 12:00:00)轉成指定格式
public class DateConvert public String convertSQLtoFullWebPrint(String dbFormatted) throws LACSDException { return convertDateTimeFormat( dbFormatted, FORMAT_DATE_JAVASP, FORMAT_DATE_FULL_PRINT ); }
1
e7cf14b42a2770b5871d2c02708c5af5
269de889bd48911c95a399581391f044
不管高度的设置Mode是什么,直接把View的高度按照宽度适配的缩放倍数进行适配
float destHeight = (float)currentHegiht* destWidth / currentWidth ; ViewGroup.LayoutParams lParams = (ViewGroup.LayoutParams)view.getLayoutParams(); lParams.height = (int)destHeight; view.setLayoutParams(lParams); }
1
e0a524e67d1ae0f52d858f5c96b1492c
4beb8b7a3a80b796f44a14a4e031ee58
Asettaa annetun flash-viestin, ohjaa selaimen etusivulle ja keskeyttää actionin suorituksen.
class ArticleController extends JsonResponseController public function setFlash($action, $value) { $this->container->get('session')->setFlash($action, $value); }
0
8c06fdb20e08745813ebb4417c013440
16587594f0dae2c78bdc7fc3cb76950f
Mets à jour la scène en mode "Pick".
namespace Codinsa2015.Server public class Scene void UpdatePickPhase(GameTime time) { PickControler.Update(time); CommandServer_Update(); lock (ControlerLock) foreach (var kvp in Controlers) { CurrentControler = kvp.Value; kvp.Value.Update(time); } ...
1
69d07aedf05abc21116c10c4bf196bc2
4fe2428f2fd34ad8bf68ca4a6f3cdd75
Function for inserting into a non full node.
void BTreeNode::InsertNonFull(int k){ int i = n-1; if (leaf == true){ while (i >= 0 && keys[i] > k){ keys[i+1] = keys[i]; i--; } keys[i+1] = k; n = n+1; } else{ while (i >= 0 && keys[i] > k) i--; if (ChildPtr[i+1]->n ==...
1
3f75cc928571595549940db20338a62a
d3c14c9fc6e5fe50d5a14df200235cc9
保持监听,循环接收服务器发来的消息
while True: if not exit_: try: res = client.recv(1024) except: break res = res.decode('utf-8') try: res_json = json.loads(res) msg = res_json['data'] from_user = res_json['from'] print('') print("收到来自({})的消息:{}".format(from_user, msg)) except: print('') print(res) ...
1
063018973ddcf9299cc07ced4dd0e399
8417c9758009f0c748cb9945647fbfd2
Get username from the database
require('Connection.php'); $query = "SELECT username FROM users WHERE _id='".$userid."'"; $res = mysqli_query($conn, $query); if($res) { $row = mysqli_fetch_assoc($res); return $row['username']; } return null; }
1
e4f9477b7e4dbbbe9c909de829ca0d02
e3dc9174345a945de1f72fa54a38442f
Selects all Triples which have a Uri Node with the given Uri from a Subset of Graphs in the Triple Store.
{ return (from u in ActiveGraphUris from t in GetQuadsWithSubjectObject(u, subj, obj) select t); }
1
30ee29661d15e3d4b21c97c9c9c30982
dc75ef5bd769e50d176fe3f9a56859a3
Retrieve the details of an instanced Destiny Item. An instanced Destiny item is one with an ItemInstanceId. Non-instanced items, such as materials, have no useful instance-specific details and thus are not queryable here.
public ItemInstance getItemInstance(Connection conn, String item_instance_id) throws Exception;
1
228df5d13d4f2a03294eb9bc06025bf8
ac00a99c1997734199503f4dfb30f07a
Get trlRfc value.
class RtlqTresorieEtat extends AbstractRtlqEntity public function getValue() { return $this->value; }
0
dc98edb537bf8b5dce120b9e9e3f437d
69c2967a59d318ae24fa291a25ec914a
Post action to delete movie
{ if(\Auth::user()){ if(\Auth::user()->access == 1){ $movie = Movie::find($id); if($movie){ $movie->delete(); return response()->json(['message' => 'Movie Erased.', 'code' => 201], 201); } else { return response()->json(['message' => 'Movie Not Found.', 'code' => 404], 404); } } ...
1
14b0e099f389cb3bcd1be3ffbb4c767b
9d2a253ef2e2f008b727130da7a28a86
Uninstalls the app with the given id
class InstalledApps(SimpleMDMpy.SimpleMDM.Connection): def delete_app(self, installed_app_id): url = self.url + "/" + installed_app_id return self._delete_data(url)
1
44ed78da48df47d052ee8c082abc57d7
f27f4e594e2f4da8e42e377a5978256b
Check if 'raid_tickets' has a value
class DelSceneImage extends \DrSlump\Protobuf\Message public function hasRaid(){ return $this->_has(6); }
0
401403f5373931a4fb81592e155439b1
5a3d4ef6db0bd34fc955f16c4e32ca70
Méthode permettant de gérer l'événement précédent sur le slider, le -400 permet d'aller directement à la dernière slide depuis la première car 5 images au total
export class LandingComponent implements OnInit prevSlide() { if(this.imageIndex - 1 >= 0) { this.imageIndex--; } else { this.imageIndex = this.images.length - 1; } }
0
5fff2af67152478c90bc11c6395d79fe
eb780e1dd4f401d06bbf7aa60cecc21d
default construct, sets coords to [0,0,0]
Vectorobject::Vectorobject(){ coordinates = (float *)malloc(sizeof(float)*3); coordinates[0]=0; coordinates[1]=0; coordinates[2]=0; }
1
597e97a45dfb2d48d11c2d1d8bcc577e
50ef1b6503a32932f1cb2f5e48f6b28b
创建唯一EF上下文对象,存在就获取,不存在就创建
namespace layDal public class LayDbContext public static DbContext Create() { DbContext contextInstance = CallContext.GetData("dbContext") as DbContext; if(contextInstance == null) { contextInstance = new layadminEntities(); CallContext.Set...
1
4f5b54d4aecf0c811a9f2fbe70b08a5f
859e7231550bcbf3ea13d84789e79a03
Statistics about system wide Disk I/O Returns a dictionary holding named tuples with I/O statistics for each mounted disk. Notes
class SystemPlugin(SensorPlugin, EntityManager): def disk_info(self): return DiskSchema().dump(self._disk_info(), many=True)
0
6a2caf452e6c24e07f0f4e6f4c74c994
294f69cb7cf6f93fa4dcffe92845a1c9
获取下一级工位的LevelNo
public class ServerBaseHelper public static byte getNextLevel(WorkShop workShop, byte level) { int random = getRandom(workShop).nextInt(100); BaseConfiguration configuration = MainServerConfigurationFactory.getConfiguration().getRegolithConfiguration().getBaseConfiguration(); double k = (double)...
1
6f71bda6b9041395f89f96416231c76e
b06edf3d651c80a024feec81cb97ad76
hàm xuất phân số
{ out << src.numerator << "/" << src.denominator; return out; }
1
99679758b4c9f17b56906bdc6586561b
062403f4f13edc3c7e34d92eaa5dec66
Return a string representing the value of the voter record.
class VoterResource extends JsonResource public function toArray($request) { return [ 'id' => $this->id, 'first_name' => $this->first_name, 'last_name' => $this->last_name, 'age' => $this->age, 'gender' => $this->gender, 'registered_add...
0
44e49c227d5c6fd58d3d8b9ebb3ac937
43de55b45ba5bb3764df32bff4313493
计算下页的开始索引(索引从0开始).
int nextIndex = this.getOffSet() + this.getPageSize(); if(nextIndex>=this.getTotalCount()){ return this.getOffSet(); } return nextIndex; }
1
46ddcc3236e60100529adc7c08c30df3
e171efe614661baa8849c6f8628be2ff
A rectangle with a chunk taken out, making a concave shape
def small_rect(TY=1,TX=1): glBegin(GL_LINE_LOOP) glVertex(-1.15*TX,.3*TY) glVertex(-1.1 *TX,.3*TY) glVertex(-1.1*TX,.2*TY) glVertex(-1.15 *TX,.2*TY) glEnd()
0
f0dbb1e4105d6e11d4ccd5d9da041fa6
75e22a99ce3fbe069e7fbadaa0529aac
获取请求时长
class HttpRequest public function time($float = false) { return $float ? $_SERVER['REQUEST_TIME_FLOAT'] : $_SERVER['REQUEST_TIME']; }
0
9fdb9fcba9d289eb0c2175d963ffc568
944daa1b94b5031a12ec29c26376780e
从用户登录触发节日活动礼品派送
def _triggerUserLoginEvent(event): gamedata.setnxGameAttr(event.userId, FISH_GAMEID, GameData.creditValue, 100) for _, shareClass in allTypeIdClass.iteritems(): shareClass(event.userId).refreshData() if event.dayFirst: updateCreditValue(event.userId, PlayerAction.DailyLogin)
0
5694cfb8b7855e9118aad08762293ae3
b2e9f276988ad257413a396aac960552
Returns the list of packages of the library.
public class Install public static PackageList get_packagelist() { return _packagelist; }
1
9c281e664ea620ab956ed5ad8ba23907
54101425be7d8ae1b08271d501cbffd0
设置左边第二行文本字体大小
T setRightTextSize(int size);
0
a8f306ede1a00594e39aef50fd7ddd13
ce6aabad2a06c034e4f71bcd1215af06
Gets jsXe's icon that is displayed in the about menu, taskbar and upper left hand corner (where appropriate)
namespace qx.ui.tooltip [JsType(JsMode.Prototype, Name = "qx.ui.tooltip.ToolTip", OmitOptionalParameters = true, Export = false)] public partial class ToolTip : qx.ui.popup.Popup [JsMethod(Name = "getIcon")] public string GetIcon() { throw new NotImplementedException(); }
0
493de424aac445a71996e5004489baa1
788b75c885ccd670bb5491186503b0df
获取审核状态(0未通过/1通过/2待审核)
public class ClientDO implements Serializable public Integer getAuditStatus() { return auditStatus; }
1
ae199a8710ce5ba2c999e6958c3b1bad
7d788cc88a9958d47d21767756db3772
расчет положения точек для случая 2
namespace Bridg public class Table private List<Place> CalcPlace(int count) { double x1 = 0.025, x2 = 0.25, x3 = 0.825; double y1 = 0.76, y2 = 0.15, y3 = 0.03; List<Place> res = new List<Place>(); res.Add(new Place( (int)(x2*_fildSize), (int)(y1*_fildSize) , t...
1
f61916d48bf204e18382efaf2ee6f72e
789637f41010117da7908a3be58bd743
隐藏登录提示信息
function tlrlHideMsg() { tlrlShowSuccess(false); tlrlShowLogin(false); clearTimeout(tlrlTimeoutId) }
1
6105b2002a7a9edf0c15324fddab878b
ff21b1fad5a00cf85cd903423e882a67
TestCase to test playlist ID retrieval. Tests to make sure the function returns a list of playlist IDs and tests to ensure the list has two parts.
class TestSpotifyAPI(unittest.TestCase): def test_valid_get_playlists(self): self.assertEqual(get_playlists("rohangoel62")[0]['name'], 'test')
0
e7b1b6cb475428b16750fd3d882f5efb
976f2fdecbfba9b4dc179b7fc244a34c
Sets whether this parameter is passed by reference.
class ReflectionParameter implements \Reflector public function isPassedByReference(): bool {}
0
c53d0186c4ea09c0c0b0e37feae5c747
145eff2764b860ae18a1066105d0e8be
Sets the amount of time required for closed loop control of the [internalMotorController] to go from neutral output to full power.
class MotorController(deviceId: MotorControllerID, vararg followerIds: MotorControllerID) inner class ConfigScope(private val timeoutMs: Int) fun closedLoopRamp(secondsToFull: Double) { motorController.configClosedloopRamp(secondsToFull, 20) }
1
87b428c05d964de63b541d182df72d04
03f9e5254eea913edede7b1a685651a9
Set a new transcription.
namespace RestEaseClientGeneratorConsoleApp.Examples.SpeechServices.Api [Patch("/api/speechtotext/v2.0/transcriptions/{id}")] [Header("Content-Type", "application/json")] Task<Transcription> UpdateTranscriptionAsync([Path] string id, [Body] TranscriptionUpdate content);
1
dfbeeb34ffa6b900e77d9888d5f972d0
cb3d55693ce05a4aedbcf4038ed3727c
监听任务状态选项卡切换事件
function reselstate(index){ $(".tasklist_tab").children(".curr").removeClass("curr"); $(".tasklist_tab").children().eq(index).addClass("curr"); $(".tasklist_tab").children().find("span.split").css("display","inline"); }
0
64240d17344687b6e7881f4f68e72607
a5e514d35c81173da7c1a666833fdfdf
형제 리스트의 순번을 다시 셋팅
@Repository("comtnbbsctgryDAO") public class BBSCtgryDAO extends EgovAbstractDAO public void updateSiblingsSortOrdr(CtgryVO searchVO) throws Exception { update("comtnbbsctgryDAO.updateSiblingsSortOrdr", searchVO); }
1
e9bfc64a338006536df022d52643196a
c60f916d1171e544b5fc01da87cc2189
Initialise les semences (seeds) à l'aide des fabriques (factories)
{ $this->fakerGenerator = Factory::create('fr_FR'); if (false === getenv('FAKER_SEED')) { $this->fakerSeed = rand(1, 9999); } else { $this->fakerSeed = intval(getenv('FAKER_SEED')); } $this->fakerGenerator->seed($this->fakerSeed); }
1
1b82042e6826b48cd0bedf5739b1ca02
0f3cec882f7684eda4d8853a6e4521cd
通过session.setAttribute()被绑定到session上时,则这个对象的valueBound()被调用。
public class CustomTrackDbService extends DatabaseService protected void doPost(HttpServletRequest req, HttpServletResponse resp) public void valueBound(HttpSessionBindingEvent event) { }
1
ac33593840ad6d741c284974f0ed547a
cec3dc45254940ba305591d6953ccc29
Unsets the "characterSet" element
public class CharacterStringPropertyTypeImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements org.isotc211.x2005.gco.CharacterStringPropertyType public void unsetCharacterString() { synchronized (monitor()) { check_orphaned(); get_store().remove_elemen...
0
ead8c0ea22a2d0c666fbb0c6a7b8a32f
9877f4c8b0a08f486b69dd106d05721a
Apre il modale dell'impegno copiando i dati forniti dall'utente.
function apriModaleImpegno() { $('#annoImpegnoModale').val($('#annoMovimentoMovimentoGestione').val()); $('#numeroImpegnoModale').val($('#numeroMovimentoGestione').val()); $('#modaleImpegno').modal('show'); }
1
80760a6025b899450f680fae061ed1d2
7aad7081785bb109455f4277274117d3
get the current date from the OS
public class OperatingSystem public String getDate() { DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy/MM/dd"); LocalDateTime now = LocalDateTime.now(); return dtf.format(now); }
1
e81316e06ffd3513a41ba4b44cf0ae39
8f2a6eed8afc825cdbdf9c224532567d
Test create client with valid URL,
rubrix._client = None rubrix.init() assert isinstance(rubrix._client, RubrixClient) assert isinstance(rubrix._client._client, AuthenticatedClient) assert rubrix._client._client.base_url == "http://fakeurl.com"
1
39f4e91937b4482823f1f3e9edd5d90d
1918db7d76dd3d5223c6c060823d4663
Get field group list from build master table yaml config for GDC.
input_yaml = read_yaml(input_file) VERSION_FAKES = input_yaml['VERSION_FAKES'] PRIVATE_DATA_PATH = os.path.dirname(VERSION_FAKES) if len(PRIVATE_DATA_PATH) < 2: PRIVATE_DATA_PATH = None VERSION = os.path.basename(VERSION_FAKES) input_yaml['VERSION'] = VERSION input_ya...
1
ac66dab70f51727f0dd78bf651982788
2c8a603dfe4b69efc9e4c4bca6d8fb57
Count the number of positive and negative points in the data set.
if not data: return 0.0, 0 beyond_zero = [i for i in data if i >= 0] average = sum(beyond_zero) / len(beyond_zero) if len(beyond_zero) != 0 else 0.0 counter = len(data) - len(beyond_zero) return average, counter
0
3a7d9f293788e588d7122be09b9bfebb
018966fbf7a1d961bec9ad3600919e02
Recursion递归测试, 求x的阶乘
if x==0: return 1 if x==1: return 1 if x%1==0: recursion=fac(x-1) result=x*recursion return result if x%1 !=0: print 'wrong input'
1
04aa897e2bf856bb54a927ecb772fd1d
d540ddcde3d148a86973138e27636806
Returns the meta object for class '{@link com.example.goodreads.model.BookShelf <em>Book Shelf</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
EClass getBooklet();
0
905f74aeb9cd225e640dce91c51d592f
9cc325e70c22604633a21205709523c0
Get Invoice Type from Parameter Bag
{ parent::__construct( $idInvoice, $Type ); $this->verifyParam( $Type, self::$necessaryParam ); }
0
7bba1d8f636cf6bf99c40c0985e34f0c
0e6efb7e499568a63fec9fb0c76d8c0e
Фабрика для заказов.
abstract class AbstractIpn protected function getOrderFactory() { return $this->_orderFactory; }
1
c0916704926cdf38872838a0614bd536
d13f821b2ecdd56c0d12b5e25490bfc5
移除所有的摄像头
class CameraView @JvmOverloads constructor( context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0 ) : FrameLayout(context, attrs, defStyleAttr) fun removeAllListeners() { listener.clear() }
0
308ab01191e029206512f67d99d15b93
e2d2b572f923b0d6e9bbf71119394d7a
Get all apps in an App Service Environment. Get all apps in an App Service Environment.
namespace Microsoft.Azure.Management.WebSites public static partial class AppServiceEnvironmentsOperationsExtensions public static async Task<IPage<AppServiceEnvironment>> ListByResourceGroupAsync(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, CancellationToken cancellationToken = defa...
0
915f0fe6f953aa82d493d783d6ea89a9
69866897fa2b5190b907226e4a32ca23
Check to see if method names are correct
class Validator public function checkMethod($answer_method, $method) { switch ($answer_method) { case "touch": case "type": break; default: header("location: ./?controller=error"); break; } switch ($method) { ...
1
d0b59be36901420a260bba15038856e9
08c40ae14bc06c4ffe4487cc119ec3f4
Don't record this update in the ref's associated reflog.
namespace GitSharp.Core public abstract class RefUpdate public void disableRefLog() { refLogMessage = null; refLogIncludeResult = false; }
1
dcf8b93f00afe8acc82cb4596e9a0616
1c5c612a6279b176cf095918d25001fd
将json数据存储到数据库中
def store(data): with open('data.json', encoding='gbk') as json_file: json_file.write(json.dumps(data))
0
3daf5be927bef3ea79718f16f044b40b
24af9cdc0bc1e7ad0016204162909398
Update the tournament.
if($schema == 1) $info = ["schema"=>$schema, "circle"=>$howcircle, "users"=>$howusers]; else if($schema == 2) $info = ["schema"=>$schema, "users"=>$howusers]; else if($schema == 3) $info = ["schema"=>$schema, "circle"=>$circlegroups, "users"=>$howusers, "groups"=>$howgroups, "usersgroup"=>$howusersgroup,...
1
dc954373ef6ed62f5121c593b91eb973
6f49c58cf91b2ee2460e03d11b79de36
查询收据数量
BillReceivableAgencyDto billReceivableDto){ if(billReceivableDto != null){ return (Long)this.getSqlSession().selectOne(NAMESPACE + "queryByReceivableNOsCount",billReceivableDto); } return null; }
1
b5e4c17741dc620ba124073799ab3a24
4056c174200108bd861f781cdba89383
Creates a random binary operation expression; objects to operate on are integers in the range [1, upperBound]
{ int divisionOperators = -1; if (forceDivision) { divisionOperators = UnityEngine.Random.Range(0, 5); } int firstNumber = UnityEngine.Random.Range(lowerBound, higherBound); int targetNumber = firstNumber; int firstOperator = divisionOperators =...
1
99a85a7331124b840c36c43e2a4abf65
6fb62c87be55429d938ac4c53ef98549
Static constructor. Will happen the first time an instance of this class is created.
abstract class Object public function __construct() { $this->class = get_class($this); static $notExtendable = array('Object', 'ViewableData', 'RequestHandler'); if($extensionClasses = ClassInfo::ancestry($this->class)) foreach($extensionClasses as $class) { if(in_array($class, $notExtendable)) continue; if...
1
56731a8f55dc9a491e20508eb6cc839a
9b1aaf37e86bdc769963b736fa70a0e0
Open a string.
def open(path): with builtins.open(path) as f: return from_string(f.read())
0
0a448b6963e53b09b3011078690348ea
29a4f4c6204d8cf136cb5897fbfdb251
查询我的可使用的优惠券总数
@Service("coreCouponService") public class CoreCouponServiceImpl implements CoreCouponService public int findCoreCouponForMyCount(String crcpnUser){ Map<String, Object> hashMap = new HashMap<String, Object>(); hashMap.put("crcpnUser", crcpnUser); return ((Long) myBatisDAO.findForObject("findCore...
1
a64eb37e1293a5adf66eb4dde50d423d
d079727e02ecac16b1f4a778bfc70fad
memcache DELETE handler
{ if (!$memcache) { $memcache = MyMemcache::instance(); } $mem_key = $_ENV['CONFIG']['MEMCACHE']['PREFIX'] . $key; $memcache->delete($mem_key); }
1
d6b3843aaa6237b8ca0a8b54cc3a8d87
f8f204a2cfadb09b5c4a124ef1f97138
Returen True if 'text/event-stream' was in the HTTP's Accpet field.
class StoreEndpoint(override val coroutineContext: CoroutineContext, private val vertx: Vertx) : Endpoint, CoroutineScope private fun isTrailerAccepted(request: HttpServerRequest): Boolean { val te = request.getHeader("TE") return te != null && te.toLowerCase().contains("trailers") }
0
bb991c20892f4959ea8b9982604b5eff
5677d6ba44462e29e6c0b6958310662f
REPORT 23: As a service user I want to produce a report listing the population of people, people living in cities, and people not living in cities in each continent
public class IntegrationTests @Test void testReport12() { int city_expected_population = 10500000; int city_population = sql.report12(10).get(0).getPopulation(); assertEquals(city_expected_population, city_population, "This asserts that the first city in the ArrayLists" + ...
0
62b6612bd417393035253486df6b8830
35283072050c7b488cff02a219c5f7bd
Betölti a megadott azonosítójú etapot az adatbázisból.
{ return ( EtapAdat ) adatok.get( new Long( eid ) ); }
0
d4901cb70ecf00ea76270987c97bba7c
d7147c722b49c01cb874b69615533734
Activate Power Pin that supplies LCD module
{ LCD_CTRL |= LCD_CTRL_LcdPwr; LCD_CTRL |= LCD_CTRL_LcdEn; UEZBSPDelayMS(10); return UEZ_ERROR_NONE; }
1
01bd4cdfc61e4b97f2705d2e510e4441
0f33c51646dc13800a99d05cd9c53288
Obtiene los intervalos de cambio de signo
if np.round(np.mean(y),0) != 0.0: y = y-np.mean(y) indx = (np.diff(np.sign(np.diff(y))) < 0).nonzero()[0] return indx
1
c13e095bf1f7bd72ff40a05ca3b647c6
f4f6115e049e001394e281a3ff5cc01e
Role : afficher le slide precedent param : néant
function goToPrevSlide(){ if(activeSlideIndex == 0){ gotoSlide(nbSlides -1); } else { gotoSlide(activeSlideIndex - 1); } console.log(activeSlideIndex); }
1
888166b3261d6d7d7deada2bbc830779
c7818468a404e42f902eaf74fe48a947
時分秒ミリを最大にセットします。
public class DateUtil public static void maximizeTime(Calendar cal) { cal.set(Calendar.HOUR_OF_DAY, 23); cal.set(Calendar.MINUTE, 59); cal.set(Calendar.SECOND, 59); cal.set(Calendar.MILLISECOND, 999); }
1
ce0153e7fe3261f72f3a8ecd619f6a42
b2ef648f352cc8f0287cdd9f7bb306ac
On 2.x, check that a unicode argument is properly prepared
class Compiler(Grammar): def u_string_check(self, original, location, tokens): return self.check_strict("Python-2-style unicode string", original, location, tokens)
1
c71344c3b80845663cb72730bcd169bd
7083a02d62ffa26a042de5c1cecc7107
Set value of ToHeader_SalesOrderLineItem_SalesOrder
public class SalesOrderLineItem extends sapodataconnector.proxies.OdataObject public final void setToHeader_SalesOrderLineItem_SalesOrder(sap_integration.proxies.SalesOrder toheader_salesorderlineitem_salesorder) { setToHeader_SalesOrderLineItem_SalesOrder(getContext(), toheader_salesorderlineitem_salesorder); }
1
9ce7fedee1e5351e547e670cd8a45021
9a5987dd1c1c6dd3e0cb4233cb0c552b
Push the current song to the front so it will be restored and restarted.
class MusicPlayer(CircularDoublyLinkedList): def replay(self) -> None: self.__load_current_song()
0
71c8e8385ac86e6ff80b662a97ebe749
192aecf9fa8a7042391874ba7aae3862
Check that the data is not modified inplace by the linear regression estimator.
class TestOptimizeExtendedRange(AlgorithmTester): def test_unchanged_data(self, data_fixture, side): x, y = get_data() self._test_unchanged_data(data_fixture, y, x, y, x, side=side)
1
5f6db6c6d46daf44b05b6f456aba7f3f
2b1961054adfe0e55acc7d7cf85fc602
take a numpy rgb image return a new single channel image converted to greyscale
def rgb_to_grey(image): grey = image[:, :, :3] @ [0.299, 0.587, 0.114] return grey.astype(np.uint8)
1
80823cb89b2ca503db83b61ad36eb1e4
5340ed165801a83a1826f8662fe35b45
Unsets fee id field.
class FeeController extends Controller public function destroy(Request $request) { return $this->fee->destroy($request); }
0
c9cad449e28847c74b40963c498678a9
157516722835bbe69fb12bf4d09c21a7
Парсит id всех книг из HTML-страницы со списком книг.
class BookResources(object): def parse(cls): lines = cls.filter_out_irrelevant_lines() lines_with_genre_at_end = map(lambda t: t.rsplit('</a></div>', 1)[0], lines) genres = map(lambda t: t.rsplit('>', 1)[1], lines_with_genre_at_end) decoded_genres = map(lambda d: d.decode('cp1251').encod...
0
75b59c9b26e782153502f513e3be34e2
9623f9a8c7e4f6f7aa81f633dd38856a
스프레드에서 원하는 값을 가지 row를 찾는다.
function spreadFind(curValue) { var nextValue = curValue+1; var find = false; for(i=0; i<row; i++) { for(j=0; j<col; j++) { var cell = ret[i][j]; if( cell === curValue ) { if( j-1 >= 0 && ret[i][j-1] === -1 ) { ...
0
918a9619498b66adf4d7f96b5c8a68e1
9b69a4d46ed2a4fa0735b955a4d253f4
Get Local Address Two
class CommuterServiceEntity extends \AppCore\Service\Entity\AbstractServiceEntity public function getLocalAddressTwo() { return $this->getProperty('local_address_two'); }
1
5b1aff3bcb42c133b64eeb1aeb8e57bf
d58cb381b015bdc4b68e91f58dfc7596
获取oms带cookies的headers
if setting.HEADER_TYPE == 1: return setting.HEADER else: from common import generateToken data = generateToken.getCookies(0) setting.HEADER.update(data) return setting.HEADER
1
d29913ccfb85feb77c76faa7b5ca0638
e4e3281b6336da83e279a983d5d73a6c
Returns the value of the '<em><b>Owned Type</b></em>' containment reference. <!-- begin-user-doc --> <!-- end-user-doc -->
EList getOwnedType();
1
d2335c4122c3048136b633c584ac6bac
d4b769e88a5257c7d8408aad048ddcdf
获取已上传月报数据年份
namespace D22000 public partial class F27010 : BaseSmartPart private void GetRollYear() { this.rollYear = this.form27010Control.WorkItem.F27010GetRollYear(this.keyId); }
1
c33569722ce83e9557cec2cdaacd4c5e
3afb120491561d347a10d27532240aa5
转换经度为°′格式
double degree = Math.floor(location); double minute_temp = (location - degree) * 60; double minute = Math.floor(minute_temp); String second = new DecimalFormat("#.##").format((minute_temp - minute) * 60); return (int) degree + "°" + (int) minute + "′" + second + "″"; }
1
1ec1b9df38baf624fda119695812e176
f94f9efde1b5ef42517fa015f9ff35e1
Create creates a new loop device backed with the given file.
d, err := createDisk(filename, dataBlocks) if err != nil { return d, err } if err = d.initFS(); err != nil { return Disk{}, err } return d, nil }
0
de063466f0dbfdd482db2923ad62914d
43fa1eac6472e669cad0b86ef0d9c584
Alters a database expression so that empty strings are converted to null. Override this method in child classes if the database uses different syntax.
{ if (expression.IsNull) return expression; return new SqlString(expression.Value.Trim(' '), expression.LCID, expression.SqlCompareOptions); }
0
fb0dd7b9207852e4720aded3ec77b527
4f45ff970f5cece3b190b2b0c1360124
喂养鸡
public class Cook public void cook() { this.cookhouse.open(); this.chicken.kill(); this.chicken.clean(); this.cookUtensil.open(); this.chicken.cook(); }
0
7b3a0c1f60518bd4526ef7dbd32a283f
9ad60147aa88871d7849f03c75b8994b
The callback for notifications of changes to children of agency hierarchy nodes.
namespace OpenSim.Region.Framework.Scenes public class SceneCommunicationService //one instance per region protected bool ChildAgentUpdate(ChildAgentDataUpdate cAgentData) { handlerChildAgentUpdate = OnChildAgentUpdate; if (handlerChildAgentUpdate != null) handlerChil...
1
c43a14bb6c1877f16ef992cc0d7c798f
fbcab0ea58163ce8ea478a8c928ba980
Returns "add to wish list" link.
{ return $this->getTypeElementHtml() . Mage::helper('bronto_reminder')->__('Item was added to wishlist %s store view %s', $this->getOperatorElementHtml(), $this->getValueElementHtml()) . $this->getRemoveLinkHtml(); }
0
9edae72c65dd8afd7799fdc7e130fc0c
805dbde87d916d1a12c4c078acd20068
Проверяет наличие прав на удаление элементов списка модуля
class Group extends ModuleContentType function hasDeletePermission() { global $login; return $login->isWebmaster(); }
1
f805c1a3a595c5b517da82f7d172c684
b31a760cf09d8683fcb5e1f864dfbd24
Randomly selects a 'ticket' from the alloted pool
namespace Project2 class TicketAgencies private void ticketPO(string threadID, double price) { int cardNo = rand.Next(4000, 5000); int amount = rand.Next(30, 100); OrderClass purchaseOrder = new OrderClass(threadID, cardNo, amount, price); Console...
0
2c4920d8e77994943163a9c459d8586d
29b9ccdf63ce5f6650be5ca744ec01ee
pagina di modifica del profilo
$session = USingleton::getInstance('USession'); $username=$session->leggi_valore('username'); if ($username!=false) { $view=Usingleton::getInstance('VRegistrazione'); $view->setLayout('visualizza_profilo'); $FUtente=new FUtente(); $utente=$FUtente-...
0
bd82a0d4fb64fc7e8c1f0799f5f76df0
1ee0acbb4ed7174face2308d0675ad59
takes the address of the colum and divides it into two sets of data (most significant bits and least signifant bits) to be send as individual writes to the controller
void BV4612::column(uint8_t col) { Wire.beginTransmission(_PADi2adr); if(col > 128) col = 128; Wire.write(42); Wire.write(col); Wire.endTransmission(); }
0