query_id
string
corpus_id
string
query
string
code
string
label
int64
36f2c81ea3aa4aaa75594535cd9c951d
b8b39bfa8d8920816d58e662ac3a08d5
escreve o cabecalho primeiro e entao a stream de audio
int main (int argc, char** argv){ char* buffer; size_t size; wav_file* wav; size = read_file(argv[1], &buffer); if (size == 0){ fprintf(stderr, "read_file failed"); printf("read_file failed\n"); return -1; } wav = parse(buffer); printf("File: %s\n", argv[1]); printf("=====================================...
0
cb77b536fc6c9af33bb186fbf97654e7
fed4cca61436e1d286346e8f47292971
Fades in the overlay for the appointment creation.
{ DoubleAnimation _FadeIn = new DoubleAnimation(1, new TimeSpan(0, 0, 0, 0, 300)); this.BeginAnimation(OpacityProperty, _FadeIn); }
1
d6839b8d022ea7d5b7918a141731e366
92b57aaa2c177a62892b4fc4f2bb998f
Sparse conv 2d with mask.
ksize = [1, stride, stride, 1] input_shape = net.get_shape().as_list() output_shape = (input_shape[0], input_shape[1] * ksize[1], input_shape[2] * ksize[2], input_shape[3]) one_like_mask = tf.ones_like(mask) batch_range = tf.reshape(tf.range(output_shape[0], dtype=tf.int64), shape=[input_shape[0], 1...
1
c4aa37a47ce594b3df5928a3504f8812
2368d291b8197bc057c21f2f7b791034
Provides whether a user is whitelisted
static bool is_whitelist() { return get_server_properties().get_bool("whitelist", DEFAULT_WHITELIST); }
0
4677bba4874b41dd2a5a5773bd0b2561
a4747f5c12ff0f03858c5f5d8993eb3b
Gets the slow speed of this unit.
public int getClubSpeed();
0
25f7a6e10de7b482775c4a14b76abebd
0d23355f262c5c1ad22607b72b3f6efc
It specifies simple search method based on smallest domain variable order and lexigraphical ordering of values.
public abstract class Base public boolean searchSmallestMiddle() { long begin = System.currentTimeMillis(); boolean result = false; search = new DepthFirstSearch(); SelectChoicePoint select = new SimpleSelect(vars.toArray(new Var[1]), new SmallestDomain(), new IndomainMiddle()); result = search.labeling(s...
1
6f5cab6b37a809fc6e67f80e99410bea
97fae27b6a9b7f5296ddcb84d757b28c
属性过滤,若list中的字典对象包含value为空的值,则将其从list中删除
def dict_filter(source_dict, filter_list): if (len(filter_list) == 0): return source_dict result = {key: source_dict[key] for key in filter_list} return result
0
5a5fef5a7cdca8c7a67de8fdcc619ae9
f088ba7baaccaf75ebde4b66d3f9fb91
Shows a loading animation while checking auth credentials
interface AuthView fun showProgressBar()
1
ff8626e7d31bc17e7a62b4ecf9809d23
eafdb13506dc4585afe5bc70e9bab45c
Walk directory tree and add song files to the library.
{ string[] songListWMA = Directory.GetFiles(fileName, "*.mp3", SearchOption.AllDirectories); string[] songListMP3 = Directory.GetFiles(fileName, "*.wma", SearchOption.AllDirectories); List<string> songList = new List<string>(); songList.AddRange(songListWMA); ...
1
b4b7b06fe8c0bce7509ead127009e7b7
0721576ec96192d1d1f8e87c2eb9fb6d
Method to pick randomly the next prediction
class PrioritizedDqnModel(AbstractModel): def predict(self, **kwargs): return random.choice(self.env.action_space)
1
ad1b764fc17d0d91ea0dccaec5041959
f25e117f7c5aa0d2f704813aa181f0d3
This fonction delete a network from the data base, and from the disk. Inputs: -request : HTTP request from the front-end -pk : the ID of the network to delete
class NetworksController extends IndexController public function deleteAction() { $params = $this->router->getParams(); if (isset($params[0]) && $network = Networks::findFirst($params[0])) { $this->view->pick('msg'); if ($network->delete() == true) { $this->ta...
1
63a5b1a3472ec6c776c690fea7cc9f36
ad00cd05e5357cb6a949c9e41db189e4
通过用户ID,获取该用户所有已完成订单
public List<OrderDTO> getAllUnfinishedOrdersByUserId(String userId) { List<OrderDTO> result = new ArrayList<>(); ShopUser shopUser = shopUserRespository.findByUserId(userId); List<OrderMaster> orderMasterList = orderMasterRespository.findAllByUserIdAndOrderStatus(userId, OrderStatusEnum.NEW....
0
4d5aec7c9a504e54a6785b1dacd94773
484b1b1bf9f92f89ad055f621fc0e707
update the Storage Pool object with the available data came as part of indication.
const ACTION = payload.action; switch ( ACTION.type ) { case ActionTypes.RECEIVE_POOL: _storagePools[ ACTION.poolName ] = ACTION.poolData; this.emitChange(); break; case ActionTypes.RECEIVE_BOOT_POOL: _bootPool = ACTION.bootPool; this.emitChange(); break; case ActionT...
1
88a47d5a87c53f1401458934fb8bb9a5
82240299e5209d5f0b35f7e93bd42c90
跳转到文件模板新增页面
@Controller @RequestMapping("/templategroup") public class TemplateGroupController extends BaseController @RequestMapping("/goto_add") public String TemplateGroupAdd() { return PREFIX + "templategroup_add.html"; }
1
07e5b07c507ce25dd79adcf2e173b89e
85d2b9204ff9e3d2daf0da8e0601a1ab
busca todos estados atingiveis pela transicao vazia
{ ArrayList estados = new ArrayList(); for(int i = 1; i < this.transitionTable[0].length ; i++) { estados.add(this.transitionTable[0][i]); } return estados; }
0
84852542a04418187ae427f1e84c8b32
b4fb18483885e5bd267c6736e20a3aa5
更新後のcalendar_statusに合わせてメッセージを変更
def format_status(status): result = f'{status["horse_name"]}の近況更新\n' result += status['status_date'].strftime('%y/%m/%d') + '\n' result += mojimoji.zen_to_han(status['status'], kana=False) return result
0
b516cb0341a2896269551f5042292b83
94f6fd8cf1119ce51ba8e5b471e60208
A condensed representation of how this read matches up to the reference. (CIGAR)
return ( a.matches_reference, -abs(a.right_offset - a.left_offset - len(a.seq)), len(a.seq), len(a.read_coverage))
0
7b6575edf8f081b21b585c42355c5564
635099cca08769a0514e24ba62aa63b0
Get the credits (cast and crew) that have been added to a TV show.
{ $actorId = ($actorId !== null) ? $actorId : $this->id; $result = $this->getSession()->request( '/3/person/'.$actorId.'/credits' ); return (isset($result->cast)) ? $result->cast : array(); }
0
bbdbd8920009e88bd88d5be5e40f9c86
0cb4227dc6b3b138e4972302638f5e80
將中文數字轉成 `u32` 整數。使用 **「上數」**。
def to_18030_codepoint(b='', m=0): if m != 0: b1 = (m >> 24) b2 = (m >> 16) & 0xff b3 = (m >> 8) & 0xff b4 = (m) & 0xff elif b != '': b = b.split() b1 = int(b[0], 16) b2 = int(b[1], 16) b3 = int(b[2], 16) b4 = int(b[3], 16) if b2 < 0x30...
1
32758bfaef058969760a27682f53f792
4641ec310ba815092d1495b77e7b72ea
Tests that the rack interface works properly.
class TestSiteDocumentData(unittest.TestCase): def test_get_baremetal_rack_by_name(self, Rack, Network, SiteInfo): site_info = SiteInfo() network = Network() baremetal = [Rack(), Rack(), Rack()] type(Rack()).name = mock.PropertyMock( side_effect=['rack1', 'rack2', 'rack3']) ...
1
47bc1afc8a901e1abbbebc9c64738895
c16553d89dae558b1c996c3ee00371e0
计时关闭页面
function cancel() { window.clearTimeout(timer); window.clearInterval(timera); document.getElementById("h1").innerHTML="留在此页"; }
0
e15cd4b9a4de710e677a8767b2c2c7ab
3f6c3931c2e5cbaa9a90d14a03ce3d03
Returns the domain name that is stored in the vm instance.
class TestHelper: def domain_name(self): return self.__model_context.get_domain_name()
1
035a4eedefbdc30e59e5dd62e6582944
07444b6b7cbbeafd06226974e7eb6422
To convert a list of bytes to an array of bytes.
public final class Arrayard public static List<Byte> asList(byte... array) { return toList(array); }
0
9d59a752c068d1ad0ab90b513841a1cc
7fa4d3a648ea258eb839aa34c41eca6e
Calculate image hash of the element. Called only when other identifiers failed
imgdata = io.BytesIO() self.save_figure(item, fig, imgdata) out = _hash_file(imgdata) imgdata.close() close_mpl_figure(fig) return out
1
b23787cd2bd05b44fea757fb5287be8b
4b46820402c0ef78a0c710e93a10c280
Updates a specific record within the databased based on user inputs.
with sqlite3.connect("python_nutrition.db") as db: c = db.cursor() create_user = ("UPDATE users SET `username` = ?, `password` = ?, `birthday` = ?, `weight` = ?, `height` = ?, `calories` = ?, `protein` = ?, `carbs` = ?, `fat` = ? WHERE id = ?") c.execute(create_user,[(userna...
1
6d856af4cd15a20a958792a8753f4ad9
28d17d94bea9af0bd33115e6e698eb78
Sets the value of the cfeDatosAvanzados property. allowed object is {@link CFEDatosAvanzados }
@XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "Respuesta", propOrder = { "cveMes", "idPersona", "rfc", "curp", "nombre", "noCredito", "fchOtrgmCrd", "montoIniclPesos", "moneda", "smgFchCredit", "montoInicVsmg", "sldoBaseVsmg", "sldoBaseInfrdFchcr...
0
a7533e1d670d77203262b9efa541c917
ec902e64a044e2b3c2cffa5af3a42dda
Insert this object in the given array using its ID as key
objmap* map, dae_obj_ptr obj, int id) { if(((size_t) id) >= map->size) { int i; map->values = (dae_obj_ptr*) realloc(map->values,(id+1)*sizeof(obj)); for(i = map->size; i < id; ++i) { map->values[i] = NULL; } map->size = id + 1; } m...
1
34a33de26b02b8de09dea33dcfb1a398
3104d0f1e59c3ece9abbb77ef3aefe26
clean up description, falling back to an empty string
class SanDiegoCitySpider(CityScrapersSpider): def _parse_description(self, item): return ""
1
8f3ef617a71f90306a1fe85762e6dad8
5950b91f8e6e27c37a2056a91f42bb29
Prune samples that are useless
class SE_Sampler: def prune_clusters(self): for cid in self.state['cluster_ids_']: if self.state['suffstats'][cid].N == 0: self.destroy_cluster(cid)
0
c1ea8f3fc25eab4222717be66e535b05
0a9e271126d870d1e9d40c4a0f93fc30
Writes attributes of AllowedTokensType complex type
@SuppressWarnings("javadoc") public class XMLStreamBindings extends AbstractXMLStreamBindings public void writeAllowedTimesType(XMLStreamWriter writer, AllowedTimes bean) throws XMLStreamException { this.writeAllowedTimesTypeAttributes(writer, bean); this.writeAllowedTimesTypeElements(writer, bean);...
0
89e6343de62e47c9ed2f4a1f13f00bdb
cfe3c88907dcdfcc09b9d7593f76c114
描述:卸载资源 参数:无 返回值:返回0.
int unload() { return 0; }
1
0755b1390f29ad3e5b1b30514ff0508f
4af15eb130d88359e1b0b397f27c4c9b
今日应付商家金额
class Zh_diancModuleWxapp extends WeModuleWxapp public function doPageWmSale() { global $_W, $_GPC; $time = date("Y-m-d"); $time = "'%$time%'"; $storeid = $_GPC['store_id']; $wm = "select sum(money) as total from " . tablename("wpdc_order") . " WHERE time LIKE " . $time . " and s...
1
c93381b1f2d8451fe442bbaf7c4696db
839a336f0f968fded9b2312f0427d208
Taking a shortcut here and not asking the user for a title
void OpenGLRenderer::CreateMessageBox(const std::string& message, const std::string& title ) const{ MessageBoxA(m_windowHandle, message.c_str(), title.c_str(), MB_OK); }
0
2272809c840c2846e927d08f03d06960
4ed7c2c568cd4aa3782175e87b3b7e41
Account Balance validation for AccountType Savings.
{ if (amount > 500M) { throw new Exception("Amount cannot exceed $500."); } }
0
2715d1ed5144fcbb342c7690bb3ffea3
276d26fd473c5b3740853ebfe98e7296
1ms tick, scans input & updates current state
function love.update(dt) local keys = _input:update(dt) if keys.amount > 0 then _stateful:input(keys, dt) end local start = love.timer.getTime() _stateful:update(dt) _time = love.timer.getTime() - start end
1
9e2e99c12aa2a388ba520fe4aa15b99d
a1ab756b2c9ac33c1da374b75c244393
Creates items for completing database table names
const tables = [] this.dbSchema.forEach(db => { db.tables.forEach(table => { tables.push({ label: table.tableName, kind: this.monaco.languages.CompletionItemKind.Module, detail: '<table>', sortText: this.SORT_TEXT.Table, insertText: table.tableName...
1
9e8f7505968a66600f9f6067069a6fc2
988237097244a90d431ce726f4f230aa
Gets the value of the acct property. possible object is {@link AccountIdentification4Choice }
@XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "Account28", propOrder = { "ownrId", "acctId", "dsgnt", "acctNm", "svcr", "subAcctDtls" }) public class Account28 public String getAcctId() { return acctId; }
0
e6bc797295a59c8347f0332f27391913
8f7362fa7d9dd0003bba0949f6a78ea9
find the perimeter of circle, triangle, and rectangle
double Rectangle::findPerimeter() { return ((2 * length) + (2 * width)); }
0
cd6f4e3c1581523dc7bbe96865df6bdb
9cce5553ef1df110152d953dac0a0b1f
Encodes the bytes in the given byte-string according to the base 32 encoding exposed by Zooko O'Whielacronx (http://philzimmermann.com/docs/human-oriented-base-32-encoding.txt). This implementation will always encode full bytes (analog to the base 32 encoding described in RFC 4648), which is one possible proceeding men...
def encode_string(intval): return base64.b32encode(bin(intval))
0
b0c8e724e7541a5f729d8f24dc893d8e
e65dfd56ccc7c0922b4640485b8e0e90
test commenting on blog with empty fields
class CommentModelTest(TestCase): def test_bad_request(self): data={'author':"Bad Comment",} response = self.client.post("/blog/post/" + str(self.post.pk) + "/comment/", data) self.assertEqual(Comment.objects.count(), 0) self.assertEqual(self.post.comments.count(), 0)
0
d0ec8e96e51bb7adc3c7ef23298a8c23
fb9e6ce497ef76864cf032e53dd5cc3f
Get the full set catalog from dynamoDB.
try: response = DYNAMODB_CLIENT.scan(TableName=table, Select='ALL_ATTRIBUTES') return response["Items"] except ClientError as error: raise error
1
ac49fb7f5a1e1131fd6e9d50d17db8d2
f82528b8152369d062e69f8df9132c15
Delete existing dataset by ID and return success.
namespace Microsoft.PowerBI.Api.V2 public static partial class DatasetsExtensions public static object DeleteDatasetById(this IDatasets operations, string groupId, string datasetKey) { return operations.DeleteDatasetByIdAsync(groupId, datasetKey).GetAwaiter().GetResult(); }
1
a92b581c9c33c57373febd32545e5e42
c9c630a7cdc78184b1be40f4ea609cf3
Gets the index of last non gap symbol.
namespace Bio long LastIndexOfNonGap(long endPos);
1
8c6722beb2905a1afb28479381ef7398
e1f7f46d47dade73a64fa99d29ac796e
判断微信是否登陆
public class UserManager public boolean isWxLogin() { return isLogin() && mUser.isWxLogin(); }
1
8884a3ac207becbd544830e63ef727a4
f75eaab49f5fade47891d5d6f8738d7e
indicate DMA completed by clearing the transfer count
void dma_adc_transfer_complete(DMA_HandleTypeDef* hdma_adc) { transferComplete = 1; }
0
6d3f2511202748400aee86ea49751602
08c58499e3c45c4f4ce53fc27cc7da4d
Start the JS coverage.
public class Profiler public void startPreciseCoverage(jpuppeteer.cdp.cdp.entity.profiler.StartPreciseCoverageRequest request, int timeout) throws Exception { session.send("Profiler.startPreciseCoverage", request, timeout); }
1
83f789f792145007af1ebff3e7903d63
7fe55b83fcb71faefef9d6e035344aaa
使用这个函数之后,选择器切换到孩子的选择器,后续的链式操作只对孩子生效
namespace BehaviorTree public class BehaviorTreeBuilder public BehaviorTreeBuilder Selector(string _nodeName) { Selector newSelectorNode = new Selector(_nodeName); if(parentNodeStack.Count > 0) { parentNodeStack.Peek().AddChildBehavior(newSelectorNode); } ...
1
067596e5ccc7d507cb1614596d589573
912c220bd0ffd7124b94cf03adc25f50
We can accept two forms of temperature: -- a numeric variable -- a list of numerics of length one --> [float(T)] -- a list of numerics of length three -->[float(t0),float(t1),int(N_t)]
class Computation_Cond(Mess_Input): def change_Temperature(self, Temp_list): key = 'TemperatureList' self.__dict__[key][0] = str(Temp_list)
0
830c8a47f9858541f88b480c519e1054
005e8c4b71db0aaee79910f0427475eb
通过博客ID获取博客评论,无分页
namespace ONE._05DAL public partial class T010博文表DAL : BaseDAL<T010博文表>, ONE._04IDAL.IT010博文表DAL public ONE.Models.RemarkViewModel getCommentsByBlogId(int blogId) { return null; }
1
1819ca103ced6e46cd3dab4fa02757e2
1cdb5c1b03ef7754e8b282cb270d5a2a
方法1 递归
namespace Demo11_递归 class Program static int Fact(int num) { if(num <= 1) { return 1; } return num * Fact(num - 1); }
1
916d8d3a78fa87fc4631e15cf42e4f96
fc45efeed32feba543b577db8da0a330
Controls the Quit Screen
{ MessageBoxScreen confirmQuitMessageBox = new MessageBoxScreen(Resources.ConfirmQuitGame); confirmQuitMessageBox.Accepted += ConfirmQuitMessageBoxAccepted; ScreenManager.AddScreen(confirmQuitMessageBox, ControllingPlayer); }
1
d0c8308ffc536dd9e1322e9fd2e8f1ab
c7b3bbf358fd9d8448a72dc1ec9211b6
Gets all events that a single user is attending
class User def events_attending Event.joins(<<-SQL INNER JOIN groups ON groups.created_by_post_id = posts.id INNER JOIN group_members ON group_members.group_id = groups.id SQL ) .where(groups: { type: EventAttendees.to_s }) .where(group_members: { user...
1
a3f8be33c361fd3a8fe7b8accb83315d
6928c7f610aa3d53438a3d42b3298d74
获取20位的独特Id
function getId() { let num = Math.random() * 100000 return num.toFixed(0) }
0
03f67546fa862bb36d13c6a1b4fc9be3
9d0f728f9af00c313239d1d37755616f
非 root 登入不顯示root於列表
ncmb.Role .equalTo('roleName', 'admin') .fetch() .then(function(role){ role.fetchUser() .then(function(adminUsers){ var currentUser = ncmb.User.getCurrentUser(); for(var i = 0; i < adminUsers.length;i++){ if (currentUser.get('objectId') === adminUsers[i]...
0
5867bc31f0046ac1fc89666fd0104c1e
f65a956fde7ed75d375722c1d7824cdc
Handles the CellDoubleClick event of the AccountsGridView control.
{ if (e.KeyData != Keys.Back && e.KeyData != Keys.Delete) return; var accountingObjectId = grdAccountingDetailView.Columns["AccountingObjectId"]; grdAccountingDetailView.SetRowCellValue(grdAccountingDetailView.FocusedRowHandle, accountingObjectId, null); ...
0
55435908aaa015d1348c8f341ed9fcc5
343827b0226e1f56e251e50ce0b85ee1
Gets tags for each post and displays them for the respective posts
jedis = new Jedis("localhost", 6379); jedis.auth("123456"); List<String> tagDisplay = new LinkedList<String>(); for(String tagEachPost : jedis.smembers("post:" + forPost_ID + ":" + "tag")){ tagDisplay.add(tagEachPost); } return tagDisplay; }
1
3d8572bda2bed02134f8c848f77da796
cefe327746fb9946db61c147f0f6a8f8
Synthesize the `move(along:)` function declaration.
accel = MAX_ACCEL if (abs(accel) > MAX_ACCEL) else abs(accel) vel = MAX_VELOCITY if (abs(vel) > MAX_VELOCITY) else abs(vel) blend_radius = max(0, blend_radius) axis_angle_vector = axis_angle_vector_from_plane_to_plane(plane_to) pose = _format_pose(plane_to, axis_angle_vector) return "movel(%s, a...
0
ec85fa82ca15bcc586f07b5d917f4573
bf3d716c5b5bb8b0734e27d136d85a59
根据名字获取 openGL 函数。
namespace SharpGL public static class Win32 [DllImport(OpenGL32, SetLastError = true)] public static extern IntPtr wglGetProcAddress(string name);
1
c6b2b8e389a064bfc65b0b2212a57a36
d09b1a10f1668bc179754c6948860e83
moves the chicken across the top of the screen
self.rect.move_ip(0, self.velocity) self.rect.top = max(0, self.rect.top) self.rect.bottom = min(240, self.rect.bottom)
0
ee35699fcc4ff339536e5594cf23ddba
50431e357f350ba455fe22cdac124fdc
If type, body, file, and line attributes are the same they are equal.
func TestEqual(t *testing.T) { type keyOne struct{} type keyTwo struct{} a1 := attributes.New(keyOne{}, 1).WithValue(keyTwo{}, stringVal{s: "two"}) a2 := attributes.New(keyOne{}, 1).WithValue(keyTwo{}, stringVal{s: "two"}) if !a1.Equal(a2) { t.Fatalf("%+v.Equals(%+v) = false; want true", a1, a2) } if !a2.Equal...
0
87b6dbee625dec66bf1c4c4bf494a36f
7dcec71bfb3a43d31d62b62c6ef392ef
Different applications may require different classes to handle identity management. This allows the app to configure itself for its auth requirements.
interface AuthenticationType fun authenticationProvider(): AuthenticationProvider
1
9e72e6f931adf291b89c89cd04e390ac
4b47bc72e0a4dfc7549a366e8701d94a
预处理OledbCommand
{ string providerName = ConfigurationManager.ConnectionStrings["AspNetForumConnectionString"].ProviderName; DbProviderFactory providerFactory = DbProviderFactories.GetFactory(providerName); bool sqlDriver = (cmd is SqlCommand); bool mysqlDriver...
1
321a78bc4d690e635d0a3db3ab6b398e
d530c449e5ecefbf440e43f0c13a7c70
add a reference to the pdu in the transaction log
{ if (pkt != NULL) { pthread_mutex_lock(&pkt->pkt_refmutex); pkt->pkt_refctr++; pthread_mutex_unlock(&pkt->pkt_refmutex); } return pkt; }
0
7d94dce2ae4cbb53510f4d0c355de48b
fd476df9ae974f2d3af8fdd2caf44964
Touches WSGI file to reset Apache
if utils.platform_im_running_on() in ['Fedora', 'CentOS Linux', 'RedHat']: if os.path.isfile('/etc/httpd/conf.d/99_%s.conf' % hostname): os.remove('/etc/httpd/conf.d/99_%s.conf' % hostname) os.system('systemctl reload httpd')
0
8e34caf6e4efb46f59d2abaa921b5e8c
3c1d28b5d52cf5879f2d51f034d5b2b2
查询低消任务总数
namespace BOCOM.IVX.Protocol public partial class IVXProtocol public UInt32 GetTaskTotalNum(Int32 queryHandle) { MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log,"IVXSDKProtocol VdaSdk_GetTaskTotalNum lQueryHandle:" + queryHandle); UInt32 retVal = IVXSDKPro...
1
76ff4b72852e14d3961eeca7667bdbe2
2ca60c2dac929a1ced1762f3d6bb701f
< Visitor that prints executable code.
public class MetaProcessor implements IProcessor private static class MetaScanner extends ElementScanner8<Void, Void> public Void visitExecutable(ExecutableElement e, Void p) { PRINT.INFO(e.getSimpleName()); return null; }
1
6851414dfcb1f234ed05dec17a19cebf
6910a05f3af8c8cae2736bb9ee05f2b6
display boking form for admin to add the booking request.
$bookings = []; $common_model = new Common(); $bookings = $common_model->getbookingRequestsadmin(); return view('admin.bookings')->with('all_bookings',$bookings); }
0
037391ebb6ccc72b8ec6a6dcb792c0cb
39dcfb69db67e02910bfa4f726287f20
转换fodder为map map不包含素材内容,是用于list查看的
gfm := make(map[string]interface{}, len(genericMap)) for k, v := range genericMap { gfm[k] = v } return gfm }
0
7a87fb0d8683920fb2ffea655dd688ec
5b2caeb180acac90ee4d0fc49493ff5a
Make the agent move along the path and avoid the obstacles
def move(): this_cell = updatewumpus.take_action(this_world, "Up") while not agent_dead(this_cell) and not pickup_gold(this_cell): store_info(this_cell) nearby_cells = get_neighbors() safe_cells = [] if this_cell[0] == 'clean' and this_cell[1] == 'calm': safe_cells = ...
1
23f6982fc5ac1f18e1da6cfbde954239
c191d555f6405d478cc4d24ae5d38f73
Splits this glyph using the given split token. 'splitBy' - Split token (e.g. a space or line break) 'result' (out) - The vector where the split segments are stored.
grlAPI GsArray *gsCreateSplit_(Gs const * const str, Gc const letter) { Gindex index; GsArray *slist; Gs *substr; genter; greturnNullIf( !str || !letter); slist = gsArrayCreate((GrlCompareFunc) NULL, gbTRUE); greturnNullIf(!slist); forCount(index, gsGetCount(str)) { s...
1
bfa0badb3224d1d594f19e6cef34c35c
a69915f0e948f41ba842bc4d57aee100
通过这个方法可以获得特定输入数据的文摘
class Ui_Search(object): # 初始化通讯的类对象 def get_inputblog(self): if self.relatecode == '0000': self.relatelist, self.showed = self.show_content(self.relatelist) return self.showed else: self.text_box1.setText('暂时您所查找的消息,过一会儿再来吧!!!') self.text_box2.setText...
0
60a9d83c25d719a4933dbeed49eca5a8
c409c13fa4c68bcd556c875df4efb0bd
Sobrescrita do operador "<" para que o método "sort" ordene conforme as especificações do TP;
class _No(object): def __lt__(self, outro_no): if not type(outro_no) == _No: raise TypeError else: self.chave[0] < outro_no.chave[0]
1
e9abb328a5ff4822b2c72592c12927ea
db740bb494f8bae1519331f166bc2939
Permet d'obtenir la valeur de DDV via le service des DDV
public class Capteur extends Thread implements MyObservable{ public VoitureDetecteState getVds() { return vds; }
0
aa4a2f1eda085bbccf22e29ca1028779
f01c535d7483df7aaf6a375c4da65e47
上麦操作,设置用户身份为主播
class TencentController extends HilandController public function masterSetOn() { $ids = $this->getUrlParaValue('id', false); if (!empty($ids)) { $idarray = explode(',', $ids); foreach ($idarray as $keyid) { UserinfoModel::setVIPID($keyid); } ...
1
d89cb59c55bb4e9badba8397e4be3d89
7834711d6c3b236763197cd15b6e23d9
Constructor defining default values of the object
df::ViewObject::ViewObject() { setSolidness(SPECTRAL); setAltitude(MAX_ALTITUDE); setType("ViewObject"); setValue(0); setBorder(true); setLocation(TOP_CENTER); setColor(COLOR_DEFAULT); }
1
29c35250114d9c567490775ea25b857f
2f3666633f26642dc6b60dcec5387419
Decodes the audio binary stream using the external MP3 library into the array of audio samples, which plays through the available audio device.
int dataSize; while (playerStatus != NULL && !playerStatus->isExit()) { out_buffer = NULL; if (finished) { finished = false; dataSize = decodeAudio(reinterpret_cast<void **>(&out_buffer)); if (dataSize > 0) { for (int i = 0; i < dataSize / 2 + ...
1
9da87ab723e84251158d9c954989e658
f1136140ca9f4b89e89e85470389641d
generic polynomial to convert georeferenced lat/lon to char's x/y
class LZCG extends Base convert(lon, lat){ var p = 206264.8; var L0 = 105; var L = (lon - L0) * 3600 / p; var L2 = L * L; var radB = lat * Math.PI / 180; var radL = lon * Math.PI / 180; var Bs = lat * 3600; var cosB = Math.cos(radB); var sinB = Mat...
1
80d7dc37909ae50b9e606b102395e484
cf87dfadbb1ec7c25b2cbfa5cf665849
Returns an array where each cell is a list of remaining possible patterns.
return boardState.map((curr, y) => { return curr.map((c, x) => { return willThisCellSurvive(x, y, boardState); }); }); }
0
2a137c094d46d07ecb74646e7bec11ac
f6461a517ab04fea44fe51804d89448a
Reset toàn bộ option đã lựa chọn về mặc định
namespace QRCodeGenerator public partial class UC_QRConfig : UserControl public void SetDefaultOptions() { CMB_Size.SelectedIndex = 1; CMB_CharsetSource.SelectedIndex = 1; CMB_CharsetTarget.SelectedIndex = 1; CMB_ECC.SelectedIndex = 0; CMB_Margin.S...
1
2bc42eda48a7e545901f9a5515c66338
1f3311652ca55415913cd136126f35c4
Отображение всех книг
class BooksController extends Controller public function index(Request $request) { $books = Book::all(); return view('index', compact('books')); }
1
bdddb9736e1bec181736999290b459fa
0e02a87d5cebef83dc1d3cd5af37e070
根据积温计算生长周期
class Climate: def __init__(self): self.growthmax = 300 self.growthmin = 80 self.growthdays = r.randint(self.growthmin, self.growthmax)
0
72abe004b7f5cbbafafa42fe7854b8ce
b03ebccec40a813ba51897ea11956359
Executes this test for the specified directory.
string assemblyFileName, ImmutableArray<string> testCasesToRun, Action<IEnumerable<TestResultData>> testsFinished, CancellationToken cancellationToken = default(CancellationToken));
0
06eb104706d1b3cec983d66d4cae9a9a
5b89b968c9ce67f3219320e63172ca03
Perfect forwarding
NonCopyable arg; using DeducedReturnType = decltype( hana::apply(std::forward<Functor>(f), std::move(arg)) ); static_assert(std::is_same<DeducedReturnType, Expect>::value, ""); DeducedReturnType ret = hana::apply(std::forward<Functor>(f), std::move(arg)); BOOST_HANA_RUNTIME_CHECK(ret == ...
1
83dc37c650f0e283cf809a4f5e3b3123
4736027466cc18231e3e52d796020dd6
Prepare related pages list Формируем список похожих страниц
if (!empty ($this->fields ['related_pages'])) { $pages = CmsPage::query(); $pages->where([ 'CP.deleted' => 0, 'CP.id IN' => explode(',', $this->fields ['related_pages']) ])->limit(0, 50); $this->fields ['related_pages'] = $pages; } }
1
eb7b0aef18f6d1b0a5986280f093e4fd
a8d57618fb5ce4c37e054b7f484a7779
Start a refresh on the dataset by replacing a specified percentage of the images with images from the physical database.
namespace MyCaffe.basecode bool StartAutomaticRefreshSchedule(string strDs, bool bTraining, bool bTesting, int nPeriodInMs, double dfReplacementPct);
1
41ab4eca958d8b2d0748761684c008ea
39aca046a1bd04e388ed4595bbc0000b
他のmodelと紐づいていない会社は削除できる
class CompanyTests(BaseTestCase): def test_delete_company(self): company = Company( company_name='削除用会社', contract_date=datetime.today().strftime('%Y/%m/%d'), created_at=datetime.today(), created_user='test', updated_at=datetime.today(), up...
1
9995afe318619f4b9a51ab6554f9488b
2c9dcab8cfd0ecfa2b949ae9c1b22601
Returns validators for GROUP_NAME field.
{ return array( 'Integer' => new validator\IntegerValidator($value, true, Lang::_('SRV_FILTER_BUILDER_FIELD_GROUPS_BUILDER_ID_INTEGER')), ); }
0
9b8b4237aeb4b211296d59edb990f82f
a889c0df1131b3db665179523146b2e6
devolver el conjunto de fechas de un fixture
ifstream archivo; archivo.open("/Users/inigo/Desktop/Semstre 3/Estructuras de datos/TC1031(Portafolio_FInal)/Act_4.2/Act_4.2/equipo6.csv"); string line; vector<Fecha> listaFechas; string fechaString = ""; Fecha fecha; while(getline(archivo, line)){ stringstream ss(line); get...
1
fc0b69494571e369666cd77a592f296d
8e95d80c3e49ab3143e36db3c463e2c6
Log Provider Configuration
class MonologProvider public function __construct(IContainer $container) { $container->set(IMonologConfig::class, MonologConfig::class); }
1
363c7fb6da4b18a556af9223c877b31a
3a0a4aa23a67aebc7c73379d194fcd7c
Process a transact2 request. The transact2 can contain many different sub-requests.
, const UINT setupCount, const PUCHAR trans2Params, const PUCHAR trans2Data, cPtr<cSMBResponse> response) const { m_maxDataCount = maxDataCount; if(!Trans2Dispatch[0]) { for(int i = 0; i < UCHAR_MAX; ++i) { Trans2Dispatch[i] = &cSMBTree::processUnhandled; } Trans2Dispatch[TRANS2_FIND_FIRST...
1
f577094f3ecd334e15526121f2c29d7d
9141372d3234d65e1418c0b0eca28154
创建的图是否支持跨可用区(AZ),默认值是false,如果设置为true,系统将会把图中的ECS建在两个可用区中。 如果创建图时,不加该参数,则会将图中的ECS都建在一个可用区中。
public class CreateDBInstancesRequest extends AbstractModel{ public Boolean getMultiZones() { return this.MultiZones; }
1
6d228e8ece052a525b693ab391869d2b
482a5273e7a223b44cb82592315ca577
Get dictionary of figure arguments depending on the plot type.
if isinstance(self.settings.plot_args, Mapping): args = self.settings.plot_args elif isinstance(self.settings.plot_args, (list, tuple)): if len(self.settings.plot_args) > plotno: args = self.settings.plot_args[plotno] if args is None: ...
1
689432c09e3b3d49df608b0e1d453a37
6e6a418e25765f5022fad0ddf8f2bed7
Retrieves result from estimate model
class EcomDev_ProductPageShipping_Block_Estimate_Result extends EcomDev_ProductPageShipping_Block_Estimate_Abstract public function getResult() { return $this->getEstimate()->getResult(); }
1
43dff7907b2a180e9d6d2e0ec3ea95de
003bf3992553bf0098f05ea937cb4ec9
Derivative of utility
mean = compute_mean(W, R) var = compute_var(W, C) utility = mean - risk_adversion*var res = -utility return res
0
0d467f230d45545c2ae5a466537812d8
bb2d4546071cbd99c10c8ef15d4f5264
更新已分配QQ号段信息 以及 存储 已分配号段信息
public abstract void updateAssignAuths(UbRoleVo assignedauths) throws Unibiz2Exception;
0
03c48f792e9d11bbd152cc0ba8c20bac
422d29517101eb70592cefed7e111c46
Filter music tracks with each field containing the given query.
public void findTrack() throws JMBWSException { TrackFilter tf = new TrackFilter(); tf.setTitle("gone"); TrackSearchResults trackResults = q.getTracks(tf); assertTrue(trackResults.getTrackResults().size() > 0); for (TrackResult tr : trackResults.getTrackResults()) { Track t = tr.getTrack(); log.de...
0
a5eae09c087c83eeb7a4ff021b46c151
e0d9526fc4aff87dde199122af5819f0
Gibt zurück, ob der gegebene Matrizenausdruck eine Einheitsmatrix ist.
{ val diagonal = this.width + 1 val max = this.width * this.width for (i in 0 until this.size) { if (i < max && i % diagonal == 0) { if (!Matrix.equals(1.0, this.matrix[i])) { return false } ...
1
69a5429e2c44c8767b9e4176ab1cd1b0
965e98ac88fe147a89759599fb5fb449
保存孕妇档案
public void editFirstPrenatal(String archivesCode, FirstMotherhoodInfoPO firstMotherhoodInfoPO, FirstPhysicalBloodStethoscopyInfoPO firstPhysicalBloodStethoscopyInfoPO, FirstGynecologicalExaInfoPO firstGynecologicalExaInfoPO, SupplementaryExamInfoPO supplementaryExamInfoPO, ...
1
eac2164d682aad75b5e4d025af16fde3
92865b151f796e2deda6795c3c5c1388
Dựa vào kết quả trả về để đưa ra thông báo
console.log("response: "+response_.status); this.hideMessage(); var severity_ :string = "info"; var show_message :boolean = false; var message_ = response_.resultMessage; switch(response_.status) { case 500: { severity_ = "error"; show_m...
1
0f781445b90f750e6b881207c0efb29c
41e911604650858a6d99ea56068f0c44
Set P0.0 as output
void init_GPIO (void) { LPC_GPIO0->FIODIR = (1<<3); LPC_GPIO0->FIOCLR = (1<<3); }
0