query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
936818be33b665b442c7c4a03e386700 | e97f852551f29172bc7ecf49178917ef | 获取胴体总重 | Weight = self.LowerWing.Weight
Weight += self.UpperWing.Weight
if self.EndPlate is not None:
Weight += self.EndPlate.Weight
return Weight | 0 |
8b17b9bb7a3e9f9641b3611d05414cb0 | ab803ebb309eabf8d85eb5e84a688e3c | Reports whether or not this term is a constant (a number of a functor of arity zero). | public boolean isConstant() ; | 1 |
0fb963874890de25807d3c53c9184103 | c8e6c22d78cf932477bb1cac784205d2 | Populates the catListBox with all of the categories from the DB | public class Advertiser extends Application implements Initializable
public void loadCategories() {
categoryBox.setItems(FXCollections.observableArrayList("Sports & Adventure", "History & Culture",
"Fashion & Craft", "Lodging & Food", "Fishing", "Transport"));
} | 0 |
e802903d2393ac1d5b57a441f4858c81 | 046d4312e2352d50e06f16678b7647c3 | Dispose the object's rendering data, because the device has
been lost. | namespace xPFT.GraphicEngineGDIP
public class Device: IDevice
public void Dispose()
{
renderTarget.Dispose();
renderTarget = null;
} | 1 |
7471febc6c1bd997304a9dda3b19d048 | ce5fb365ce1f60705def8c4150d94091 | returns whether or not the given ring is within the boundaries of the detector | public boolean contains(int ring); | 1 |
80d7059b095127c3416d81cddbb9eeae | 06c9dafd67d03991e264a13c38ddd1ef | Creates Nondeterministic Finite Automata from a Regular Expression | public class Transformation
public FiniteAutomaton DeSimone(RegularExpression e) {
Parser p = new Parser(e);
Node root = p.parse();
p.thread(root);
Set<Node> comp = new HashSet<>();
Set<Node> all = new HashSet<>();
ArrayList<Character> alf = new ArrayList<>();
Has... | 1 |
5a0cdafa1df786f776e4939b9e4e4781 | 043a475178c95a4030b5431602482a58 | Test that parse() returns an array of data from the file. | class TestDataToArray(unittest.TestCase):
def test_data_csv(self):
self.assertEqual(self.class_instance.data_csv, TestDataToArray.DATA_FILE) | 0 |
7a6c21c49e6647e3cab4004c20a6bb54 | 7082a5277da666643368f45d6d8484ef | 3 斐波那契数列第n项的值(递归) | int f1 = 1;
int f2 = 1;
int f3 = 1;
for (int i = 3; i <=n ; i++) {
f3 = f1 + f2;
f1 = f2;
f2 = f3;
}
return f3;
} | 0 |
d876f093420af47fc4b6160590a1bfdd | 51907fa9405caac3157562c0077fdbb9 | Basically just checks if home icon is being looked at to "click" on it | def isHome( img ) :
screenName = "home"
iconName = "identity"
return searchIcon( img, screenName, iconName ) | 1 |
ea95b64465f1ab7262cdde76ed84da79 | 8250e58477643a09cc4e5fa564db0e41 | 生成字母数字随机字符串 | {
$charsLib = '0123456789qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM~!@#$%^&*()_+/';
$ctypeAlnumALib = '0123456789qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM';
$str = $ctype_alnum ? $ctypeAlnumALib : $charsLib;
$resultStr = '';
for ($i = 0; $i < $length; $i+... | 1 |
0708c9b6e1f67b968c51dd7d8a9560b5 | 8329e5b44999d83722cd39819f70a3f6 | Get an MSAL.NET Token cache from the HttpContext, and possibly the AuthenticationProperties and Cookies sign-in scheme | {
IConfidentialClientApplication app = MSALAppBuilder.BuildConfidentialClientApplication();
AuthenticationResult result;
IEnumerable<IAccount> accounts = await app.GetAccountsAsync();
string[] scopes = VeracityIntegrationOptions.VeracityPlatformServiceScopes.Split... | 0 |
6ec4f9828cac94fd8834ac9289fc69be | a5b54da69b13c9b899b004a173ea776b | удаление всех классов из списка элементов | for (let i = 0; i < this.count(); i++) {
this.elems[i].remove();
this.elems.splice(i);
}
return this;
} | 0 |
0a22177bacd5b9c9990ddfad69c5cdf8 | c17d513c8e3cc247641290e1edeed017 | Test Runner
this method contains the algorithms that bascially runs through all of
the tests indivudually and returns you a state that shows which one
of those tests passed (True) and which one of those failed (False)
with their test names written in a key-value pairing | 'shpgsa_once']):
try:
if 'dfs' in algorithms:
for i in range(self._args.ncalls - 1):
dfs(self._model, self._root)
self._results['dfs'] = dfs(self._model, self._root)
if 'dfs_mem' in algorithms:
... | 0 |
12ba97e5ee1ef863e7241935c13b0d40 | 809b6c124ec9519bd8353c18eff40036 | Legt die Farbe fest, mit der Linien und Raender um Formen gezeichnet werden.
Diese Farbe wird hexadezimal in Form der RGB angegeben: z.B. "CCFFAA" oder "004E23". Die Syntax verwendet sechs Ziffern - je zwei fuer die roten, gruenen und blauen Komponenten,
um eine Farbe anzugeben (genau wie Farben typischerweise in HTML... | public class PUNKTELISTEANZEIGE extends PunkteListeAnzeige
public void SchriftfarbeSetzen(String farbe)
{
super.SchriftfarbeSetzen(farbe);
} | 0 |
574a29a8f16ec35f907731219f48411e | f22b5b613794c810202527450d931029 | Set cursor position (internal - not syscall) | set_cursor (int x, int y)
{
_offset = calc_offset(x, y);
int _offset_intern = _offset / 2;
outb(_VGA_REG_CTRL, 14);
outb(_VGA_REG_DATA, (unsigned char) (_offset_intern >> 8));
outb(_VGA_REG_CTRL, 15);
outb(_VGA_REG_DATA, (unsigned char) (_offset_intern & 0xff));
} | 1 |
2c00f86a3c83fd114c638bc677ca50dd | 3b2747cb7a2af37b22bffc203bee7c83 | Returns an open-data measurement.
Returns a measurement by open-data UUID with either all or a custom selection of measurement types. | fill=None, group=None):
result = self.backend.get(namespace, start, end, method, fill, group)
if result == 400 or result is None:
return jsonify({"response": 'Not Found'}), 404
elif isinstance(result, tuple):
return jsonify({"response": (result[0], result[1]... | 0 |
7711d14a38e2d6de5debbcc56b0871d9 | 3cd96b98e9cf0109c60cba956f105649 | 在窗口大小更改(例如,设备方向更改)时更新应用程序状态 | namespace OZitter
public sealed partial class SplitPage : Page
private void Window_SizeChanged(object sender, Windows.UI.Core.WindowSizeChangedEventArgs e)
{
this.InvalidateVisualState();
} | 1 |
9c55c588748e3942450579378f28434b | 11fd888ca0f88c0d6ecce3c3c8411482 | Returns true if the object uses the presentation data form | public abstract class ProtocolCoder<T>
protected abstract boolean isForm(); | 1 |
0d1f32fee36eab9015bb3f0fd56dd778 | 94671e07167f4757355df5b75c0a02c0 | Decide if a page is edited with a page builder or not. | $page_template = get_post_meta( $page->ID, '_wp_page_template', true );
if ( !empty( $page_template ) && "default" != $page_template)
return false;
$has_post_content = empty( $page->post_content ) ? false : true;
$primary_content_area = get_post_meta($page->ID, "primary_content_area");
$uses_page_builder ... | 1 |
c1c39acb3491741684c4129b196921d2 | d5feaf74075ebb2ae2a95aa9c71cc59e | initialize network View and set type of synchronization | public abstract class NetworkListActivity extends ListActivity implements NetworkDataChangedListener, OnItemClickListener
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.networklist);
} | 0 |
d6bc006486652dc904a012269664b8af | 62037fc7fc8c861484084256cf0dc854 | Save session statistics. | $session = Service::Session();
$statData = $this->getSessionStat($session);
$statData[$key] = $value;
$this->saveSessionStat($session, $statData);
} | 1 |
f043d7e1174d48c684939ccb98de4b31 | 7a112232afc15e80ffb0f4f71aa503c1 | Returns the sum of two tensors. | public interface TensorAlgebra<T> : RingOps<Tensor<T>>
override fun Tensor<T>.plus(other: Tensor<T>): Tensor<T> | 1 |
30e2787d3aec5a4529f6d29d31f57e6b | f46c17644e329bd481a4a1b470187a81 | Create robot connection by Telnet | username = username.encode('utf-8')
password = password.encode('utf-8')
try:
tn = telnetlib.Telnet(host,port,timeout)
tn.set_debuglevel(5)
tn.read_until(b"Username:", timeout=2)
tn.write(username + b"\n")
tn.read_until(b"Password:", timeout=2)
tn.write(passwor... | 1 |
ec5838533c36e088ee3d2a4f8c98cfe8 | 931cb803d6bbcfeaf767e042a7e57963 | 格式化参数,如果是form-data格式则将参数封装到MultipartEntity否则封装到StringEntity | @SuppressWarnings("deprecation")
public class HttpServiceAgent
private HttpEntity paramsToEntity(RequestParams params,
ProgressHandlerInterface progressHandler) {
HttpEntity entity = null;
try {
if (params != null) {
entity = params.getEntity(progressHandler);
... | 0 |
470c8ff04e1ed7c94eb44ed8a99afc0c | 0bf24edaa9c5b18bb02fedfce68d55a0 | Number of segments that the side is divided on | public class IntCurveSurface_ThePolygonOfHInter
public int NbSegments() {
return OCCwrapJavaJNI.IntCurveSurface_ThePolygonOfHInter_NbSegments(swigCPtr, this);
} | 1 |
b6c32de04b100741357b6638ec5b5e18 | 0a51a8cfeae5adb72de87c178f11c021 | 根据标签获取居民 | @RequestMapping(value = "/getUser", method = RequestMethod.POST)
public Map<String, Object> getUserByTag(@RequestBody String jsonStr, HttpServletRequest request) {
BasicModel model = (BasicModel) request.getAttribute("BasicModel");
Map<String, String> result = null;
try {
result = service.getUserByTag(jsonSt... | 1 |
3b00c731d5fff0389671d0de2e976528 | c82e48dac529f5a51f3dbfe1c91ca995 | スライド窓による部分時系列データの作成 | @slide_count = time
@slide_from = from.collect {|i| i.to_f}
@slide_to = to.collect {|i| i.to_f}
@slide_real_pos = @slide_from.clone
2.times do |i|
@slide_speed[i] = (@slide_to[i] - @slide_from[i]) / @slide_count
end
@slide_processing = true
end | 0 |
746d5783770c56c532c0a06e96f90347 | 9cd66da70cd227005f4a4809be4695ba | Saves the qr evidence for later check during qr token validation. | public class QRDAL
public void registerQRCode(QRCode qrCode, Runnable onSuccess) {
collRef.document(qrCode.getId())
.set(qrCode)
.addOnSuccessListener(doc -> onSuccess.run());
} | 1 |
37e109f4606a553bdd4a2b8adb9891c7 | 781eb211f658a18fb7107e051d0a1fc5 | delete all selected widgets | void GraphicalPresentation::deleteComponent(){
this->presentation->deleteComponent(this->selectedWidgetVector);
this->unSelectAll();
this->sync(ControllerEvent::DeleteComponent);
} | 1 |
30a25a0db0be880fa9ce878eb679cdca | ac152fc2a34926a724f0168ee43a9be8 | Gets the value of the tempMin property.
possible object is
{@link Double } | public class WeatherSearchForm implements Serializable
public String getMinTemperature() {
return minTemperature;
} | 0 |
886b95846d15e0cbf51427641afd6553 | 47e1abd8409e39fe443aa7422194bda0 | Gets query for [[IdCliente0]]. | class Cliente extends \Phalcon\Mvc\Model
public function getClienteId()
{
return $this->cliente_id;
} | 0 |
b58900161de63bcc9da5dc75639749fc | 1e9b329c108d7eb38f06c6e54bec9869 | Retrieves a collection containing all sensors associated with the specified type. | public abstract String[] searchSensorType(String sensorTypeName); | 1 |
6f17f7e271685e1da4ecb018ef954c8c | 7fc61fecf5668378cde80e5d79ed2189 | If Open is given a negative initial deposit, it must return nil. | fun withdrawingMoney1() {
val john = bank.newCustomer("John Doe")
val account = bank.openAccount(john, openingDeposit = Money(100), limit = Balance(-100))
bank.withdraw(account , Money(80))
val x = account.balance
assertEquals(Balance(20) , x)
} | 0 |
8fe55418b54c525126623ec37981efbe | a655566b8ffe17aa29f2695aa2eed5ba | send an alert email if one hasn't been sent recently | class CronPopAlerts extends Command
public function fire()
{
$reset_inverval = 60*60*24;
$api_key = 'c3RhY2tvdmVyZmxvdy5';
$count = 1;
$url = 'http://54.196.143.144:8000/rest/popalerts?api_key='.$api_key.'&count='.$count;
$alert_intervals = array(5*60, 10*60, 30*60, 60*60, 2*60*60, 2*60*60, 8*60*60);
$bro... | 1 |
15e3b57ed34fa55fccee5e9cd75f2482 | 5cf68d4a4fd86ae42175252615029b6f | Computes the bit length set for a structure type given the bit length sets of each of its fields.
As far as bit length sets are concerned, structures are similar to fixed-length arrays. The difference
here is that the length value sets are not homogeneous across fields, as they can be of different types. | PriorityQueue<Node> frequencies, List<Byte> orderedBytes) {
int sizeInBits = 1 + Constants.BITS_LENGTH_SIZE + Constants.BYTES_BLOCK_SIZE + Constants.DICTIONARY_BITS_SIZE;
HashMap<Byte, Integer> frequenciesMap = new HashMap<>();
for (Node n : frequencies) {
... | 0 |
4b896147f26879ffc36f11dd6252b35b | eb41fec94fd383f09ac0cdea69778f75 | Тесты для функции my_strcspn. Возвращает количество неудачных тестов | char w1[] = "This is a sentence.";
char w2[] = "ezSrg";
printf("w1 = \"%s\"\nw2 = \"%s\"\n", w1, w2);
printf("strcspn(w1,w2) = %zu\n", strcspnJR(w1,w2));
return 0;
} | 0 |
0e997e97121ce70287ec2be53feb2317 | 2f07f6342017109edbe8954a13ff2d78 | Shows buffer in editor area starting at a given
number of line of buffer.
It's recommended to hide cursor before calling this function | {
if ($this->_buffer_position < $n) {
return false;
}
ob_start();
for ($i=0; $i<$n; $i++) {
if ($this->_buffer_position < mb_strlen($this->_buffer)) {
$head = mb_substr($this->_buffer, 0, $this->_buffer_position);
$tail = mb_substr($this->_buffer, $this->_buffer_position, mb_strlen($this->_buffer... | 0 |
7c350d1a6a9b5f499984444429e05f45 | 1eb6e4320deea3ae2d7a4bc871ba86ea | mutates the codig by flipping some bits. | def mutation(chr, mutPoint):
mutChr = chr.copy()
mutChr[mutPoint]=flipBit(mutChr[mutPoint])
return mutChr | 1 |
12a6eb78f7b3d5b8391862e88cbc6905 | 812cb78258728cbb330c9067e816d0e3 | 以PushEach方式更新 | class Builder extends BaseBuilder
public function push($column, $value = null, $unique = false)
{
$operator = $unique ? '$addToSet' : '$push';
$batch = (is_array($value) and array_keys($value) === range(0, count($value) - 1));
if (is_array($column)) {
$query = [$operator => $colu... | 1 |
18e1dd51b7145673e0ef592d7f6489cb | 8f9178b9a410a9039632003d54ef87f2 | 获取收藏歌手列表 | List<SolrSingers> listEnjoySingers(@Param("id") int id, @Param("start") int start, @Param("limit") int limit) throws Exception; | 1 |
1c7f809a9c58f15892cbb12624032273 | 8cebabe1b86396eb227a5d9ec56309b0 | Sets the local Meta Info equal to a received Meta Info | self.meta.update( dict(items) )
for key, value in self.meta.iteritems():
setattr( self, key, value ) | 1 |
f408c3c9a780d0f1afc67b93bcce2fa7 | 5d26df5640e4f8f498ab5071acbd01a9 | 根据地址显示当前路径下的所有文件(显示在右边的listview中) | items = new ArrayList<>();
paths = new ArrayList<>();
text.setText(filePath);
inpath = filePath;
File file = new File(filePath);
File[] listFile = file.listFiles();
List<File> fileList = new ArrayList<>();
List<File> floderList = new ArrayList<>();
... | 1 |
4e755fc8b3ab4ea84e0addb790845dac | 474152d59d3e81377f4ec71242a6a89f | Evaluation function for evaluating all the existing checkpoints.
This function just runs through all the existing checkpoints.
Raises:
ValueError: if model.checkpoint_dir doesn't have at least one
element. | config = run_configuration.config
run_dir = run_configuration.run_dir
adapter = run_configuration.adapter
optimizer = adapter.create_optimizer(run_configuration)
last_checkpoint_path = None
last_checkpoint_time = time.time()
checkpoint_dir = checkpoint_utils.build_checkpoint_dir(run_dir)
success_path = ... | 0 |
fbf92f87c55d9241c70d898026ccc343 | 0361c95d636fbdf19b7e156002e37597 | dataにノイズを付与。※ 元データを変更する | def add_noise(data,noise,c = 0.5):
signal=np.zeros(len(data))
for i in range(len(data)):
signal[i]=data[i]+float(c)*noise[i]
return signal | 0 |
3db80488a8f986d2098b8fabae7a2cd5 | 109ea1b5c5c6ede59ff007809add2455 | 初始化描述的三段文字的动画 | this.firstTextWt = egret.Tween.get(this.firstText);
this.firstTextWt
.to({y:this.stageH*0.156,alpha:1},2000,egret.Ease.backOut)
this.secondTextWt = egret.Tween.get(this.secondText);
this.secondTextWt
.wait(1500)
.to({y:this.stageH*0.579,alpha:1},2000,e... | 1 |
638ab633f57af69f7225e7bd357e35c1 | ad18caf6499e85024113ee0d74da92e5 | 下载所有需要更新的文件(根椐updatelist)并显示百分比 | export default class SubGameDownLoader{
refreshTasks(){
this.alreadydownloadsize=0;
for(let filepath in this.completeDic)
{
let item=this.newFileDic[filepath];
if(!item)
{
continue;
}
this.alreadydownloadsize+=item.siz... | 0 |
ab984c4bc575dd7e5d07bf06d2459013 | 7f07c174c55fd21c6fd3075520356975 | Returns the address the server will claim to be listening on in the PASV reply. Useful when
the server is behind a NAT firewall and the client sees a different address than the server
is using. | @NonNull HostWithPort getServerAddress(); | 1 |
b1f46c2fc666c62ced8948ff2d15499d | 429bb0a3991433dd52d39420f2f2fbd3 | Empties supplied buffer into the sink descriptor | FreeSinkBuffer(Sink *sinkPtr)
{
if (sinkPtr->bytes != sinkPtr->staticSpace) {
Blt_Free(sinkPtr->bytes);
}
sinkPtr->fd = -1;
} | 0 |
ddd69d41a24cd34d35189e03e168fb57 | 0e6b2445e9190c6242dc6819699c0029 | Validate the filetype of the model. | ext = os.path.splitext(value.name)[1]
valid_extensions = ['.csv']
if not ext.lower() in valid_extensions:
raise ValidationError('Unsupported file extension.') | 1 |
08fbe750695e2591ded631c507e76780 | d9b96a45abd3782cd597330270effefd | 根据爱人lid找到所有该爱人创建的所有loverImpDate的id | async function findIdByPid(lid){
let sql = 'select id from loverImpDate where pid = $1';
let ret = await pgdb.query(sql,[lid]);
if(ret.rowCount<=0){
return 1
}else{
return ret.rows;
}
} | 1 |
31f8bb0386279746d0084888d8ca1b6a | ef60c93bb47ad0f0af9f56bac11944bd | Проверка на количество открытых приватов за день. | class CounterDao extends Model
function onlineday()
{
$day = $this->db->num_rows($this->db->query("SELECT `ip_address` FROM `php_counter` WHERE DAYOFYEAR(`last_visit`) = " . (date('z') + 1) . " AND YEAR(`last_visit`) = " . date('Y')));
return $day;
} | 0 |
4741e022258b9770d3c3bd4d00e0f9a1 | 2cf6018629deb45439eae76e0b6d0010 | 判断楼梯显示隐藏 | private isCanChangeFloor() {
this.upstairsGroup.visible = true;
this.downstairsGroup.visible = true;
} | 0 |
e8109b928e4096d8c49d820f3d1515db | b2b54ffa36a0a6c26fa22da805346f4d | 复核明细汇总分页查询根据箱号汇总 | public List<BillOmRecheckDtl> findRecheckDtlGroupByBoxPage(SimplePage page, String orderByField, String orderBy,
Map<String, Object> params, AuthorityParams authorityParams) throws ServiceException; | 1 |
94e53fa18319868efe278c14ae8de666 | 1309fc863e82018330fb39e29f8d9865 | Tests the full circuit cutting pipeline returns the correct value and
gradient for a simple circuit using the `cut_circuit` transform with the TF interface. | fn test_cut() -> TestResult {
let p = polar();
p.load_str(
r#"a(x) if x = 1 or x = 2;
b(x) if x = 3 or x = 4;
bcut(x) if (x = 3 or x = 4) and cut;
c(a, b) if a(a) and b(b) and cut;
c_no_cut(a, b) if a(a) and b(b);
c_partial_cut(a, b) if a(a) and bcu... | 0 |
743373ff0f51dbf10ed993ac01a7e5c6 | 29672ff2f1a8365e7715fb2d7dafdae8 | Get the current view dimensions | if (config.debug) console.log('getViewportDimensions');
return {
width: ILPSLogging.$(window).width(),
height: ILPSLogging.$(window).height()
};
} | 1 |
d18a604680eb08bd21903bf28976504c | d9ac3f5a9364c3a8e4d4dc29c3e8e01b | 计算ppt学习进度 | @Service
public class ProServiceImpl implements ProService
@Override
public String showTotalPro(Long stuId, Short courseId) {
TkProgressExample tkProgressExample = new TkProgressExample();
TkProgressExample.Criteria criteria = tkProgressExample.createCriteria();
criteria.andStuIdEqualTo(stuI... | 0 |
35b2e7dca40aa77e4684e93ba08469d4 | 03003753838d96ccd0ea1d526c69b7a6 | Função gira 180° | global grelha
nova_grelha = []
for i in range(4):
nova_grelha.append([])
for j in range(4):
nova_grelha[i].append(grelha[j][i])
grelha = nova_grelha
return(grelha) | 0 |
624866d651f861b16b308c83cdf305cb | dd17c6ce877b878024e8b50d0d320bb8 | Handles the 'tick' event of the executionTimer. | namespace SACS.Implementation
[Serializable]
public abstract class ServiceAppBase : MarshalByRefObject
private void ExecutionTimer_Tick(object state)
{
if (this.IsStopped)
{
_executionTimer.Change(Timeout.Infinite, Timeout.Infinite);
return;
... | 1 |
2af524ff24a22724395bdb02752616e7 | 370ec685c755834f59eb967b246d48e9 | Finds minimum interval between choosen peaks. | array_length = len(note_info)
i = 0
minimum = 99
while i < array_length - 1:
current_interval = note_info[i + 1][1] - note_info[i][1]
if current_interval < minimum:
minimum = current_interval
i += 1
return round(minimum, 5) | 1 |
bf6277781e2505e08b5c3d87ea29ebbe | da6a44abfd32530e388c77e4b35b1281 | Called when receiving input events from controller, sets player vars accordingly | public class Player : MonoBehaviour
public void HandleInput()
{
if (_controller._state.IsGrounded)
{
_starttime = Time.time;
}
if (Input.GetKey(KeyCode.D))
{
_normalizedHorizonalSpeed = 1;
}
else if (Input.GetKey(KeyCode.A))
{
... | 1 |
b60254b3c508e9e5bc4cd96ca06b9949 | e6bd8bb8896ac5aee0d4387bc24d2e66 | This method overrides existing filterQueries without warning or error.
<p>
If multiple filters are to be used, consider collapsing them into one:
{@code ["foo", "bar"]} → {@code ["(foo) AND (bar)"]}.
<p> | @SolrQl
fun SolrQuery.fq(vararg fq: String): SolrQuery = setFilterQueries(*fq) | 1 |
77d55c81b5c87956c189423ac27c906e | 386bc80d7833b96d61b982c3c5728fe4 | Returns the sum of all the monthly income sources | class DataRecord2225700
def income_all_total
return 0 if target_months.empty?
target_months.map do |month|
send("#{month}_income_currency").to_i + send("#{month}_income_goods").to_i
end.inject(:+)
end | 1 |
6a8dc92b402afb771d9d85978c31a67a | 627686b54c261bcafbea049e58621efb | Проверяет, является ли город Москвой | city_name='Лондон'
list_city = home_page.search_list(city_name)
for city in list_city:
assert city_name in city | 0 |
c806ec1007e040375fe79a7a95a8eff6 | b1bbee0c11a5a8304595a820bfcdffa6 | Parse dcov log basic block table from filestream. | block_parsers = {
0x50: self.parse_header,
0x44: self.parse_copyright,
0x42: self.parse_overview,
0x4C: self.parse_detail,
0x52: self.parse_trademark,
}
while self.f.read(1):
self.f.seek(-1, 1)
b = Block(self.f)
... | 1 |
b40c04fc0cc9c65f29e0342607d064a5 | 22fc6d4f845032afecd3858a14f33108 | 根据分页对象、所属部门ID号,分页查询用户列表 | List<User> findUserByOrgIdNoPage(Map<String, Object> map); | 0 |
5b5ac315c5b871be1a5974dff2aef439 | 141d311d0b021339bb35d692b353ced0 | funcion para cargar Totales Detalle de Factura | forms.factura_formas_de_pago_detalle.foundset.deleteAllRecords()
forms.factura_formas_de_pago.vl_total_factura = forms.facturacion_pagos.vl_total
forms.factura_formas_de_pago.vl_cheques = 0
forms.factura_formas_de_pago.vl_efectivo = 0
forms.factura_formas_de_pago.vl_transferencia = 0
forms.factura_formas_de_pago.... | 0 |
2090fd6a8dc7762592b66322bb9cf1e8 | 85acebdcdf0fcd1c06240e0c4b29f12b | 获取体力药水信息并使用 | class Item
public static function useDrug($item)
{
$user_role_id = Session::get('user.account.user_role_id');
$row = DB::query()
->select([
'ur.*',
])
->from('user_role AS ur')
->where('ur.id', '=', $user_role_id)
->get()
... | 1 |
c53ce45ab89df00ec04da4dd28f0a6d5 | 594567440203d39ff6dd7434b88a93fa | 创建服务端的证书 | ca := &x509.Certificate{
SerialNumber: big.NewInt(1653),
Subject: pkix.Name{
Organization: []string{organization},
},
NotBefore: time.Now(),
NotAfter: time.Now().AddDate(10, 0, 0),
SubjectKeyId: []byte{1, 2, 3, 4, 5},
BasicConstraintsValid: true,
IsCA: ... | 1 |
836e3970a246135048ac7200a663a049 | b91b1763d4f1618290b0b6c6b8d5f899 | Generates base Highcharts graph option structure | const { width, height } = dimensions
return {
width,
height: height + 10,
title,
xaxis: {
type: 'category'
},
yaxis: {
zeroline: true,
showline: true,
title: expressionLabel
},
margin: {
pad: 10,
b: 100
},
autosize: true
}
} | 1 |
3bc8c9fe2daf33df55d9a673c05a089a | e381e75dc76b632e60c5175cb9db13ca | Test that MediaFileManager removes session maps when requested (even if empty). | $this->resetAfterTest(true);
$instance = cache_config_phpunittest::instance(true);
$instance->phpunit_add_file_store('testfilestore');
$instance->phpunit_add_definition('phpunit/testappsession', array(
'mode' => cache_store::MODE_SESSION,
'component' => 'phpunit',... | 0 |
b987e2108bc754916e1c28626c514284 | db785c8288921e1c75d4b74a0ea3beea | Change the hilite of the user that's currently selected | public class ParticipantTree
public void highlightSelectedUsers()
{
if (isHighlightUsersOn())
{
removeHighlighting();
highlightUsers(selectedUsers);
}
} | 1 |
1a05903bdb3d8eb6f9fcfd1e7972e09c | 48ab1d77500ca3a722cb38329192d25a | Pull all testcases to the worker. | class TestProblems(unittest.TestCase):
def start_tests(self):
for _ in range(min(NUM_WORKERS, NUM_TESTS)):
self.start_next_test() | 0 |
d43b7978aabe04caa54e08ab19ea6bd9 | dc4e0178d105c86757a95a5284183afd | Create and return an integer counter. | def createCounter():
base=[0]
def counter():
base[0]+=1
return base[0]
return counter | 1 |
0f496a7137d58bec5b78faa558bb7d2c | 94f9a21e001d98b16b8cd4e63fbb0355 | Dump an attribute of a FunctionInfo object. | void deDumpFunction(deFunction function) {
deString string = deMutableStringCreate();
deDumpFunctionStr(string, function);
printf("%s", deStringGetCstr(string));
fflush(stdout);
deStringDestroy(string);
} | 0 |
71c8f0ecf96800dd3e932cccd72ae1d9 | 701e5eb1a2b4517b0d85b53b5ad19c05 | В зависимости от тега траектории меняем материал | {
var self = this;
self.target;
self.run = function(event)
{
self.target = $(event.currentTarget);
var id = $(event.currentTarget).data('id');
if (id.trim().length != 0) {
$('.tour-content__tabs__... | 0 |
46aa451abeca5f509c2f1ab9dbbbadaf | 37793cbc4b54cbbd97cc0a1dd946b231 | Method checks if name validation error is present | class NameFieldTest extends TestCase
public function testHasError()
{
$nameField = new NameField('foo');
self::assertFalse($nameField->hasError());
} | 1 |
c471f677493ed340d84fe4108760cd2a | f4d33071c6c895627babcb2b6d2355a3 | 用手机号登录, 其中mobilePhoneNumber和smsCode为必填字段 | export class LoginApiService
public loginByMobile(mobile: string, code: string): Observable<any> {
const url = '/auth/mobile/token/sms';
const grant_type = 'mobile';
let header = new HttpHeaders();
header.set("isToken", "false");
header.set("TENANT_ID", "1");
header.set("Authorization", AUTHORIZ... | 1 |
6cae773fd100bcb4c798efdc6e714289 | f473e2c0494136015e756c3e663c6f97 | Initiate connection on the logical channel.
o for PVC we just get channel configuration
o for SVCs place an X.25 call
>0 connection in progress
<0 failure | void
vchan_init(self)
XObj self;
{
PState *pstate;
xTrace0(vchanp, TR_GROSS_EVENTS, "VCHAN init");
xAssert(xIsProtocol(self));
pstate = X_NEW(PState);
self->state = (VOID *)pstate;
pstate->activeMap = mapCreate(ACTIVE_MAP_SIZE, sizeof(ActiveKey));
getProcProtl(self);
} | 0 |
a4211a3b49535a41885a6df8bbe5c0e0 | e18cf7137a6714b4ee9be30617d0431d | Draws the textures to the stage based on the chosen character, and based
on all of the selected DTs. | public class LocalWorldStage extends UiStage
public void draw() {
handleInput();
camera.update();
getBatch().setProjectionMatrix(camera.combined);
drawingUtil.begin();
tileRenderer.render();
entitySelectorRenderer.render();
drawingUtil.end();
} | 0 |
d0d062510f01629340b31431b1859ecc | 1021b0694c92cc4c49a4cc6cf4484230 | 数据列名转属性名 | public class Sort implements Serializable
private String transferColName(String field) {
String column = MapperFactory.prop2Item(entityClass, field).getColumn();
if (field == null || field.trim().isEmpty())
throw new BaseDaoException("DB1001", String.format("未找到属性[%s]映射的数据库字段", field));
... | 0 |
33213bbee8daaf369ce89519844f84d8 | 479e23e631eb70982183a01f4d0a0c0d | первый обход в глубину для алгоритма Косарайю для подсчета времени выхода из вершин | if (marks[v] == State.GRAY) return true;
if (marks[v] == State.BLACK) return false;
marks[v] = State.GRAY;
var e;
for (var i = 0; i < graph.length; i++) {
if (graph[i].V === v) {
e = graph[i];
}
}
if(!maxTime) maxTime = 0;
... | 1 |
a1622e0bf7b4b437a37af4aa9b897ca3 | 1c68d5457b8acded689c092105c6e356 | Apply Pending Changes | namespace SO.PictManager.Forms
public partial class ListForm : BaseForm
private void btnApplyChanges_Click(object sender, EventArgs e)
{
try
{
if (FormUtilities.ShowMessage("Q008") == DialogResult.No)
{
return;
}
... | 1 |
0c2e360166bc2d0b0a2b278e8b78c98e | f414c96db13050864e92a648ed54c36c | Current revision id for the multi cluster app (string) | public class LocalCluster extends ModelFields
public String getModelIdRe() {
return CLUSTER_RE;
} | 0 |
38f89b638bc47c0d19ffc6fe261bf0ad | 29a016333a82a726fec8ee7c08040164 | Cannot recurse into BadExpression | namespace DataDictionary.Interpreter
public class ContextGrabber : Visitor
protected override void VisitExpression(Expression expression)
{
if (ShouldCheck(expression))
{
base.VisitExpression(expression);
}
} | 1 |
23f0478fdc6f8836b897ac66eb478bb5 | ff8002c6cee7c897f20db630ad6c4ca3 | Open receipt window | void on_receipt_nfc_finish_button_clicked ()
{
kill_nfc_receipt_process();
Bitwise WindowSwitcherFlag;
f_status_window = FALSE;
f_mainmenu_window = TRUE;
WindowSwitcher(WindowSwitcherFlag);
} | 0 |
2d5676add80d5bd3f431aaed2aaa7b4d | d3320901d621f724e2d073be855bcff4 | 1 H <- D | def op_0x62():
registers.H = registers.D
registers.PC += 1
cpu.wait_for_cycles(1) | 1 |
3eab672b3d1953f1ab7f539bce06a230 | 6068f27e2db1520dcb23b8ad36110696 | Adds a point at end of path | {
_path.Add(_path[0]);
CurrentLength += DistanceBetweenTwoPoints(_path[_path.Count - 1], _path[_path.Count - 2]);
} | 0 |
846b5517d41e2a0ca75b0198d377e584 | 7cd365a071255adfa44de87a8028f8c8 | 単一行テキスト入力フォームを生成する | {
$form = new Zend_Form();
$element = new Zend_Form_Element_Text($elementName);
$form->addElement($element);
return $form;
} | 1 |
25eee9f7fdc09644818b387011861a77 | 14d42805f6bc69a69b4e6de981f5ae4c | The address of the copy of the router table | class ArpanetNode(GCompound):
def getRoutingTable(self):
return self._routingTable | 0 |
58fbe0d608dcefa674f5e12237066b09 | fc6bca860585c8e4c782db9bf956b970 | Asynchroniczne zadanie wczytujące wszystkich odbiorców do kolekcji | Observable
.Defer(
() =>
Observable
.Start(
() => this.repository.GetAll(),
this.dataStoreScheduler)); | 1 |
0db24d45742ea2bbe66f74800e3a1bb0 | 17539abd7d93e41b90c197609f489546 | Returns a list containing randomly selected items from an input list. | {
T[] copyArray = new T[inputList.Count];
inputList.CopyTo(copyArray);
List<T> copyList = new List<T>();
copyList.AddRange(copyArray);
List<T> outputList = new List<T>();
Random rd = new Random(DateTime.Now.Millisecond);
while (... | 1 |
e726196e0729b751e41944fd0b2b514e | f03f7f7ca3e26f43ae4fb83eb1cb876d | POST /bricks | class BlocksController
def create
@block = Block.new(block_params)
@block_types = BlockType.all().order('id DESC')
@characters = Character.all().order(:name)
last_block = Block.order('position DESC').limit(1).pluck(:position)
@block.position = last_block[0].to_i + 1
respond_to do |format|
... | 1 |
29d63d51c98cf10db367d6ad6865d38d | 076fa801a4fd420de0f9c0e7ea4ddfc8 | Create Direct2D factory. | HRESULT ZZ::D2DGraphicsManager::CreateDeviceIndependentResources()
{
HRESULT hr = S_OK;
hr = D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, &m_pDirect2dFactory);
return hr;
} | 1 |
a012d595e6955e246a021de7e66816d9 | b6e7403dd240a9411741795a64dd889f | Tells the drone to hold its position | class Drone:
def position_hold(self):
while self.running:
self.position_control(self.ph_command) | 1 |
5b7752d231f77265cd5f754a8172cd36 | 2d1f2501480f7b39931d13f061e9a5c0 | Tests that duplicate states will not be added. | def test_duplicate_state(fixed_harmonic_sample, caplog):
_, u_kn, _, _ = fixed_harmonic_sample.sample(N_k, mode="u_kn")
u_kn_dup = np.append(u_kn, u_kn[[0], :], axis=0)
N_k_dup = np.append(N_k, [0])
mbar = MBAR(u_kn_dup, N_k_dup, verbose=True)
assert "likely to to be the same thermodynamic state" in... | 1 |
31e099021e3db13ed3cb1cf4a9be5884 | fc05ecd031580cd84bdb9a888d4da484 | Compute the light sampling weight, which 1/pdf | const Quaternion lightOrientation, float distanceToLight)
{
Float3 lightBasisZ = Float3::Transform(Float3(0.0f, 0.0f, -1.0f), lightOrientation);
float areaNDotL = Saturate(Float3::Dot(sampleDir, lightBasisZ));
return (distanceToLight * distanceToLight) / (areaNDotL ... | 1 |
14b9185927cf9ebfced9e7b66827ddf8 | 8fcc61fdfa7553897d70f95988d840da | Configuramos en el constructor del controlador la autenticación usando el Middleware auth.basic,
pero solamente para los métodos de crear, actualizar y borrar. | class ConfiguracionesController extends Controller
public function __construct()
{
$this->middleware('auth');
} | 0 |
64b310a2050f0afcc14582e9f8e83f3e | 995050a7d06b183a1abb6d928abd9b13 | Returns a dictionary of {componenetID: cost} | def vehicle_cost0():
return {
'primary': 0,
'secondary': 0,
'd_minutes': [],
'distances': [],
'stops': [],
'arrivals': [],
'deliveries': {},
'checked': {},
} | 0 |
2f4b53bef75141f551133e1960b64709 | 63a05589c46524c1f24065beedf7c93c | Calculate the Stochastic Relative Strength Index (Stochastic RSI) | class Indicators
static calcStochRsi(serie, rsiPeriod, k4Stoch, d4Stoch, smooth4Stoch, returnArray=false){
const rsiArr = this.calcRsi(serie, rsiPeriod, true);
const result = this.calcStoch(rsiArr, rsiArr, rsiArr, k4Stoch, d4Stoch, smooth4Stoch, true)
if(returnArray) return result;
retur... | 1 |
a11ebda437f932b28377e04ea89fbe3f | 47c02778787d4677d86d9558c6d3fb1e | Changes category of item | $now_date = date("Y/m/d H:i:s");
$sql = 'UPDATE ec_item_details SET category =? ,update_datetime=? WHERE item_id=?';
$stmt = $dbh -> prepare($sql);
$stmt ->bindValue(1,$_POST['category'], PDO::PARAM_INT);
$stmt ->bindValue(2,$now_date, PDO::PARAM_STR);
$stmt ->bi... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.