query_id
string
corpus_id
string
query
string
code
string
label
int64
6dfeb153c0e52268e9b4ab09ed54d7b5
ad4da30524b65279266a9b7c594ba021
查找待扣款明细表需要计算罚息的待扣款记录,当还款日小于当前日期并且明细状态不为报盘中
public List<MyMap> findPenaltyFineExemptDoneList(Map<String, Object> paramMap);
0
b031d85ba5e4fbac7f767d38c43d8928
927a6a8ab0db5c251d02ceee3a3464df
列出所有i位到j位词
namespace Permutation1 class Program static void jyun(char[] t, int n) { int i, k; char word = ' '; if (n == t.Length - 1) { list(); return; } k = n + 1; for (i = n + 1 ; i <= t.Length - 1; i++) { word = t[k]; t[k] = t[i]; t[i] = word; jyun(t, k); t[i] = t[k]; ...
0
1b2b7557d897335144b0f52dbe1c32d9
ebd49a2b832eb8f4d2b046e1d62b4ff0
Populates the image view models based on the images in the safety check fault data model
String[] violationList = getResources() .getStringArray(R.array.violation_types); TypedArray violationImageResources = getResources().obtainTypedArray(R.array.violation_images); mViolationData.clear(); for(int i=0;i<violationList.length;i++){ m...
1
69be30665c78e6d586d5ebb50293101f
18cf04480036b1bc56c7fc1915688ec5
Returns enum constant.
public class JournalHeader extends Header public JournalHeader.Name getEnum() { try { return JournalHeader.Name.valueOf(this.name); } catch(Exception e) { return null; } }
1
fd2c76a892730759020acaf2c20aa7aa
02609d48086a7914690aff8f4d1c4334
Returns a String with the latitude and longitude Keyword arguments: self -- The caller, the instance Returns: This function returns a String with the coordinates
location_string = "{city}, {countrycode}".format(city=self.city, countrycode=self.countrycode) g = geocoder.arcgis(location_string) coords = g.latlng return coords
0
cfcb3ff28e43641c9979f4e054208e6e
6a165fbbd535afcfa9ee109731dd9940
Из числа преобразует в структуру хранения данных флагов операция обратная операции get_digit
uint32_t get_digit_flags(uint32_t n) { if (n == 0) return 0x1; uint32_t digit_flags = 0; while (n != 0) { digit_flags |= 1 << (n % 10); n /= 10; } return digit_flags; }
1
d7da4e8f4255962174a951b9ae008c90
931f7d41300498268c09631994056622
Get a deep copy of the group and all filters contained in the group
{ var groupFilter = new SVR_GroupFilter { FilterType = Directory ? (int)(GroupFilterType.UserDefined | GroupFilterType.Directory) : (int)GroupFilterType.UserDefined, ApplyToSeries = ApplyA...
0
ef839ce73b6d2400ea3c243c98de972d
1457f39660ed69664e9f5691664607ca
根据层数获取所需等级
namespace WebNotifications.Helper public class LevelExpHelper public static int GetJustLevel(double total_exp) { int[] res = GetLevel(total_exp, 1); return res[0]; }
0
6e505096495bebf356b95b91061f8a49
7a6345b5cc08f5b2b550f8c61c44980f
Draw a triangle with a depth of 1
GP142Color color, int thickness) { GP142_triangleXY((int)color, x1, y1, x2, y2, x3, y3, thickness); }
0
f59a5f6345b001903ddb97f25801a666
6382e3301e3913e3784b69da4e98c54d
Sends the pose to the communicator. Sends the x and y coordinates and the heading.
msg = { x: x, y: y }; updater.socket.send(JSON.stringify(msg)); }
0
66acb8eba2684db7142f02bfae0206b0
e7c1fe0b5ad90e6de2f9c318f6467745
社区玩家更新数据(手机号&QQ号)采集
numbers = self.get_argument("numbers") session_key = self.get_argument("session_key", "") default = ["not", "update"] nickname = self.get_argument("nickname", default) sexy = self.get_argument("gender", default) age = self.get_argument("age", default) email = self...
0
8afe6df92cc819e2695e632057949c47
18ca1c5be4008dc43efd8c6ac1423271
Convert a Morton number to an x,y coordinate
def rev_morton_code(morton_key: int) -> Tuple[float, float]: x,y = deinterleave(morton_key) return float(x)/100.0, float(y)/100.0
1
fa8dcfc9fa7b43cdf78d30e6748e7a2f
67bf2f30c89058db5139c1c68c83a2f4
Returns the keyValue of the element
class Invoker public function getKeyValue() { return $this->keyval; }
1
23f4998a3d91e1c75dbbe0b74cdde8db
eb6fa214e418d386a015c6be9fe4cbb3
Get the value of Previous Block Hash.
public class SimpleBlockImpl public String getHashValuePrevious() { return this.hashValuePerviousBlock; }
1
db4460ce99eb91279ae79f9193fdac11
9464ef5ba67253e39d10226a5a16a47b
The method to set the value to deleted_by
class Naming public function setDeletedAt($deletedAt) { $this->deletedAt = $deletedAt; }
0
1095c82e9c6986852c6645e28dbd721f
9fae0237ccd3a32ad21e2595fe570d8f
Posts message in slack channel inside the thread.
def slack_notify_message(message, channel_id=None): bot_token = SECRETS_DICT['CITIGROUP_SLACKBOT_TOKEN'] sc = SlackClient(bot_token) if not channel_id: channel_id = 'C193UMR0V' print message sc.api_call('chat.postMessage', channel=channel_id, text='{message}'.format(message=m...
0
4016100b26233245a3d72c50897880b9
66e3c66ff2fbecb71fb2b7f891f9e62c
Makes necessary adjustments to display the create student interface
namePanel.removeAll(); buttonPanel.removeAll(); newFirstName = new JTextField(NUMBER_OF_CHAR); newMiddleName = new JTextField(NUMBER_OF_CHAR); newLastName = new JTextField(NUMBER_OF_CHAR); newEmail = new JTextField(NUMBER_OF_CHAR); newMajor = new JTextField(NUMBER_OF_CHAR); namePanel.add...
1
1d3bd99201431fed0c72318952c506e0
99c729d38829ebf07dfa7c595bbaf230
Return whether list_, or any nested sub-list of list_ contains value.
class multi_content_column(): def contains(self, content): return [content in i for i in self.value]
0
eceddb48bd082c7487163c2dbeca68b8
2a8516bfa86f56dba063fab2cf82b32d
Get size of fragment (in bytes).
namespace lf SizeT FileResourceChunk::GetFragmentCount() const { return FileResourceUtil::FileSizeToFragmentCount(mData.size()); }
0
3b4020b486ddc229a9de0898ada0bc85
ba6c47af191a539e69daf8b93c36cc43
对于未登录的用户只可以查看列表页,不可以编辑和更新
list_url = reverse('user-list') detail_url = reverse('user-detail', kwargs={'pk': 1}) response = self.client.get(list_url) self.assertEqual(response.status_code, status.HTTP_200_OK) response = self.client.get(detail_url) self.assertEqual(response.status_code, status.HTTP_...
1
e81ef42c012d21e1f10bb7e89c9e05e4
722cee468db25f96eafebd107091ff90
Checks out the specified document.
{ if (IsCheckedOut()) { Client.Delete( this.Links, LinkRelations.CANCEL_CHECKOUT.Rel, null); } return this.fetch<RestDocument>(); }
0
2370bc29a11b16de4635341643f4979e
23803d9702551f1ea46fd9b758f9cae7
This method is responsible for providing the main production variable
public void production();
0
f4dfa64e8fc978a2c3db31a553c48575
5ee91998722ea4d4bd617768ba77d41a
Fungsi ini akan dipanggil sebelum proses delete
abstract class Pengguna implements ActiveRecordInterface public function preDelete(ConnectionInterface $con = null) { if (is_callable('parent::preDelete')) { return parent::preDelete($con); } return true; }
1
599e3c02cbf65985bffb39468860bd9b
5cebaa0492ffd29d0bcf7492ce595e62
Computes an l2 loss for predicted-vs-gt insidedness at samples.
predicted: torch.Tensor, ground_truth: torch.Tensor, positive_mask: torch.Tensor ) -> torch.Tensor: predicted = predicted[positive_mask, :].view(-1, 4) ground_truth = ground_truth[positive_mask, :].view(-1, 4) return functional.smooth_l1_loss( input=predicted, target=grou...
0
cd72aea9af83ee8bc322af75955f251a
2f451ae3bb8da454eba85fac407d855a
Inverse of an Insert is a Detach that starts before the leftmost node inserted and ends after the rightmost.
: Set{} { Node* temp = source.head->next; while (temp != source.tail) { Node* p = new Node(temp->value, tail, tail->prev); insert(p); temp = temp->next; } }
0
96b58c14277fae9a799fd7b626fdbf8b
822e8ea4f0079094b479b0920671ca26
returns false or the length of the suffix it had to remove to find the string
{ PFC_ASSERT_PEDANTIC(s_ && substr_ && *substr_); usize_t ssize=(usize_t)::wcslen(s_), subssize=(usize_t)::wcslen(substr_); if(ssize>=subssize && ::wcsncmp(s_+ssize-subssize, substr_, subssize)==0) { wchar_t *tc=s_+ssize, *rc=tc-subssize; if(strip_all_) { while(rc>=s_+subssize && ::wcsncmp(rc-...
0
15059e6ec176b4ffa4e496160c396d66
1b9ac78435e1aaa1fa86daf1093e61c3
loads the active scene (the game scene), by getting the name of the current active scene (game scene)
public class GameManager : MonoBehaviour public void RestartGame() { SceneManager.LoadScene(SceneManager.GetActiveScene().name); }
1
ba937a123848633fc049d463d080878d
f53fab0956415943cc5701c1da84d996
This function displays the search items available in the tickets.json file.
regex = re.compile(f'^.*{name}.*$', re.IGNORECASE) myquery = {'Author': {'$regex': regex}} found_tickets = [] for ticket in db.find(myquery).sort('Price'): found_tickets.append(ticket) return found_tickets
0
ed5ba1fff1803960cd93b29a411717b8
93e360478be58ae8ff8317f1de8f1854
Check if the bottom notifications warning appears that you are not allowed to annotate 1.0 syntax pages
class PostFragment : BaseFragment("PostFragment"), NewTagDialogFragment.OnAddNewTagsListener, BackAwareFragment, CommentsAdapter.CommentActionListener, InfoLineView.OnDetailClickedListener private fun addWarnOverlayIfNecessary(inflater: LayoutInflater, view: ViewGroup) { if (userService.isAuthorized && feedItem...
0
e29523a59da98631257367b070aadbac
754836674b1afa12d0f4e0f1ce3312cf
插入一个联盟
self.unionLiuYan[#self.unionLiuYan + 1] = data GameEventCenter:dispatchEvent({ name = UnionData.ADD_UNION_LIUYAN_EVENT, data = data }) end
0
97024e41197de3ca428d717401065533
3ce493e75177a0270b8fbaa3780590b0
Get the sql column definition for the given field.
class MySqlDatabaseDriver extends AbstractDatabaseDriver protected function getColumnDefinition(string $columnName): string { switch ($columnName) { case 'id': return '`id` int(10) unsigned not null auto_increment'; case 'timestamp': return '`timestamp...
1
40ea8c1f6a8ab5f17a294bab811e7343
020c5cabeb306eecab612b80eeca8331
Replace the value in this Node with the specified value Return the original value that was replaced.
@Nullable @Contract(mutates = "this,param") Node<V> setNode(@NotNull Node<V> node);
0
fee703abe30cc3703562f49f715891bc
07a53892221fc4b498ee235e2ce308ef
\brief Evalua si se trata de un texto valido(Letras numeros simbolos)
{ foreach (var x in strTexto) { if (!char.IsLetter(x)) return false; } return true; }
0
c57fb95792919f9ea1ddc261a954b412
6a42df6d95548a859d50e7211c42d985
Function to implement brute force string matching
def bf(astring,bstring): if len(astring) < len(bstring): return False for i in range(0,len(astring)-len(bstring)+1): j = 0 while j<len(bstring): if astring[i+j] != bstring[j]: break j += 1 if j == len(bstring): return i retu...
1
fe65d7c47d29a7ab221e311b774929ee
b133bf8af216ee921805dc55a5d1c10b
Called by 'awake()' to rebuild dictionaries, which Unity doesn't serialize
{ GuidTypes = new Dictionary<string, AssetItem>(); foreach (System.Type type in Types) { CreateLookupDictionary(type); } foreach (AssetItem ai in SerializedItems) { if (ai == null) continu...
1
78afb5cb10c1d6bdcb605b12106ec825
4b4be34f9386e5aadc8383cc4dc6804a
Test setting the widget's unit.
pf = par.ParameterFrame(data=self.data["component"]) pf.from_dict({"data": self.data["component"]}) assert pf.get_param("thickness", key="unit") == "m"
1
2322892de7106000db6b9d4ab32211b0
c6517106cd5375a2ef8c8d3f3d4c03ef
Get results based on datatable in Business Requests list page
[WebService(Namespace = "http://tempuri.org/")] [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. [System.Web.Script.Services.ScriptService] // REMEMBER TO UNCOMMENT THIS LINE public class ajaxWebServic...
0
67759f131577b3faf82fd5a60497ae6c
fdc94eec734deaf18d7bdec498a31c75
Rotates code point inside given bounds.
namespace Nuclex.Math.Generic [DebuggerStepThrough] public int Wrap(int value, int lower, int upper) { unchecked { if(upper <= lower) throw new ArithmeticException("Rotary bounds are of negative or zero size"); int distance = upper - lower; int times = (value - lower) / dista...
1
6397211424e194fcf8430b55d002a8c2
ce2f89a2b0a8ff5bd96f9f7ac702750d
idEquals returns a scope that will find the item by id.
func idEquals(id string) scope { return fieldEquals("id", id) }
1
e5214bb47e03c5cb3fa8253e0c0eeb2d
6fea333214231fd5fd79f056472e400f
Creates new Trip.
Trip createTrip(Trip entity) throws RAException;
1
c9fe2f724f41fc820ae50485dcd78604
855503c0d1880e0e68345640d3e7ca9e
Se asigna la documentación predeterminada y se comprueba que no exista previamente
{ $video = new Video(); $video->Imagen_Caratula ='imge1.jpg'; $video->titulo ='Docuemntal juegos'; $video->descripcion='Video docuemtal'; $video->duracion = '2 horas'; $video->url_youtube ='NO APLICA'; $video->fecha_estreno = '24/03/2022'; $video->id_c...
0
e9298b14b8fd288fa327d8374c493004
1bcd4ae9791dab6b88ac83e9be180099
アイコンをチェック状態を解除する
namespace KH2FM_Checklist public partial class App : Application public void UncheckItem(object sender, MouseButtonEventArgs e) { Image pic = (Image)sender; String[] reference = pic.Source.ToString().Split('_'); BitmapImage image = new BitmapImage(new Uri(reference[0] + "...
1
1382238e945e36bb43fd030d20099508
298fd3035e99c9efcf7a8dd4280c6358
Hide the video view, remove it, and show the non-video view
public class VideoFragment extends Fragment private void showVideo(View view, final String videoPath) { View v = null; removeVideoView(); videoView.stop(); v = view.findViewById(R.id.item_image_intro); if (v != null) v.setVisibility(View.INVISIBLE); v = view.findViewById(...
0
db250222fce712223aaed740f4befc4a
d2575ebc7bf8125e744bc91eae8317bd
Gets the es common index name.
def get_elasticsearch_index(): return settings.ELASTICSEARCH_INDEX
1
cf129abddb6e1b8482f16927bd2e8813
afe8ac9d5df2cc988a0f2f527bcdeef4
Abandon an ongoing LDAP operation.
throws LDAPException { try { if( results == null) { conn.abandon( (com.github.terefang.jldap.ldap.LDAPSearchResults)null); } else { conn.abandon( results.getWrappedObject()); } } catch( com.github.terefang.jldap.ldap.LDAPExc...
1
af028eabc8b93c0369ec4efbecc7f924
2b58a151ebf9012dd95464e1af08db7e
設定類中指定變數名的值,如果改變量不屬於這個類,將throw一個exception
$setter = 'set' . ucfirst($name); if (in_array($setter, get_class_methods($this))) { $this->$setter($value, $name); return $this; } if (array_key_exists($name, $this->data)) { $msg = 'Readonly property: ' . get_class($this) . '::$' . $name; ...
1
13ed1fdc413f023f003f1791ca0369ac
5946048f6120732da7cd8d8b8cee50f9
修改订单发动机信息
class Engineorder def modifyRepair(repair) copyToRapair(repair) repair.setEngine (self.old_engine) return repair end
1
4d50c0e1a032372e547598f98d7f1597
87e623914b7a4542d3911af78d8e3575
Joint petrophysical modeling operator.
esat = 6.112 * np.exp((17.67 * temp) / (temp + 243.5)) slope = esat * (17.269 / (temp + 243.5)) * (1.0 - (temp / (temp + 243.5))) lam = (2.502 * 10**6) - (2250.0 * temp) gamma = (cp * press) / (0.622 * lam) ep_joule = 0.65 * slope / (slope + gamma) * k_in pet = ((ep_joule / lam) * timestep).asty...
0
31ba2d3a10d0a6eef58aed41246d66ba
0f1678ec4ac870ec09f799dbc3ffb4ac
! @brief メソッドImageProcessing::showTogetherImage().2つのcv::Matを1つのウインドウに表示
void ManualRegistration::displayImagesSideBySide() { img_pair_ = Mat(max(img1_.rows, img2_.rows), img1_.cols + img2_.cols, CV_8UC3); Mat left(img_pair_, Rect(0, 0, img1_.cols, img1_.rows)); Mat right(img_pair_, Rect(img1_.cols, 0, img2_.cols, img2_.rows)); img1_.copyTo(left); img2_.copyTo(right); imsh...
1
1a6f218cb2705dffd5c1807f660bc69b
dcc3079e871eed5d638bc6b728cf901a
Removes the element from the delete notification list.
namespace InstallerStudio.WixElements void NotifyDeleting();
0
bcf1ffb47767296cf54c1ef8a6d4e9c2
7b1d2b3289ed8ee810b7fc400f9a8114
Get the number individuals to evaluate in each round
namespace GEP namespace Core void Controller::setNumberOfIndividuals (unsigned int n) { _number_of_individuals = n; }
0
fda1d099aaee5f89f51ff47287a51ed6
090eedbbb36aef9e05422361b12f571c
Method used to initialize the runners spinner
mHandsSpinner = (Spinner) findViewById(R.id.hands_spinner); fillHandsSpinner(); mHandsSpinner.setSelection(0, false); boolean initialized = WHFRP3Application.getDatabase().getHandDao().findAllTitles().size() > 0; mHandsSpinner.setOnItemSelectedListener(new HandsSpinnerItemSelecte...
0
37c5048016911926ee60ef340452da08
c174ed43207e79e414e26359354b496d
坐标旋转 (x0,y0)旋转中心;(x,y)旋转值 a 旋转弧度 逆时针为正
namespace Tibrus public static class MathHelper public static PointD Rotate(this PointD pnt, double a, double b, double radians) { double cos = Math.Cos(radians); double sin = Math.Sin(radians); PointD rotate; rotate.X = a + (pnt.X - a) * cos - (pnt.Y - b) * s...
1
33e4a662d427af1792a3d648ac43b165
81f753f82ffe6f40e9992cb14163d217
coupure de phrase
int main(){ char texte[100]; char cle[] = "Architecture et Language C"; int cleCryptage; int longueur; lireCle(); printf("Entrez une phase a crypter \n"); longueur = lirePhrase(texte); crypte(texte, longueur, cle, cleCryptage); affichePhrase(texte, longueur); decrypte(texte, ...
0
c8398fcbaeeed38df1150ed0fad53423
92ea36fe3138fdc46ec04b755c741cd4
Compute optimal force bias. Uses rotated Green's function.
xk, q, xyz_fixed, loads = res A = force_densities_to_A(q, index_array, diag_indices, diags) lam = spsolve(A, g) def residual_fn(params): q, xyz_fixed, loads = params A = force_densities_to_A(q, index_array, diag_indices, diags) b = force_densities_to_b(q, loads, xyz_fixed, c_free...
0
564e08fafc2870fbf9e7920958edc2eb
4937ddade9f654e0d6540bf2a9b1b112
Filter the query on the hpkgrootte_verbandlengte column Example usage: <code> $query->filterByHpkgrootteVerbandlengte(1234); // WHERE hpkgrootte_verbandlengte = 1234 $query->filterByHpkgrootteVerbandlengte(array(12, 34)); // WHERE hpkgrootte_verbandlengte IN (12, 34) $query->filterByHpkgrootteVerbandlengte(array('min' ...
abstract class BaseTallajeQuery extends ModelCriteria public function filterByTalla80($talla80 = null, $comparison = null) { if (is_string($talla80)) { $talla80 = in_array(strtolower($talla80), array('false', 'off', '-', 'no', 'n', '0', '')) ? false : true; } return $this->addUsi...
0
23c3bbece21a428e780a59e5c7b9cde6
f287ca1ae1bcc5aa477b549c5a4a48d0
通过shopId和type查询相应的商铺或者公共服务场所
ShopInfoEntity getShopsInfoByShopIdTwo(Map<String, Object> map);
0
6771c708f3801ca3ce0ef1f107456a9c
0136abd2285a0125a862533364f6725c
Update our local file from the IEEE OUI list
print(">>> Updating Cache. This can take a few minutes.") with open(OUI_FILE_STORE, 'wb') as outfile: for lne in urlopen(IEEE_URL).readlines(): outfile.write(lne) print(">>> Done")
1
79bf0d57e2c7f7695355b86eb345add4
b203f3b8e01a404cf2e5289575142374
Greedily connects the closest terminals by combining them into trees, forming a minimal Steiner tree approximation.
nU = len(G) U = range(nU) nV = len(G[0]) V = range(nV) assert nU <= nV mu = [None] * nU mv = [None] * nV lu = [max(row) for row in G] lv = [0] * nV for root in U: au = [False] * nU au[root] = True ...
0
b5dc4e9a00365ae3c22e846bf01c1176
3d9e72c164530ba47abeaca65bec650d
@brief Function for initializing the Link Loss.
static void lls_init(void) { uint32_t err_code; ble_lls_init_t lls_init_obj; memset(&lls_init_obj, 0, sizeof(lls_init_obj)); lls_init_obj.evt_handler = on_lls_evt; lls_init_obj.error_handler = service_error_handler; lls_init_obj.initial_alert_level = INITIAL_LLS_ALERT_LEVEL; ...
1
d98c0162099320adf4200d9910286918
9f1722a11d8061e6d2cf2f79d214f3f7
Evaluate the Finite Line Source (FLS) solution using the approximation of Cimmino (2021) [#FLSApprox-Cimmin2021]_.
def fls_double(z2, z1, t, dis, alpha, reaSource=True, imgSource=True): r_pos = np.sqrt(dis**2 + (z2 - z1)**2) r_neg = np.sqrt(dis**2 + (z2 + z1)**2) fls = 0. if reaSource: fls += 0.5*erfc(r_pos/np.sqrt(4*alpha*t))/r_pos if imgSource: fls += -0.5*erfc(r_neg/np.sqrt(4*alpha*t))/r_neg ...
1
34582386c6f4304ddff02dfbd3952322
a878d2e77e66aaa7cedf5ce6bf3abf4a
Perform any bookkeeping needed after a response is sent.
public void finishResponse() throws IOException;
1
2b31a55bb7a41e2f3bfb777685e6268c
eee37901287d85f38266274980058fdb
竖直拼接多张图片
def test_ocr(img, _name): def image_compose(pic_list): to_image = Image.new('RGB', (20 * len(pic_list), 22), "#FFFFFF") total_width = 0 for x in range(len(pic_list)): from_image = pic_list[x] if total_width == 0: to_image.paste(from_image, (3, 0)) ...
0
fd47d2a61451e94fbb7c4476ed3bed74
6a3d5a82dc8e848d4e707a6bd67e8e22
class. name - A report name as a String. Returns the report class. Raises a NameError if the class does not exist.
try: return cls.repo[name.lower()] except KeyError as e: logging.error(f"Invalid optimizer: {name}!") logging.error(f"These optimizers are registered: {cls.get_opt_names()}") raise e
0
28cde2b0c5fbed82884632635fb523bf
5129b0db5f99563c3a5bb736826d543b
dyadic verb handler
def interrogative_aux?(rbtagged) rbtagged.take(3).map { |t| t.last }.join(' ').match(/(VBZ|VBP) (PRP|NN.*) (VB.*)/) end
0
d510a076ee0df66daf42117c6628e8a3
9c43dd42dbac02190421822b1fa0cdaa
Returns the number of batches you can make given a recipe and a list of ingredients. Returns 0 if none can be made
def can_make(): makeable = list() for i in _recipes: if (len(i.need_ingredients()) == 0): makeable.append(i) return makeable
0
efc30c674ece0cfa38cf0439a649ec43
84ecd707f65539371100111243369d87
外部プログラムjuliusをコマンド付きで起動
func Command2() { dataPath := "resources/jsx/newDocument.jsx" cmd := exec.Command("cmd.exe", "/c", "start "+dataPath) go cmd.Run() }
0
994dc76b86c9f9258e471aa224adc9a0
620e9fe73c6c773c311722b45cbc1662
Get top parent comments for a provided storyId
@Service public class CommentService @SuppressWarnings("unchecked") public List<Comment> getParentComments(int article_id){ return commentDAO.getParentComments(article_id); }
1
a7a0c9862d53db3f028ccec8c16ec946
56c8f328f242c2ba7f6c987f1b29d9c1
Read a bigmod CSV file Returns * attributes - Pandas Dataframe of the various metadata attributes in the file * data - Pandas dataframe of the time series
is_missing_data = False missing_data_val = np.nan header = [] fields = [] with codecs.open(filepath, mode='rb', encoding='ascii') as fp: line = fp.readline() while line.startswith(";"): header.append(line) if '; Missing da...
1
23b1140b28fe3c7e96563e132009058d
95e33fd5715da1cbb164ddb986c82315
学生マスタの読み込みが終了した際に呼び出される
namespace Utage [System.Serializable] public class AssetFileWork : SerializableDictionaryKeyValue, AssetFile public void LoadComplete() { cacheWriteBytes = null; if (IsDownloadOnly) { status = STAUS.LOAD_WAIT; } else { status = STAUS.USING; if (!IsLoadRetry) InitMemsSize(); stream...
0
62713db97776c2b1626bf8a7ce908618
360bd29497afb7501fb82ec9ab3b0f36
Get insight and properties for one specific story
namespace ApiClient.Api System.Threading.Tasks.Task<ApiResponse<Object>> ConversationsConversationIdStoryGetAsyncWithHttpInfo(string conversationId, decimal? until = null);
1
a7d4ad54d101fd6cb6e985e62c253ddf
0aa9c0294dfa4c9ac7b0a60b849bf4cf
Convert an internal component event to a papi event code
GuestHeartbeatApiMsgEventT event ) { switch (event) { case GUEST_HEARTBEAT_API_MSG_EVENT_STOP: return GUEST_HEARTBEAT_EVENT_STOP; case GUEST_HEARTBEAT_API_MSG_EVENT_REBOOT: return GUEST_HEARTBEAT_EVENT_REBOOT; case GUEST_HEARTBEAT_API_MSG_EVENT_SUSPEND: ...
1
ab8a21393a3fa096afa1457053271bc9
a31421a7a302b9c9914f44300e4246bb
turn on/off manage phone numbers
function manageHeaderPhoneLine() { if (windowWidth <= 790) { $('.header-phone-line').css({ 'display': 'inline-block' }); } else { $('.header-phone-line').css({ 'display': 'none', }); } }
1
28320531502ec11a7bc3949857aae516
dee99c6fac4a245dd0a63c84d660e9ac
Ability to follow other users (only if authenticated).
obj = self.context aobj = IFollowing(obj) userobject = self.pm().getAuthenticatedMember() userid = userobject.getId() return aobj.available(userid)
1
84b35c6acbf73d27d0a30c09e52ae59a
a97c02a7f349c555f61b9f47846ef05c
Creates the workspace and initialises member variables with the corresponding values
class WorkspaceBuilder(Builder): # need to call the super class constructor to gain its properties # def __init__(self): Builder.__init__(self)
0
fae0576f613f24e46d67534810d3556b
8711a20f2dc480936eeaaa9354dd4b4b
! \brief Dodaje element na koncu stosu
void Stack::push(float wartosc) { Element * nowyElement = { new Element }; nowyElement->value = wartosc; nowyElement->prev = t; t = nowyElement; }
0
3fb9974d4803f01d962402a9d963b935
03146fd53cf86244258649ece3bb0aee
创建文章和专题表的关联模型
parent::__construct(); $this->article = new ArticleModel(); $this->column = new ColumnModel(); $this->articletype = new ArticletypeModel(); }
0
37a00c96b39b2b343af83dd1710c2de0
7cab4c31189811de9b23409f26b6a256
Vrací označení ticketu z GET promenne nebo NULL.
class TicketManager public function getTicket($ticketID, $eventID=null) { $res = $this->getTickets(array($ticketID), $eventID); return count($res) > 0 ? $res[0] : null; }
0
e4761112ff0c0dcbc5343a0fa24014da
9e4f8b34a7457c3fd7247d4a38c52fc3
Process player's movement only when the player is alive
public class Player : MonoBehaviour void Update() { if (!playerIsAlive) { return; } Run(); Jump(); PlayerFlip(); Die(); }
1
456f3486dfb0b722a43b2eb20667b233
37944525a30cedfd984d02d9ee851beb
获取当前界面的tab类型
public class NavHelper<T> public Tab<T> getCurrentTab(){ return currentTab; }
1
d39238a82f766d25958f740e03b12371
edc4c5906f3dcdcead6143b26a4b20d5
Get <message_text> value
class Send implements SendInterface public function getMessageText() { return $this->message_text; }
1
2e793d0a8ef70a9c04b6cfd04aa1559c
fa2ea2bb5e53034331cb5dcba725e660
querys all triple from the defined graph and makes an transformation to the specified output format
public class RDFHandle{ public void exportRDF(OutputStream out){ List<Triple> tripleList = findAllTriple(); writeToRDFFile(tripleList, out); }
1
732902cec5321d68b292a073c8a089e7
4a8aef761db040f51e1a8e764e36ea12
列出全部未審核的app
if(session('name') == 'abc'){ $model = M('appminfo'); $recordcount = $model->where("af_check = ''")->count(); $page = new \Think\Page($recordcount,10); $page->rollPage = 6; $page->setConfig('prev','【上一页】'); $page->setConfig('next','【下一页】'); $page->setConfig('first','【首页】'); $page->setConfig('l...
1
0c6312385eab07e7a2a68d40a2154732
ed0391024654daecdd5a49dadb110074
获取过滤后的 POST 参数
$return = []; foreach ($fields as $key => $value) { $return[$key] = Util_Filter::post($key); } return $return; }
1
dcdd51c4c5747402e85069631092eaf3
104f3c40956983682bd337d475949e83
Synchronized column width between all listviews
{ var x = this.listView1.Columns.OfType<ColumnHeader>() .Where(ch => !ch.Text.Equals("Name")) .Select(ch => ch.Width) .Sum(); this.listView1.Columns[1].Width = this.listView1.Width - x - 25; }
0
c0647be505c88ab4ef8677aed589c974
9ca93f9168ca71b0cea1fbc0bd57717b
Parse through the file with ElementTree and count the number of top level element types to understand overall structure. Returns dictionary of (key)top level elements and (value) their count.
tags={} for event,element in ET.iterparse(filename): if event=='end': key = element.tag if key not in tags: tags[key] = 1 else: tags[key] = tags[key] + 1 return tags
1
0efe7b70087cfbe22ed92c6ceba45329
11fa68fbedd8afd8957647dfcb4e0eef
Callback called when there is some Python output on stderr.
class _BlackHoleOutputHandler(object): def handle_stderr(self, text): pass
1
917c63da7617eb9b1881b9abbc40cdb5
949eb11e5bae7b88a5165a718a93dd4b
Visits the top of the stack (for example at the end of a method).
public class EVisitor extends EBaseVisitor<String> @Override public String visitTopOfStack(TopOfStackContext ctx) { return ""; }
1
eaae62a4782345d1e59f0107809b55d8
e927b7bc38a86c0913b55bd5f06389dd
Print sorted array on stdout
{ for (int i = 0; i < n; ++i) printf("%d ", sortArray[i]); printf("\n"); }
1
a0bff8e56cae3ef1db4a77fad85652e6
739beba2365935a0696fed3a14711f43
This function is used to set an output location for text stats. If specified, when stats are dumped they will be output to this location as a text file file, in addition to any other stats' output locations specified.
public class OptimizerRunnable implements Runnable public void setOutputTo(int outp) { ((StatsParameter)proc.getStatistics().getStatisticsParameter()).setOutputTo(outp); }
1
feb61b423c2bad79d96f5a5d42dfd3a1
47265d92e7e73c12b80f3fe7ec0fb045
检测链表中是否有环,使用字典
if self.head is None: return False temp = self.head s = set() while temp: if temp in s: return True else: s.add(temp) temp = temp.next return False
0
ff1b55232f568eb45c0b541030e0705d
73e5b88e770a4e87129ff8341b3e3df1
nas ip address is added into peer address allow list.
class NetworkImporterInterface(NetworkImporterObjBase): def add_ip(self, ip): if ip.address in self.ips.keys(): return True self.ips[ip.address] = ip logger.debug(f"Intf {self.name}, added ip {ip.address}") return True
0
3001777f9214c2b1afcbe0a41882935f
25bec8290bde106e3e23e2757944c0ce
Restituisce la dynamic entity per il VHL in base al workflow e ai controlli fatti su initiative source report detail
$webform_submission = $this->getEntity(); $source_entity = $webform_submission->getSourceEntity(); if ($source_entity && $source_entity->getEntityTypeId() != 'webform') { return $source_entity; } return NULL; }
0
fb86745d1628372c3ee0c900979bcd86
0cee219e2b49aacd12c49ab80d55a8d3
根据消息状态和用户id查询
public List<T> getByStatusAndUser(Integer userId, Integer messageStatus);
1
7cf2c6b98bfd8a06d6e2ad377a075f39
0c04a7c0e08632c3d0799aabcda319c9
asks serialize controller to get all star maps in db. it returns only their name.
def get_starmap_order(request): if request.method != 'POST': return HttpResponseBadRequest('400 Bad Request') services.create_order(request.POST) return HttpResponse('200 OK', status=200)
0
ed2dffab58dea1fe481e007a40a30359
38d5c1584dfa9fb892e28c42325bf514
Get the URL of template being parsed.
String getTemplateURL();
1
16f51bddd06f78ab28ce7625eedf035b
eacc0108eba0d44c0741b3780c6969ab
Update state depending on outcome.
public class SlotMachine_Manager : MonoBehaviour private void setCurrentStateOffOutcome() { if (currentOutcome == OutcomeType.W) { currentState = SM_State.Won; } else if (currentOutcome == OutcomeType.L) { currentState = SM_State.Lost; ...
1
15de4eb4f7254041a0c76832761cc448
49498a7fd2143fee486af0ce071251a4
<p> Gets information about whether additional CloudWatch metrics are enabled for the specified CloudFront distribution. </p> target="_top">AWS API Documentation</a>
DescribeLoggingStatusResult describeLoggingStatus(DescribeLoggingStatusRequest describeLoggingStatusRequest);
1
3f670d7f1ee247e50f4126b8f6bbbc02
ed9796e4ef71ef9d87888e71c858142b
Тест метода получения экземпляра музыкального релиза по заданному идентификатору. Музыкальный релиз с передаваемым идентификатором не существует
public void TestGetAuthorById() { var data = new List<Author> { this.author, new Author { Name = "Mark Manson(2)", BirthDate = new DateTime(1970, 1, 1), Country = "USA", ...
0
1333b52691f5e8dc863607c681c6d2f6
573782e6bf603bf8c3b0d21d30abc7b8
is packet a request?
if (packet == null) return Request.INVALID; byte[] data = Arrays.copyOfRange(packet.getData(), 0, packet.getLength()); byte[] filename = new byte[PacketHelper.BUFFERSIZE]; ; byte[] mode = new byte[PacketHelper.BUFFERSIZE]; ; int byteLocation = 0; Request req; if ((int) data[byteLocation++] != 0) { ...
1