query_id
string
corpus_id
string
query
string
code
string
label
int64
156757f031cfa0f7812069f2f875573c
2381ae556b59dc69d3dcedb88a3321fa
Test that placeholder methods return NotImplementedErrors
with pytest.raises(NotImplementedError): self.bp_1 + self.bp_1 with pytest.raises(NotImplementedError): self.bp_1 + 2.0 with pytest.raises(NotImplementedError): self.bp_1 - self.bp_1 with pytest.raises(NotImplementedError): self.bp_1 - 2.0
1
e620e13b01b4fa5f8239ec8577a3b891
a83128b01e47b1b97c2337a1aa37ce19
Copy all files from the source to the target storage that don't exist on the target storage yet While copying the target files will be added to the cache with the etag from the source storage
namespace FubarDev.WebDavServer.Engines.Local public class CopyInFileSystemTargetAction : ITargetActions<CollectionTarget, DocumentTarget, MissingTarget> public async Task<ActionResult> ExecuteAsync(IDocument source, DocumentTarget destination, CancellationToken cancellationToken) { try ...
0
a653b9f0adef226dee250212e1b8cccc
2ac227fa908b295f1f99c985a28a9f9e
var_export打印类中的所有属性值。
{ if ($key) { print_r($this->aExported[$key]); } else { print_r($this->aExported); } }
0
b710e023eb0afb3cd40d02d10168c9ff
f4a197f3c2372237687e89c66e132f7c
If opacity is None just silently ignore the request
void FalconG::on_sbBackgroundOpacity_valueChanged(int val) { if (_busy) return; _OpacityChanged(val, 2, ui.chkBackgroundOpacity->isChecked()); }
0
a490b71f49424859f104069175cc8ff2
81e393e7baf3f922f36cfc8c69217bf6
The code that executes after the Shutdown status is achieved.
namespace MyRevit.Entities class MyExternalApplication : IExternalApplication public Result OnShutdown(UIControlledApplication application) { return Result.Succeeded; }
1
19dc2eba427207a9fb14e7845410736a
b1f5da43492ea7357065d2b2711b90ec
Returns the current routing object.
class QContext implements ArrayAccess function router() { return $this->_router; }
1
21e4907964b8cccc406bcccc4c12a1cb
06b7ad09428ea40381af89dbf491f2ba
Runs the Ticket Auto Close Routines
{ preScriptReset(); while(drive.driveByEncoders(1, driveConstants.straightSpeed())){time.keepTime();} while(drive.pivotRight(45, driveConstants.turnSpeed())){time.keepTime();} while(drive.driveByEncoders(9, driveConstants.straightSpeed())){time.keepTime();} while(drive.turnLeft(90, driveConstants.tu...
1
a95de2e3cc8f7a16f8c2582ad2618995
f2752c48d2d0d0cdd6ffe21a85a711b5
获取根节点SeqNum最大的记录。
public class ZKClient public static String getMinSeqNode(String path) throws Exception{ return getMinSeqNode(path,null); }
0
e61e3078130a190c6a40c37f09382cd3
4a74d7d1f461135cdd332f10ea259800
Serializes the object into an XML string, using the encoding method specified in <see> <cref>ExtensionMethodsSettings.DefaultEncoding</cref> </see>
{ using (MemoryStream stream = new MemoryStream()) { XmlSerializeInternal(stream, o, encoding); stream.Position = 0; using (StreamReader reader = new StreamReader(stream, encoding)) { return reader.ReadTo...
1
b35b4e4bdaef917c9752eafbeaa548dd
2b936589cb4ac9c08f233a8cc5f0e5c2
This plots two runs where we try to trigger reentry with & without I_kr block. Here the g_NaL parameters were set using source code only
syst = make_system() kwant.plot(syst) syst = syst.finalized() plot_conductance(syst, energy=0.2, welldepths=[0.01 * i for i in range(100)])
0
a2c1126b688411e240368aebfdc5a09e
f29967f104e289ff785cdfde4ab27e42
Suspends the process instance with the given id. If a process instance is in state suspended, activiti will not execute jobs (timers, messages) associated with this instance. If you have a process instance hierarchy, suspending one process instance form the hierarchy will not suspend other process instances form that h...
void suspendProcess(String processInstanceId);
1
5c6f447942a32c7fb10e9521cd1c4a57
b8acc402c017d0af59a87fd655825a8a
Setter for <code>cbis.major.major_name</code>.
public class ProofBeanLibInfos public void setCompVersionMajor(String compVersionMajor) { this.compVersionMajor = compVersionMajor; }
0
af3561d547e3b056fcdb1c26915bdb4c
94e2aaf6ba84d7a178aaa506c4bad71e
Given a vertex index, grab the edge clockwise from it
def clockwise_about(vertex_index: int, g: Lattice) -> np.ndarray: vertex_indices, edge_indices = vertex_neighbours(g, vertex_index) edge_vectors = get_edge_vectors(vertex_index, edge_indices, g) angles = np.arctan2(edge_vectors[:, 1], edge_vectors[:, 0]) angles = np.where(angles > 0, angles, ...
1
83d37a3a19dc23987dca752310c4a0e7
410be048cb9437c202915eeea6e634e5
Parse JSON move and return as Position objects
if input.len() != 4 { return None; } let split_input = input.split_at(2); let move_start = parse_position(split_input.0); let move_end = parse_position(split_input.1); if move_start.is_none() || move_end.is_none() { return None; } Some((move_start.unwrap(), move_end.unwra...
0
916d3b0df3472de796ce1f149c446ead
6a689bb762af236be0b04849bbe87c62
将数据点值转换成像素点值
class _MiniTouchStream(): def PointConvert(self,point): realpoint = (int(point[0] / self.banner.percentx) * self.device.virtualscale, (int)(point[1] / self.banner.percenty) * self.device.virtualscale); return realpoint;
1
ecbc51fb492d9495345d1d37d73a854f
cf084d4329ec5cecd8d6cdce57e00819
Puts the state in a "resolving" state that correspondes to loading platform data in a GET fashion. Sets loading to `DaffState.Resolving`
SET_LOADING (state, platform) { state.isLoading = platform; }
0
9a84824401eb85ff24dcca3bd67abd34
247e38c55213080c0c51acbdf4263170
删除成长记录数据
namespace Fantasy.SmartTraining.Business.Growup public class GrowupBusiness public static void Delete(long id) { var myGroupRecordModel = ChildrenGroupUpRecordDao.GetModel(id); if (myGroupRecordModel == null || myGroupRecordModel.IsDel == 1) { throw new Bu...
1
24406e1450b372fbb567853838b09a32
c112a61b84b40070cec4ac82bd55d919
Raise the VisibleChanged event
namespace AvengersUtd.Odyssey.UserInterface.Controls public abstract partial class BaseControl protected virtual void OnVisibleChanged(EventArgs e) { if (!DesignMode) { OdysseyUI.CurrentHud.EnqueueForUpdate(this, IsVisible ? UpdateAction.Add : UpdateAction.Remove); ...
1
2bae4760ed0c6e77bafcb4eefebf8d97
5a550f4aea50639b3974621be07c0615
This function is called by the builder to signal progress and to report memory consumption.
progress_report(bool finished) { int percent; pg_time_t now; Assert(showprogress); now = time(NULL); if (now == last_progress_report && !finished) return; last_progress_report = now; if (current_size > total_size) total_size = current_size; percent = total_size ? (int) ((current_size) * 100 / total_s...
1
4df568ab7fa818546e780ac99f65d8e3
8ab29bf104c66da4829508ea62096869
Hàm vẽ mắt.
void drawMouth() { glPushMatrix(); glColor3f(1.0, 0.5, 0); glTranslatef(0.24, 0.48, -0.02); glRotatef(0, 0, 0, 0); glScalef(0.25, 0.05, 0.3); drawCube(); glPopMatrix(); glPushMatrix(); glColor3f(1.0, 0.5, 0); glTranslatef(0.25, 0.18, -0.02); glRotatef(0, 0, 0, 0); glScalef(0.25, 0.05, 0.3); d...
0
3b5ef090711cecbc4fa044f43a835148
fe2640e2c3d9839e7d69d5bbf73b9415
Multiple processor coroutines will be launched to receive element from
fun fanOutExample() = runBlocking { val producer = produceNumbers() repeat(5) { launchProcessor(it, producer) } delay(950L) coroutineContext.cancelChildren() }
1
8a942ec22f4b5b1b7d26fb3d5e0bd9bd
bea5b2f2a7e355dacb2c3ec772669cee
Este método permite listar los detalles de vacaciones periodicas por id de vacacion.
namespace Calendar.Api.Controllers [Route("api/[controller]")] [ApiController] public class VacationController : ControllerBase [HttpGet("{id}")] public IEnumerable<Vacation> Get(int id) { return Get()?.Where(s => s.UserId == id)?.ToList(); }
0
b8eb3224a2f4fd21a4fa3822e65f5fdf
7c4e05e590ec74d311d2938768cc9041
проверка вхождения подстроки в строку
int i=0; while(i<countSep2) { if(mas[i]==str) return true; i++; } return false; }
0
5986117657bd7b3e03dd3547888fdac0
c7aa423bbc7644ee9514905f6cfac0e6
This will capture useful performance counter data until the specified cancellation token is set, at which point it will return the data (as such, it makes sense to call this from a background thread)
{ using var cts = new CancellationTokenSource(duration); await CollectAsync(outStream, cts.Token); }
1
cd402cc74b41bed425de479067452b6e
da6f0b56f7fda516eb4b406b53b3da8c
Puts all 52 cards in the DeisplayDeck (doesn't clear it beforehand).
public class PlayerDesk extends javax.swing.JPanel public void displayCards() { this.refleshCardLayout(); this.revalidate(); }
0
32a3c75988f28bf955794bc12a8329b2
c9d84a4e94df2c2a61e7f74f6b19a310
Method for changing the ring settings of the rotor. Had some difficulty with this method as there are many interpretations on what the ring setting does or outputs so chose the method that most sources agree with.
{ switch (rotorNum) { case 1: Rotor1.Clear(); Rotor1 = new List<int>() { 1,3,6,0,5,4,8,7,9,2 }; break; case 2: R...
0
6d00e5e50033f1e931efa9a466d898ac
557ac65cf8b79c03ec1319016184017d
获取增加攻击力比例
function Hero:GetAttack() math.randomseed(os.time()+self.u_index*100000) local scale = math.random(50)/100+0.7 return math.ceil(self.attack * scale) end
1
929471c22d630967484c091189a67c2e
7cfe3d48ced4fb692d5b266c32ddbcf3
Used to sort words in descending freq order for outputting top 50 words
def sort_descending_values(word_counts): [print(f"{key} {value}") for (key, value) in sorted(word_counts.items(), key=lambda x: x[1], reverse=True)] return sorted(word_counts.items(), key=lambda x: x[1], reverse=True)
1
f545b9a0612f1fbebd5960b83e89dee5
33a29b417b2405c4756f4588b9d5c7b2
Sets the best time per game for statistics.
public class Statistics public void setMeanPlayingTime(String meanPlayingTime) { this.meanPlayingTime = meanPlayingTime; }
0
31f9239cd42ea7c799dabd508d2ad5aa
7d05aebecf82afb9ffa737c238f09ef4
Returns the NPCTown ID
class GingerBreadNpcData extends \DrSlump\Protobuf\Message public function getNpcid(){ return $this->_get(1); }
0
a5680f922d1fd96d55e916bdfdbac31a
ac1ad97b3c163e82cd3ae8e6a1fae478
Load all particles/cells of one type for a specific subhalo (optionally restricted to a subset fields).
auto start = current_time(); int max = min(ndx*ndy, numProc); if (rank==0) for (auto &p : sectorization.getParticles()) allParticles.push_back(p); for (int proc=1; proc<max; ++proc) { if (rank==0) { int size = 0; CommWork.Recv( &size, 1, MPI_INT, proc, 0); Particle *buffer = new ...
0
c84a99733691c854cc16777c6419faf5
e82fa3a99becf03a6ff62e050ab4700e
Trains Word2Vec Model for all documents
class TextProcessor(object): def wv_train(self, tokenized_text_path, output_model_path='./wv_model.bin'): sentences = word2vec.Text8Corpus(tokenized_text_path) model = word2vec.Word2Vec(sentences, size=250) model.save(output_model_path)
1
2ceb5adc7138bbf643c290bb07fddc44
a9c067f21b6b2c4e8b362a1d664ccf80
Called when the mocked method is called. This implementation runs the action with the mock instance and given parameters.
namespace Mocklis.Steps.Lambda public class InstanceActionMethodStep<TParam> : IMethodStep<TParam, ValueTuple> public ValueTuple Call(IMockInfo mockInfo, TParam param) { _action(mockInfo.MockInstance, param); return ValueTuple.Create(); }
1
9805cfe96a17d8730312badf1391abaa
aff0b0c3e94322e94733c1c40fef3518
@brief Helper function to update spectrogram bitmap
int i; float average=0.0f; for(i=0;i<BANDSCOPE_BUFFER_SIZE*BANDSCOPE_MULTIPLIER;i++) { if(i<BANDSCOPE_BUFFER_SIZE) { timebuf[i]=samples[i]*blackmanHarris[i]; } else { timebuf[i]=0.0f; } } fftwf_execute(plan); for(i=0;i<BANDSCOPE_BUFFER_SIZE*BANDSCO...
0
9d55413c188ce284c44e739abba0dc16
734651692cbfe63fc5833be1f0872541
同步地从云端获得指定宝宝的身高体重等信息
{ $query = $this->db->query('SELECT baby_id, baby_nick as nick, baby_pic, baby_sex as sex FROM cloud_babys WHERE baby_id in('. $bids .') ORDER BY baby_devs DESC'); $query->setFetchMode(\Phalcon\Db::FETCH_ASSOC); return $query->fetchAll(); }
0
79914744e07fe8b3337c8bed3320f558
b9f3dbe4a4337cd95cdabf74d9a8aa53
Downloads all the test objects to a given directory in a given pod.
self, nsfs_bucket_factory, awscli_pod_session, test_directory_setup, nsfs_obj ): nsfs_bucket_factory(nsfs_obj) retry(CommandFailed, tries=4, delay=10)(random_object_round_trip_verification)( io_pod=awscli_pod_session, bucket_name=nsfs_obj.bucket_name, uplo...
1
7aafa9cd25871129648b822a475b6f50
9920d1651e77d606e15a0d9da56a9e5f
Retrieves the first applicable policy that grant the requested access. For example, used for applying effects (constraints) where we need the {@link ACAbstractEffect} associated with a certain policy. information of the requesting user required to evaluate the policies. {@link Optional}; an empty {@link Optional} other...
java.util.concurrent.Future<GetPolicyResult> getPolicyAsync(GetPolicyRequest getPolicyRequest);
0
440fd4bccd3bce726331407e476f6d01
2fd6537b55dd4d2ecfab880288660205
Pushes the function into the Lua stack
namespace LuaInterface public class LuaFunction internal void push(IntPtr luaState) { LuaDLL.lua_getref(luaState,reference); }
1
ff84f1b5d72a88e100df7d0d86110373
94a8324c0b7e8756ce065c087939eb46
记录总共发放实物奖品的数量
{ foreach (var item in setEntityList) { if (item.WxHbID > 0) { int prizeType = 0; int activityType = item.IsSpecial == 0 ? 2 : 3; string hbStockCountKey = string.Format(SignKeys.signactprizegrantn...
1
d87279f25dab1a3baf4263fd865c61ef
da237b35c91acd605b42dab2ead51f3f
获取付款单是否启用工作流
@RestController @Api(tags = "WorkOrderPayController") @Slf4j public class WorkOrderPayController @GetMapping(value = "/pay/payStatus") public Map<String, Object> payStatus(HttpServletRequest request, @RequestParam String paymentId) { try { Thread.sleep(1000); WorkOrderDTO workorder =...
0
8d5edf2c4a59091284d21bf103475f51
87dca212b7bcd80155cee9dc20e26f32
@brief Power on WLAN
{ char tmp[64]; char *lan_ifname; if (act_wl_cnt == 0) return; lan_ifname = nvram_safe_get("lan_ifname"); #ifdef SUPPORT_WSC snprintf(tmp, sizeof(tmp), "lld2d %s", lan_ifname); bcmSystem(tmp); #endif bcmSystem("eapd"); bcmSystem("nas"); bcmSystem("dhd_monitor"); #ifdef SUPP...
1
bf0c8ff75bd404976b7ca39b4f02d74f
5ee54c6664e40520554897aef594dd44
查询店铺会员推荐资讯列表
List<Map<String, Object>> findRecommendListInfo(Map<String, Object> param) throws Exception;
1
df51c1538913a8c2f16bc5500ee86c6c
88bcde5161090b7d918a3cdad08f289c
Представляет простой текст
class TextFragment(XmlAble, TeXAble): def __init__(self, text): self.text = text
1
aa76de6298b51afba8545d63ff26e767
07d6ddc97da186989851525ade8de47c
Removes the given sections from the route, by removing the section relations.
public function removeRoutes() : RouteCollectionInterface;
0
7919a022d784d9ffffc4f7d451b07268
5516b5ac333bfb41b48bb8fc3104a4a2
Returns a bank function with a starting balance. Supports withdrawals and depositis.
class Bank(object): def __init__(self, name, account_id, initial_bal=0.0): self.__name = name self.__account_id = account_id self.__balance = initial_bal
0
c691cc10c87784205a6ba2a43f455627
2be26e47f828bcf18d4ca994b6af3af3
Task 2 - Blink Status LED
def task1(): while True: pyb.LED(LED_BLUE).toggle() time.sleep_ms(250)
0
3cb36f17db2cb01cf98ffb4c289bd725
21daf32f83857c3d9435b45da8fcaa55
Loads the clothing buttons
public class InventoryManager : MonoBehaviour public void LoadItemButton() { Knapsack.Instance.LoadItemPanel(); Chest.Instance.LoadItemPanel(); CharacterPanel.Instance.LoadItemPanel(); ForgePanel.Instance.LoadItemPanel(); if (PlayerPrefs.HasKey("CoinAmount")==true) { ...
0
f17fc98cd76d8bc93a9ac85fe1c0e2db
f092d422c132de071d2dbf66412e5ced
将pt值转换为px值,保证文字大小不变
def pt(value): return dpi2px(value, 'pt')
1
23984dcda459ba219f688ab17264120a
69380aae1f7ecc7f791d6a8dc6f694b1
Checks if a module is compatible with the server version
{ $aModuleVersionsToCheck = $this->getConfig()->getConfigParam('aModuleVersions'); $aModuleVersionsToCheck = is_null($aModuleVersionsToCheck) ? array() : $aModuleVersionsToCheck; return $aExpectedVersions == $aModuleVersionsToCheck; }
0
507c643c60c28cbac9b633989d60aca0
c29ac2e77beb0c5e026dc81f9d93eb78
Divides the first given mathematical entity by the second given mathematical entity
void div(double first, double second);
1
cec1794fbfc35a6ae6e8f98273d078e4
54373e3f40f01e601b58ad8de9c094e2
根据订单ID 获取手工退款单
OrderRefund getOrderRefundByReturnsId(String returnsId);
0
a464427c34fef54261cfd65bba1fb529
86f4df1c730b476d69ac2a88fb7b6ebb
记忆化搜索,每当搜索到当前位置对应剩余位置的可能组合,就记录下来,避免大量重复计算。
class Solution int combinationSum4(vector<int> &nums, int target) { vector<unsigned long long> memo(target + 1, 0); memo[0] = 1; for (int i = 0; i < target; i++) { for (int num : nums) { if (i + num <= target) memo[...
0
ae685b0a40ee8448c4abac26fc09182e
2f3836e3cd34bee54c064b01727b987f
Проверка, что это гласная на латинице
namespace WordProcessor public class TextHelper public static bool IsLcaseCyr(string ch) { return (CYRILLIC_ALL.ToLower().Contains(ch) && ch.Length > 0); }
0
3b2d13dc2ba1ba8bd17ab02ce39f603d
8e713058f5386453fd22244ee219babc
*Чтение файла построчно с конца
namespace ConsoleApp2 class OpenFile public string F_ToEnd() { F_data = F_reader.ReadToEnd(); F_reader.Close(); return F_data; }
0
fbf8e0ca5bdb7a3bbdbb68d03bbbb215
5f9ef5fe1e99027f9d09bc03916123e6
Retrieves the integration version
class Logging public function getVersion() { return $this->_version; }
1
f0a4db48169d3c4c7eff06e31551851e
2b5569825692e703fb89ce4812984295
displays a single movie with its poster image and details
title = movie[1].replace('\n', '') year = movie[2] imdbRating = movie[3] table = [] movie_info = c.execute( "SELECT plot, actors, awards, genre, released, runtime, file " "FROM movies WHERE title=? AND year=?", (title, year)) movie_info = movie_info.fetchone() plot = movie_in...
0
175d1e136fedc570c31a05d9af5652b7
1b6c397698a45703fc58f74112364e35
兼容ie下载功能
function canSaveIE () { var userAgent = navigator.userAgent; var isIE = userAgent.indexOf("compatible") > -1 && userAgent.indexOf("MSIE") > -1; var isEdge = userAgent.indexOf("Edge") > -1 && !isIE; var isIE11 = userAgent.indexOf('Trident') > -1 && userAgent.indexOf("rv:11.0") > -1; if(isIE || is...
1
a5a5fcac332d41112eee79391abaf6b4
0371d5f0fe843a80be00ce2b3f5e0fd5
Fills dropdown list with column names
function renderCSVDropdown(csv){ var dropdown = $('select#id, select#label, select#time-series, select#dimension,select#fact'); var record = csv[0]; var keys = Object.keys(record); for(var i = 0; i < keys.length; i++) { var option = $('<option value="'+keys[i]+'">'+keys[i]+'</option>'); ...
1
5993484f80f879e6f167b66822e0cd71
69675657d99c89121fcc7280b0462d39
Remove parameters that are output of the application.
if (outputParameters == null) { return Collections.emptyMap(); } return Collections.unmodifiableMap(outputParameters); }
0
97d3847cebed20a2abf8728f819f1871
659a288886aa17a07c1665b9775baaa6
set the test examples with a new collection of test examples
saveExampleList(state, { exampleList, examplePaginate }) { return { ...state, exampleList, examplePaginate, } }
1
8b1ffacfded62297f722bdd75f36afc3
1aa39bc6a3108ab8a962521125630c49
Open file stream to read from database
bool StreamAccountReader::openAccountsDB(std::string file) { bool bOpened = true; mcInFile.open(file); if (mcInFile.fail()) { std::cout << "File failed to open"; bOpened = false; } return bOpened; }
1
2e450fa093d9db2b27378ae9787d33b4
d0c2e3375b7a1242274fd690338eb3ce
داده های اولیه فرم
namespace MPOS.presenter public class MainFormPresenter public void init() { initNewOrder(); setCurrentProduct(null); setCurrentOrder(); setLastOrder(); }
1
f5d9ca4fb1266d3b57d75a43fc1de635
33b62e42922c37b1fce85d9b717f9855
set the granularity of the pipeline
class Graph: def set_granularity(self, granularity): self.granularity = granularity self.alphas = [float(i)/float(self.granularity) for i in range(0, granularity+1)]
1
5ac37b053092380fc6923da77934e406
f1da429a26487ed21149fc9a70850d78
<p> This demo will demonstrate typical usage of JavaScript calls. </p>
MultipleAxisDemo3 demo = new MultipleAxisDemo3( "JFreeChart: MultipleAxisDemo3.java"); demo.pack(); RefineryUtilities.centerFrameOnScreen(demo); demo.setVisible(true); }
0
6053000fbe5b99c00e1c3d67dcf081f5
294e55128a39e628aecfd54e4cd38fd4
Delete an aggregation account holding
namespace Nucleus.Api public partial class AggregationAccountApi : IAggregationAccountApi public async System.Threading.Tasks.Task DeleteAggregationAccountUsingDeleteAsync (Guid? aggregationAccountId) { await DeleteAggregationAccountUsingDeleteAsyncWithHttpInfo(aggregationAccountId); }
1
0157fd9da9536c32e1774e4f65370f39
f9014350747fc883ae18d354096aeab6
根据主键全部更新字段数据
public abstract class BaseService<T, M> public Long updateAllById(T record){ return Long.valueOf(mapper.updateByPrimaryKey(record)); }
1
e252387589d2049e415705e70e3c486a
408f8f6bee31a9c2b73ef9a15d60d40e
! \brief Sets rotate flags when touchpad pad is pressed
wstpad_click(struct wsmouseinput *input) { struct wstpad *tp = input->tp; if (tp->contacts == 1 && (PRIMARYBTN_CLICKED(tp) || PRIMARYBTN_RELEASED(tp))) set_freeze_ts(tp, 0, FREEZE_MS); }
0
adca0f1ad36c62a26dcb30d8f1758949
f0369354b9657e1f0316c0dae0b04a87
Remove the given file from the archive
void close_file(int fd) { struct archive_node* searched_node = NULL; struct archive_node* node_before = NULL; for (struct archive_node* it = first_archive_node; it != NULL; node_before = it, it = it->next) if (it->file_handle == fd) { searched_node = it; break; } if (searched_node != NULL) {...
1
92043dcff6f1d560b4fd2b7ec752c5af
2d589a84192ba760a0d6a035a3fb5b97
요번에 선택된 카드를 선택된 카드에 추가시킨다.
selectedList[selectedList.Count - 1].Sort(); if (playerSelect) { teBtn.Interactable(); Filter.SetActive(false); switch (selectPlace) { case SelectPlace.Hand: hm.EndSelect(); break; case SelectPlac...
0
e0128b8ba6e08b1313d532715fcfdf3b
317a1401f1178e0d7f2bab07263b0e9f
Test empty generator.
class MultiWriterIdGeneratorTestCase(HomeserverTestCase): def test_empty(self): id_gen = self._create_id_generator() self.assertEqual(id_gen.get_positions(), {})
1
da7c75267557f2fed5d49863dcd7b96c
537d854989c433ea6baef74f9ce223b1
Permet de récupérer le nombre total de biens loués par le locataire
public class Reader implements Serializable public int getNbBorrow(){ return borrow.size(); }
1
7c76a26757b9f810074d7d5dd2c5854a
a6117520ce6e8abb7b145943906c1dc6
Will redirect to the product details page of the product that matches the query string as SKU
function hadeClick(id) { location.assign('../product-details/product-details.html?' + id); }
1
690f6caf142faf97cce175b4c894e97d
2ac7e072648fa15c37e377982d5d6709
RotateRight will rotate the active piece to tne right by one
function moveRight() { var grid = null; for(grid of GameData.activePiece.getOrientation()) { GameData.mainPlayField.setBlock( GameData.row + grid.getRow(), correctColumn(GameData.column + grid.getColumn()), 0 ); } GameData.column = correctColumn(GameData.column + 1); ...
0
645d275d6aeae780bf90e6c367c67d33
6bba13148fa232502f7455644067f9e7
Test case for api_v1_policies_secrets_put
class TestPoliciesApi(unittest.TestCase): def test_api_v1_policies_secrets_put(self): pass
1
6de53f65928143c6ebeeb0d4a4795379
663ee41fdd078c3afcf99dbbc65cd837
Gets all BusinessUnits
namespace IO.Swagger.Management.Api System.Threading.Tasks.Task<List<BusinessUnitBaseDTO>> BusinessUnitsManagementGetAsync ();
1
1b22af5ebd7bed32ac6ca9b2253d57d7
18c95eb70c3cd0181f35f5f0d1fac4b4
予約除外状態を解除
$db = DbConnection::getInstance(); $sql = "update tb_order set is_freeze = 0 where id = ?"; $para_array = array($this->id); $db->exec($sql, $para_array); }
1
fce9711df1b12a4b5b4d284a3773302b
4a1d90566aa6d6077678294fc5fdc29a
valida si la entidad ya fue registrada en la grilla
let resultado = false; this.data.listaItemsAsignados.forEach(element => { if (resultado == false) element.id == elemento.id ? resultado = true : resultado = false; }); return resultado; }
1
e64aa2ed0d19f579fa1001da83e40016
c8aaed203d803c8eeca6d1cdf742bc69
cette fonction traduit une sequence de bits en un message. Cette fonction est maintenant simple, mais elle est insuffisante (elle ne permet pas de trouver le debut du message par exemple) le but de ce TP est de la completer.
def reveler_texte(nom_image): tab = image_to_tab(nom_image) L = 0 for i in range(8): L = (L << 1) | (tab[0][i][0] & 1) message = '' for l in range(1,L+1): car = 0 for i in range(8): car = (car << 1) | (tab[l,i,0] & 1) message += chr(car) return message
1
756e13480a592c19e31dac0e0588bd36
3f888110fc44bbd263b8dfbca31501bd
下载硬件数据
$.Console(_data, '硬件配置'); $.each(_data, function(n, val) { var OtherInfo = JSON.parse(val.Other); switch (val.DeviceType) { case 1: DKQNAME = val.DeviceName; DKQCOM = Number(val.COM); DKQTSD = Number(OtherInfo.Indor); break; case 3: ZKJNAME = val.DeviceName; ZKJCOM = Number(val.C...
0
74be0cbad4277b328ed317c435212252
18ed80b6a7aacc1d8acdcd9b9a157fc9
衡量一个推荐列表的多样性
class Metric(): def popularity(self): item_pop = {} for user in self.train: for item in self.train[user]: if item not in item_pop: item_pop[item] = 0 item_pop[item] += 1 num, pop = 0,0 for user in self.test: ran...
0
9ce11cdffbbf7e5b74d2b17d79a8f7c1
6eba0f2f26c7339c6c2a832d956caae4
这个函数,在世界空间指定的位置播放 AutioClip,参数 音频信息,位置,注意这里的位置写的是物体的位置,因为是 2D游戏
{ if (clip != null) { AudioSource.PlayClipAtPoint(clip, pos, sfxVolumePercent * masterVolumePercent); } else { print("Audio is null!"); } }
1
eefa40a3724ab5e7cae8c9163b505a07
dd14db2a6457413d387e9ba4873de50c
Builds a csv table with top 20 most frequent words for each target. To be used in visualization to demonstrate NLP functionality Input - X message feature associated with the model y label features associated with the model Output - keywords.csv stored in 'data' directory
data_frame = read_keyword(file_name) data_frame = construct_simple_variable(data_frame) data_frame = labeling_with_word_2_vec(data_frame) return data_frame
0
e1ef9e3e35682b7ff3e16ec687d02d3e
5c2fdcc6afa0836e131a14fe1f0c2760
拒绝邀请 拒绝邀请请求。受邀帐号拒绝邀请,此时当前邀请状态将设置为拒绝,邀请停止。此接口只能由受邀帐号调用。邀请发起者无法再次激活被拒绝的邀请,但可以重新发送新的邀请。 Please refer to HUAWEI cloud API Explorer for details.
{ var options = new InvokeOptions(); options.RequestMarshaller = RejectInvitationRequestMarshaller.Instance; options.ResponseUnmarshaller = RejectInvitationResponseUnmarshaller.Instance; return InvokeAsync<RejectInvitationResponse>(request, options, cancellationTo...
1
9f0f7db30ef517b6a82adfd6f86b10f6
01cd742b7ed2e58c30b69a3e01a9fb5d
从 ziplist 编码的哈希结构中找到 field 指向的值 如果值是字符串, 将内容和长度写入 vstr, vlen 如果值是数值, 写入 vll 查找成功, 返回 0. 否则返回 -1
unsigned char *ziplistFind(unsigned char *p, unsigned char *vstr, unsigned int vlen, unsigned int skip) { int skipcnt = 0; unsigned char vencoding = 0; long long vll = 0; while (p[0] != ZIP_END) { unsigned int prevlensize, encoding, lensize, len; unsigned char *q; ZIP_DECODE_PREV...
0
134eaa9a8c7850aa38d4f4cce95d3480
0b7df0d1568b9b0b24dca7ff87664f45
create the docblox classes table
def create_class():
0
62c008c4747c0257764636941bbcf2b3
eca5d82a1789a1eba50402dd0c0b846e
Returns a copy of this instant with the specified duration in seconds subtracted. This instance is immutable and unaffected by this method call.
@SuppressWarnings("serial") public class CalendarDate implements Comparable<CalendarDate>, Serializable public CalendarDate minus(Duration length) { return length.subtractedFrom(this); }
1
b40f4d51c3a77b4e4d39cc712b20360d
75483c94e081db0e43a52b6547c699fe
Updating the position of the particle based on Verlet integration.
class ParticleSystem: def __perform_verlet(self): for i in range(len(self.m_cur_vtx_pos)): x = np.copy(self.m_cur_vtx_pos[i]) temp = np.copy(x) old_x = np.copy(self.m_old_vtx_pos[i]) a = np.copy(self.m_force_acc[i]) x += x-old_x+a*self.m_time_step*...
1
b7c2fff520d5c1796b9053b6bb57b280
f39312d91f3fddf6f48cea640d914b52
Determines whether this item is assembly.
{ switch (itemType) { case Dot42Constants.ItemTypeValuesResource: return true; } return false; }
0
3522093e27db465e9accb1096fa1fb9e
fa794e81ac6a879db2b69680e7248f1f
Load and display Encounter (visit) information
namespace EideticMemoryOverlay.PluginApi void LoadEncounterCards();
1
211aa547ae6102781b9e6dd20593a1a2
7b12bc2508015ce8d3572f44b6194fcb
Drive motor A backward by setting A low and B high.
{ digitalWrite(A2, 0); digitalWrite(A1, 1); digitalWrite(A0, 0); digitalWrite(EN, 1); }
0
45bdb122bf8c67158443ae245f1c7119
33202ccbf5bddb22d54517655bbfdfa8
Inserts comment in trac tickets, checking first that is opened. Also changes the status to 'in_progress' and engineer to owner.
return $this->__call('mc_issue_checkin', array( new SoapParam($username, 'username'), new SoapParam($password, 'password'), new SoapParam($issue_id, 'issue_id'), new SoapParam($comment, 'comment'), new SoapParam($fixed, 'fixed') ), array( ...
0
e58db083d44a9264a3115227e700bd5b
8fb1e1563c7b038614ab838316edd050
페이지 경로를 사이트이름과 마지막슬래쉬 제거하고 반환하는 함수
var temp = path.split('/'), page_name = '' if(temp.length == 2) page_name = temp[1] if(temp.length == 3) page_name = temp[2] return page_name }
0
ba0c2acc94d17f5fefb2a3a9fa0f8e2f
41c060c170eadba9fa7e552bdda46a6f
callback for Robot Body by defining which axis of motion goes with what body part
const odepart* torso_opart = get_torso_opart(); affine A; torso_opart->get_A_ground_body_from_odebody(A); modelnode* mnode = torso_opart->get_mnode(); affine B (*mnode->get_A_pj_body()); affine C (*mnode->get_joint()->get_A_ground()); B.invert_rigidbody(); C.invert_rigidbody(); C.mult(A); C.mult(B);...
0
6a1b54ebecb2c72e8f241777b4314fe0
37e1baf38ec4be9d6379b6e89770a751
Save course menu ID to table. Needed for queries.
class TB_COLLECTION{ public function setMenuId($theMenuId){ $this->menuIdM = $theMenuId; }
0
55827fb763196338d61c183c059fbbfc
58307e82fbce050fe4ffebea3894e901
Syncs all videos to current time
public class ParticlePlayer : EditorWindow void SyncAllPlay() { for(int i=0; i<particleControl.particles.Count(); i++) { if (playlist[i]) timeControls[i].Play(); } }
0
0e833212ae1de61aed61e96344f98b75
dd06001231481b07c3abbef4dab54281
Función para logear empleados
$user= DB::table('users')->select('password', 'email', 'estado')->where('email',$request->input("log_email"))->get(); foreach ($user as $user) { $contraseña= Crypt::decrypt($user->password); if ($user->estado==0){ return view('loguear', ['error' => 'No has activado tu cuenta, favor revisa tu...
1
e8ce7aabdf654f391920cd06da43c20f
588cab3499086903254375030b1a72e3
释放语音合成
@ContentView(R.layout.activity_bgin) public class BGInActivity extends TTSBaseActivity implements EasyPermissions.PermissionCallbacks , QRCodeView.Delegate private void stop() { int result = synthesizer.stop(); checkResult(result, "stop"); }
1
1ff80c567de3d6086db207e40fb1be3a
ab8ec823cc170b93fe43d559ec3693a9
Generates a random simple bipartite graph on (V1+V2) vertices with E edges.
Graph generateErdosRenyiGraph(int n, double p) throws IllegalArgumentException, VertexAlreadyExistException, VertexNotFoundException;
0
4ba35354c5b34bf1ec8cbc93f023cfef
a7b5d2e321686f496659664e3c37dcfc
绑定单价最低或者总价最低
double minPriceOrigin = productDetailModel.getMinPriceOrigin(); double maxPriceOrigin = productDetailModel.getMaxPriceOrigin(); double discountMinPrice = productDetailModel.getDiscountMinPrice(); double discountMaxPrice = productDetailModel.getDiscountMaxPrice(); int isPromotion = productDetailModel.getIsProm...
0
fa30a821c435c9f4292a3291cc3077bf
1e89be96e188d25f2f9e121f0c74fa9e
根据 play List ID 获取视频
$videoIds = implode(',', $collectVids); $res = $db->field('videoid,gameid,gametid,gamename,viewcount,uid,title,ctime,length,poster,vfile,orientation') ->where('videoid in (' . $videoIds . ')')->select('video'); if ($res) { foreach ($res as $v) { $result[$v['videoid']]...
0