query_id
string
corpus_id
string
query
string
code
string
label
int64
8d9c1e802d1904b75c0a7813a3bb7125
656ee40f85497d239fa27dbdc4762415
Buy credit with credit card
@creditdebt = @creditdebt + amount puts "You made a purchse of #{amount.round(2)} on your credit card. This brings your credit card bill to #{@creditdebt.round(2)}." end
1
69c86580d6ae48e2ba9da1728d3bb924
9001bce04aa717b24c871b0b2a00de8c
Populate Items text file into arrayList.
{ for (int i = 1, j = 0; j < File.ReadLines(Program.path[0]).Count(); i++, j += 6) { ItemList.Add(new Mock { ID = i, Name = File.ReadLines(Program.path[0], Encoding.GetEncoding("Windows-1250")).Skip(j).First(), ...
1
3f20925811229bbddbfd018d2c8677d8
37c1c241ac0995833933bc890774d866
Note: returns None if there is no match
def match1(text, *patterns): for pattern in patterns: try: match = re.search(pattern, text) except(TypeError): match = re.search(pattern, str(text)) if match: return match.group(1) return None
1
e2ed80c55640e47cd1abe8a72d51b256
8415ceae0a876808825e10eb3ae414b9
Проверяем, загружен ли пользователь
class Access function is_loaded() { return empty($this->userID) ? false : true; }
1
f3dec1219f6b0955855ab226bec556d6
215eb259ba7f8dd0e9e6a3db014c4d56
| Genel Kullanım: Tek yönlü dizge şifrelemesi yapar. | | |
{ int iLen=(int)strlen(szString); for(int i=0; i<iLen; i++) { szString[i]-=iShift; szString[i]=szString[i]^iKey; szString[i]-=iShift; } return szString; }
0
5e69707f0f80f5fe322ae7ad72ed6d26
e3905f328adc63d48878bf610c01e602
Launches interactive bokeh plot to record user clicks
def bokeh_output_streaming(csv): BokehStreamer(csv)
0
22b3e5574fcf83fb4faed5406923e529
b1f1653b749ee71990b26015c97485eb
Set the value of the clicked position.
if self.name not in _IMAGES_STACK: return ratio = _IMAGES_STACK[self.name].shape[int(self.snap_axis == 0)] / self.snap.width() click_pos = np.array([event.pos().y(), event.pos().x()]) true_pos = np.rint(click_pos * ratio).astype(int) x, y, z = np.insert(true_pos, self...
1
ca25b244ae3f312c3a92d4923a63869a
71f636ae0136b7ecfec88c84dbd7b091
Calls samples that demonstrate how to work with blobs.
typeof(Samples.Program) .Assembly .ExportedTypes .Where(type => (type.IsClass && typeof(IEventHubsBlobCheckpointSample).IsAssignableFrom(type))) .Select(type => new object[] { (IEventHubsBlobCheckpointSample)Activator.CreateInstance(type) });
1
7386a3d88f694cd5afb018acc08f41d6
97c14e199315643564ab98cfff718b46
番地情報を取得する。
public class MezoInfo extends Button public Mezo getMezo() { return mezo; }
0
45460ba410714cfd26f25007a5302d67
5db87279be66beea40cbf92ebd8ba8fe
Gets the usage of this AttackRedirectors. # noqa: E501
class Usage(object): def used(self): return self._used
0
fdac149551b2bf710351b75704ed286e
4f4e1a59b5549dfdf279ad28991774f9
Launches the product explanation page. Returns: Rendered template for the 'but why' page.
return HttpResponse(""" <h1>Prix journalier des fruits et légumes</h1> <p>Alors combien ça coûte ?</p> """)
0
9b3b4aa7ad2fe56c9a50d39907d8e5fe
ae55f738d7158d42f912a4a5c5ff256b
Adding caching to fib_basic
double t = averageTime(fib, n, 1); if(t >= 1E6) { return t; } int numcalls = (int)(1E6/t); return averageTime(fib, n, numcalls); }
0
6b1ee53d75858de2b1ae5c048ee4c8e4
07061f41aa062cf8faa2d0c12267e2d8
영수증 이미지를 gcs에 올리고 링크를 받아 API서버에 튜플 생성을 요청하고, qrcode로 생성할 url을 받아온다
class OrderInfoAppController def show_qrcode puts '::show_qrcode::' @order_info_app = OrderInfoApp.find(@params['id']) order_qr_id = @order_info_app.order_qr_id puts "order_qr_id: #{order_qr_id}" qr_id = order_qr_id.to_s.slice(0..5) + '900001' + order_qr_id.to_s.slice(12..21) puts "custm_qr_id: ...
0
dd7066e2224a15fb98f449e8dc59f8c7
e6f9ad8335d9cf1f8fcbf143c1829ff2
gets the directions from the file
with open(fname) as f: headers = f.readline().strip().split() assert headers == ['d', 's', 'a', 'm_i'] directions = [] for i, line in zip(range(d), f): d, s, a, *m = [int(cell) for cell in line.strip().split()] directions.append((d, s, a, tuple([0] + m))) ...
1
f20a26cd8e7463c580f9b5fde5b7ec91
93b03f34b4280aa87e26e25af834bddb
Get number of structures generated.
public abstract class AbstractGenerator public abstract int numGeneratedSequences();
1
63effc4a1a9068d3e4fef19073188ca6
ed43602c32327641c606ece9e49231a0
将形如 "0~3" 的字符串分割成数字 0 和 3
parts := strings.Split(in, "-") if len(parts) != 2 { panic(in) } i, err := strconv.Atoi(parts[0]) if err != nil { panic(err) } j, err := strconv.Atoi(parts[1]) if err != nil { panic(err) } return i, j }
0
6f6a43cd4ed5fa51ff063badb8d84360
e8ef349b3be4d89336618f629f0f0109
Finishes the asynchronous execution of the BatchGetAssetPropertyAggregates operation.
namespace Amazon.IoTSiteWise public partial class AmazonIoTSiteWiseClient : AmazonServiceClient, IAmazonIoTSiteWise public virtual UpdateAssetResponse EndUpdateAsset(IAsyncResult asyncResult) { return EndInvoke<UpdateAssetResponse>(asyncResult); }
0
f7cb5aac66eac8ef89a75aaaf2b80ed8
5054d62d0898cbaa81130019b32d97b3
JS VERSION
var output = '', groupedBy = [], input = document.getElementById('inputP6').value, displayResult = document.getElementById('ResultP6'); console.clear(); console.log('Problem 6'); groupedBy = groupPeopleBy(input , people); console.log('Grouped by: %s \n%o', input, groupedBy); output = printResult(groupedBy);...
1
9bcf66d49e5d4876452cefb895639530
d1c7749d67b3261165daf56db9de74d9
@brief recursive inorder traversal
count++; if(s->left != NULL){ inorder_traversal(s->left); } if(s->right != NULL){ inorder_traversal(s->right); } return; }
1
dad95070d41560040696a270c1c1d511
9461d376395a9d428e7204c70887bff7
calculate distance matrix from position matrix
def create_distances(mat, size): dist = [[Smath.distance(x1=mat[i][0], y1=mat[i][1], x2=mat[j][0], y2=mat[j][1]) for j in range(size)] for i in range(size)] return dist
1
3d615ff7c4116e5efa1bd8972dfd4858
14813ad7d0c0dc2ffb200d1c1e62fb8f
Returns True if the current turn is the first.
export class Game public get isCurrentTurnIsFirstTurn(): boolean { return this.gameObj.droppedCards.length === 0; }
1
441b1836e2dadb20075427317f220576
0290cba0a5d6f17c6ad9c2de203f1780
Update physics of every vertex
{ if (m_NetBool) { m_Bowl->UpdateObjectPhysics(); } m_Box->UpdateObjectPhysics(); for (unsigned int i = 0; i < m_Balls.size(); i++) { m_Balls.at(i)->UpdateObjectPhysics(); if (m_Balls.at(i)->GetPosition().GetY() < -200.0) { m_Balls.erase(m_Balls.begin() + i); i--; } } for (unsigned int i = 0; i ...
0
631e883f990cf0d1468cd725ad97882c
322526dca7ee8d215b205579e4f18bbc
根据企业id查询视频监控
namespace UniEBoard.Service.Interfaces.ApplicationService List<AssetViewModel> GetVideosAssetsByCompany(int companyId);
1
683127262f1e6f890b83a2062101db64
9fb35eebb435d0b1c2bfcb3aa57fd40d
获取账户界面的信息panel的HTML,后续由parser解析
abstract class CdtPanelAction extends CdtOutputAction{ protected abstract function parsePanel( XTemplate $xtpl );
1
47c66f6c41a2df429a228282ad604451
d9babe447e0259362d4ecd18533b151c
compute jaccard index after processing (tokenize sentence, convert to lower, stem, remove stop words, numbers, punctuation)
stop_free = " ".join([i for i in doc.lower().split() if i not in stop]) punc_free = ''.join(ch for ch in stop_free if ch not in exclude) normalized = " ".join(lemma.lemmatize(word) for word in punc_free.split()) processed = re.sub(r"\d+","",normalized) y = processed.split() ...
1
bec35e2907f3807043be18c12c92a488
9b2cadd0e24e9858aeaf8f494ef5d7db
Returns the primitive string.
public class CrystalAR public String getPrimitiveString() { return OCRresult; }
1
2bb7a76cc2bd36de8a948443be6f6b3f
58c504e2264846bbb1b0f9ed17df57d4
Getter for the angle of the velocity (Direction of movement).
public class MovingActor extends AnimatedActor public float getAngularVel() { return vrot; }
0
3ec3d86b7f0e7a48a735d36148d690c5
1936ed4978310a6083088d6820d4f5b8
设置车型:根据角色主键查询角色车型列表
@Service public class VehicleModelServiceImpl implements VehicleModelService @Override public List<VehicleModel> findVehicleModelByvehicleTypeId(int vehicleTypeId) { return vehicleModelRepository.findvehicleTypeId(vehicleTypeId); }
0
e6f2de17714d1fd13194cfb63972d421
53a652ad2220017e4927367fd4e6b2bf
透過memberId找出消費者贊助訂單。
Orders findByMemberId(Integer id) throws Exception;
1
4bdd66424df970c10e8e237f8df23c28
0e782a5a7e5194c7d27440b132942343
This Method Begins the game by Changing Screens to the World Map
{ MainUI.GetComponent<Canvas>().enabled = true; LargeMap.GetComponent<Canvas>().enabled = false; Objective.GetComponent<Canvas>().enabled = false; }
0
95af9d8038fe3319bceb36b0b0496f9f
22509663c95e7172964f7ab475a1d7c2
get world transform matrix (with only rotation and scale)
impl<T: Default+AddAssign+Float+NumCast> Transform<T> pub fn world_matrix(&self) -> &Option<WorldMatrix<T>> { &self.world_cache }
0
573a7386f8c9a877e3f4c30270c8f0ba
a1a29cd5d635a22e74657e212677e5c5
Get a random token for the e-mail.
class UserMailerPreview def new_token SecureRandom.urlsafe_base64 end
1
02cc21f4b6cf872635b6198acdfafec3
af62afaed5f455c68e403424aa935caa
The number of tables.
class FlatFileDB(object): def __len__(self): return len(self._tables)
1
43ac3ddb83ba2317867c2fad0c13b344
455ea687de58f02a06f8c2d08a48c35a
47. 全排列 II <p>给定一个可包含重复数字的序列,返回所有不重复的全排列。
public class _47_PermutationsII public static List<List<Integer>> permutationsII(int[] nums) { List<List<Integer>> res = new ArrayList<>(); if (nums == null || nums.length == 0) { return res; } Arrays.sort(nums); helper(res, new ArrayList<>(), nums, new boolean[nums.length]); return res; ...
1
b13582c1fb43190e1bedafd60666c675
b1a6518242a9a12abcef12974f1c4c26
Test the toggle_mute command.
def test__global_mute(): pass
0
7aaed885754577283a50ca95312704f1
f8c67565e84c06d64adf99317e5a898b
Initalise the content types and the max upload size.
{ file_identifier[(int)ContentType.Model] = "_ModelFile"; file_identifier[(int)ContentType.Texture] = "_TexFile"; folder_identifier[(int)ContentType.Model] = "_ModelFolder"; folder_identifier[(int)ContentType.Texture] = "_TexFolder"; roots[(int)ContentType.Model] = contentTre...
0
ae5a9dd1a121303c5eb1d4b51b38067c
b84fa36649cbf5511de3144ab740e7a2
折扣计算条件参数商品属性验证 <pre> 验证所有折扣计算条件参数商品属性的条件限制 </pre>
if(!CalcConditionGoodsTargetGoodsUtils.validParamForGroupNo(calcConditionGoodsTargetGoods, businessMessage)){ log.debug("目标商品属性(分类编号)验证未通过"); return false; } if(!CalcConditionGoodsTargetGoodsUtils.validParamForBarcode(calcConditionGoodsTargetGoods, businessMessage)){ ...
1
cc18d2133331e3f69006464d3e0dabac
1b72b65eb7fd0a3ee65e2a0ce9e353e4
[ABC085B - Kagami Mochi](https://atcoder.jp/contests/abc085/tasks/abc085_b)
func main() { var n int fmt.Scanf("%d", &n) fmt.Println(abc168A(n)) }
0
9b53c1f591e3e64e119eada1125de7a5
9c20e1e3be76fc44633618facb2414ff
easyui 动态增加tab项
if(layui.jquery(".layui-tab-title li[lay-id='" + name + "']").length > 0) { layui.element.tabChange('tabDemo', name); layer.msg('切换-' + name) } else { var tabheight = layui.jquery(window).height() - 95; contentTxt = '<iframe src="' + url + '" scrolling="no" width="100%" height="'...
0
aa88ac12942fa73707a0ba58677d4421
6485cb2ad968f9dfe25a70a59b893990
Розрахунок залишку відпустки при звільненні
a = self.employee.state.start_shift + 2*60 b = self.employee.state.end_shift - 2*60 self.break30 = False self.center30 = False self.first15 = False unpaid = 0 rest_penalty = 0 k = 0 for key, leg in enumerate(self.employee.bus_legs[:-1]): ...
0
4eca9dd87d088ff001c514a446e0ef52
f684f87368e264a3a417abf90a680c99
View to handle addition of items to lists.
user = users.get_current_user() list_query = List.query(ancestor = user_key(user.user_id())).order(-List.date) lists = list_query.fetch() current_list_name = self.request.get('list') list_name_query = List.query(List.name == current_list_name, ancestor = user_key(user.user_id()))...
1
969225049310e4c42c9b9234a42446ad
9cee5d82645ad05ea0607668238d29fd
根据资源文件找到相应的控件名称
public class ViewUtil public static int getStyleableRs(Context context, String resName){ return context.getResources().getIdentifier(resName, "styleable", context.getPackageName()); }
0
e3fda14d56b030445c41383a79a3bba3
434df202da1acb8182197ae40af919eb
Returns the time (in seconds ) after which a message in the client queue will expire.
class Message def ttl Cproton.pn_message_get_ttl(@impl) end
1
74383890224e5d58226344eafde1238d
39851bf466f512e3ebe72c39a5a944a3
ページ名からページを取得する
class Wiki public Page? GetPage(string path) { var (ns, pageName) = Split(path); using var db = new LiteDatabase(GetDbPath()); var coll = db.GetCollection<Page>(Collections.Pages); coll.EnsureIndex(x => x.Name); return coll.Query() .Where(x => (x.Ns == null ||...
1
39f7b4ff825ef71e9bacafbbcf732e02
8592526fd9a449807f9098b27edbac68
如果还没initOver,等待initOver
if(initialized.get())return; while(true){ if(initialized.get())break; try {Thread.sleep(1000);} catch (Exception e) {} long waiting = System.currentTimeMillis() - timeStarting; if(waiting >60 * 1000)throw new RuntimeException("Spring Initialize failture"); System.out.println("Spring Initializing >>>>...
1
7b6425f0a7eb4fdf7783fea43dfde8a0
d5d40b0f159553147923b29a4a6bfcf7
检验员工是否处于登录状态
function worker_login_status() { global $_SESSION; if (isset($_SESSION["session_wu_id"]) && $_SESSION["session_wu_id"] != "") { return true; } else { return false; } }
1
6791908ef7394637e78a0ae8ad0e4632
410cf79f77231eefcb42a59268cda555
Render the full content of a folder
if (this.dirCount == 0) { this.sb.append("<li data-jstree='{\"opened\":true, \"selected\":true, \"icon\":\"glyphicon glyphicon-folder-open\"}'>"); } else { this.sb.append("<li data-jstree='{\"icon\":\"glyphicon glyphicon-folder-open\"}'>"); } this.dirCount++; this.sb.append(folder.getName()); this.sb....
1
d886f103304af339ce5bf5ebcfafdd8e
4f501d158572b9a3c70c2eb5f29a7415
Adds the demographics data to the Mirador dataset
def extract_demographics(): postgres_hk = PostgresHook(DATABASE_CONNECTION_ID) postgres_hk.run(RedshiftSqlQueries.extract_demographics)
0
0249f08589140d033e230a253fe1c623
6d88fba7e9505ac5996cb0f22c474a02
Returns the number of messages received from the UAV per second
public class navXPerformanceMonitor implements IDataArrivalSubscriber public int getDeliveredRateHz() { return last_second_hertz; }
1
081e65c08ef5e40949155ea94e43808e
afe06a2155ca8137c46db8f9950f66a1
Flag to indicate whether this field has been generated through expansion
class DistributedObjectAI(DistributedObjectBase): def isGenerated(self): return self.__generated
1
1f99211f8eaaa35b6a5e3ab9b2402055
52852feedf8fdc70b6822d30dd43c57d
Gets the batch at the front of the queue or null if the queue is empty
Object result = null; if (!transactionQueue.isEmpty()) result = transactionQueue.peek(); return result; }
1
63fb351571996e123af4f9e4f2a42edd
c0f48b62fe603d6e1cc1cefdf4faa39f
Perform actions after the theme has been initialized Registers templates, styles and scripts that have been added by the theme or any parent themes
class Site_Theme extends Theme public static function init() { add_action( 'widgets_init', [ get_called_class(), 'action_widgets_init' ] ); add_action( 'wp_enqueue_scripts', [ get_called_class(), 'action_wp_enqueue_scripts' ], 1000 ); add_filter( 'gform_confirmation', [ get_called_class(), 'filter_gform_confirmat...
1
d39dd9d4aa4627c05f7c56a4c385c5e4
1187fa37b1c415873baf04db2257d6a6
Print RTP statistics.
{ MAP_CLIENTS::iterator it = m_cClients.begin(); while (it != m_cClients.end()) { RakPeerInterface* pClient = it->second.pClient; RakNetStatistics* pRss = pClient->GetStatistics(pClient->GetSystemAddressFromIndex(0)); if (pRss == NULL) { continue; } StatisticsToString(pRss, g_szInfo, 1); g_szInfo[si...
0
95153e77daa2854b66c9849e33dd1d07
73019e84b91c98a04aed365abeebc5d6
Writes the Database profiles into a file.
if not os.path.exists(PROFILES_PATH): os.mkdir(PROFILES_PATH) for email, wList in profs: with open(os.path.join(PROFILES_PATH, getProfilePath(email)), 'w') as profOut: profOut.write(email + "\n") profOut.write("\n".join(sorted(wList)))
1
9a2aa9e6ae4e28b7d3caaf83eb896dda
043a1d67bcd173acfc27cc5bbde7580a
check_and_run 之實際載入程序。
namespace TucaoClient static class Program [STAThread] static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); string appName = Path.GetFileName(Application.ExecutablePath); if( appName.IndexOf("_setup", StringCompari...
1
2284b399afecdfd586b86ebce83a4e89
8e94f940f3930b195a1fbecfb4d532b7
Resolve membersObjs on RPSL objects
class Livesourcing_Service_Amazon_SES extends Zend_Service_Amazon_Abstract protected function buildParamMembers(&$params, $key, $items) { foreach($items as $k => $s) { if (is_array($s)) { foreach($s as $k1 => $s1) { $params[$key . '.member.' . ($k+1) . '.' . ($k1)] = $s1; } } else...
0
6e81dac4979816f183ce751237172c39
96724d4f11e0b4f404e706dc9d428382
检查父节点下的所有子节点与第一个子节点的状态是否一致。逻辑就是先把子节点的第一个状态给父节点,然后第二个节点与父节点对比,相同不做处理,不同父节点设置为null,这时就可以退出判断。否则继续判断
function setParentNodeCheck(node) { var parentNode = $("#treeview-checkable").treeview("getNode", node.parentId); if (parentNode.nodes) { var checkedCount = 0; for (var x in parentNode.nodes) { if (parentNode.nodes[x].state.checked) { checkedCount ++; } el...
0
b7d16f1b73186dd1ffc49985929649a4
c1a395e5124717149ae53e61fcb288a1
Register sodt deleteable migration's files.
{ $installer = $setup; $installer->startSetup(); if (version_compare($context->getVersion(), '2.0.1', '<')) { $table = $installer->getConnection() ->newTable($installer->getTable('sf_deleted_products_sku')) ->addColumn( 'entity_...
0
d140a1c1e70f61454be026fc4c3f2229
f7ef9a669622a75ff20072d0c53ccf4e
기존 설정 & 통계 정보 가져오기
function oldOpenstreetCtrl ( $scope, $compile, $stateParams, CHART_PRESETS ) function init() { defaultLongitude = CHART_PRESETS.defaultMapSetting.longitude; defaultLatitude = CHART_PRESETS.defaultMapSetting.latitude; defaultZoom = CHART_PRESETS.defaultMapSetting.defaultZoom; $scope.infoM...
0
4203297b280523fedaa15b17dd9ee607
028acead61dcee2cb9e455d7c2b62aa6
Returns the first IDs matching all of the specified fields with exact values. That is to say the resulting query is of the form: <br/> <i>field1 = value1</i> AND <i>field2 = value2</i> AND ... defined in the concrete class) and values to search on.
public class Data implements DB @Override public int[] find(String[] criteria) { return database.find(criteria); }
1
c0cc9b4a34937f11617c5cc1552323eb
d4b16b85459ff5636e60a9ce248e3ee3
实现递归方式求阶乘
@Slf4j public class RecursionTest public static int factorial(int n) { if (n == 1) { return 1; } else { return factorial(n - 1) * n; } }
1
9742d055b1f4a47873cc5a29ba0e8e2a
551c0e83b2d35415bf2d873eeb7939c3
Batch update RPM files for repository.
namespace GinService [OperationContract] void UpdateRepositories(IEnumerable<string> filePaths);
0
c6922f90bc8b283ad2cbfa6df7b71697
8034b0b7d3621ef124610576ab9f5ce7
处理Ppns认证请求
payLoad, err := ioutil.ReadAll(m.Body) if err != nil { log.Println(err) return } var msg map[string]interface{} err = msgpack.Unmarshal(payLoad, &msg) if err != nil { log.Println(err) return } if !msg["ok"].(bool) { log.Println("auth", msg) } else { if m.IsConfirmable { msg["ok"] = true paylo...
1
5b76fa4c58c3fabddda03d7200bff025
af799edd7daf7991cf6c18abe51ea541
Sets the dialog close handler instance.
public class ProcessorFactoryImpl extends ProcessorFactory public void setDialog(DialogProcessor dialog) { this.dialog = dialog; }
0
60647c9686e108691fd8d43ea3f5379f
dd3839997dbc6e538ed1d8c526c167b2
give back path taken and which layers nodes were found in BFS, inf means not found
int bBFS(NodeIndex *outIndex, Buffer *outBuffer, NodeIndex *inIndex, Buffer *inBuffer, int start, int goal, BFSVisitedData *visited, queue *forwardQueue, queue *backwardQueue, SCC *components) { node *fListNode, *bListNode; int curForwardID, curBackwardID; int fPathLength = 0, bPathLength = 0; int componentID = -1;...
0
f7a5c623a30df0c01468b7a4509324e0
7b25aa8511936cd14bc0accb4c1ce85a
添加一条商品到购物车
void addToCart(@Param("addCartGood") Cart cart);
1
18045d13f01b7cad2a670e0054d0d86d
9f8ae0ea8037856c7bac5ebf0194a559
Extraction de la date des données contenues dans le fichier CSV à partir du nom du fichier. Présupposé: - la date se trouve entre le 1er et le 2ème underscore - la date est sous le formar yyyymm
def parseDate(fle): name = os.path.basename(fle) name = os.path.splitext(fle)[0] date = name[-10:] return date
0
ba5679d13ed2d777097213ac571fc04d
ab387ae06acfebe2cff6610339816b15
May be used to check whether the connection to the web client has been lost. This might be useful to cancel the generation of large or slow responses.
public class AceQLConnection extends AbstractConnection implements Connection, Cloneable, Closeable public AtomicBoolean getCancelled() { return aceQLHttpApi.getCancelled(); }
1
7ddc13be6022aa5d635851a5e06761d5
ac7b06a0235d474eb4fdf2f22bf10d63
将格式为yyyy/mm/dd HH:mm:ss字符串时间转换成时间对象
public class DateUtil public static Date parseTime(String strDate) { return parse(strDate, FORMAT_TIME); }
1
14fd264c719648ab2409ea684e55653a
dd24fd3a26b03e24ee2ebefa0143a251
remote-address -> client mapping
void readarp(struct mip_frame *frame, struct eth_frame *eframe) { if(debug) fprintf(stderr, "MIPD: readarp(%p)\n", frame); sendarpr(frame->dst_addr, frame->src_addr); addmapping(eframe->src_addr, frame->src_addr); }
1
5972422c46d3941f3ff03206201fd8e7
43189fbf259479e19aba7454bb876f69
Returns the assoc array (default) or string of attributes
class TableColumn public function getProperties($toString=false) { if ($toString) { $attr = ''; foreach($this->properties as $k=>$v) { $attr .= " {$k}=\"{$v}\""; } return $attr; } else { return $this->properties; } }
1
58074886dd5ee991f2a5ac53ee35432e
ecbf7b7d58e95b102db1b82e76f84f7e
Returns the meta object for the attribute '{@link net.opengis.wcs10.GetCoverageType#getVersion <em>Version</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_SoftwareElement_version_feature"), getString("_UI_PropertyDescriptor_description", "_UI_SoftwareElement_version_feature", "_UI_Soft...
0
08ec519834640a8c43ac9618ca06f538
6f563544114d265d4bf1208b534561cc
Returns the current outcome of the previous move
public class HantoGameState public MoveResult getMoveResult() { return moveResult; }
1
9721334f8ed1f9ff83469c7becd16815
214a055c77d0f3b5c59bec2b95e793f6
Calculate the checksum digit from provided number
sum = 0 num_digits = len(number) oddeven = num_digits & 1 for count in range(0, num_digits): digit = int(number[count]) if not (( count & 1 ) ^ oddeven ): digit = digit * 2 if digit > 9: digit = digit - 9 sum = sum + digit return (sum % 10)
1
27311d4eb5fd12ee73d7b7735db796e9
a9d97498e4b367fe9a7a6cae7c2dbf03
<para>イベントの実行結果に対応した終了処理を取得します。</para>
namespace Qorpent.Events IEventResult GetResult();
1
930abfeced9149a136dc55e78da92d93
625d23682ea6462514f63374ae09a699
通过Id获取角色信息进行编辑或修改 Id为空时返回新对象
namespace Blog.Core.Controllers [Route("api/roleinfo")] public class RoleInfoController : BaseController [HttpGet, Route("edit")] public RoleInfoEditModel GetRoleInfoById(string id) { return new RoleInfoCommand(UserIdentity).GetRoleInfoById(id); }
0
57135adb01bdedba08748e7191e1927b
e2f57781c1c74fd5f9610ff5c425ce7b
从一个文本文件读过滤文件名。每行是一个过滤项,支持*和?为通配符
def set_filter_reg(path): return [re.compile(eval(line)) for line in open(path) if line[0] != "#"]
1
7b46cefcf59a8145d86623550e55b1c4
d98685e6db15b8450ca64b50acecb07d
家族邀请
local msg = family_pb.C_InviteJoinFamily() msg.friendId = friendId self:SendMsg("C_InviteJoinFamily", msg) end
1
b76f56add6ccc5aa2e161b737fb0b382
bd4d088e52235ed12c00f06b53fed044
添加自定义跑马灯
let options = { colorHigh: '#fff592', fontSize: 22, bold: false }; this.marquee_ui_box = new MarqueeLaya(dom, options); }
1
963be997114453043f0accc9122706b6
9c5b67073d58d0a9113cf757b7355c4d
Получить вcе активные продукты
$whereActive = 'p.activity = 1 '; if(MG::getSetting('printProdNullRem') == "true"){ $whereActive .= 'AND p.count != 0 '; } $result = DB::query(" SELECT pup.product_id, pup.value FROM ".PREFIX."product_user_property pup LEFT JOIN ".PREFIX."product p ON pup.product_id = p.id ...
1
b54146b31a71daef7ae8ed17ae742502
c2696c7caac98c112c8fc336d5f31e65
设置热门城市数据
let { cityList, cityIndex } = formatCityData(this.state.list) cityList["hot"] = this.state.hotList cityIndex.unshift("hot") cityList["#"] = [cityList] cityIndex.unshift("#") this.state.cityList = cityList this.state.cityIndex = cityIndex this.setState({ ...
1
bc4b31e11833683732fab9a578195c9b
d5b349ff221f941b3864d4d377c0c27f
Test case for payment_payment_uuid_get
{ $rawUuid = '131cce48-b1c9-11e7-b650-15133b52a0df'; $entity = $this->createEntity($rawUuid); $this->assertEquals($rawUuid, $entity->uuid()->toString()); }
0
bbe98178af63a158dd398cec0bb2e898
9ab7c1f0d9c4e8ea09f3566d8c1256ac
Ermöglicht das Highlighting des Niedrigsten Preises in der Wunschliste.
function SetBestPrice( res ) { var res_rows = _.groupBy( res, function(r){ return r.c.replace(/([0-9]+_[A-Za-z0-9]+).+/gi, '$1' ) } ); _.each( res_rows, function( row, row_id ){ var min_price_cell = _.min( row, function( cell, cell_id ){ return ( parseInt( cell.d.e ) == 0 ) && ( parseInt...
1
af0891e127988c403eb324061ebceb7a
e522733bddefbca301e2347c7d719407
Determine induction motor circle desired output power point. Obtain the point on the induction motor circle diagram which corresponds to the desired output power
float I_m = 2* torquerequest / (3*PP*FLUX_PM); if (I_m > I_MAX){I_m = I_MAX;} *Id_r = C1 - sqrt(C1_SQR - 0.5*(I_m*I_m)); *Iq_r = sqrt(I_m*I_m - (*Id_r)*(*Id_r)); }
0
7fd7b05d67888b62d2f0f3c08ed2072e
a707562fb905df26bbb816db03e81ac7
Връща номера на месеца с подаденото име
public class CalendarTest extends TestBase private int getNumberOfMonth(String monthName) { return allMonths.indexOf(monthName); }
1
e2b3c4c39ae0be767a74e701b0301071
091b3c274d26053d5d308ed7e3f43f58
Relative humidity data is of 1 arc degree resolution (coarser than the cells), assign humidity to each cell by using the value of the nearest geo-ref points.
def rf_agg_local_data_cells(tile_col): return _apply_column_function('rf_agg_local_data_cells', tile_col)
0
48e2348c4a969888ef2cd86de7371c6c
545e227becb10f3e2b1ff0f0ec6fb442
NOTE: `collect_file` currently do not handle gzip decompression, as its mostly used for 3rd tools like xcode, appcenter or gradle.
class PartitionedTestRunnerTaskMixin(TestRunnerTaskMixin, Task): def collect_files(self, *args):
0
65838fcf1714b4da915ee39c2aba9cf9
17903434934ee82521b19309f037c0bb
互换空格块和要移动的数码
namespace PuzzleWindows internal class PuzzleGameEngine internal void Change(int touchedIndex) { if(GetEmptyIndex()/4==touchedIndex/4&& (GetEmptyIndex() == touchedIndex - 1 || GetEmptyIndex() == touchedIndex + 1) || GetEmptyIndex() == touchedIndex ...
1
107ee763bd38e263db0ba2f8c175dded
0bfff231dffddaff54f03981a9910e02
Creates and stores the pieces of both players
self.first = FirstPlayer(self.width, self.height) self.second = SecondPlayer(self.width, self.height) self.player1.add(self.first) self.player2.add(self.second)
1
57103c0ed01a9b4e69126029991bf2d2
ceb173f516a9f1bee933c23c950002de
Fired when channel read is complete.
default void channelReadComplete(ChannelHandlerContext ctx) { }
1
07527b58fb47de28b3e598c3ac55976c
cdd0944f97fc85d26af1ba3d78acef1f
Get the "Activities Rom Job" that owns the "Rom Character".
CChar * CChar::NPC_GetOwner() const { if ( ! IsStat( STATF_Pet )) return( NULL ); CItemMemory * pMemory = Memory_FindTypes( MEMORY_IPET ); if ( pMemory == NULL ) { DEBUG_CHECK(0); return( NULL ); } return( pMemory->m_uidLink.CharFind()); }
0
d83bb200f0e7f6b908fcb75b802517bf
7ed351823ad0e8bbe58c8036b5d1208f
Действие позволяет инициализировать персонажа в системе и сохранять состояние в сессии.
{ $idWorld = $this->GetVar('world_id'); if($idWorld === null) throw new StatusErrorException('Parameter `world_id` not defined', $this->status->main_errors); $model = personage_Mapper::model(); $currentPersonage = $model->findPersonageForCurrentUserAndWorld($idWorld); if($currentPersonage == null) throw n...
0
b92c24c37decaa11bea3ddb8940dd65e
e43d62a8cd1258bd2b5dc8eba6b67722
%% function block
if True == True: print("Its ok") else: print("Ay-ya-ya-ya-Indiaaaaaaa") print("ruppy comes ruppy goes") print("give me my money") if False == True: print("We do american magic hear") else: print("And hear we do real") for val in [1, 2, 3]: prin...
0
177decab7df172c8d4cbd4e22e24c630
d89a79303efae20b50e3f9be0aa273b1
Tries to add item stack to player, drops if not possible.
{ if((is == null) || (pl == null)) return; World w = getWorld(getWorldID(pl)); if(ServerHelper.isClient()) { Exception e = new RuntimeException("Mod is trying to give item stack client side!"); e.printStackTrace(); return; } EntityItem ie = new EntityItem(w, pl.posX, pl.posY, pl.posZ, is); ie.de...
0
15730ac2d71f7959d1b45b34eb7dea27
0bf4c5b5017e9cc915c690191ef36c6d
Logical identifier for the asset. stability :stability: experimental
class EnhancedBetaUnderlierRefData(Base): def asset_id(self) -> str: return self.__asset_id
1
e59db1c0ba2e099964f4b5da0cec42ca
a4e5d98591210c29fb43624acb810339
提取出数字、字母和汉字,去除其他字符
def filter(string): pattern = re.compile(u"[^a-zA-Z0-9\u4e00-\u9fa5]") string = pattern.sub("", string) result = jieba.lcut(string) return result
1
c4aa4eb4b6e9c26720a3598722f0758b
f481f9922967404a2e4f2488c0c49a9c
Gets the id alergeno.
class RelAllegatiPreCipe public function getIdAllegati() { return $this->idAllegati; }
0
48d2cdfa58632e6a6ad60b2c0c43b992
4ff2c03743eb30b4053097491d781501
This method is used to select the Loan Length by selecting from the Combo Box
public class BottomPane private void GrillageComboBoxAction() { grillageComboBox.setOnAction((Event t) -> { wide = Double.valueOf(grillageComboBox.getSelectionModel().getSelectedItem().toString()); }); }
0
ec0a8e8bfbc290e454759819fc024136
f8c03d6b330cea970d05118512d7ae13
<p>Creates a <code>Manager</code> instance.</p> <p>A manager is an <code>Employee</code> that can store/manage other employees and that contains methods applicable to all the employee of it's group (e.g. <a href="#findbyid">findById</a>).</p> <br><pre> let a = new Employee("Ed", "Ster", 45, "Dev"); let b = new Employee...
public String createStandardManager(String parent) throws Exception, RemoteException;
1
db486157a4c55c0e867199f6f09fa42c
215bdfbaf19b8bf8cbef24f29cac067e
Sinh tên store theo tên bảng và kiểu thao tác dữ liệu của store
{ statusCode = Status.Error.ToString(); var commandText = string.Empty; if (DbHelper.CurrentDbType == CurrentDbType.Access) statusCode = Status.Ok.ToString(); else if (DbHelper.CurrentDbType == CurrentDbType.SqlServer) { ...
0