query_id
string
corpus_id
string
query
string
code
string
label
int64
08cd48f8fae1adc6e4af3ca835e681a6
00dd3e7a7ee42bdd121d0746ceaf8fe4
Method that returns an International Journey for the supplied request parameters
public Result PlanJourney(string transactionId, string language, Request request) { try { int tokenCount = Microsoft.Web.Services3.RequestSoapContext.Current.Security.Tokens.Count; if (tokenCount < 1) { Exceptio...
1
25b08646b6cd5ff5df08a27242356175
cf5cf9565f1cb04a32ac31b342b8aaa4
# Implement the SVM classifier.
train <- function(feature_df, par = NULL){ if(is.null(par)){ cost = 1 } else { cost = par$cost } svm_model <- kernlab::ksvm(y ~ ., data = feature_df, scaled = FALSE, kernal = "vanilladot", C = cost) return(model = svm_model) }
1
fd8a83ea16374649f29102b3581457b4
647da4edced147cd31fd773056a8451d
выводим сообщение, очищаем ошибки и данные нового элемента, обновляем список элементов
{ int i=nomber-1; int limit; if(i<0)i=0; if(where) { limit=curbast.size(); if(limit) { ui->datalist->clear(); if(i>=limit) { i=limit-1; } cursor2=0; cursor=0; ui->lim1->setText...
1
ae76c03a3fa5676292762b86f8e34f7a
07789c555e1468e7d5ef0d5fd0a41b8e
Convert the provided vector and angle to a rotation matrix and return it. x,y,z -- the axis vector angle -- the angle (in radians) to rotate around the given axis
if not isinstance(axis, str): raise rotatorerror("This function takes axis=x/y/z only.") try: theta = degree * (np.pi / 180) c, s = math.cos(theta), math.sin(theta) except: degree = float(degree) theta = degree * (np.pi / 180) c, s = math.cos(theta), math.sin(...
0
e8b35dbd777585ea2d5eb7794203c6f9
df090f0efd828c04a5c89c2f1bd85995
获取表中字段备注信息
public class TableService private String getRemark(String field, Map<String, String> remarksMap) { for (String key : remarksMap.keySet()) { if (key.equals(field)) { return remarksMap.get(key); } } return ""; }
1
d6d551f1295128c559cc1157fb412ec1
6fb852c2a31233061b44ff52d08edace
Receives the index of the most recently selected instrument Invokes the actions needed when selected instrument changes.
namespace MantidQt namespace CustomInterfaces void QtReflMainView::instrumentChanged(int index) { m_calculator->setCurrentInstrumentName( ui.comboSearchInstrument->itemText(index).toStdString()); m_calculator->processInstrumentHasBeenChanged(); }
1
0562693c173ea584f9beabc6284d1d33
f3a944416fcff98d4c6f10b0f69fc92a
Displays the button needed to be pressed to go to next screen
public class RoutePanel extends JPanel private void constructNextButton() { buttonNext = new JButton("ARRIVE"); buttonNext.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { GameEnvironment.arriveAtIsland(destination); if (eventOccurs) { EventPanel.updateDetails...
1
ed7e1317798c574cb162ff01769d1157
a9ba3ea661c6fee7570e6a3ffe64dd20
Записывает карту {@link IMap} с ключевым словом.
public <K, V> void mSet(Map<K, V> keyValues);
0
619057d59e7199705a697690fb544eca
398040930c5828565755badbbeef9ec4
키워드가 입력되었을 때, 제목, 저자, 출판사 종합 검색
{ BookViews.SearchPage(); var keyword = Console.ReadLine(); if (keyword != "") { WebbShopAPI api = new WebbShopAPI(); var listOfBooks = api.GetAuthor(keyword).ToList(); if (listOfBooks != null) { ...
0
01f8dc510f3d73f2de106c59016396f9
f89ecffdf063431bdc4c60c086401e3f
Quantise the direction to 8way
public class CharacterControllerTD : MonoBehaviour public MoveDirTD MoveEight(Vector2 dir, float speed) { Vector2 fixedDir; Vector2 normalizedDir = dir.normalized; float angle = 0.0f; for (int i=0; i<8; i++) { fixedDir = m_MoveDirArray[i]; angle = Vector2.Angle(normalizedDir, fixedDir); if(angle < 2...
1
beee151e5d1fb818c7385f7db50c1c0f
d7ad67297c89769698e2acba0a152997
git config Sets a git configuration key value pair for the current directory repo Equivalent to: git config <name> <value>
class Git_Lib public function configSet($name, $value) { $this->executeCommand('config', array($name, $value)); }
1
043e47fc214aee4926bae3f62f137320
367a6d7d6d401017392f2152b8760938
获取加盟反馈
class AppInfoLogic public function getFeback($where, $whereArr, $limit) { $model = new AppFeedbackModel(); $res = $model->getFeback("(1=1)" . $where, $whereArr, $limit); return $res; }
1
a048d69847e9d064e85f8c6324dc9f13
e061ce7b8eefceea392f8dacfbfcad83
Called if the client wishes to know what is in the current directory
command = fileserver_pb2.CommandRequest(command="ls", id=client.myId) output = client.fs_stub.TakeCommand(command) if output.status == 200: click.echo(output.output) elif output.status == 400: click.echo('Terminal not authorized') else: click.echo('File server error')
1
0892b18e5bfa7f7651c8a1d58ee2c04a
c627ac0873531968d9daa7597d77a489
添加单个任务覆盖物
var htmlStr = '<table width="200px">' +'<tr>' +'<td>' +'<label style="color: #009999;font-size: 11pt;">&nbsp;Select Your GeoTask</label>' +'</td>' +'</tr>' ...
0
8ae6d6ca0fe8e4af585c00d6eddc9424
808461f7cb263db3fdc0249a11ad17d8
呼び出し最終時刻を出力するかどうかを設定する。 デフォルトはfalse。
public class WsServiceMetricsHandlerService extends ServiceBase implements SOAPHandler<SOAPMessageContext>,DaemonRunnable, WsServiceMetricsHandlerServiceMBean{ public boolean isOutputLastTime(){ return isOutputLastTime; }
0
58ee6ee654d6bc1d503b58ef37a645c6
e17c3ac1eba1a7f834f417ce47d28c10
添加多边形热点
class Feature extends mix(Style, Layer) addHeatFeatures (points, params) { try { let feature = '' if (points && Array.isArray(points) && points.length > 0) { let [multiPoint, change] = [(new ol.geom.MultiPoint([])), false] if (params['zoomToExtent']) { params['zoomToExtent'] = ...
0
96610b10e3840a7b5f9703db5579fcc6
4863902e2503a13d883c265c35d18263
获得userId最近的positionName对应的职位级别.
int getJobLevelByInitiatorAndPosition(String userId, String positionName);
1
0332fae2c10ae6d74b4eb0c5bdf250dd
78bdd6b9922ad7b571253d41c22eb296
获取传入日期的当前周的周日
LocalDate localDate = date2LocalDate(date); localDate = localDate.minusDays(7); return getEndDayOfWeek(localDate); }
0
6ad2096174d46b2ec00ae55ac1f9134b
b763aff51172865e104c78456de07072
Execute the SELECT command with *(every) column, and a specified WHERE clause.
if ($args == null) { return $this->SetError("No WHERE arguments passed."); } $sqla = sprintf("SELECT %s FROM %s %s", implode(",", array_keys($this->cols)), $this->tblname, $this->BuildWhere($args, $cond)); if ($ordr != null) { $...
1
694e8cbc5fb648e114d95ac754d25a5c
b7822255659a502a7dbb29ca398f2788
Adds a invalid record to the array of invalid records.
abstract class Processor function addBadRecord($reason) { if (!is_resource($this->bad_fp)) { $this->bad_fp = fopen($this->bad_file_name,"w"); if (!is_resource($this->bad_fp)) { I2CE::raiseMessage("Could not open $this->bad_file_name for writing.", E_USER_ERROR); ...
1
2fe0b711f925a3f669bc1bb8a84345c5
a40a845e7dbf320b7c52b62cdd2768de
Saves changes of text in the textarea
function saveText(){ var textarea = $("#linker_text_edit"); if(textarea.length && textarea.is(":visible")){ var newText = textarea.val(); var code_list = new Array(newText.length); for(var i = 0; i < code_list.length; i++){ code_list[i] = newText.charCodeAt(i); } linker.text = cod...
1
271a8d74aea2cda88e0fc36e56acec03
b8dc5dd2913501f810e28533070241d5
Tries to parse signed 64 bit integers from string. If parsing fails returns default value of zero
{ return source.TryTo(out long value) ? value : defaultValue; }
0
e76fc7f14f7a627b579486e6c0177f5c
a8bb211455972a13571f4e70b320977a
Rotates projectile clockwise or counterclockwise based on flag
public class Projectile_Rotation : MonoBehaviour void Update() { if(chance == 1) { transform.Rotate(0, 0, 100 * Time.deltaTime); } else { transform.Rotate(0, 0, -100 * Time.deltaTime); } }
1
1833adee8ac8a094089765434edd4b54
6c28bb028b1ef7ef8b8e646ef9b4d00c
save the source of the latest reset
void reset_last_sourcing(void) { VIM_CLEAR(last_sourcing_name); last_sourcing_lnum = 0; }
0
9809661cf485bdf2e660eef612675daf
0e3cdc9a8ef7880dbb20fe560e85128f
Inserta un elemento antes de la posición pasada como parámetro.
void DList::InsertBefore (DListElem * pElem, DListElem * pPos) { DERR_IF_NULL (pElem); DERR_IF_NULL (pPos); pElem->vNext = pPos; pElem->vPrev = pPos->vPrev; pPos->vPrev = pElem; if (pPos->vPrev) pPos->vPrev->vNext = pElem; ++vNodeCount; }
1
f7e8accfa93b15ef89eae248bcb91fb0
65d57f432e025dd222c26680ef94539b
複数グラフ表示する際の各種サイズを返す
xfactor = 90 yfactor = 30 x_extraSpace = 50 y_extraSpace = 80 (width,height) = (x_extraSpace + xfactor*(Nmax), y_extraSpace + yfactor*(kmax)) url = url_for('browseGraphHolo',Nmin=str(Nmin), Nmax=str(Nmax), kmin= str(kmin), kmax= str(kmax)) ans = {'src': url} ans['width'...
1
622bdd576a70e35804533c921d42d4e5
2aeb10f90c6a8bec20d5691d3c44a778
MainActivity가 최초 실행될 때 실행된다
class MainActivity : AppCompatActivity() override fun onStart(){ super.onStart() println("onStart") }
0
a02ae0fd7e8ae4c95ff5d0b2fe2d3ef4
c28b99b1ba0eb8485ba3f80e6eed3469
雪玉生成
void DemonSkill::iceSkill(DemonChain* chain) { CCLOG("iceSkill"); int level = GameManager::getInstance()->getSkillLevel(4); int num = 0; switch (level) { case 1: num = 4; break; case 2: num = 6; break; case 3: num = ...
1
891a188d5731fe4a5e60054ceb8dd747
def1b712f5a5e1f86dce7d0eb5503ee2
Get the JSON representation of a complete dashboard. Returns: A dashboard.
all_params = ['id'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_dashbo...
1
ed1f72c8b848977207e4da63e4867773
5a1d906b981a271199b5c70b92bcdb0c
Print out a 1401 address plus index
address: number, nib0: number, nib1: number, nib2: number, nib3: number, ): string { if (address < 127) { const a0 = (address >> 4) & 0x7; const a1 = address & 0xf; return ("O " + hex[a0] + hex[a1] + " " + hex[nib0] + hex[nib1] + " " + hex[nib2] + hex[nib3] + ...
1
677cce37a2a56e72bd7e625af5e3519a
cb144a36bdff201d493d6491299c819d
no additional initialization needed
void LineFollowToSwitch::initialize() { }
1
c3682e8cb1b731d0c6409668905b502e
d72c2921d0ee8d1e58fcfe92ec0f51f8
新增加盟商
public class JoinActivity extends Activity private void addFranchisee(String name_join, String nickname_join, String address_join, String phone_join) { RequestBody requestBody = new FormBody.Builder() .add("name", name_join) .add("nickname", nickname_join) .add("a...
1
014491ba0947abb18d6dfe6ec66d8f12
a2a4eca592474a69be9c3bed3d7854a3
Gets the miniature of a post. Create miniature if it doesn't exist.
function minorPost(val,i){ var Ele = document.getElementById(i), xhr = new XMLHttpRequest(); xhr.open('GET', 'https://www.googleapis.com/blogger/v3/blogs/5844238035868473137/posts/'+val+'?fetchBody=false&fetchImages=true&maxComments=0&view=READER&key=AIzaSyAV7brZF-F8ZxonIzqova14F6jtyKZ71wc'); xhr.on...
0
aa6b94d6ed872acf482be19d5db0d235
93c5a453950a77f5777a27a9ac152531
getColumnIdListFromPrimaryKeyRequest return list of column Id from PrimaryKeyRequest.
KeyAttribute... primaryKey) { if (primaryKey == null) { return null; } return toAttributeValueMap(Arrays.asList(primaryKey)); }
0
6e8917824e00138a5c1fd87ee7085809
fd05f231770fd1573209bbbe66a99d82
draw walls formed by a base and a cap
void draw_wall(float x1, float x2, float y1, float y2,float z1) { glPushMatrix(); glEnable(GL_TEXTURE_2D); glBindTexture(GL_TEXTURE_2D, texture[1]); glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_BLEND); glTexEnvfv(GL_TEXTURE_ENV, GL_TEXTURE_ENV_COLOR, brick_ambdiff); glMaterialf(GL_FRONT, G...
0
aaa0e595f122052dadb77db2f2fe55fb
15abd84f9ad292fc0bc9e8889bd92cf5
Cette methode change l'entier courant en lui affectant le reste de la division euclidienne par un autre entier (si l'entier courant valait 3 et que l'autre entier valait 2, alors l'entier courant vaut 1, 3 modulo 2 vaut 1) l'entier diviseur de la division euclidienne si l'argument est null. si l'argument vaut l'entier ...
{ assert(other._n != 0); assert(_field == other._field); GFNumber res(((this->_n % other._n) % this->_field.getOrder()), this->_field); return *this; }
1
d473653a4044017a581a50f78dc7af1e
d23f326bdc0df3e751fbb1a4ff6abbf8
Creates a new version of a model from a trained TensorFlow model. If the version created in the cloud by this call is the first deployed version of the specified model, it will be made the default version of the model. When you add a version to a model that already has one or more versions, the default version does no...
throwIfNotDefined(modelId, 'modelId'); throwIfNotDefined(file, 'file'); const pathParams = { modelId }; const formParams = { file }; return this.post({ path: '/api/enterprise/models/{modelId}/newversion', pathParams,...
1
d1ba305436b706e2483bd3b5ffe476a5
9b55a531da541963c492d43701c176c0
Creates a query that sets the read uncommitted pragma.
SelectionQuery<R> setReadOnly(boolean readOnly);
0
cae1c3cd14f53bf0e40663f0594c3e3b
bb8fdd7f3a43ba641def091a57bc5ce9
Finds days with both inputs (predictor and target file) available.
def find_common_dates(paths): if ('SRAL' in paths.keys()) and ('SLSTR' in paths.keys()) and ('OLCI' in paths.keys()): path_sral = paths['SRAL'] path_olci = paths['OLCI'] path_slstr = paths['SLSTR'] folder_sral = os.listdir(path_sral) folder_sral = [f for f in folder_sral if (...
1
9c02758daf2b326d139822d767a131b5
27093712d69e4ab5dd7e3c117de05eee
Calculates viz slice positions from the current state.
namespace GraphShape.Algorithms.Layout public partial class SugiyamaLayoutAlgorithm<TVertex, TEdge, TGraph> where TVertex : class where TEdge : IEdge<TVertex> where TGraph : IVertexAndEdgeListGraph<TVertex, TEdge> private void CalculateSlicePositions(LeftRightMode leftRightMode, UpperLowerEd...
1
2137f9123938be9462a5e4979de87147
65125cafcff5a234f20115a1e513efec
draws the ascii art depending on cpu and player choice.
{ if (game.CpuChoice == "water") { water2.Visibility = Visibility.Visible; grass2.Visibility = Visibility.Hidden; fire2.Visibility = Visibility.Hidden; Gary.Visibility = Visibility.Hidden; } else if (...
0
1e052fb07b26b330648e59b1944a0241
aa87ba73bdc235b0b25733f750df5aab
Проверяет на повторный ввод буквы
if @status == -1 || @status == 1 return end if @good_letters.include?(bukva) || @bad_letters.include?(bukva) return end if @letters.include?(bukva) || (bukva == "е" && letters.include?("ё")) || (bukva == "ё" && letters.include?("е")) || (bukva == "и" && letters.in...
1
f01d28a325bd77cf5cc74418c41895da
b3ad472d990dda022f17f1e477c0eb18
添加后勤车辆加油记录 Vehicles_OilRecord对象(即:一条记录)
DetachedCriteria detachedCriteria = DetachedCriteria.forClass(THCarJiayoufeilishi.class) .createAlias("TCarJiben", "carJiben") .createAlias("TCarJiben.cartypeJiben", "cartype") .createAlias("TCustomerJiben","customerJiben"); if(carAddOilQueryEntity !=null){ if(ToolKit.stringNotIsEmpty(carAddOilQueryEnti...
0
68ca49e2aa8071b092dab6805826b738
7390a1efe8aae145b5e37a346059d1d5
Returns a new {@code VRSkeletalSummaryData} instance allocated on the specified {@link MemoryStack}.
public class VkComponentMapping extends Struct<VkComponentMapping> implements NativeResource @Deprecated public static VkComponentMapping mallocStack(MemoryStack stack) { return malloc(stack); }
0
eda6f97f8baaec833339bac6ec019a59
f8cc15f037992f85549614a916f8b192
Cbus Queue operation: Get In-queue's active Req's timeout value
uint8_si SI_RcpTimeoutHandler(uint8_si channel, uint8_si direction) { uint8_si result = SUCCESS; if (direction == CBUS_IN) { SI_CbusIQCleanActiveReq(channel); } else if (direction == CBUS_OUT) { uint8_si retry; retry = SI_CbusOQReqRetry(channel); if (retry > 0) { SI_CbusOQReduceReqRetry(channel); ...
0
1601dce9729598e307d875525f4c1982
7416db36caf66f6f85ed560f1a6512a4
Returns the planet building mode.
class Bengine_Game_Controller_Constructions extends Bengine_Game_Controller_Construction_Abstract protected function getMode() { return (Game::getPlanet()->getData("ismoon")) ? 5 : 1; }
1
3b7789e70b6b4a006a74cc5123c1087f
1996fb026cc4ea71eb50d2e8f4aa865a
一天只能10条
showRecords(value) { console.log(value, value.length) var arr = [] if (value.length > 10) { arr = value.slice(-10) console.log(arr) this.setData({ ContentList: arr, intoView: 'msg-' + (arr.length - 1) }) console.log(this.data.toView) } else { this.setD...
1
a01fc61d49f5b3738fff8bec6557511c
e460d5c2a18497f5d54587ca5a20b24c
Remove one or more computers.
namespace VMware.Horizon.RESTAPI.Api List<BulkItemResponseInfo> RemoveMachines (List<string> body, string id);
1
018697a5b085e7274b209fbca5518a4a
64d019409108084f91ed054be2e1f28f
Close an XML leaf.
void xml_closeXML (handle_t xml) { Element *elem = xml_getElement (xml); int my_type = xml_elemType (elem); if ((my_type != TY_ROOT)) { xmlEmsg ("closeXML() arg must be a root tag\n"); return; } xml_deleteNode (xml); }
0
3f2e715a80a9810f0ee55e0fcfb0ec67
8456c575e3a54393ce4a11f95a4ba0f2
11.принимает два массива интов одинаковых по длинне, возращает массив интов который состоит из перемноженных елементов входящих массивов
multiplyTogether (array1, array2) { let returnArray = [] for (let anIndex in array1) { returnArray.push(array1[anIndex] * array2[anIndex]) } return returnArray }
1
d4e2363aac1369b066effc1f4eb753b2
233ff1b8705f2b8495df85f6f0281b75
Add an in clause to the statment with a function wrapped around the column <blockquote> <pre> ... qb.addIn(handle,"last_name",new Object[] {'smith'}); qb.addWhereGroup("names"); qb.addFuncIn(handle, "first_name", new Object[] {'phil','steve','joe'}, "lower(",")","names"); select * from foo where (last_name in 'smith') ...
public abstract class AbstractEventConditionBuilder<T, C> extends AbstractConditionBuilder<T> protected void addInCondition(DynamicQueryWrapper<T> dynamicQueryWrapper, String field) { addInCondition(dynamicQueryWrapper, field, field); }
0
2e4608f8d3c7e18206a0a68e323f06a7
930367fd5d0b9b0dc67a03ae189bc6eb
Helper to build the URL for a My Recipes Management API call.
{ string userSignifier = "-"; if (!string.IsNullOrWhiteSpace(encodedUserId)) { userSignifier = encodedUserId; } var parameters = new List<object> {userSignifier}; if (args != null) { paramete...
1
5553195d9bf0c104871dc06de6e5f3ce
df7d3aae60d0d2bb2c6d10cea07ad3cc
本页面核心方法,设置交易限额
public String execute() throws Exception{ Context context = getContext(); try { Context parentContext = context.getParent(); String flowNo = parentContext.getDataAsStr("flowNo"); context.put("flowNo", flowNo); context.put("custLevel", ""); context.put("safeTool", "4"); IcopClientManager.callCha...
1
ae2c3531bd23a84723371239919cdb4f
5fabbf2dd58b5afdf90c1c8b1450b64d
Name conversion fixes to match gtkscintilla2
def fix_name_wiki(artist): if "Alonzo Cano" in artist: return "Alonso Cano" if "Michelangelo" in artist: return "Michelangelo Buonarroti" return artist
0
efa7521eaebe1269b6c757eae64baeb9
14eb917835e7559fd222ee8a3bf2cad9
发送POST请求到服务器并返回服务器信息
public class HttpURLUtil public String sendPostRequest(String requestUrl, String content) { Logger.d("sendPostRequest", "url=" + requestUrl + ", content=" + content); HttpURLConnection urlConnection = null; BufferedInputStream bis = null; BufferedOutputStream out = null; InputStream is = null; String respon...
1
939204bd6fa4b9f3301c8fc71a119b50
defeda1d5bc4261935c04117a5b113f4
Returns which wall of the arena a arena marker is on.
walls_by_points = ((np.array([0, 0]), np.array([0, arena_size[1]])), (np.array([0, arena_size[1]]), np.array([arena_size[0], arena_size[1]])), (np.array([arena_size[0], arena_size[1]]), np.array([arena_size[0], 0])), (np.array([arena_size[0], 0]),...
1
4875a6db2c16686cf86917636c7c5d4d
f7fc632d768b6886f1c135d4409c65c7
Gets stream partition assignment of a table by reading the segment assignment in ideal state
WfAssignmentIterator get_iterator_assignment (SharkTransaction t) throws BaseException;
0
7c6299cdcc8d4ec35cbdb0f20d81e6d3
eccf4ab5e572d85c228f66b86b18720e
Get the Grammatical Checking State
export default class MathLangCompiler get_cst() { return this._cst; }
0
d2d7e096f61a0456ded848c534cf26de
8c7a294760b76b15cc15e281923b7d6a
On définit une fonction, qui remplace les mots du document par les émojis correspondants en utilisant le dictionnaire.
for key, value in modDic.items(): while(text.find(key)!=-1): text = text.replace(key, modDic[key]) return text
1
e79e38be6a5943b462ba558142fada15
31c99ddf2ec67540061f1dcd7730687b
If we have less than two tabs then we close the window Doing less than 2 incase something happens and == 1 does not catch it
public class MainWdw extends javax.swing.JFrame private void reset() { int numTabs = jTabbedPane_Main.getTabCount(); if (numTabs > 1) { jTabbedPane_Main.removeAll(); jTabbedPane_Main.add("Data", jPanel_Data); } }
0
82ddafa2775b1cbba4cee4a862fe0e39
9e12030628d2d63cc3e135e7db343d3e
Are all fields ok.
{ $valid = true; foreach ($this->fields as $field) { if (!$field->isValid()) { $valid = false; } } return $valid; }
1
52f453aa7d58530971897da8d3ff5aea
7030b12514bf01db62718fa7b8d015ef
Test the image module for MOD13A2
class Test(unittest.TestCase): def test_MOD13A2_preprocess(self): MOD13A2_tested = MOD13A2.preprocess() self.assertIsInstance(MOD13A2_tested, ee.image.Image)
1
f17c4eb896c556523a5b3cdd6e96bf8d
6c144888cbce7adcca510dc00274dae7
Turns byte array into Texture2D
{         FileStream fs = new FileStream(imgPath, FileMode.Open, FileAccess.Read); int byteLength = (int)fs.Length; byte[] imgBytes = new byte[byteLength]; fs.Read(imgBytes, 0, byteLength); fs.Close(); fs.Dispose();         var img = System.Drawing.Image.FromStream(new Memory...
1
e447a228cd5744979e0c07e414ff6fc1
7005a28b35746b0d145ff23592b71971
Test ID: Q9.
public void testT1RV2D2_T1LV2D9() { test_id = getTestId("T1RV2D2", "T1LV2D9", "159"); String src = selectTRVD("T1RV2D2"); String dest = selectTLVD("T1LV2D9"); String result = "."; try { result = TRVD_TLVD_Action(src, dest); } catch (RecognitionException e) { e.printStackTrace(); } catch (TokenStrea...
0
ed05509ab7463b7560e337d59084501f
c56818ac51411a37299e579f631af9ef
判断实体是否是数据实体,并且来源与已有实体
namespace Feng bool CopyIfMatch(S newEntity);
0
98dae38f1cf864e4a6bb076d9b24549a
46fe38d84301123c1ffb6fdc0ecc2a69
构造函数, 初始状态每行一个Queen放到随机列, 行号为下标,列号为对应值
queenproblem::queenproblem(int _numOfQueens) { numOfQueens = _numOfQueens; fillboard(); }
0
4ff5715f1173aca11cd052dd09e5316c
eed6bca6eec4bf5ee0287c655e170291
For now ordering is done comparing UUIDs
public class UUIDTest extends TestCase public void testCompareTo() { try { NULL_UUID.compareTo(null); fail("Expected exception not thrown"); } catch (NullPointerException ex) { } catch (Exception ex) { fail("Caught an unexpected exception: " + ex); ...
1
da970a3fe24eb0fc783c587da1ff3ef0
db422ae70e74ac690195e58d7a079c8b
Se redibuja la barra que representa una cola de pacientes
class ColaEspera(pygame.sprite.Sprite): def actualizar(self,surface): self.pygame.draw.rect(surface,(0,0,0),(self.posicion.getX(), self.posicion.getY(), self.ancho, self.largoConstante),3 ) self.pygame.draw.rect(surface,(255,0,0),(self.posicion.getX()+2, self.topeSuperiorBarra, self.ancho-4...
1
5a05fba01806ba5af1a774846ff072ea
343472d048d2983d65c621fbaf45de26
Always mark as modifying the payload. only read, the payload may still be modified, so we currently stay on the conservative side and always indicate modification. This may prevent some code reordering.
namespace BansheeEditor [CustomInspector(typeof (Renderable))] internal class RenderableInspector : Inspector protected void MarkAsModified() { modifyState |= InspectableState.ModifyInProgress; }
1
f3736b9fa6fc1e1111d5960ad2987cb6
428e78edce5baa0d50269a0a1560087d
手を打つメソッド(ターン数から○か×を打つかを決定)
class NonPlayer def generate_hand @hand = HAND_TYPE.keys.to_a.sample.to_i puts "あいては、#{HAND_TYPE[@hand]}を出しました" end
0
5fc62c1a6a2db860864546045fd9d794
ec9e19c99ad3117ca7572edfe68d9a6c
Display all posts instead of a limited number
class PostController extends Controller public function index(Request $request) { $models = Post::query(); $limit = $request->limit; if($request->limit === 'all' || $request->limit === null) { $limit = $models->count() + 1; } if ($this->hasSearchQuery($request)) ...
1
09e56257cd50738463ad24f7bc647b35
06e34530d16d4d5874e41598dcec15fa
Provide a list of mutants which do not have any crashes or OBEs
public class HeteroallelicAnalysis extends SampleAnalysis private class LocusRegion public MultipleMutant[] getMultipleMutants () { ArrayList<MultipleMutant> multipleMutantList = new ArrayList<MultipleMutant>(); for (MultipleMutant mm : multipleMutantTable.values()) { if (mm.readCounts < 2) { continue...
0
1622626d2b50ccc0167ad36f5842a22d
0daa3e48367c2f97dd188b83d15c89e2
POMOCNICZA; ODEJMOWANIE
Symbol Odejmij(Symbol x, Symbol y) { return Dodaj(x, PrzeciwnyDodawania(y)); }
1
2b8c7670961266946de0ae2a6a77303d
44cb7a05322090ab55ea43ec0ed8a331
<p> Description:根据官网账号查询在线理赔<br /> </p>
public List<OnlineApply> getOnlineApplyByOnlineUser(String onlineUser, String waybillNum) { return recompenseService.getOnlineApplyByOnlineUser(onlineUser, waybillNum); }
1
c75d17909f7fab5e2db4e9795c8e7b15
90f08217725eaf74e485335f08b5396d
Converts tiles into a single matrix
class GeoConvolution: def _tiles2image(self, tiles: np.ndarray) -> np.ndarray: n_row, n_col = tiles.shape[0], tiles.shape[1] tile_size = tiles.shape[2] n_channels = tiles.shape[-1] image = tiles.reshape((n_row * tile_size, n_col * tile_size, n_channels)) return image
1
b5f7eafe1de09c53822a0c23e1249cc8
6b272e96524ce0ad142f7c5f335526f8
look through the node_module roots to find the given node module
const nodeModulePath = path.resolve(cwd || process.cwd(), 'node_modules', mod); try { return fs.existsSync(nodeModulePath) || require.resolve(mod); } catch (e) { return; } }
1
2b7775d66a0d60478eb633f311974d11
27399ce4adb35c99592ae4b51a3a9a8f
Using this method we are getting all the product categories and binding them to the dropdownlist ddlCateogry
namespace ShoppingHeart.Admin public partial class AddNewProducts : System.Web.UI.Page private void GetCategories() { ShoppingCart k = new ShoppingCart(); DataTable dt = k.GetCategories(); if (dt.Rows.Count > 0) { ddlCategory.DataValueField = "...
1
86b63bde302d9d8fc107e84502fc9361
bc8eaeb7fa8e65f7cff659248e7206f9
Get location boundary of events.
from_zone = tz.tzutc() to_zone = tz.tzlocal() utc = datetime.utcnow() utc = utc.replace(tzinfo=from_zone) actual = utc.astimezone(to_zone) all_events = Event.query.filter_by(location_id=location_id) return all_events.filter(Event.time>actual).all()
0
ebe873504b3468680c17538587a32962
66cf469f47580cff3973d6b2c502ac7c
クラス定義のリネーム可否チェックを行う。
class voa_uda_frontend_customer_class extends voa_uda_frontend_customer_abstract public function chk_classname($name, $err = null) { if (empty($name)) { $this->set_errmsg($err); return false; } return true; }
0
6e04422793b822d3802bcc315a87ea3f
a867e36642211e3dc589ef5af9c87fcc
接收评标专家信息存储到数据库
response = ServletActionContext.getResponse(); PrintWriter out = response.getWriter(); String dept; String[] deptCode=map.get("deptCode").toString().split(","); List<Department> dlist = new ArrayList<Department>(); boolean flag = false; List<ExpertInfo> list=null; Department d = null; for(int i=0; i<...
1
6eafe021666a94251ca56ecc2c9f9a05
ad7ac7b565961524c9c7ef6964a8d467
Muestra los elementos de pantalla informando de que la firma se ha generado correctamente y donde se ha almacenado.
public class ConnectionTask extends AsyncTask<String, Void, String> @Override protected void onPostExecute(String result) { Toast.makeText(context, "El formulario se diligencio correctamente!", Toast.LENGTH_LONG).show(); }
0
fc0d93678cd227ee2c6dadfee8a56ce0
e95c3d779caf77886655062e7c862f2b
build all the trees for all unrooted GNodes. There may be more than one "starter" GNodes. Some GNodes may be represented in multiple trees. RECURSIVE
{ char *yo = "Zoltan_Reftree_Build"; ZOLTAN_REFTREE *root; int ierr; int i; ZOLTAN_TRACE_ENTER(zz, yo); if (zz->LB.Data_Structure == NULL) { ierr = Zoltan_Reftree_Init(zz); if (ierr==ZOLTAN_FATAL || ierr==ZOLTAN_MEMERR) { ZOLTAN_PRINT_ERROR(zz->Proc, yo...
1
d7010353adb990179d6cded1b1900249
310c1353e4b991e812f47442eae86035
ubah passing grade
class AdminController extends Controller public function gradeEditForm() { try { if(isset($_POST['action'])): if($_POST['action'] == 'edit_fetch'): $id = trim($_POST['grade_id']); list($output) = $this->_model->cariGradeById($id); echo json_encode($output); endif; endif; } catch (Exception ...
0
df7ac011f9988310b5c482eccef3e790
3faf509c21111a68f7521b2e62546492
Callback when printer goes online (graphical bits)
class BaseTasmotaNode onDeviceOnline () { }
0
6e34a53bb01976bab5d3d44b6a5fb368
d49476a585f08789d044194139ad641b
caches to options table, used with ajax to keep track of status of beyonic requests
class CacheStorage function setStatus($status){ $this->_options['status'] = (bool) $status; }
0
2ba714976730cbf994f55de89528b836
dd26d2b3a8d5184223388a3b40f6b62f
Test case for accept_order_by_seller Accepts a pending order by seller. # noqa: E501
class TestOrderApi(unittest.TestCase): def test_fill_order(self): pass
0
bace9acf38ea25328bac9f11a20f0977
c4c4d965f031103f29d48d88708d2b52
\brief Collect Mv candidates for a block
smpUMHEXSubPelBlockMotionSearch ( Macroblock *currMB, MotionVector *pred_mv, MEBlock *mv_block, distblk min_mcost, in...
1
f3d1084afa58e52921e934aa7c2d84fc
b55ed7cf8577ddcd07551e5c7b5c8ad1
Allows to group multiple commands in a transaction. If any of the commands fails with an exception the transaction will be rolled back.
{ bool flag = false; if (commandTextes.Count == commandParameterses.Count) { List<MySqlCommand> commands = new List<MySqlCommand>(); commandTextes.ForEach(x => { commands.Add(new MySqlCommand(x) { CommandType...
1
3bc8932efd7ede18f095342106236bd1
7a9d8b8e9dc27cb90a91955bef5b8650
Default step method composes the obs, reward, done, meta dictionaries from each component step.
class GymWrapper(Wrapper, Env): def step(self, action): ob_dict, reward, done, info = self.env.step(action) return self._flatten_obs(ob_dict), reward, done, info
1
951a52962f359702a0323d5cbdfee6a1
52e40c9d2707ce5f4604f5673cb564e6
##### function: hp filtering
Han <- function(y) convolve(y, c(1,2,1)/4, type = "filter")
0
71e86e3fe85657880698ade4ddc890fc
56811b3608578dfc1078d5f423b813fc
Returns whether the Android Lint plug-in is installed. <code>false</code> if not.
Process p; try { p = Runtime.getRuntime().exec( "which xmllint" ); } catch (IOException ex) { Logger.getLogger( Packager.class.getName()).log(Level.SEVERE, null, ex ); return false; } return p != null && p.waitFor() == 0; }
0
d4529cb53fd1838f63fe6e39672f5de7
be8a0d49bb2ee49bd87d067d94f9effb
Whether noise cancellation is enabled.
class InputProperties boolean isNccOnly() { return isNccOnly; }
0
85e01d33d5c2f23a2690c2db52d6afc9
13c9b8de19a3ba6819082d800794e578
Get the average activity for each neuron at each position and velocity.
class Worm(object): def get_avg_position(self): avg_pos = [0,0,0] for i in range(self._num_joints+1): avg_pos = [sum(x) for x in zip(avg_pos,man.get_body_position(i))] avg_pos = [i/(self._num_joints+1) for i in avg_pos] return avg_pos
0
95125208191f922126bb2393ce3db279
283974f40039930568b0dd9ceed1efbd
反射更改字符串
namespace ParamPass class Program static void Main(string[] args) { Console.WriteLine(" String引用类型按值传递的特殊情况"); string str = "old string"; ChangeStr(str); Console.WriteLine("调用方法后,实参str的值:"+str); Console.Read(); }
0
e9bc6185966c096a17c6fc7577e74281
d7ae95f8068aa319f4c944727d929798
Investment recommendations for an article.
class TwitterLineItemOptimiser(object): def recommend(self, reason): if self['M.install'] >= MIN_INSTALLS: self._data['ir'], self._data['ir_interval'] = self['M.ir'], '1D' else: self._data['ir'], self._data['ir_interval'] = self['L.ir'], '7D' self._data['new_bid'] = norma...
0
cae9e739cc6dc66ee3b503e04ea740c2
53cb8f396bd991a72c485be5ac539d70
Tests that WebLayer forwards invalid access token notifications to the embedder.
@RunWith(WebLayerJUnit4ClassRunner.class) public class GoogleAccountAccessTokenFetcherTest @Test @SmallTest public void testOnAccessTokenIdentifiedAsInvalid() throws Exception { Profile profile = TestThreadUtils.runOnUiThreadBlocking( () -> { return mActivityTestRule.getActivity().getBro...
1
fb8b273a31b17163faaf0c4d71423503
ce81ba96ceea1159e3f219c90ccf440f
<p>Description:根据订单编号获取车位订单信息</p> <p>CreateDate:2017年9月23日 下午9:16:29</p>
ManageCarInfoBean selectOrderInfoByOrderId(JSONObject requestMessage);
1
3cdebd2d0fea9232712f5638a49c66c4
113a791fdb3b658d064cac92f54d89a8
重要股东股权质押明细
$('#shareHolderInfoTable').bootstrapTable('destroy'); $("#shareHolderInfoTable").bootstrapTable({ method: "post", url: "../shareHolder/list", search: false, showColumns: false, showRefresh: false, sidePagination: "server", que...
0
89af1634b9ecd256fb2d3015ba2b76c4
117b58d55c81c1103956cc2bac53269b
Gets items that are similar to the given itemid. The $options array can have one of the following name-value pairs: category => categoryid segment => segmentid e.g., array('category' => 'music') or array('segment', 'en-US')
{ extract($args); if (!isset($itemid)) return array(); if (empty($module)) { $module = xarMod::getName(); } $modid = xarMod::getID($module); $tables =& xarDB::getTables(); sys::import('xaraya.structures.query'); $q = new Query('SELECT'); $q->addtable($tables['categories_linka...
0
866bd086888797fff1256b14df1922b7
b8fb6172d145c757ada59301fb19767d
Отрисовка линии вовремя параллельного переноса
{ DragDirection drag = GetDragDirection(points); Vector3[] postions = GetPointsAccordingToDirection(drag, points, yPosition); LineRenderer lr = parent.GetComponent<LineRenderer>(); if (lr == null) { lr = parent.AddComponent<LineRenderer...
1