query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
4cb06777f65c8f210c5ccc187783e551 | 213c94491686edaa7a447e75ce6ba90d | 检验单位添加 | var contextPath = getContextPath();
var url = contextPath+"/addGoodsForworrd";
Modalshow('添加单位',url,700,520,2,true);
} | 0 |
46b1c47623851dfb9c7c116d5b557955 | 2df16576f2dbe057e21abee98d415061 | Determines the total revenue the player will make after selling his
goods. | float total = 0;
for(BuyItem bi : this.items){
total += bi.getProduct().getSellprice()*bi.getAmount();
}
return total;
} | 1 |
581ca238ce49baa74e4319c2192d0f5c | 7c9b4ef05f65583476e35b321d8f099f | Write the data to the outfile with uniform case. | {
Outfile.setf(ios::fixed);
for (int i = 0; i < REU; i++){
Outfile << setw(14) << StIDS[i];
for (int j = 0; j < 6; j++){
if (TestS[i][j] > 0 && j < 4){
Outfile.precision(1);
Outfile << setw(13) << TestS[i][j];
}
if (TestS[i][j] > 0 && j == 4){
Outfile.precision(2);
Outfile << setw(13) << ... | 0 |
c953a03cf63af0742ddedccedad8ca46 | a8019470c2f45cb9185632bacdd71cc1 | =====================================================
Description:generate tag index -- 6 characters
===================================================== | function get_tag_key_from_index($tag_index_id)
{
$my_tag_list = get_tag_list_from_index($tag_index_id);
if ($my_tag_list != -1)
{
return $my_tag_list[4];
}
else
{
return "";
}
} | 0 |
5f5113641018beb1a2834d60b92aa8f0 | 6f22f1d883fbd1a9e9fdd70e81861ab3 | returns fn_pretty_desc of ldata (NOT the fn_pretty_desc of
get_ldata) | static void get_patch_desc(AL_CONST DATAFILE *dat, char *s)
{
sprintf(s, "MIDI instrument (%ld bytes)", dat->size);
} | 0 |
627afce61c417181635db7c433b3ba91 | 49fac37366c0885feec5ea28ec6b3969 | Grossly inefficient but for now return a copy of the pins so
the offical board cannot be manipulated by clients. | class SimBase(object):
def get_pins(self):
return self._pins | 0 |
48e6b8a8b409ad87a87f0f52272623fe | f669d4ec9666a35907455d195851d5d4 | Tests that a property change calls the binded callback | self.getField().setPropertyDataSource(ObjectProperty(''))
self.getField().setWriteThrough(True)
self.getField().setReadThrough(True)
self._listener.valueChange(mox.IsA(ValueChangeEvent))
mox.Replay(self._listener)
self.getField().addListener(self._listener, IValueChangeLi... | 1 |
ed6ffe4d63ea2ed244970c1e0a9eee28 | f9166dc606f8109dfa73be0b94937f2d | z Rotation Matrix for angle phi in radians | def R_x(phi):
return np.matrix([
[ 1, 0, 0],
[ 0, np.cos(phi), np.sin(phi)],
[ 0,-np.sin(phi), np.cos(phi)],
]) | 0 |
b280ca2e281fbeb6c8b945bc4e1ba2fb | 8f64f8a9d220bb18e072a218a1cee0c7 | Toggle title display. | willTransition() {
this.notifyPropertyChange('displayTitle');
} | 0 |
c04f225d12a47a5dd9b22f48be5674f6 | f805ee0ea7fa787a2e81869c06461157 | GET: api/retiros | class RetiroController extends Controller
public function index()
{
$retiro=Movimiento::where('idTipo','=','2')->get();
return view('admin.retiros.list',compact('retiro'));
} | 0 |
6ad74e668c2eaa6760c006d4e66ad98b | 66eb91d6e85ae283793ec808e7329b5c | Basic script execution routine - any runtime exceptions are
caught and passed back into the engine to display. | namespace MotionDataHandler.Script public class ScriptConsole
public string Execute(TextReader reader) {
this.SequenceController.SuspendAllocationChanged();
try {
_suspendHistoryChanged = true;
try {
ScriptParser p = new ScriptParser();
... | 1 |
c606a3f3adf2b234c314cfc0af61ff64 | 916a507c1553f807764ec9e62f349882 | @brief memcpy/memmove when you need one, and libc fails | {
void *tmp = d;
char *dp = (char*)d;
char *sp = (char*)s;
if (dp > sp) {
dp += sz;
sp += sz;
while (sz--)
*--dp = *--sp;
} else {
while (sz--)
*dp++ = *sp++;
}
return tmp;
} | 1 |
e4a6a8b1aa40a9c2afd7cd84086f721e | b761f8ffc3c250dbbfacf3200095d9fa | Searches the swapi people for the given text. | {
try
{
PeopleSearchService.Interfaces.ISearch searchService = new PeopleSearchService.EndPoints.Search();
PeopleSearchService.Models.SearchResults searchResults = searchService.SearchFirstAndLastName(searchForPeopleRequest.Keyword, searchForPeopleRequest.... | 0 |
ee779a915595e84404f168d711e6e4ac | 8f1190f1edbe8ae2c24e187241a4d63a | Tests that the algorithm forms the correct number of clusters | def test_number_of_clusters(data, k):
medians, labels = KMedians(data, k)
df = summary(medians, labels)
assert np.equal(np.unique(labels), k) | 1 |
f8a3afe7b132022fe9946f70cfb47c0e | 6f3de6bb55d42797be054b36b5351a49 | Test opening and closing of `FTPHost` objects. | class EventProcessorHostTestCase(unittest.TestCase):
def test_start(self):
try:
self._loop.run_until_complete(self._host.open_async())
self._loop.run_until_complete(self._host.close_async())
finally:
self._loop.stop() | 0 |
f7727e866cd40bd048ae110baa5812f4 | d6eb452456ddbd2496e80a91330c5342 | メニューウィンドウが開かれている状態で押されたら、ウィンドウを閉じる | public class Test : MonoBehaviour
private void OnBtnCloseClick() {
WindowAnimation wa = GetComponent<WindowAnimation>();
if (null!=wa) {
wa.OnWindowClose((close) => {
Destroy(gameObject);
});
}
else {
Destroy(gameObject);
}
} | 1 |
3488209f97bce439bea3c265bfe21201 | 52ec438b40f6c45ca419a896507444cb | # Get all the text strings for each font in the document. | .get_text <- function(xml_document, xpath) {
xml_document %>%
xml2::xml_find_all(xpath) %>%
xml2::xml_contents() %>%
xml2::xml_text() %>%
paste(collapse = "; ")
} | 0 |
69b2aa2cd2318a553d65f92086d6f54b | 1ca370af230a72dd0af4a3a4a7b80959 | 查询更改单每月平均处理时间 | String query = null;
String queryTail = " from job_info jobInfo " +
" where jobInfo.service_name like :service " +
" and jobInfo.start_time_date >= :startDate " +
" and jobInfo.start_time_date <= :endDate " +
" and jobInfo.code=8 " +
... | 1 |
9cda630c519a60f70debca3b79c2b1c3 | 07123c7e2eef2c33dfb4280d7a169df9 | 跳转至initDc,提取globalRepeatSubmitToken和key_check_isChange | public class BINOLPLCOM02_Action extends BaseAction implements
ModelDriven<BINOLPLCOM02_Form>{
public String init() throws Exception {
UserInfo userInfo = (UserInfo) session.get(CherryConstants.SESSION_USERINFO);
String flowType = form.getFlowType();
String flowFileName = binOLPLCOM02_BL.getFlow... | 0 |
1b96ad8545072936835532ee25f289d9 | de92bf59013629ef29c6e5a2d077e62e | get the card data (if any) associated with this graph | public class SlamDunk
public FrameData getFrameData(int id)
{
return graph.getVertexData(id);
} | 0 |
8d9a11a97fdb583f2885f4b30486f749 | 52f9530465507ad319f203e53dafbc7e | This function scans the squares to the north east of the active piece and returns legal moves. | var row = currentPosition[0]
var col = currentPosition[1]
var legalMoves = [];
legalMoves = getValidMoves(board, row, col+1, 0, 1, legalMoves, pieceColor)
legalMoves = getValidMoves(board, row, col-1, 0, -1, legalMoves, pieceColor)
legalMoves = getValidMoves(board, row+1, col, 1, 0, legalMoves, ... | 0 |
9d67239c50664bb18f45e316935f844d | c64ba4f3a1237de38dd4d00da3842334 | This operation transitions the user to the status of `PASSWORD_EXPIRED` and the user's password is reset to a temporary password that is returned. | export class AuthApi extends BaseAPI
public passwordResetCreate(data?: Data11, options?: any) {
return AuthApiFp(this.configuration).passwordResetCreate(data, options)(
this.fetch,
this.basePath
);
} | 0 |
f69978f626c23857e0a34f4c2e3bcbf8 | 8612fdc6230b7a72ac930dfaaadf5c8b | # logistic regression with lasso penalty 7 using Bigrams | Dw <- D
p <- ncol(XB)
n <- nrow(XB)
indi <- rep(1,p)
indi[hatS] <- 0
if(sum(indi) == 0) indi[1] <- 1
fit <- glmnet(Dw*XB, Dw*pred.rf, penalty.factor = indi, nlambda = 40)
W <- Dw*(pred.rf - XB%*%fit$beta)
lambda.sqrt.lasso <- sqrt(2*log(p)/n)
index <- which.min(abs(fit$lambda - lambda.sqrt.lasso*ap... | 0 |
8ec593c5eb0d3f696e3dd4996ad0ba81 | 5455d0c51eecabd9b2355b04be22cbef | 是否有修改公文元素的权限,集团管理员,企业版、政务版中的单位管理员 | public void isHasModifyAuth(HttpServletRequest requset, HttpServletResponse response) {
String userId = requset.getParameter("userId");
String id = requset.getParameter("id");
Project p = projectService.getProjectEntity(id);
boolean isHasModifyAuth = false;
if (StringUtils.is... | 0 |
4628c24812bcf06a1bd6ef2896da9e0f | 57f8637dd53fd51db7b35361eb209948 | 新建应聘者(文件导入) | require_once("excel/phpexcel/Classes/PHPExcel/IOFactory.php");
if(IS_POST){
$file = $_FILES['file'];
$name = $file['name'];
if(!is_uploaded_file($file['tmp_name'])){
return ;
}
$objPHPExcel = \PHPExcel_IOFactory::load($file['tmp_name'... | 1 |
88b613518f937b62f0b82253a00770c7 | 59e6b3f1d4f919687798406da39a4f81 | 多班级比较某课平均值 | isLogin();
$courseid = $_SESSION['courseid'];
$classname = $_SESSION['classname'];
$sql = "select avg(score) as score,count(*)
as people,api_score.version,api_score.coursename,api_score.courseid from api_score, api_user
where api_score.courseid='{$courseid}' and api_score.user=api_user.username and api_us... | 0 |
ffd0033f74ed28d2a09d489aa4fe6b7e | 963529a837440e6de55572b57b73bc88 | Tests if the add row functionality works correctly with several tables. | public class HistoryTableTest
@Test
public void testAddRow() {
System.out.println("addRow");
HistoricalRecord expResult = historyList.get(0);
HistoryTable instance = new HistoryTable(dbcon);
boolean ret = instance.addRow(expResult);
assertTrue(ret);
HistoricalRecord r... | 0 |
92f5695e47c2af2037aaa41224f89296 | 5e2d7a4637b734e45a0a89c0bd38a53a | sets user data of presolver; user has to free old data in advance! | CeedData ceed_data_f, Ceed ceed, UserMultProlongRestr prolong_restr_ctx) {
PetscFunctionBeginUser;
prolong_restr_ctx->comm = comm;
prolong_restr_ctx->dm_c = dm_c;
prolong_restr_ctx->dm_f = dm_f;
prolong_restr_ctx->loc_vec_c = V_loc_c;
prolong_restr_ctx->loc_vec_f = V... | 1 |
2fc06c612f76c61264c1d0292a7a0e66 | fa63e0cd30c71ad3951ee26176c6e033 | Creates an H-shaped Polygon within a specified rectangle. | class TestGeos
def create_square_polygon(xoffset, yoffset, side)
outer = create_square_linearring(xoffset,yoffset,side);
inner = create_square_linearring(xoffset+(side/3), yoffset+(side/3),(side/3));
holes = Geos::GeometryVector.new()
holes.push(inner)
poly = @geom_factory.create_polygon(outer, hole... | 0 |
122cac6ac38f2a218c87974de32ded94 | 3f1b607b5193305fc2e28a8d0ebb5d13 | 获取图片循环时间秒 | public class SlideShow implements Serializable public static class PagePojo implements Serializable
public int getTimeout() {
return timeout;
} | 1 |
24e5eae82964f3ca03ebcbc146796faa | f63150cfa09ea3b3cc229485ca5b2f76 | count number of plus ones | int cnt(long long int x)
{
int sum=0;
while(x)
{
if(x&1)sum++;
x>>=1;
}
return sum;
} | 0 |
19ef5891ae7cae3836dfe2a68f4d1f0c | 9d558b5aa0bb0ad773cb8f6322f4cdba | 服务端不停地接收客户端发送过来的消息 | public class ChatServer extends Thread
@Override
public void run() {
while (true) {
try {
packet=new DatagramPacket(data,data.length);
serverSocket.receive(packet);
Message msg=(Message)Translate.ByteToObject(packet.getData());
String userId=msg... | 1 |
1cdf7b09410b24910c91b7ec48954f91 | fd447498fe8321ec40bcb9d49366703f | Returns a list of <tt>ServiceReference</tt> objects. This method returns a list of
<tt>ServiceReference</tt> objects for services which implement and were registered under
the specified class and match the specified filter criteria.
<p>The list is valid at the time of the call to this method, however as the Framework i... | public abstract class AbstractActivator implements BundleActivator
protected <T> ServiceReference<T> lookupServiceReference(Class<T> clazz) {
return lookupServiceReference(clazz, (String) null);
} | 0 |
cf5d55d2d3f94baf3db68b85b46fe3fa | 837b337c262ae1dfcc4cc85936ac72e2 | 表示求复杂可以求left和right的并集, 并集元素个数不超过CAPACITY | class Solution
void merge(vector<long>& vec, int l, int m, int h) {
int left = m + 1, right = m + 1;
for (int i = l; i <= m; i++) {
while (left <= h && vec[left] - vec[i] < lower) {
left += 1;
}
while (right <= h && vec[right] - vec[i] <= upper) {
... | 0 |
c42da1e81ef9eda916dadb340c387fa0 | 498f29f14f2a4b2f55b817e9cfe13f0b | returns all hyperlinks from bookmarkDict | list = []
obj = soup.findAll('div', attrs={'class': 'fdw-background'})
if(obj != None):
for div in obj:
list.append(f"http://www.bookcity.kz{div.find('a')['href']}")
return list | 0 |
d8e35ebac6001ca3c9e0104bf6b8d521 | 1892c9762ac911136ed9723fa270a31b | Turn on IPv6 networking for this droplet | namespace DOcean.API.Clients
Task<Action> EnableIpv6(int dropletId, CancellationToken token = default); | 1 |
7f41c2746235a51f393e46c018434db7 | b2cf6b3dfe31b3e1fd9f64ec1f4bf6f9 | implementation of abstract method(Method2_Print) from abstract class(AbsClass) | print self
print key
print value
return "Attempting to use abstract base class" | 0 |
715957efc77da89dbd5255c4adaac308 | 749371ed7ac71b26b068b3ae27f15796 | Is the whole contour selected | export class PointChain
public get closeContour(): boolean {
return this._closeContour
} | 0 |
2596c0ac81c072dd8bd143df74bdb072 | a080ee6775aa8da07083ba84240f153e | Callback function for FFmpeg logs. | const rd_kafka_message_t *rkmessage, void *opaque) {
if (rkmessage->err)
fprintf(stderr, "%% Message delivery failed: %s\n",
rd_kafka_err2str(rkmessage->err));
else
fprintf(stderr,
"%% Message delivere... | 0 |
a4010074f22b83ff41924bf1f34fcc02 | 732ff9c8c475103d416656d4fbbe08cd | Gets the log manager. | class CliHelper
public function getLoggerManager()
{
return $this->loggerManager;
} | 1 |
9cdee0792fa083a1ea5d824bbe82c185 | daa6126839e7d9f3971db2c57e9d5325 | *************************FUNCION PRINCIPAL*************************** | def main():
mensaje_entrada = "Inciso a) de la práctica\nHola, por favor ingresa el tipo de Alfabeto con el que trabajare:\n"
menu = ('1.- Ingresar alfabeto manualmente\n'
'2- Alfabeto Espaniol\n'
'3.- Numeros (0...9)\n')
print (mensaje_entrada)
alfabeto=crear_alfabeto(menu)
print ("\nEl alfabeto con el que trab... | 1 |
c170ea75602c1aa04b67e5367987ff66 | 350231b6fa04c4cb48d3a0d7f5ce4649 | create list using variadic paramethers | list_p Lnconc(int nargs, list_p first, ...) {
int i;
list_p list, last=NULL, l;
va_list valist;
list=first;
if (list)
last=Llast(list);
va_start(valist, first);
nargs--;
for (i=0; i<nargs; i++) {
l = va_arg(valist, list_p);
if (!l)
continue;
if (list)
last->n... | 1 |
2c41fa6664ccfccf094ab30029d27328 | c914b97871d0a167cdabe42a02419d2d | Returns the hash function for this cached model key. | namespace System.Data.Entity.Core.Common.QueryCache
internal sealed class EntitySqlQueryCacheKey : QueryCacheKey
public override int GetHashCode()
{
return _hashCode;
} | 1 |
18fe786d5be7b358dd437ed6ff23ee85 | 2ff8639a6dfc84332cd22068cf628822 | Attempts to read a rewrite tracker file. | fs.access(this.filename, fs.constants.R_OK, (err) => {
if (err) {
this.reset({});
return done(err);
}
fs.readFile(this.filename, (err, data) => {
try {
this.reset(JSON.parse(data));
} catch (p... | 1 |
ca807b626ab2bcda0f2116085b5e5965 | b647f5596facd71c3e007be6418e1b35 | Sets the phase during which communiction takes place. The default is the
main tick phase (see {@link Simulation#TICK_PHASE}.
the communiction phase | @XmlRootElement(name="state")
public final class SimulationState
public void setPhase(final SimulationPhase phase) {
this.phase = phase;
} | 1 |
19b9ce8a7a514cb7764730952fca8e65 | 19fda8004ba4d26a6741404f52680df7 | https://stackoverflow.com/a/7970461/7609067 | var textArea = document.createElement('textarea');
textArea.style.position = 'fixed';
textArea.style.top = 0;
textArea.style.left = 0;
textArea.style.width = '2em';
textArea.style.height = '2em';
textArea.style.padding = 0;
textArea.style.border = 'none';
textArea.style.outline = 'no... | 1 |
bc797b6dfe36ba36a2efab523d7c8b9b | e2b844438441e293bd4231e8234cf271 | Defines values for specifying how the width of a column is adjusted.
enum DataGridViewAutoSizeColumnMode,values: AllCells (6),AllCellsExceptHeader (4),ColumnHeader (2),DisplayedCells (10),DisplayedCellsExceptHeader (8),Fill (16),None (1),NotSet (0) | [EditorBrowsable(EditorBrowsableState.Never)]
public static class ObservableDataGridViewEvents
public static IObservable<EventPattern<DataGridViewAutoSizeColumnModeEventArgs>> AutoSizeColumnModeChangedObservable(this DataGridView instance)
{
return Observable.FromEventPattern<DataGridViewAutoSizeColumnModeE... | 0 |
acdcf07c8514c87c59e134e9f87ec404 | db9256802c0082195795f7ee2cd95457 | Returns the extension slug. | abstract class AbstractExtension extends \Twig_Extension
public function getName()
{
return str_slug(get_class($this));
} | 1 |
c3336c2830b99b7c0ef2cc6ba48f52b7 | 8fcec1c80707cf82630724b57d81ab25 | Low-priority interrupt redirection to the firmware code. | {
if (r.int_no >= 40)
out_byte(0xA0, 0x20);
out_byte(0x20, 0x20);
if (interrupt_handlers[r.int_no] != 0)
{
isr_handler_t handler = interrupt_handlers[r.int_no];
handler(r);
}
} | 0 |
03786d7a02fdac0a246831f793561655 | a4f6c43bae0ea091c62324656b1c4fb8 | \brief Hide direct children widgets of current widget
\note The function is private and can be called only when GUI protection against multiple access is activated | void CWidget::Hide(const bool bPaint)
{
this->bIsVisible = false;
} | 0 |
cf04969b31fcea3fdf3ecb26107d626c | 5df4f1b0fbb685fefe6873be5c4b87dd | Helper function to return the appropriate comparison operator function from a specifier string like ">=" or "<". | if func == gt:
return '>'
if func == lt:
return '<' | 0 |
c281c208df251a50a3fae387612ba1e7 | 87e829703855ccb2f1eae5ac7c8d3ce0 | Ajout d'un nouveau jury dans la base de données | {
using (var db = new Entities())
{
db.JudgeStudio.Add(juds);
return db.SaveChanges();
}
} | 1 |
079a4e1591185fe519955dbb94299b97 | 607a0098c2404417d9607d17b15462c3 | calculates entropy and prints table using the second method | int main(int args, char* argv[])
{
ReadFile(argv[1]);
int numberOf[256] = {0};
int diffBytes = 0;
for(int i = 0; i<length; i++) {
numberOf[(int)buffer[i]]++;
}
for(int i = 0; i<256; ++i) {
}
cout << endl << endl;
for(int i = 0; i<256; i++) {
if(numberOf[i] > 0) {
diffBytes++;
}
}
unsigned c... | 0 |
598efb3e041343f80a1e7c61e08d248a | adcaddb859d5043a5be85f4c4ae4ab5b | Update an existing Tercero entity | $Tercero = new TercerosRecord();
$Tercero = TercerosRecord::finder()->FindByPK($this->TxtIdTercero2->Text);
$Datos = explode("_", $this->TxtIdTercero2->Text);
$this->TxtIdTercero2->Text = $Datos[1];
$this->TxtNombre2->Text = $Datos[0];
} | 0 |
2ef41052319e13baa4eeed6748757b17 | cb7f10d5d91a5b8c6580ea0224db1d16 | Returns new empty User instance. | class User
public static function createEmpty()
{
$user = new User(0, false);
return $user;
} | 1 |
ca30b732951d30309074b301663a8738 | db476232552602e06f65f9feb5de57b3 | Performs very simple unmangling of C++ names.
Does not handle arguments and template arguments. The mangled names have
the form:
?LookupInDescriptor@JSObject@internal@v8@@...arguments info... | static char* dvmDescriptorToName(const char* str)
{
if (str[0] == 'L') {
size_t length = CRTL_strlen(str) - 1;
char* newStr = (char*)CRTL_malloc(length + 1);
if (newStr == NULL) {
return NULL;
}
CRTL_memset(newStr, 0, length +1);
CRTL_memcpy(newStr, str + 1, len... | 0 |
7d4c1b0500a9f60318f11a9465fc52bf | e2d9b62cbe9efc99cbe42193bbdb1698 | Provides unit for given code. | public class InlineUnit
public void makeCode(String packageName, String className, File outputFile, boolean interpret) throws IOException {
if(codes.isEmpty() && defs.isEmpty()) return;
Iterator<String> i;
PrintWriter p = new PrintWriter(new FileOutputStream(outputFile));
if (packageName != null) {
p.println... | 1 |
b320bb52f5122f29e8bbaa9f27cdb400 | 8a4d2af1470ffc550d5d1738ab910efb | Sets whether to use authentication | namespace byps.test.api.remote
void SetUseAuthentication(bool useAuth); | 1 |
7edf8564416f6ed86c9898607283b840 | 5282eca0e5f17706a286cc6a295989e9 | Are we running on the iphone retina display | var agent = navigator.userAgent.indexOf('Mac OS X') > -1
var height = window.screen.height === 812
return agent && height
} | 0 |
33a4c94dd103164d1d5eadd6339817ee | 6427db200189b334f5240461e3ced648 | 获取短信通知信息. | class Sms_model extends CI_Model
public function get_sms_info($sms_id = 0)
{
if (empty($sms_id)) {
return false;
}
$query = $this->db_read->get_where("est_sms", array('sms_id' => $sms_id));
return $query->row_array();
} | 1 |
417d884f82912c196511f5e94d884686 | 8e01a28e2d728ff91754cf39d1f7b2d7 | 初始化关联的币种汇率时插入临时表 | $("#contentTable").children("tbody").find("tr").each(function(index,obj){
var currencyIdStr = "";
$(obj).find("input").each(function(index1,obj1) {
if($(obj1).hasClass("ipt-currency")) {
currencyIdStr += $(obj1).attr("var") + ",";
}
});
currencyIdStr = currencyIdStr.substring(0,currenc... | 0 |
fc1449172cf4b7ffa115c89df4efc089 | 71ebae92e5fc57ee066cf845bdb8b874 | add a signer with extra signed/unsigned attributes.
@param key signing key to use
@param cert certificate containing corresponding public key
@param digestOID digest algorithm OID
@param signedAttr table of attributes to be included in signature
@param unsignedAttr table of attributes to be included as unsigned | byte purpose,
byte alg,
byte padding,
byte digest,
byte[] privKeyBuf,
short privKeyStart,
short privKeyLength,
byte[] pubModBuf,
short pubModStart,
short pubModLength); | 0 |
0c8e2f36286139dd315440e47d85cc73 | c5fe9f06affedd49f99796cb3843e5b5 | The names of fields to check for links in. | String[] re = new String[2];
re[0] = hostField.getName();
re[1] = linkedField.getName();
return re;
} | 1 |
7f497ab6ba9256f7f8dcc2a8370da076 | 379f041287bf85effe7c18f3e70dc2f9 | 生成Sku商品图片 | if(StringUtils.isNotBlank(goodsSkuOut.getGoodsSkuPics())){
String[] regoinArr = goodsSkuOut.getGoodsSkuPics().split(",");
List<String> stringList = Arrays.asList(regoinArr);
if(stringList!=null&&stringList.size()>0){
List<Long> ids = new ArrayList<Long>();
... | 0 |
ea3ad0a7764e0899b1eb930514de6179 | 7c817103cc136bdb16b6d1f081e39210 | Formats a stack trace into a single line that provides relevant information for debugging
that, when clicked in the logcat, will display the line or source from where the message originated. | private fun getMsgWithStackTrace(msg: String?): String {
val builder = StringBuilder().append(msg).append("\n")
val ste = Thread.currentThread().stackTrace
val stackOffset = getStackOffset(ste)
val traceElement = ste[stackOffset]
if (traceElement != null) {
builder.ap... | 1 |
f27d4930183d0a5581a35b0ae8838620 | bb40f9317bfd9efa131ebbffaf22e13f | 获取能否使用Y/N | @Alias("api.Admin")
public class Admin
public String getUseYesOrNo(){
return useYesOrNo;
} | 1 |
fb7334cdfb38897963bc1248ee4c0a6c | abc988020c325a4c0ad58d92cd751fb9 | 检查ip与域名记录值是否相同,不同则更改,并记录log | isRepeat = False
db = self.connectDB()
cursor = db.cursor()
sql = "SELECT dnslogs.id FROM dnslogs WHERE dnslogs.domain = '%s' AND dnslogs.domain_ip = '%s' AND dnslogs.dns_server_ip = '%s'"
data = (sniffDnsLogs.domain, sniffDnsLogs.domain_ip, sniffDnsLogs.dns_server_ip)
cu... | 1 |
f339d84e5461842926f7ef5f8435db42 | ac9a0cb34947f54bb226c2b5aa378825 | Store trigger polarity for use during acquisition start | void ExcaliburFemClient::triggerPolaritySet(unsigned int aTriggerPolarity)
{
mTriggerPolarity = (excaliburTriggerPolarity) aTriggerPolarity;
} | 1 |
301e4e3d39249474ef8bb9a8c250a5d0 | 6ecd068850dfa64f7de4869516ad4326 | Write a BER encoded unsigned integer to the buffer | {
int grow = VarIntSize(value);
if (Position + grow > target.LongLength) Grow(grow);
if (value <= 240) _WriteULongByte(value);
else if (value <= 2287)
{
_WriteULongByte(((value - 240) >> 8) + 241);
_WriteULongByte(value ... | 0 |
59e7d82bef55beebf0b8375f31a4fb2d | 8b540801bbc67b7b2c0740332f6ad64b | Returns summary info for all applications in the given organization. | HttpContext context,
EmailAddress accountId,
DomainLabel name)
{
var result =
from e in this.appStore.GetApplicationsOfOrganization(name)
select new OrganizationApplicationDisplayInfo
{
Applicat... | 1 |
fd6f00da227e2efaebdd12ed848d8be8 | 5101cb6f746f968dbb4ddbba0f13c5c8 | Install the Python package PyText. | def pytext(args):
if args.install:
cmd = f"{args.pip_install} pytext-nlp"
if args.cuda_version:
pass
run_cmd(cmd) | 1 |
972b00fdc658a91d7103d96c1a528cfd | 797b8975d37ba67b4c07eab3556497c3 | Returns a mock BatchGet Object. | export class BatchReadCommand extends $Command<
BatchReadCommandInput,
BatchReadCommandOutput,
CloudDirectoryClientResolvedConfig
>
constructor(readonly input: BatchReadCommandInput) {
super();
} | 0 |
81a4acf05f9e96ebdf9a40d1f1c320d4 | db80d58ac5ad274dc70509ee394121ca | Form for input events in calendar | super().__init__(**kwargs)
self.booking_type = booking_type
available_times = padstow.scheduler.find_all_available(
booking_type,
timezone.now(),
timezone.now() + datetime.timedelta(weeks=1)
)
self.fields['event_date_time'] = forms.TypedChoiceF... | 1 |
41f51b07cd77b09c9462dc08d742d180 | 4ca7b7042b80023e36d4703e474d1590 | 星空上加入随机闪烁的星星 | void StarryBackground::Update()
{
int iRGB;
for (int i = 0; i < m_iNumStars; i++)
if ((rand() % m_iTwinkleDelay) == 0) {
iRGB = rand() % 256;
m_crStarColors[i] = RGB(iRGB, iRGB, iRGB);
}
} | 1 |
173a9ad4c7a9595b5a29c0ecbdeaa603 | c7173eda800dc50a9685de04b11e0e24 | \brief DOS conio.h cputs() equivalent | int caca_conio_cprintf(const char *format, ...)
{
va_list args;
int ret;
conio_init();
va_start(args, format);
ret = caca_vprintf(cv, caca_wherex(cv), caca_wherey(cv), format, args);
va_end(args);
caca_gotoxy(cv, caca_wherex(cv) + ret, caca_wherey(cv));
conio_refresh();
return ret;
} | 1 |
1eda6acb91e2bb22aa6b043b4787c5cd | aacb404e12b911918e17b1112a1fffb6 | Play C Major Chord | rainbowPiano.play_note(A4, .500)
rainbowPiano.play_note(A4, .500)
rainbowPiano.play_note(A4, .500)
rainbowPiano.play_note(F4, .350)
rainbowPiano.play_note(C5, .150)
rainbowPiano.play_note(A4, .500)
rainbowPiano.play_note(F4, .350)
rainbowPiano.play_note(C5, .150)
rainbowPiano.play_note(A4, .650)
tim... | 0 |
389d5c0b3de5027c8a2be8567bd741a6 | 0036a721e5757a9282d24bae51f6bb2c | Check if the method can properly count trophies for the specified gamer | String query = "SELECT COUNT(id) AS value "
+ "FROM pvpr_kills "
+ "WHERE player = ? AND milestone = ?";
return ((Number) EasyDB.getDb().get(query, 0, name, milestone)).intValue();
} | 1 |
f5f9ade632c76f6bd2ccac09249a45af | e1d552e9841dc6835c7bc9f051fb7c90 | Takes a number of measurements, averaging the distance, and returns the detected distance in centimeters. | namespace Gadgeteer.Modules.GHIElectronics
[Obsolete]
public class DistanceUS3 : GTM.Module
public int GetDistanceInCentimeters(int numMeasurements = 1)
{
int measuredValue = 0;
int measuredAverage = 0;
int errorCount = 0;
for (int i = 0; i < numMeasuremen... | 1 |
b68fbc60de0be4b070b39e6ba9cf5381 | ceafa284b02e8559fb136275d08a77ba | Handle the down arrow key. | class Album(Screen):
def _handle_down(self):
self.track_menu.down() | 1 |
abad9aabb51853085f9e7204cf7c2951 | 8caa48bb02e4453665f9da76d293d4a6 | Unrolled version of FNV
http://www.isthe.com/chongo/tech/comp/fnv/index.html | {
return (uint)((((((OFFSET_BASIS ^ (uint)i) * FNV_PRIME) ^ (uint)j) * FNV_PRIME) ^ (uint)k) * FNV_PRIME);
} | 1 |
32598a7d067f27be4dc451a3793e1333 | c8f83625f3feb92384bb1d4ad335767c | 将上面的item数据与获取的itempic拼接成json字符串 | {
$arrContent = [];
$arrAlbum = [];
$arrJson = [];
if(isset($_POST['Active']['album_content']) && isset($_POST['Active']['album_pic'])){
foreach ($_POST['Active']['album_content'] as $v) {
$arrContent[] = $v;
}
foreach ($_POST['Acti... | 1 |
d6fbe11e9ded54097a69037b400fe127 | e67ed24c8e47e2c28d89190b7e1445c7 | 某个id的书的评分 | namespace BookStore.BLL
public class BookRatingManager
public BookRating GetBookRatingById(int id)
{
return brs.GetBookRatingById(id);
} | 1 |
780c71cb4dfd8c47260da6510d0cbe1b | 847e45313968160f83b29cfd4ca2f1f2 | 备份渠道文件(写入远程服务器文件内容) | $file_blocks = array();
$file_block_size = 2*1024*1024;
$rmote_dir = str_replace('//','/',REMOTE_ROOT.'/backup/');
$file_name = basename($zip_file_path);
$BaiduPCS = new BaiduPCS(BAIDU_TOKEN);
$handle = @fopen($zip_file_path,'rb');
while(!@feof($handle)){
$file_block_content = fread($handle,$file_bloc... | 1 |
e434517ba08d3aa3770d43f03141c174 | d7d020546a6f2d75941ae1bf271689ca | Solve non negative least squares problem:
min 0.5*||y- A x||_2^2 s.t. x >= 0 | x, constraints = __weight(c, bxl, bxu)
constraints = constraints + __constraint(x, A, bcl, bcu) + [cvx.quad_form(x, Q) <= qc * qc]
objective = x.T * c
ccu.maximize(objective=objective, constraints=constraints)
return x.value | 0 |
45774959be9ce92f07d141bef4ec819d | 969e1da19cfa3048c1d52f3f95404741 | 将comboBox的值填到textBox中 | {
QString value = index.model()->data(index,Qt::EditRole).toString();
QComboBox *comboBox = static_cast<QComboBox *>(editor);
comboBox->setCurrentText(value);
} | 0 |
3dadfa4e4c6fd95be757461b149a2df2 | 1bef79eff30c322165afd58fded56769 | Remove all entries from the pending list | void KonqHistoryManager::clearPending()
{
QMap<QString, KonqHistoryEntry *>::iterator it = m_pending.begin();
while (it != m_pending.end()) {
delete it.value();
++it;
}
m_pending.clear();
} | 1 |
b38a6b800e2a31bc6c87af2f30d46672 | d290bc06b9c0cf77c749a6e222ebfdb6 | GET /shopping_lists
GET /shopping_lists.json | {
$lists = auth()->user()->shoppingLists();
return ShoppingListResource::collection(
$lists->withCount(['items', 'items as items_bought_count' => function ($query) {
$query->where('bought', true);
}])->latest()->get()
);
} | 1 |
90a91c1c13ffbb3e3a80e5a9205853dc | a2eb101bda55431803b2b80c3132a088 | Get min PHP version. | public function getMinimalPhpVersion(); | 1 |
1a28a9d58ce59b99b23c190a0b06b87a | f6088c19e271104b7ffc7b713069ab7b | Metodo che permette l'inserimento nel database di un servizio passato al metodo | namespace BLL.Logic
void AddService(ServiceDto serviceDto); | 1 |
9fecd83249874eef7ae198127c22efe8 | 2e3da331d33e4f7a2fc8b9856e3ebd45 | 查询主症状下疾病下的所有问题,并计算答案数量 | List<DiagnosisMainsympQuestion> listConcSymptomCount(String mainSympCode); | 1 |
bd2d114c92f20c7bb9ed70731d2b4666 | 97e09490d122ab54eacbc58ddcf42f16 | Retourne la couleur de la carte. | public class Traitement{
public Carte getCarte() {
return carte;
} | 0 |
223a794fae31b21ec9d898e886ea6511 | 7bbc252be3a03c9b626b99ce6711f928 | Returns a pandas dataframe with a selection of the logistic regression
experiments to be included on deployment. | def _search_df(): | 0 |
bd81577a6fd4956e676cec499bb70d00 | a23c439c3cef002b21f28445998d96cf | 合并 | {
$post = $this->post();
$count = $post['order_id'];
if ($count > 0) {
if ($count >= 2) {
$order = DB::table('order as o')
->leftJoin('order_data as oi', 'oi.order_id', '=', 'o.id')
->whereIn('o.id', $post['order_id'])
... | 1 |
4cc1ba4b2c606f1ab630e416eed10f08 | ccea5a954527abb15376b0121c448812 | Sets the commit message by parsing a given string into the different parts of a commit message | function parseCommit(logMessage: string): ConventionalCommit {
const [, type, scope, breaking, description] =
logMessage.match(conventionalCommit) ?? <(string | undefined)[]>[]
return {
breaking: breaking !== undefined,
description,
scope,
type,
}
} | 1 |
efb92250402573baf2acb7b1476d330a | 46b9c4dcca113b8a2258de7c0ed8c85a | 指定ファイルをISOイメージとみなして開く | namespace PictureText
public partial class PictureText : Form
public void OpenFile(string path)
{
try
{
System.Diagnostics.Process.Start("explorer.exe", path);
}
catch { }
} | 0 |
608fbe20efe5acfd8e4d5b00a62beb7d | 4b15aae6b7d88ab406efe84ec9afb37c | Gets the page count. -1 if none. | public class ControllerState
public int getPageCount() {
return this.pageCount;
} | 0 |
a1499b023784d0e9fab1f5c0873ff268 | eeaed664aef18e5372e567a6deca28c9 | Gets the default notification channel ID. | public class PushgramService extends JobIntentService
protected String notificationChannelId(NotificationInfo notificationInfo) {
return DEFAULT_CHANNEL_ID;
} | 1 |
52ccf106fc3af6d50ada52f4cf497a2a | 1092228e73acba18ee84ff65bae74fc7 | 根据角色ID统计关联到此角色的菜单数 | int findCountByRoleId(Long roleId); | 1 |
1933c0c42f726c6a6492cd0b9f517ee9 | 1c0c4424441148462e74ad1f8447f8c8 | 平均色を取得します。 | export class Color extends Kimono.CObject
public getA(): number {
return this._a;
} | 0 |
577d9bb882974d04d5e6a9e829ed9434 | 499f04dfcce301cc5ec289e92af3836d | Converts Project Task Time Entry Model for edit. | {
return new UserTask()
{
Id = dto.Id,
Title = dto.Title,
Details = dto.Details,
DueDate = dto.DueDate,
Category = dto.CategoryId.HasValue ? new Category()
{
Id = dto.Categ... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.