query_id
string
corpus_id
string
query
string
code
string
label
int64
b90c23dc4ded74b8068aee0572595d15
bd6cf895a1562c2d1ef6a444a1dd1fb4
初始化贪心算法的路径,以便后续模拟退火算法来进行优化
void TspBase::TspEnumImplicit() { fout<<"TspEnumImplicit ..."<<endl; cv=0; bestV=10000; for(int i=0;i<N;i++) currentPath[i]=i; EnumImplicit(1); Print(); }
0
72a82caea486da868a4387e48e049993
0ab61056a8e9a683281861ca429a5125
根据城市编号获取物业
@Service("pkService") public class PkService public List<PageData> findByCityCode(PageData pd) throws Exception { return (List<PageData>) dao.findForList("PkMapper.findByCityCode", pd); }
1
29ba08c39f24eea6935799a2d6f1eb38
4d49d9f66d113fd0c86840dd4d9238ac
Gets all members from data store where id's in view model match.
namespace Airline.AppLogic.Service ServiceResult<IEnumerable<AircrewMemberDto>> FindByIds(IEnumerable<Guid> memebrsId);
1
295a7ed7fbba8883d8f96de2b8c3ab78
e26dc66b367e473d6ed3b30490524f3e
Get the value of Goals Nbr
public class ChartGoalDto extends BaseDto public Integer getGetGoals() { return getGoals; }
1
a1d73e05bdcf0e30b448bb0fdb0f5a19
dc5411bea9fd2953877fa6d6b8f9fe75
Return a normalized version of the vector given as argument. Vector must be a numpy.ndarray.
def normalize(v): v = np.array(v) n = norm(v) if n > 1e-8: return v / norm(v) else: return np.zeros_like(v)
1
198411c19a40ea3edd973c41ec8c7edb
199b2ccbf4519385f66c032133a004ad
method to set circular progress bar values
public class RecordActivity extends AppCompatActivity private void setProgressBarValues() { progressBarCircle.setMax((int) timeCountInMilliSeconds / 1000); progressBarCircle.setProgress((int) timeCountInMilliSeconds / 1000); }
1
75c6e8543fe8cf99e85ea5ea97a979f4
0d9f53cad42015e6d33642b95a64a902
Fonction pour dessiner le selecteur de la minimap :
class Carte private function drawVille() { $zones = array(); $query = "SELECT nom_ville, x_min_ville, y_min_ville, x_max_ville, y_max_ville FROM ".DB_PREFIX."ville"; $res = mysql_query($query); if (mysql_num_rows($res) != 0) { while ($row = mysql_fetch_assoc($res)) { $p1 = $this->positionToPixel...
0
18b6d72460b41d5921d1fbd4588f8dc7
e1676dc2d80bc876cfcbb8f19bce8154
checks if State has attributes
class StateTest(TestCase): def test_attr(self): self.assertTrue(hasattr(self.state, 'name'))
1
afa8cb1c2b5495366998192ef7eccc11
e2dbfc5a4743d1bd18faca94cfec985c
A function that adjusts the x or y or both coordinates in coordList by shiftval amount x and y will be shifted if the shiftxTF and/or shiftyTF parameters are set to true
ADJUST_AMOUNT = 0 if coords is None or len(coords) == 0: raise ValueError elif isinstance(coords[0], tuple): coords_to_use = coords[0] else: coords_to_use = coords if ADJUST_AMOUNT == 0: return coords_to_use else: ...
0
24f8f249075a34e91ecb5645136ed4ac
68353380b18f078fe625edfdf680f4cc
Create an instance of {@link AbstractMDContentInformation }}
@XmlRegistry public class ObjectFactory @XmlElementDecl(namespace = "http://www.isotc211.org/2005/gmd", name = "AbstractMD_ContentInformation") public AbstractMDContentInformation createAbstractMDContentInformation(AbstractMDContentInformationType value) { return new AbstractMDContentInformation(value); ...
1
2a4f2a25227435a5b445c62852d791b7
3d755a103ae7d52e563610f6245bc2ec
指定したアドレスからファイルの内容をロードする
{ loader.loadText(this.getAbsolutePath(path), (content) => { callback(null, content); }, null, (e) => { callback(e, null); }); }
0
7506feb08d1d64d8854c88a001e9876b
99c581b0e6d1ad7b656993f1bca3e725
Append "kubernetes_resources_deletion" finalizer if not already present. This will prevent the API from deleting the resource without remove the Kubernetes resources.
func EnsureFinalizer(ctx context.Context, cli client.Client, contour *operatorv1alpha1.Contour) error { if !slice.ContainsString(contour.Finalizers, finalizer) { updated := contour.DeepCopy() updated.Finalizers = append(updated.Finalizers, finalizer) if err := cli.Update(ctx, updated); err != nil { return fmt...
1
6056a02b6e30fd1a409caed330042848
651c93dd3b52c67feaa2cc7a85698d9b
Test field instantiation from raw bytes value
dct = {field: i for i, field in enumerate(ldmlib.CAM.__attrs__)} dct['message_id'] = 2 m_from_dct = ldmlib.CAM(**dct) b = m_from_dct.as_bytes() m_from_bytes = ldmlib.CAM.from_bytes(b) self.assertEqual(m_from_dct, m_from_bytes) self.assertEqual(b, m_from_bytes.as_b...
1
20536eda491d2f4cc8d3c31ed4749398
20d66eda1c4d2f3912026dde543f4316
Send text message to the websocket channel. It inserts the message to the queue and actual sending is done on an other thread
namespace Bridge.Networking public class WebSocketWrapper public async Task SendMessageAsync(string message) { if (_ws.State != WebSocketState.Open) { throw new Exception("Connection is not open."); } Log.Trace(4, $"WebSocketWrapper.SendMessage...
0
82955c873d064b0b7815ff66d42bd5a4
ed88d64e76f1139045494bbe6eb34b9a
Print prints the elements in its argument slice
func printEach(tar []string){ for i:=0; i < len(tar); i++{ fmt.Print(tar[i]) } }
1
3175b68944d1330035c3b6e266cbd665
438adc63dbe549534727ea7a31d55129
module de redimensionnement auto de la taille des tracks dans la playlist en fonction de leur durée
def adjustduration(x,gain=10,window=10): a = [] for b in x: a.append(b[3]) a = np.array(a) def checkalignment(y): score = 0 c = np.cumsum(y) for d in c: if d%2 == 0: score += 1/16 if d%4 ==0: score += 1/8 ...
1
0b2bb97079882cb1f117d3cb280286de
7144113ad47394821cda4a75f8f8a3f4
Calculates passed pawn bonuses given tuning data
namespace SuckSwag.Source.ChessEngine public class Evaluate private int tradeBonus(Position pos) { int wM = pos.wMtrl; int bM = pos.bMtrl; int wPawn = pos.wMtrlPawns; int bPawn = pos.bMtrlPawns; int deltaScore = wM - bM; int pBonus = 0;...
0
cbec1eb02e22601a5557b68aeabf9947
27fb92398b1f8ac7506221f130b543ba
prints without a newline and flushes the buffer so it appears on screen without delay
local function flush() io.write(printbuf) io.flush() printbuf = "" end
0
c9582ad834c5d35f056e5aedcc712574
eb05024e6e67b544c8b3316d9187dd4f
Add `START` to the beginning of target input sequence, while add `END` to the end of target output sequence.
batch_size, max_time = input_tensor.size() input_tensor = input_tensor[:, 1:] output_tensor = th.cat([input_tensor, th.zeros([batch_size, 1], device=device, dtype=th.long) + target_pad_idx], dim=1) return output_tensor
0
921bb5efb89e9cecfa7820f5879c9432
dee85f94f0d6abc4d2893a13552099cb
Find the radius enclosing half the bulge mass.
class NFWProfile(AnalyticDensityProf, ConcMass): def halo_mass_to_halo_radius(self, total_mass): return AnalyticDensityProf.halo_mass_to_halo_radius(self, total_mass)
0
9fc516c766083efad72ec311fa4a3fbf
20c17386b84cd225a1357fac1c17c291
Calculate ring statistics, assortativity and Aboav-Weaire parameters
self._get_m() self._calc_rca() self._get_m_cp() self._get_diversity() self._get_ubiquity() self._calc_eci() self._calc_pci() self._calc_proximity() self._calc_density() self._calc_distance()
0
8429a6c591e216ac8a4498629ade19d7
0a52870ae04a43be71af05d89dc436da
Adds a method that should be called whenever the system has finished drawing the OpenGL window The order in which the registered callbacks are called is not guaranteed
namespace ActionGroupManager [KSPAddon(KSPAddon.Startup.Flight, true)] public class VisualUi : MonoBehaviour internal static void AddToPostDrawQueue(Callback callback) { postDrawQueue.Add(callback); }
1
6853f4d6068a6c46161d42eff06665f7
3f52a73db7447f7c086bb0fe1082dea7
tests the exam seed setting and getting
$this->quiz = $this->create_test_quiz($this->course); $user = $this->getDataGenerator()->create_user(); $this->assertFalse(settings_provider::is_seb_settings_locked($this->quiz->id)); $this->attempt_quiz($this->quiz, $user); $this->assertTrue(settings_provider::is_seb_settings_lo...
0
d78bac24e962bb931e7cc29a39baa55f
9750fe4ab77b72dfb824f1789e649b7b
窗体大小改变时触发该事件,用于最小化到托盘
namespace IDInfoRead public partial class Form_Main : Form private void Form_Main_Resize(object sender, EventArgs e) { if (this.WindowState == FormWindowState.Minimized) { notifyIcon1.Visible = true; this.Hide(); } }
1
e9f2b00d4bbff03a5368e7b057021cdf
970fe5fc92f9bcb26d1923a5069b4bf5
Quartic tween with t clamped to 0..1
namespace FluffyUnderware.DevTools public static class DTTween public static float QuartIn(float t, float b, float c) { t = Mathf.Clamp01(t); return c * t * t * t * t + b; }
1
8841576fed44ba564b4741c68878bdbb
4a18bf6505eb724070268f40e023d50b
Preenche as posições do array com numeros aleatórios.
function setRandom(){ var i; var random; for(i=0; i<50; i++){ random = Math.floor(Math.random() * (999 - 100)) + 100; array[i] = random; } }
1
060b1b6473c611ff8ee93984d13063c0
f6cf147ed9a67e199dc26b1a5e3ef939
Chama método da classe de tratamento para permitir ou não, o que foi digitado.
{ TextBox textBox = sender as TextBox; if (e.Text.Length > 0) { bool allowed = false; if (textBox == txtNumero) { if (char.IsDigit(e.Text, e.Text.Length - 1)) { all...
1
172313e65b85cd6b8b5d219c1fae012f
91260cf9b57a1cbf00ec1853ca667649
子函数, 通过socre0平时成绩, score1期末成绩, 来计算总评成绩
def my_sum(*, mid_score, end_score, mid_rate = 0.4): score = mid_score * mid_rate + end_score * (1 - mid_rate) print(format(score, '.2f'))
1
211321d920cea02ea07694f6c909789b
2fa3235f946da26dee0bec540f1e0953
Test simple escaping and the unescaping.
class CSSSerializerTestCase(basetest.BaseTestCase): def test_escapestring(self): css = r'''@import url("ABC\a"); @import "ABC\a"; @import 'ABC\a'; a[href='"\a\22\27"'] { a: "\a\d\c"; b: "\a \d \c "; c: "\""; d: "\22"; e: '\''; f: "\\"; g: "2\\ 1\ 2\\"; content: '\27'; }''' ...
1
5b5de48842dc08c47aefa620046d6774
df430960e523bc252a482d9bfa1b1628
休日数に関する修正用関数。
def springAdjust(day): day2 = day if day < 79: day2 += 286 else: day2 -= 78 return day2
0
d3c13903fb827bae11fd880f0f660f90
3b329671fb9a202e4220e53e71675917
Ajout d'un compte agence.
class Agency_model extends CI_Model function add_agency($params) { $this->db->insert('agencies', $params); return $this->db->insert_id(); }
1
b64efdab813bba1923d6aaf347fec27a
3461f661ba18d92946620b4920702dc7
On a market tray change.
void onTrayPreferenceChanged(Collection<TrayItem> items);
1
a5d893bcde8574e0a656b192a0fcc8f4
f353f798e8d126d5cdb259a66866870c
获取连续的数字
public class Leet394_decodeString private String getDigits(String s) { StringBuilder sb = new StringBuilder(); while (cur < s.length() && Character.isDigit(s.charAt(cur))) { sb.append(s.charAt(cur++)); } return sb.toString(); }
1
9238fae8b35172306b544743a0aefc01
19a1ce1764db8d379fa45379adc98b90
leetcode 477. total hamming distance b/w all pair
class Solution: def totalHammingDistance(self, nums: list[int]) -> int: max_num = max(nums) l = len(bin(max_num))-2 arr = [0] * l for i in nums: for j in range(l): if i & 1 << (l-1-j) == 0: arr[j] += 1 res = 0 for i in arr: ...
1
22c6779a9337fe4ae0c7268dd0fe38bb
48620014a12b5f0d285b8a63d8150a95
修改所選擇的費率或月數資料
namespace DianDang [System.ComponentModel.DataObject] public partial class DDFeeRateController [DataObjectMethod(DataObjectMethodType.Update, true)] public void Update(int RateID,string Rate,int? RateType,string Description) { DDFeeRate item = new DDFeeRate(); item.MarkOld(); i...
1
496c66c286f65dbdd3c9a0db097c1eda
3f347180f524378e41c4bf5f99bb3474
验证支付密码:拿tradePwd进行MD5后与数据库中userId得数据库支付密码比对
public void updatePay_pwdWithUserId(String pay_pwd,String userid) throws Exception;
0
bf9e59eb75ca2b12a5e01f78da65ee5c
74794980852234cc2559d9074228eedc
Returns response for case when file was not saved.
public class Ui public void storageFileNotFoundError() { }
0
1a34739216d28cbffa7ba9c165aa3c45
bc44604a01969daeee1d6ebddc159468
Gets the piece type of the given text Returns -1 if text is not a piece
public class ChessAI private int getPieceValue(String type) { switch (type) { case "Pawn": return PAWN; case "Knight": return KNIGHT; case "Bishop": return BISHOP; case "Rook": return ROOK; ...
0
8e547e39bd2217391eca129d658af715
ba65be3bd53a1c303f24430ae8a6f03d
3. 对PBXSourcesBuildPhase数据进行merge
rcmd_db_merge_spf_data (rcmd_spf_run_info *pspfr) { rcmd_inst_info *pinst; rcmd_spf_run_info *pspfr_tmp; rcmd_spt_data *psptd, *psptd_inst; pinst = pspfr->pinst; psptd = (rcmd_spt_data *)RCMD_WAVL_GETFIRST(pspfr->wh_spt_data, RCMD_SPF_SPT_...
0
0a87c777593a560fe32ffe814389233a
ed6cf6187ff8b8f7dffe523f700b40df
update the currently selected Content item
namespace Renishaw.MAPD.DocumentViewer.UserControls public static class TabContent public class ContentManager public void UpdateSelectedTab() { _border.Child = GetCurrentContent(); }
1
30b72e17b89b2aff349190f37a087f4a
4f412fff3113db7aa9384f27f420401a
get the next `num_of_days`, skipping sundays
class Task def calc_next_tweet_wday(base_wday) tweet_wdays = [tweet_sun, tweet_mon, tweet_tue, tweet_wed, tweet_thu, tweet_fri, tweet_sat] next_tweet_wday = -1 tweet_wdays.each_with_index do |wday, i| if i <= base_wday next end if wday == 1 next_tweet_wday = i break...
0
334ace63a0dadd21d2829d3b731afb85
b243ad6ff1411e4023fff0faf7971d9d
Returns the width, in pixels, of the Chart Panel.
function getChartDivWidth(){ return parseInt(d3.select("body").select(CHARTDIVNAME).style('width').slice(0, -2)); }
1
b0c50ce5e73e76b299072f8e6089c618
6964c2feddc7e0ae33609e8aebdc0ace
Test used of a custom URL builder.
class ElogRepositoryTest extends \Orchestra\Testbench\TestCase function test_it_uses_custom_url(){ $this->repo = new ElogRepository('https://logbooks.jlab.org/api/elog'); $this->test_it_verifies_a_known_logentry_exists(); }
1
d81b9c38c9c7c1b15d02909302f5b36d
59c2439538c84a3177ac86d9a781967d
发送请求给vag,同步返回vag response
class VGSShow private constructor( context: Context, private val vaultId: String, private val environment: VGSEnvironment, private var url: String?, private var port: Int? ) @AnyThread fun requestAsync(path: String, method: VGSHttpMethod, payload: Map<String, Any>) { requestAsync(VGSRequ...
0
8a06c27ceb7c6c60412a3342355b41d9
5a300b3f6265c765da4e5e85c33e1d90
Setter for <code>express40.orders_rec.ID_city</code>.
@XmlRootElement(name = "shipto") @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "shiptotype", propOrder = { "name", "address", "city", "country" }) public class ShipTo public void setCity(String city) { this.city = city; }
0
5c71609da9e4409f595af7180b148707
7937979a076efebc6c343f0748afa42a
Reset all pieces as not being able to en passant
class Black_Funcs(object): def reset_enpassant(self): for i in range(8): Black.en_passant[i] = 0
1
067a05ab2a541c6cae17bf967f6ad078
002d2ebb0f614af83d683f520f3ca0fd
Clear docs If our documentation file has been updated we need to empty the current "content" from our table completely before saving the newly parsed data
find = self.collection.find(filter={'content': ''}) for doc in find: content = self.get_content(doc['html']) self.content_update(doc['title'], content)
0
2060dc89f1d80552c49b5231d7111dd1
c8b93440bd41ac9cb4798031b1141f63
设定员工的姓名和入职年份
string empBirthday, int empAnnualSalary) { SetData(empFullName, empDepartmentCode, empBirthday, empAnnualSalary); return; }
0
575c192113ddbc5f6987bc283119a0a4
4fc9bb3bcf2581139c91238e90eb5fff
checking error output of shell.c with cd and a directory that does not exist
void testMultipleInvalidCmdWithCd() throws Exception { CallCommand catCmd = createCommand(APP_CAT, INVALID_FILE); CallCommand cdCmd = createCommand(APP_CD, FOLDERS[0]); CallCommand grepCmd = createCommand(APP_GREP, "+/+", FILES_IN_FOLDERS[0]); SequenceCommand seq = sequenceCommands(c...
0
34ae14eeffa20e19c84036da318bef63
44a1e4556df5883bb98b1d6d9862603c
Returns character for quoting value of given attribute
namespace WebMarkupMin.Core.Helpers internal static class HtmlAttributeValueHelpers public static char GetAttributeQuoteCharByStyleEnum(HtmlAttributeQuotesStyle quoteStyle, string attributeValue, char originalQuoteChar, char defaultQuoteChar) { char quoteChar; switch (quoteStyle) { case HtmlAttribute...
1
40d7fe83a5207cdd94faddff9fa19fb4
f0c44ed92a464c5c858d08673de1d697
Checks whether command to evoke error exists in provided user input.
class Gbp_Config(object): def cmd_error_check(self, cmd_out): for err in self.err_strings: if re.search('\\b%s\\b' % (err), cmd_out, re.I): _log.info(cmd_out) _log.info( "Cmd execution failed! with this Return Error: \n%s" % ( ...
1
e6a1ecfc1d72eb03824597659fff5f82
12e60d280c2a825db96e3d68131e73fe
读取文本框里面的内容
class MainWin(QWidget): def getData(self): return self.InputBox.toPlainText()
1
6496115ed9c2423b16f3fea2a5f21f4c
9d2660a87703c2c1e187108a37518523
Devuelve el número de productosque tiene una categoria
class Productos_model extends CI_Model{ function filas_categoria($categoria) { $consulta = $this->db->query("SELECT * FROM Producto WHERE Categoria=$categoria"); return $consulta->num_rows() ; }
1
aec73502c265ad796931f8f55fc4885a
38b5fc6d2e46eee417c7337f1bbf4096
Returns mouse position which is translated if control Zoom is not equal 1
{ Vector2 mousePos = new Vector2(newMouseState.X, newMouseState.Y); return mousePos; }
0
42492395d7826dddff3149eca20534bc
77c1dba41ba177305a529f387ff1b536
清除字符中的所有超链接
tv.setMovementMethod(LinkMovementMethod.getInstance()); CharSequence text = tv.getText(); if (text instanceof Spannable) { int end = text.length(); Spannable sp = (Spannable) tv.getText(); URLSpan[] urls = sp.getSpans(0, end, URLSpan.class); if(url...
0
81be1943996b98dac59c5a0ce750e50d
7645461518f0d62db3169eb07200d10e
NewProjBusinessFormat 创建项目业态存储实例
export class ImpProjectPref extends BaseModel constructor(data?: Partial<ImpProjectPref>) { super(); Object.assign(this, data); }
0
2b26343ab7ccafc9294f2949e9fea0d4
53b23c313bb75fea3683dba3b8dd6fff
通过主键修改并返回修改后的信息
int updateByPrimaryKey(Information record);
1
6c94ead32de01dac4cfa43fd5cd811d5
05d3aca54f8f870ddd9fec2f8b0bdb9a
考察随机划分和最优划分对于抉择树的影响
dataset_DT = import_data_DT() X = dataset_DT.values[:,0:6] Y = dataset_DT.values[:,6] accuracy_matrix_gini = [] accuracy_matrix_entropy = [] depth_choice = [] leaf_choice = [] for i in range(1, 101): depth_choice.append(i) leaf_choice.append(i) for i in depth_choice: ...
0
15093cfd56d0a4712c14bbd1d850016d
eb4cc032cfe67c097d10d2da53ae3f4b
Filter the search results loop to fix some bad permalinks.
if (!$query->is_admin && $query->is_search) { $query->set('post_type', array('post', 'page')); $query->set('post__not_in', array(2446,491,944,945,946,947,948,949,950,951,952,953,954,955,1523,1526,1530,1532,1535,1538,1541,1544,1547,1549,1552,1555,1558,1469,1472,1473,1474,1475,1476,1477,1478,1479,1480,1481,14...
1
ddc21c5a439961927850da218a2c7aa8
1057d55bfdc49166f737acc4ea7d2f53
выводит количество элементов в списке
class MyList public function size() { return count($this->myList); }
1
7dfc218e24cb55880a2e151f385999a1
7d9278080c3cda83f6f6eb15b495be71
Add a DocumentVersion.
public class DocumentManagerBeanAccTest extends TestCase private DocumentVersion addDocumentVersion(Document document, DocumentName documentName, Integer version) throws Exception { DocumentVersion dv = this.createDocumentVersion(document, documentName, version); return this.manager.addDocum...
1
5c8e68147fa363d0f2b6502018fd7954
7326591379733d70c1f485dfb8147d63
根据phoneNo查找告警设备信息
public class FunSupport implements IFunSDKResult public boolean requestDeviceSearchAlarmInfo(FunDevice funDevice, XPMS_SEARCH_ALARMINFO_REQ info) { int result = MpsClient.SearchAlarmInfo( getHandler(), G.ObjToBytes(info), funDevice.getId()); ...
0
ab6d22c517359cf6134999dd2cd3acbf
43ac23d45e40503b0ea47591f3628ce3
Form ilk açıldığında (picturebox1'e henüz resim eklenmediğinde) Gri ve Binary'ye çevirme butonları aktif olmasın
namespace NDPprojeTasarim public partial class Form1 : Form public void butonlarEtkin() { organikAtikButton.Enabled = true; kagitButton.Enabled = true; camButton.Enabled = true; metalButton.Enabled = true; bosaltOrganikAtikButton.Enabled = ...
0
20691218d96b207cc96e7b94946c6a41
1165c8be6275d7033e90bc4396e92a5d
Calculates the current centripetal acceleration in pixels/s/s.
{ return ((float) Math.hypot(_mouseX - _previousMouseX, _mouseY - _previousMouseY)) / _deltaTime; }
0
9563f455c987f6d7e20f29a3bfe43a9d
40fdb165fb1022139a5b93b3b8b278eb
Tryes to extract location latitude from NMEA message
int8_t ParseNMEA(void) { memcpy(&GPSnmea_data[0], NMEA_data(), MAX_GPS_STRLEN); if( (GPSnmea_data[0] == '$') && (GPSnmea_data[1] == 'G') && (GPSnmea_data[2] == 'P') ) { if( (GPSnmea_data[3] == 'G') && (GPSnmea_data[4] == 'L') && (GPSnmea_data[5] == 'L') ) { double latMins; double longMins; char tokens[7...
1
b798c7ab860bca959c918d798e471958
9afdda4ce74dddf6d837a27cfb657c5b
Tests typedef nested inside a compound (valid).
public abstract class OperationTests extends AbstractTest @Test public void testTypedefNestedInCompoundInvalid() throws IOException { reasoningTest("typedefNestedInCompoundInvalid", 1); }
0
f2e82d0534dc0214e36378600de97011
c71e405854371b3ed4e410cd6a48ac4f
Setter for <code>inf.job_task.modifyDate</code>.
public class PaymentInfoSchema extends Schema public void setmodifyDate(Date modifyDate) { this.modifyDate = modifyDate; }
0
155b67415ed3d519a4a4f91a12a96260
77031dcddd97a8dab74ed9295ef7b6e3
Set current object to the start of the current minute.
public function startOfDay();
0
151bfc885f741731957d1a3f1b3ca52d
51d909d39eb16bd145dacb83efa024fe
Multiply a 2d matrix with a 1d vector
def matmult(m, v): return [dot(r, v) for r in m]
1
c977a1babda08d7c3d37b918568cee50
f7a7994583382263ee49cceaa163bc6e
Get Freight Charges.
public class X_C_Order extends org.openXpertya.model.PO public BigDecimal getFreightAmt() { BigDecimal bd = (BigDecimal)get_Value("FreightAmt"); if (bd == null) return Env.ZERO; return bd; }
1
f82c68c57fbdea6a188f8ea5853119f3
8220bdd49f3e93ce12ef4544fdde3f51
Insert to table from current select
int count = 0; if (getSelection().length == 0) { return 0; } int row = getSelection()[0]; final Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard(); final Transferable transferable = clipboard.getContents(this); if (transferable == n...
1
6c8f98e0e95c6a1d651cf079fca9e921
b9c4a3640917862257756fc6c2a1f95e
Number of active signups
class Event(Base): def num_signups(self): return int(Signup.query.filter_by( event_id=self.id, is_active=True).count())
1
dd6f6999108f3b1ad9a7210f76780e16
e4b9c85653cdb320c5857f83b14c534c
Реализация метода k-means
self.points = np.full((self.n_clusters, data_points.shape[0]), False) self.distances = np.full((self.n_clusters, data_points.shape[0]), np.Infinity) self._set_centroids(data_points) self._k_means_objective(data_points) for iteration in range(iters): old_points = np.co...
1
30d846cf65a5f7bea0dd954f5985a743
9e32e0e8d79d2d9d369efe1b3c4cbf3b
进货价调整单-添加编辑
@Controller @RequestMapping("freightPrice") public class FreightPriceController extends AbstractWebController @RequestMapping(value = "add", method = RequestMethod.GET) public String add(Model model,String freightid) { Map<String, Object> map = new HashMap<String, Object>(); map.put("grade", 2); model.ad...
1
a52dcbc31e45b917b2541988fa82d91f
990f0babb8043a1eb5f67158fa030402
Don't touch the inventory of the untouchables
public class ModSoulbound extends ToolModifier @SubscribeEvent(priority = EventPriority.HIGH) public void onPlayerClone(PlayerEvent.Clone evt) { if(!evt.isWasDeath() || evt.isCanceled()) { return; } if(evt.getOriginal() == null || evt.getEntityPlayer() == null || evt.getEntityPlayer() instanceof Fak...
0
7b0a1a705aa6da0e8e04bf5071d96ed4
e6a0e2d572dd1091605fd4db7e28223d
将评论信息转换成前端展示的VO
@Controller public class CommentController private CommentVO convertCommentToVO(Comment comment) { CommentVO vo = new CommentVO(); vo.setUid(comment.getUid()); vo.setCId(comment.getCId()); vo.setQuestionId(comment.getQuestionId()); vo.setUname(comment.getUname()); vo.setT...
1
5f930879d588e71bc67719e51f436849
9e775a8939bbfeecdf132f154e6f18b2
POST api/sensors
namespace ASW.Sensors.API.Controllers [Route("api/[controller]")] [ApiController] public class SensorController : ControllerBase [HttpGet] [ProducesResponseType(StatusCodes.Status200OK, Type = typeof(IEnumerable<Sensor>))] public ActionResult<IEnumerable<Sensor>> Get() { return new[] { ...
0
057ca0f35873dadb253743d49a2107e2
b9e62d5f674838a68e7f305ac677a64b
We consider I(a) = int_0^1 cos(ax) dx. Then dI/da = (a*cos(a) - sin(a))/a^2.
class sin_(RealFunction): def fdiff(self, argindex=1): assert argindex == 1 return (cos_(self.args[0]))
0
efa415d98d586e50b67244cdd60e64b0
e98ed7c630c6853b77a109ba2ff78784
录音动画相关
record(e) { if (isrecording) { return; } const index = e.currentTarget.dataset.index; let list = this.data.list; this.data.recording.state = true; this.data.recording.currentTime = +list[index].currentTime; this.data.recording.duration = +list[index].duration; this.data.recording.i...
1
c4effdb4cab23e312b53282d151fa85a
c683b5b6c591ccf2f9401a9817f45868
執行臨時的進食事件 (伺服器重啟後消失)
{ if( DefinedScript.EAT_DEAD_HUNGRY_SEC <= GameDataScript.GetSecNowTimeSpan( GameDataScript.GetLastEatTime() ) ) { Dead( DefinedScript.MSG_DEAD_EAT ); } }
0
314b7eb3a5de4fac38e159415a853313
17275facb0ed7a3c55b3fc5c0857e82f
在GameObject完全被加载后调用
local function onLoadComplete (param) local win = nil; local canvasGo = LuaHelper.InstantiateGameObjectFromAsset(param.assetbundle, "Canvas", "Canvas"); MainPanel.uiRoot = canvasGo local tmpCanvasScaler = canvasGo:GetComponent("CanvasScaler"); LuaHelper.SetCanvasScalerReferenceWH(tmpCanvasScaler, -1, -1); local e...
1
69112e57b2ce8d3b4b9b4ee421947d50
482cb6a3d605470fb8560e10cb73cc15
初始化支付宝布局
{ if (!empty(@$con->reward_ssl[0])) { $ssl = true; } else { $ssl = false; } $config = [ 'appId' => $con->reward_alipay_id, 'rsaPrivateKey' => $con->reward_alipay_private_key, 'alipayPublicKey' => $con->reward_alipay_public_k...
1
e4ab2aee217d993ad7b9724c0e1ee671
2de156bc60f279bfd76969c6782d8d37
Returns True if the intersection of the ranges is Null
{ if (rangel != null && range2 != null) { throw new NotImplementedException("TODO"); return false; } else { return false; } }
0
20134d61dad6ee01311077a0bde6fc21
9cb8436a04593df5d6dc194151df0e69
Palauttaa viestin sisällön muodossa, jossa BBCode on muunnettu toimivaan muotoon.
class NewsFeed extends FrameworkBusinessObject function displayMessageText() { return BbCodeParser::staticGetMarkupFromBbCode(htmlspecialchars($this->dataObject->messageText)); }
1
45f288f5f279c9e38376f7e6400f47a5
a11b261ab0d5b63d2dbcb38754446e96
添加建筑实体(显示对象) 到词典 ,仅用于建筑创建方法
public class MaterialsManager : Manager void AddclassifyDic(GameObject value) { Dictionary<string, GameObject> dic = null; if (!string.IsNullOrEmpty(ReceiveMgsManager.Localtion) && value != null) { if (classifyDic.ContainsKey(ReceiveMgsManager.Localtion)) { ...
1
c5af95700a53d9538a2f099d1c96a284
899db7c6d21d9d94fb615fc727653ae5
@brief Get the LSM6DS0 gyroscope sensor output data rate
int32_t LSM6DSV16B_GYRO_GetOutputDataRate(LSM6DSV16B_Object_t *pObj, float_t *Odr) { int32_t ret = LSM6DSV16B_OK; lsm6dsv16b_gy_data_rate_t odr_low_level; if (lsm6dsv16b_gy_data_rate_get(&(pObj->Ctx), &odr_low_level) != LSM6DSV16B_OK) { return LSM6DSV16B_ERROR; } switch (odr_low_level) { case LSM6...
1
4b198d6f6998b22dcbeea100dd84a5ae
937fd8f13210001bfe1b08f600ea084b
Icône du site
public class Website public Image getIcon() { String urlIcon = getIconUrl(); if (urlIcon == null) return null; try { return ICODecoder.read(new URL(urlIcon).openConnection().getInputStream()).get(0); } catch (Exception e) { e.printStackTrace(); return null; } }
1
05680bcb5314871d33a6a9bfef6e62d7
ce618c4229b6209f908ff23f612de2cb
отримує поточну кількість вузлів в мережі
namespace HW_2_2 public class Node : ILinkedList public int GetCount() { return NumberOfElements; }
1
e075d72b9350f1381358383b83747f6a
870ee14e3bf313dd0fa1659ca0310ecc
Obtiene objeto Tabla
public class TablaButton extends JButton public Tabla getT() { return t; }
1
245e3123da4fac1812c05497de527532
d163b40bf9fde326d40b2102c3f246e6
Listagem de diálogos sobre a determinada busca.
class DialogController extends Controller public function index(Request $request) { $data = Dialog::orderBy('updated_at', 'desc')->paginate(20); return view('dialog.index', compact('data')); }
0
a39cb7b36992633fd6d83d926aa956cb
afe8a4c6d005ad5f5bd1df440be4bb79
Filters sentences that contain less words than a given threshold
for (Iterator<Label> it = result.iterator(); it.hasNext(); ) { Label l = it.next(); if (l.belief < threshold) { it.remove(); } } return this; }
0
70ca82dee0df54770e9914ca0876f355
a9e13164cad39fcd895ce597844c37c3
Função que retorna a palavra repetiva 3 vezes
func ExampleRepeat() { fmt.Println(Repeat("a", 3)) }
1
f503f9e00980cd089dd286c2661ddb2b
6d78067cb2dffc999d53585f376eaed7
Show registered ImageWriter(s)
public class ImgWriter2 private void retrieveSupportedWriters() { if (m_mapFormats == null) { final Context con = SCIFIO.getContext(); m_saver = new ImgSaver(con); final Collection<Format> outFormats = SCIFIO.format() .getOutputFormats(); m_wri...
1
b3d7141e1f46e5dc654b0e208b8ff6cf
14ff17d245aaea6e2443191b12208030
<para>Gets the component-wise min of two vectors. </para>
namespace System.Numerics [MethodImpl(MethodImplOptions.AggressiveInlining)] [Intrinsic] public static Vector2 Min(Vector2 value1, Vector2 value2) { return new Vector2((value1.X < value2.X) ? value1.X : value2.X, (value1.Y < value2.Y) ? value1.Y : value2.Y); }
1
a09035c93d5ca021d32a012598f719c6
274bef3f637e6f89ab04e35ebe448972
This page will show logout if logged in or login and register if not logged in
class App extends Component render() { return ( <div > { this.loggedIn() ? ( <> <AddPost siteLang="en" loggedIn={this.loggedIn} getToken={this.getToken} /> <Button onClick={this.handleLogout}> logout </Button> ...
1
21014e3269185e7d1c48ee8a31b53e1d
ec2524fd34d367715ee7850c596dc72f
Undo the work of ffs_init().
ffs_uninit(vfsp) struct vfsconf *vfsp; { int ret; ret = ufs_uninit(vfsp); softdep_uninitialize(); ffs_susp_uninitialize(); return (ret); }
1
bffaed361bb0b790ef5cd5f0cfb09d05
6987b050682ed40a0d8a533cba85ac6e
Get list of unique book_ids in ratings table
arr = self._client.gets(self._key(list_name)) result = sorted(arr, key=operator.attrgetter('updated_time', 'public_rating', 'rated_amount'), reverse=True) return [obj.isbn for obj in result]
0
e8c5c05b2b077f4a06d05132873e30e1
ef1ed9512cdef991660fbc1af259810e
Test DELETE /rubriques ok.
{ Rubric::insert( [ 'name' => 'TestName', 'course_edition_id' => 1, 'week' => 1, ] ); RubricEntry::insert( [ 'rubric_id' => 1, 'distance' => 0, 'is_row' => 1, ...
0
0a91d185cd3e65a8d24dd5f3725a7caf
ed0938b614d262377b95dd0aecb34b2b
Create a FIP on VN (vn_id) and apply this on VMI (vmi_id)
void addVNFCInstance( String id, String idVnf, String idVdu, VNFComponent component, String mode, String projectId) throws NotFoundException, BadFormatException, WrongStatusException;
0
ad6322d27c71eb0836026aaa569b1c1e
74c96d092fdef784d0e567608604b939
Подписываемся на активацию.
class SubscriptionServiceProvider extends ServiceProvider protected function registerEvents(): void { Event::listen( 'InetStudio\ACL\Activations\Contracts\Events\Front\ActivatedEventContract', 'InetStudio\Subscription\Contracts\Listeners\Front\AttachUserToSubscriptionListenerContract...
1