query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
499c877b85759669476b7398f9649bc6 | 3bc3e869e7cddec49cee71a8f7665be0 | Genera informe conciso sobre datasets correctamente. | catalog = os.path.join(self.SAMPLES_DIR, "missing_periodicity.json")
indicators = self.dj.generate_catalogs_indicators(catalog)[0][0]
expected = {
'datasets_actualizados_cant': 0,
'datasets_desactualizados_cant': 0,
'datasets_actualizados_pct': 0
}
... | 0 |
15dfa1ab4cf084bafb0f5df3555a1a6e | 225bc94db6468ee57440b6a60542a0b8 | 学生关注老师 | class Organization extends Controller
public function attention_teacher(){
$attention_teacher_data = input('post.');
if (empty($attention_teacher_data['user_token'])) {
return returnJson(-1,'请登录...');
}
if (!$user_find = Db::name('user')->where('user_token',$attention_teacher... | 1 |
98c9bd8a594c01af75542785d65764f3 | 65cc90b5cf27a4bbf2ea355a90027d0e | Identify main chain - main chain hydrogen bonds in protein.
Found bonds satisfy custom criteria. | final HydrogenBondCriteria defaultCriteria = new HydrogenBondCriteria();
final HydrogenBondFinder hydrogenBondFinder = new HydrogenBondFinder(pdbStructureParser);
return hydrogenBondFinder.findMainSideHydrogenBonds(defaultCriteria);
} | 1 |
3652adbbbd8829704ec1bd629d7d02bb | 93d0086921e94aa0d0e40855a6fabc6c | return a single field, the average entropy | def expected_entropy(x):
return np.mean(entropy(x), axis=-1) | 1 |
923c7722424076bfdbdfa45f8dec1c09 | 377cab8ab00484c9d0b0bfb17f79c161 | Tells the container item to disable focus | namespace MS.Internal.AutomationProxies
class WindowsTabItem : ProxyFragment, ISelectionItemProvider, IScrollItemProvider
internal override bool SetFocus()
{
if (Misc.IsBitSet(WindowStyle, NativeMethods.TCS_FOCUSNEVER))
{
return false;
}
Window... | 0 |
176cd5dafcbd37013859020afdc7fbca | 2ce90d1dfe152f84f094f93a666c73e0 | Checking copy of a File (checking not overwriting) | mock_copy.return_value = {}
try:
self.fs.copy('/file1.txt', '/file2.txt')
except Exception, e:
self.fail(e) | 0 |
0c6d14b79b2946516539bb89293c8f87 | 41d3b0a8ad5c9082b60babec194de64a | Get the http client builder instance. | class Builder
public function getHttpClient(): HttpMethodsClient
{
if ($this->httpClientModified) {
$this->httpClientModified = false;
$plugins = $this->plugins;
if ($this->cachePlugin) {
$plugins[] = $this->cachePlugin;
}
$this->pl... | 0 |
15b1e9e676c85a953356673a05862c64 | e1eb5431518ee5dfe85a1800489c08a1 | takes the best classifier after tuning hyperparameters, and trains and tests it on the full training dataset
and then makes predictions on the test dataset | t0 = time.time()
classifier.fit(train_vectors, train_labels)
t1 = time.time()
prediction=classifier.predict(test_vectors)
t2 = time.time()
time_train=t1-t0
time_predict=t2-t1
accuracy=m.accuracy_score(test_labels,prediction)
precision=m.precision_s... | 1 |
4ad8db1eeae97d06c4ef5b7a37f18cf2 | f33a6e63442ee7710217109fe2e508b2 | 自动添加球员, 添加到阵容或者仓库 | {
if (Player
.Where(p => p != null)
.Any(p => p.Controller.ControllerID == controller.ControllerID)
)
return;
Player player = new Player(controller);
for (int i = 0; i < 4; ++i)
if (Player[... | 1 |
132ee3294efcaaf2ff5dfc2aa6b9e4b4 | 7718ef7f58df88f6d008018dc24758bd | Returns the meta object for the '{@link Logo.Expression#eval(java.util.Map) <em>Eval</em>}' operation.
<!-- begin-user-doc -->
<!-- end-user-doc --> | EAttribute getQualitativeMapping_Evaluation(); | 0 |
0c64cc11e787f60459e7dd4ae0340339 | 0e979c55b8d0c8cf80d26028889fddce | This takes a dictionary (word tuples/co-occurrences -> counts) and a vocabulary;
returns a dictionary mapping each word to an index, as well as
a Scipy Sparse matrix containing the counts at the index positions. | def vectorize(co_occurrences, min_threshold=0, max_threshold=np.inf,
verbose=True):
start = time.time()
C = []
row_names = []
for row_name, features in co_occurrences.items():
row_names.append(row_name)
C.append(features)
row_names = np.array(row_names)
v = DictVect... | 1 |
a9c850640a25d10eaec0a2e0d40f6d53 | d1f434bc484bfab4d22f00bbb1cf9f85 | Stores the specified number of elements from the start of the current sequence and creates
an infinite sequence that loops repeatedly over the stored items. | namespace TestStack.Dossier.DataSources.Picking
public class Pick
public static RepeatingSequenceSource<T> RepeatingSequenceFrom<T>(IList<T> list)
{
return new RepeatingSequenceSource<T>(list);
} | 1 |
853c0e6336ecf69e978df427eb723178 | 0bc541142fbc17a7bca027ca124b1b84 | Based on the time of day, decide whether the
lights should be turned on or off. | public class GameTime : MonoBehaviour
private void AdjustLighting(bool brighten)
{
float pos = 0;
if(brighten)
{
pos = (timeOfDay - sunRise) / _morningLength;
}
else
{
pos = (sunSet - timeOfDay) / _eveningLength;
}
RenderSettings.ambientLight = new Color(ambLightMin.r + ambLightMax.r * pos,
... | 0 |
7127ff700b83dd27f4d67ae4caf58789 | d813c44b72e53f6a6668449b0b9307b5 | Calcular Bin para Dec | namespace ConversorNumeros
public class Conversor
public static double BinarioDecimal(string bin)
{
int longBin = bin.Length;
char[] array = bin.ToCharArray();
Array.Reverse(array);
double resultado = 0;
for (int i = 0; i < longBin; i++)
... | 1 |
27afaa11297732e28c808f9d0e296bd7 | 684f01809204b34b9afb0c7d79ff5357 | Try to connect to the core service, if not connected. | namespace Xked.ClientHelper
public class Scheduler
private static void TryConnectScheduler()
{
lock (scheduler)
{
if (!scheduler.Connected)
{
scheduler.Connect(
"",
"",
... | 1 |
5f8355df2c616ce34239e08f92ab3735 | 03577116b1dce234fc9709b10bdcf72b | hàm đổi màu lbl mức thưởng theo số câu hỏi người chơi trả lời được | {
String chucNang = "Tăng may mắn";
lbLoiNoi.Text = chucNang;
} | 0 |
28c68cfcc7f9c7b54f65c5f271308a23 | 508a3e69787939f92e43edd9c0199c99 | 实例化工作流模型中涉及的数据流文件
算法:根据workflowDocument中的记录,将object所对应的文档从模型的模版库中拷贝到
该模型实际运行的某个package的process目录下。
文件的路径存储在path中。 | doc.setId(params.getParameterAsString("content.id"));
doc.setSortId(params.getParameterAsString("content.sortId"));
Long versions = params.getParameterAsLong("content.versions");
doc.setVersions(versions != null ? versions.intValue() : 0);
doc.setFlowid(params.getParameterAsString("_flowid"));
} | 0 |
c41e72f254f283b53ba7207d6a5e1de7 | a3227f766714411e5d093480479b4ea5 | 更新逻辑集群权限点 | JSONObject j = new JSONObject();
j.put("success", true);
if (this.getLimitFile(this.getOperator()) != null) {
try {
LimitAction limitAction = new LimitAction();
List<Permissions> ps = limitAction.getPermissions(limitAction
.getLimitPath());
List<Permissions> limits = new ArrayList<Permissions... | 1 |
4cf77e558865c3a367e1fe712859d1db | 5bfc2553633e4c5198b4d4cd42892544 | Creates the yield curve valuation. | {
var nsCurve = new NsCurve
{
Short = Get(Series.InterestRateOneYears),
Long = Get(Series.InterestRateTwentyYears),
Convexity = 1.8
};
return nsCurve.GetYield(maturity);
} | 1 |
1620386395fb51f07153e43858205743 | 46e873ea9e2050a1e468cb7e025c3b24 | Return true iff there is a valid login session.
If you use some other mechanism for telling if somebody is logged in,
override this function. | class Base
def logged_in?
return false unless @cookie
true
end | 1 |
481ed4238623ae4472c675c4aed7f992 | c540489149a9feb0ca336436099e578b | 根据股票代码和时间范围, 查询出所有历史股价信息(default) | def query_history_k_data(code, fields, start, end, frequency, adjustflag):
rs = bs.query_history_k_data_plus(
code, fields, start_date=start, end_date=end,
frequency=frequency, adjustflag=adjustflag
)
data_list = []
while (rs.error_code == '0') & rs.next():
data_list.append(rs.ge... | 1 |
a57349c382a6b1e22d3afb243d3bbffd | 94422d6b45aa1bca8e5d944189ad01de | 游客新建项目 | if(empty($_POST['project']))
$this->display('create');
else {
if($this->visitor->create($_POST['project'])) {
$this->bare($_POST['project']);
if($this->config($_POST['project']))
$this->push();
echo 'success';
}
else {
echo 'failed';
}
}
} | 1 |
c0b2328619d1e93e554e897bfdbf9e3a | e7bbd107ca1abe3afbdeb1339fba93c9 | Wheter to allow Froala in open list items | export class ConversationItem extends Item{
get allowNewComments(): boolean{
return this._allowNewComments;
} | 0 |
0b399f87dd95c271c9025edf5e3a0bd3 | 4a965e2e10fd3d004464821cd61d2ad2 | Insert element e into list before Position p and return new Postion. | public void addAfter(Position<E> p, E e) throws InvalidPositionException; | 0 |
4392bb14b5e62882a80ac7bda733fd27 | 1efce69f251f72321b6dc56bec28b58f | 어드민 쪽지 메인 화면 | $members = Member::all();
$id = Auth::id();
$author = User::find($id);
$inboxes = Inbox::where('member_id', '=', $id)->get();
$unread = Inbox::where('mail_read', '=', '0')
->where('member_id', '=', $id)
->get()->count();
r... | 1 |
433de2de294ee861d1ade2935f149950 | 811455f0de23c533c56b3baf989489b9 | Este método permite listar los niveles de un regimen laboral especifico | {
$carreras = Carrera::where('id_nivel', $request)->get();
return response()->json(['carreras' => $carreras ]);
} | 0 |
c7862980fc2c1e710a142cc3f4fd61ce | 96386f2a8f7b46ea5de2e9d9aac9d58e | Validation for null of mandatory fields (First Name, Last Name, Email, Registration Date, City) | valid = true;
var arr = [$('#name'), $('#lastname'), $('#city'), $('#phone')];
if (check_validator(arr) > 0) {
return false;
}
return valid;
} | 0 |
c7357fdec01460cd54ad932ea6c04aa4 | f4ac2b0a21a7e05af778370981ba56e2 | detect requested language.
if user denote a language, that language will be load,
else check session, if exist session variable, load that language,
else in the end load language which config denote. | class Controller extends CController
protected function selectLanguage() {
if (!empty($_GET['lang'])) {
$lang = $_GET['lang'];
} elseif (!empty(Yii::app()->session['lang'])) {
$lang = Yii::app()->session['lang'];
} elseif (!empty(Yii::app()->request->cookies['lang'])) {
... | 1 |
49e009646486ccc864aab651e2f8371c | ca121539d76921842b3203b059b55b96 | Returns name of default data type for specified data kind | if (dt < 0 ||
dt >= sizeof(graph_datatype_names) / sizeof(*graph_datatype_names))
return NULL;
return graph_datatype_names[dt];
} | 1 |
8c5471e770630e91b67fe489824227a9 | 5fab1ea5650df51d2df9a3deba615fa0 | This function pops all the contents of stack C and pushes them back to stack A. | {
int tmp;
tmp = 0;
if (inst->amt_b == 0)
return ;
while (tmp < inst->amt_a)
{
inst->stk_a[inst->amt_a - tmp] = inst->stk_a[inst->amt_a - tmp - 1];
tmp++;
}
inst->stk_a[0] = inst->stk_b[0];
inst->amt_a++;
inst->amt_b--;
tmp = 0;
while (tmp < inst->amt_b)
{
inst->stk_b[tmp] = inst->stk_b[tmp + 1];
... | 0 |
e57c1f34f8ed6a43032d8a445502e898 | f58ec2e35aa80b41f56119fb51769939 | Plot a surface contour in LINES style | Display(const int in_color) const
{
glPushAttrib(GL_LIGHTING_BIT|GL_TEXTURE_BIT|GL_LINE_BIT);
glLineWidth(1);glDisable(GL_LIGHTING);glDisable(GL_TEXTURE_2D);
ARRAY<typename OPENGL_POLICY<T>::T_GL> vertices;
for(int i=lines.domain.min_corner.x;i<=lines.domain.max_corner.x;i++)for(int j=lines.domain.min_c... | 1 |
431c51bcf5955573262183a4fa4386bf | d9b4af521daff66bbb8f6adf48bafb31 | The default display is the form + error list as ul if needed. | {
$html = '';
if ($this->show_form) {
$html .= $this->get_delete_script();
$list_title = $this->get_list_title();
if( $list_title ) $html .= get_header( $list_title );
}
if (!$this->show_form) {
$html .= $this->show_list();
} el... | 0 |
267d79b51b5e8cac9a0828c0f85e06cc | 2794d4c6b4d858a616e8bf758f01e1a2 | Get the number of live decommissioned datanodes. | public class EnvironmentStats implements Serializable
public long getNLNsDead() {
return cleanerStats.getLong(CLEANER_LNS_DEAD);
} | 0 |
296a4756810ef72fb97d0ac88ce6fbd7 | 76b387c034a947e617671ca6fe9480ac | 根据token字符串获取AccessToken | public class KuaiPanOAuth
public AccessTokenRes accessToken(RequestTokenRes param, String verifer){
try{
AuthEntity oauth = new AuthEntity();
oauth.setConsumerKey(KuaiPanGlobal.CONSUMER_KEY);
oauth.setSignatureMethod(KuaiPanGlobal.SIGNATURE_METHOD);
oauth.setTimes... | 1 |
4cbcbeba15dc85ec9107649199f1ee64 | 0dc255ce150c3b9c6abd9ea608a78551 | Получает метрики RAM на заданном диапазоне времени | namespace MetricsAgent.Controllers
[Route("api/networkMetrics")]
[ApiController]
public class NetworkMetricsController : ControllerBase
[HttpGet("from/{fromTime}/to/{toTime}")]
public IActionResult GetNetworkMetrics([FromRoute] DateTimeOffset fromTime, [FromRoute] DateTimeOffset toTime)
{
... | 0 |
8f4c2f640fdd9cd802fb3aaacab37d34 | 960add5060b295478070ebad128d9128 | Handle AJAX data for the GA dashboard widget. | class DashboardController extends AdminController
public function getChartData (Request $request) {
$profileId = Settings::get('ga_profile_id');
$tokenData = Settings::get('ga_token');
$token = (array)json_decode($tokenData);
$from = '30daysAgo';
$to = 'today';
$metrics =... | 1 |
93ab68624218d497b7100b0ac2856ccd | ac331fe855ba86a9601a6ec9503c35f4 | 验证供应商绑定情况(成功返回openid) | {
global $DB;
$data = [];
$rsBfUser = UsersBindFrontRelation::find($UsersID);
if (!$rsBfUser) {
$data = [
'status' => - 1,
'msg' => '您还没有绑定前台会员账号,请绑定会员账号!'
];
} else {
$rsBfUser = $rsBfUser->toArray();
$rsBindUser = UserBindYijiPay::Multiwhere(... | 1 |
fb4e6f0e66f4b1f09d2eab44ec0629b2 | ed95cc23f62ce0d88c1512b492558b5e | Creates an array of "name=value" elements, suitable for
<code>Runtime.getRuntime().exec()</code>. | public class WebCATConfiguration
public String[] envp()
{
if (envp == null)
{
ArrayList<String> envList = new ArrayList<String>();
for (Map.Entry<String, String> entry : envMap.entrySet())
{
envList.add(entry.getKey() + "=" + entry.getValue());
... | 1 |
f5d17b3ba316081c6cf515fb03aeeed3 | 766799130067c34bba781aaf13cf4856 | Select Text in the webview and automatically sends the selected text to the clipboard | function onClickHandler(info, tab) {
chrome.tabs.query({active: true, currentWindow: true}, function(tabs) {
chrome.tabs.sendMessage(tabs[0].id, {"selectionText": info.selectionText}, function(response) {
});
});
} | 0 |
128daabf2e210c8c6e5df95e421ef1eb | b6368c813819df7b164ac807f73d948f | Add a recovery request to the database | class RecoverManager implements RecoverManagerInterface, ServiceLocatorAwareInterface
public function createRecover(UserEntityInterface $user, RequestInterface $request)
{
if ($user->getState() !== UserEntityInterface::STATE_CONFIRMED) {
return false;
}
$class = $this->getUserOpt... | 1 |
aa9e2034ceeebce30949e7a2e2b16dc5 | c82dd2b538e0fa211d6470ef5c57bfc0 | 两个小数的四则运算 | public class Test_BasicOperator
@Test
public void testBasicFourOperator() {
basicOperator.basicFourOperator(9, 80);
} | 0 |
25ae47d0c459ba437b5ab781d498ee06 | 04a2d7dff2de08ba1394d2c605a7b9da | Integer between -32768 to +32767. | if u32 < 0x80000000:
return u32;
return u32 - UINT32_MAX - 1; | 0 |
609eec746104593ccafb02c0f03d4356 | b3528f7d9df38732702013fc9f3046f5 | Center justify the whole page | namespace ACSEditor
[Docking(DockingBehavior.Ask), ComVisible(true), ClassInterface(ClassInterfaceType.AutoDispatch), ToolboxBitmap(typeof(Editor), "Resources.HTML.bmp")]
public partial class Editor : UserControl, SearchableBrowser
private void justifyCenterButton_Click(object sender, EventArgs e)
{
... | 1 |
d40b5b1e89f7ddc127048125ba439d6e | 76f78165f4dc2c9189bb3d2104f7bb94 | Gets the error message panel. | public class LogPanel extends JPanel
public JTextArea getErrorArea() {
return this.jErrorTextArea;
} | 1 |
d9c98bf934397e6ac4abb708f056109a | ee94c258ca08c3a5cbc3fe62c845b349 | Gets a highlight text for a given search result item | public function getHighlightedHitText(); | 1 |
cc3910d2bf5c5c448941e7c46ebaab72 | 9ddfa336feb209abfc2148e6b74a793e | Дано двузначное число. Вывести число, полученное при перестановке цифр исходного числа. | {
int number = 65;
int des = number / 10;
int ones = number % 10;
Console.WriteLine(des);
Console.WriteLine(ones);
Console.WriteLine(des + ones);
Console.WriteLine(des * ones);
} | 0 |
08db5f3f03f95db777a2c5e698d68f64 | 87b0b84e3825f7e0c60a7cb7c94d9839 | Providing a 'STORAGE_DIR' in defaults overrides the root-relative
default. | public File getStorageDirectory(String key) {
File f = new File(baseDirectory, key);
validateDirectory(f);
return f;
} | 0 |
1d72c56944961efdef35b1000c7efd5f | a44c5728663dc10043f687ec99741f4e | 用户点击借书时对应书籍数目减一 | if( parseInt(this.state.bookNum) == 1 ){
this.setState({
bookNum: 1
})
}else{
this.state.bookNum = parseInt(this.state.bookNum) - 1;
this.setState({
bookNum: this.state.bookNum
});
}
} | 1 |
4db95fd9773f5af62bd068b476eed39c | 290d7076c57eeff565b1f31cfff3b9f0 | リサイクラ・ビュー上にセンサ一覧を縦に並べる | public class SensorDataListActivity extends AbstractBaseListActivity
@Override
protected void setListData(List<Data> list) {
mLogger.d("IN");
mSensorManager = (SensorManager)getSystemService(Activity.SENSOR_SERVICE);
setData(list, 3, mSensorInfoMap3);
setData(list, 9, mSensorInfoMa... | 0 |
cd371362209daeb5c0d3e5f732f5d4b9 | 2908f00bccf09145fd8bbc58e2c42737 | 删除迭代器对象表示的集合当前元素 | void ZFSet::iteratorRemove(ZF_IN_OUT zfiterator &it)
{
d->iteratorRemove(it);
this->containerNotifyChanged();
} | 1 |
1e090c2053d01cdd477d68646133f89e | 40f4cd9b3c8d114c9f72172fb8c8199e | function used to get palette based on provided palette ID | function bt_get_palette() {
return array(
);
} | 0 |
81ec27b1895770e874e1a6548d6fe7fb | 13abacbc9b45ca6ba025e0d8cb71a401 | Append default action(batch delete action).
return void | this AjaxTableIdColumn column, AjaxTableSearchRequest request)
where TBuilder : class, ICrudPageBuilder, new() {
var app = new TBuilder();
column.AddDeleteActions(request, app.DataType, app.DataTypeName, app.BatchUrl);
} | 1 |
355d8925603af88c7e89cc25c4be8745 | 9a7bcccda7df4a944ee36fe94b40fe82 | 法1 动态规划使用一个二维数组,来记忆起点到达当前每一点可行的走法总数 | int[] dp0 = new int[n+1];
int[] dp1 = new int[n+1];
dp0[1] = dp1[1] = 1;
for(int i=2; i<=n; ++i){
dp1[i] = dp1[i-1] + dp0[i-1];
dp0[i] = dp1[i-1];
}
return dp0[n] + dp1[n];
} | 0 |
cddc23a8b0e8d68db39435e5517d36c6 | 3adfd33705d28c196e608b32958818c0 | Jnitboardmedia 목록을 조회한다. | List selectJnitcmshistList(JnitcmshistDefaultVO searchVO) throws Exception; | 0 |
621eb216eaebdfd6cae10ed5383452c9 | 2d4f4c618bc1b7749c7b5c5e5a5b9ec4 | Leere Felder (Felder zum ausfüllen) nach angegebenen Schwierigkeitsgrad festlegen | $("#" + event.data.schwierigkeit).off();
$("#" + An1).on("click", { schwierigkeit: "" + An1 }, Spielfeld_Erstellen);
$("#" + An2).on("click", { schwierigkeit: "" + An2 }, Spielfeld_Erstellen);
$("#" + event.data.schwierigkeit).addClass("Not_Active_Button").removeClass("Active_Button");
... | 0 |
921f0032cf31b23200674a0d7d72fa9c | 0987b1bc9176d85a23d19c1f40912e1e | Gets the optional-content groups listed under 'OCGs' entry in the object
dictionary. | {
$propertiesDictionary = $this->getOptionalContentPropertiesDictionary();
if (
null === $propertiesDictionary ||
!$propertiesDictionary->offsetExists('OCGs')
) {
return array();
}
$optionalContentGroups = array();
$_optionalContent... | 1 |
64b692a08a18677c80d3a0fd2ea5618b | 7f8eab6bb22df5f139596a635b4ddf97 | Constructs and returns a new Google map object. | class tx_rnbase_maps_Factory
static function createGoogleMap(&$configurations, $confId) {
$map = self::createMap('tx_rnbase_maps_google_Map', $configurations, $confId);
return $map;
} | 1 |
8517e7c5a321d68cf06cfee29854c282 | 83e9c1e28d74980e31e551445a2e5104 | Spawns the workers and starts them so they're ready to start reading from the tasks queue. | public function startWorkers(); | 1 |
de2d86eb3ffae1bbf3a92d105b326534 | 79f5a3e8cea50461b1ce4183324e3a1d | Getter method for the current background image coordinates. | public class Background
public int getX() {
return backgroundImageX;
} | 1 |
e790752259bcdb226340a78b4b9c5d86 | 4644fa3076dfa505499a2a3a25e024b5 | 获取高频item | @Controller
@RequestMapping("/data/data/merchant")
public class MerchantController extends BaseController
@ResponseBody
@RequestMapping(value = "/hotItemList")
public Response getHotItemList(MerchantHotItemListRequest request){
Response response = new Response();
response.setApi_name(request.get... | 1 |
f30cef6517e1b25e4df07f8c4f8fde4a | 63b0084c45a31574180db27a5b8c6beb | 删除fileRes表里的文件信息,防止重复插入 | @Service("DeviceAdService")
public class DeviceAdServiceImpl extends AbstractServiceImpl<DeviceAd, Long> implements DeviceAdService{
private void deleteFileRefById(Long oldRecordId){
FileRef fileRef=new FileRef();
fileRef.setRefId(oldRecordId);
Long[] list = fileRefMapper.queryFileRefByRefId(fil... | 1 |
e1a3311968dc268064b8c35761ab2a0d | 94589a9a3487fb68f448b59e2ad82e3a | M�todo que permite obtener la longitud de un punto | public class Punto implements Parcelable
public double getLon() {
return lon;
} | 1 |
06d881bde6a48084c65a80be56488931 | ba6eb5b0ce02fa10eb406b2c42bf10dc | Parse GCA accession XML to import chromosome name and chromosome types
into genseq table. | {
ret->chrom = row[0];
ret->chromStart = sqlUnsigned(row[1]);
ret->chromEnd = sqlUnsigned(row[2]);
ret->name = row[3];
ret->segment = sqlSigned(row[4]);
} | 0 |
e9cde5dcfeafb1e0624e66f28ed7f428 | 0e0cc96139ea16882fde761cf4c29304 | <h1>Busqueda de documentos diarios abiertos</h1>
<p>
Busca documentos diarios (daily_documents) que aún no han sido cerrados | {
$documents = Document::where('RECORD_STATUS', 'N')
->where('DOCUMENT_NAME','asd')
->orderBy('DATE_IN', 'desc')
->get();
$Faculty = Faculty::all()->sortByDesc('LASTE_DATE');
return View('documents.index')
->with('documents', $documents)
... | 1 |
9862af18ea9bace57e316202c5ca8d56 | 9221a9a513592bcb25985d6210190fe1 | ! \brief Clears information text about coordinates of mouse in visualisation. | namespace E_Race_Application
public partial class ControlPage : Page
public void Clear_Cord(object sender, RoutedEventArgs e)
{
SCord_Box.Text = "Coordinates:";
Coordinate = "";
} | 1 |
c39e3d00ca9885ad0601231c504285f6 | fb389e6437ac27d26d0ff3b8a50c1ea5 | Reads the files in the given directory and exports the data needed
to use the QM_Plottings function on the _graphics module | def plots():
project_name = os.path.basename(os.getcwd())
globals()['plots_%s'%project_name]() | 0 |
4dda9bbef9bc9a5eeaa27970c30e8347 | 95f02ce0767b91d815ddfddd2c38cf8a | Teste si un auteur est dans un groupe ou une liste de groupes
ID de l'auteur dont on verifie l'appartenance
Liste des ID des groupes d'appartenance a verifier
Vrai si l'auteur est dans le(s) groupe(s), faux sinon | class BasicCommandAuthorization extends AbstractCommandAuthorization
public function isUserGroup($grups=[]) {
$ret = FALSE;
if (!empty($grups)) {
$userGrups = $this->permission->getUserGroups();
if (!empty($userGrups)) {
if (!is_array($userGrups)) {
... | 1 |
8d7ed0d89a24a8ebcf0fdcc3b1b1e743 | 8b573ccf1f0568d31288baa3e533c297 | this functions saves the game status in Saved_Games directory by using file I/O. If the player name and chapter have been saved before, then it will be overwritten. | def save_game(score, ship1, level):
enter_name()
with sqlite3.connect("User_Data.sqlite") as con:
cursor = con.cursor()
cursor.execute(
"SELECT Name FROM Saved_Games WHERE Name=?",
(s.username.upper(),),
)
data = cursor.fetchone()
if data is None:
... | 0 |
312edb42532d4219a63c39452aea88ab | d9870e0245cee7b4b0c797de550ec12e | 获得上传xls文件的表头 | public class MvrRfoAction extends AbstractAction
private String[] getExcelHeads() {
String[] header = {
"期间", "运输性质", "客户编码", "客户名称", "始发部门编码", "始发部门名称", "到达部门编码",
"到达部门名称", "开单现金", "开单银行卡", "还款现金未签收", "还款银行未签收", "还款现金已签收",
"还款银行已签收", "还款现金未签收", "还款银行未签收", "还款现金已签收", "还款银行已签收", "公布价运费",
"接货费", "送货费", ... | 1 |
39c5920bb4a6e5e680bdab2312bcdd3c | fba473ceda5b6e9af0ebae610a9bdbd7 | Numérote les scénarios (vecteur numod) dans l'attribution des probabilités a posteriori | {
for (int i = 1; i <= nphase; i++)
{
prob[i] = 0.0;
}
for (int m = 1; m <= ns; m++)
{
for (int i = 1; i <= nphase; i++)
{
if (pix[m] == i)
{
prob[i] = prob[i] + 1;
break;
}
}
}
for (int i = 1; i <= nphase; i++)
{
prob[i] = prob[i] / (ns * 1.0);
}
} | 0 |
5a772282ffa587f2182e7514c2caaaf2 | 71358b40c3b65bb27e96451df086358e | parseDeletions reads and parses the deletions.yaml. | decoder := kyaml.NewYAMLOrJSONDecoder(reader, 32*1024)
var values []interface{}
for {
var val interface{}
err := decoder.Decode(&val)
if err != nil {
if errors.Is(err, io.EOF) {
if len(values) == 0 {
return nil, trace.BadParameter("no resources found, empty input?")
}
if len(values) == 1 {
... | 1 |
107f20eb812c9293b3a5edb9885c59ef | 773d61945591b70523b2ab6ab9bc7d21 | Setup the first Imgur connection | connection = connections.irc
self.connection_factory = connection.connectToServer(
self.config.connection,
self.nick
)
connection.start() | 0 |
84e151939a51e4f3390ff42b23a6bdf5 | b4ccba884b677987f4575ca0b9cfe4a0 | zb该交易对是否存在未完成的买单/卖单 | func AlibabaLstPosOpenAccountCheckissettled(clt *core.SDKClient, req *lstpos.AlibabaLstPosOpenAccountCheckissettledAPIRequest, session string) (*lstpos.AlibabaLstPosOpenAccountCheckissettledAPIResponse, error) {
var resp lstpos.AlibabaLstPosOpenAccountCheckissettledAPIResponse
err := clt.Post(req, &resp, session)
if... | 0 |
db1005fe30fa399585d77b349665cc1b | 6634e9ccd7b8f134c5587c35199799fb | Debug output subscriber | if(enable_debug_mode) {
debug_msg.curr_lat = curr_lat;
debug_msg.curr_long = curr_long;
debug_msg.elapsed_time = elapsedTime;
debug_msg.sats = sats;
debug_msg.speed_val = speed;
debug_msg.heading = curr_heading;
debug_msg.bin_fullness = bin_fullness;
debug_msg.battery = batt_level;
debug_msg.l_mot... | 0 |
7fedf0ccddc4041dc4a59b9eb4cdb419 | 375bd4b485baba859bfe92b80978499c | 获取收入类型是否启用 | String enterpriseCode) {
String sql = "select t.* from hr_c_intype t where t.IN_TYPE_ID=? and t.ENTERPRISE_CODE=? and t.IS_USE=?";
Object[] params = new Object[3];
params[0] = inTypeId;
params[1] = enterpriseCode;
params[2] = isUse;
List<HrCIntype> instance = bll.queryByNativeSQL(sql, params);
if (inst... | 1 |
fc1c84762bd04204d01012e4c6c57fda | 93da1519a4588acd2fc636960b382a02 | Find WS Form shortcodes or Gutenberg blocks in a string | function pixelglow_shortcodes_formatter($content) {
$block = join("|",array(
"team_member",
"section",
"button",
"prettycol",
"portfolio",
"row",
"col",
"service",
"tab",
"tabs",
"carousel",
"carousel_item",
"features",
"feature",
"contact_form",
"googlemap",
"social_icons",
"progre... | 0 |
ed74a6368936bd383c8eaf621579ae2a | 7271b7d4b06630c17af3736cb020da4c | Create a directory if required. Any parent directories will also be
created. | class Endpoint(metaclass=ABCMeta):
def mkdir(self, path):
try:
makedirs(path)
except OSError:
pass | 1 |
a19250c95cf928632dd15956a2f4629b | f94c6b1dc8151400b5077ec86b82c12c | helper function: transform list to SLL | linked = node = ListNode()
for idx, val in enumerate(ls):
node.val = val
if idx < len(ls) - 1:
node.next = ListNode()
node = node.next
return linked | 1 |
e70b04e8ebe43ddce92d9a7cc115a477 | 8b724bf0830d7973be31191d6e7d02df | 发出一个拉黑商铺的请求 | {
final HashMap<String, Object> data = new HashMap<String, Object>();
data.put("device_id", getIMEI(context));
data.put("token", token);
data.put("target_id", hx_id);
task = new HttpTask(MyApplication.rootPath + HX + ADDBLACK, getClientParam(data), 1);
task.setOnHttpBackLinstener(new OnHttpbackLinstener()
... | 1 |
07b8c93512a19483637e56b15b65b8ff | ec1265678905a185932ebc6c7c468ec7 | Helper for grabbing type-specific precision constants. | impl TypeConstraint for NumericConstraints
fn from_typmod(typmod: i32) -> Result<Option<NumericConstraints>, String> {
if typmod >= VARHDRSZ {
Ok(Some(NumericConstraints {
max_precision: ((typmod - VARHDRSZ) >> 16) & 0xffff,
max_scale: (((typmod - VARHDRSZ) & 0x7ff) ^... | 1 |
a03feb5125736a4bbe3e4ee51d42513f | 40fe402095595160ba865fce9b1332ec | Проверяет, что объект является моделью eloquent. | {
if (!$model instanceof EloquentModel) {
throw new InvalidArgumentException('Identifiable has to be instanceof Eloquent Model');
}
} | 1 |
2d425c7a3a821efaa3af6e3cc946ad95 | f0d9f527aea8c54a35ed57ae71c6c05d | Launch 'Three-two-one-GO' timer. | SysCtlPeripheralEnable(SYSCTL_PERIPH_TIMER3);
TimerDisable(TIMER3_BASE, TIMER_BOTH);
TimerConfigure(TIMER3_BASE, TIMER_CFG_ONE_SHOT);
TimerLoadSet(TIMER3_BASE, TIMER_A, (gSystemClock/50) - 1);
} | 0 |
72bb190bebfc6236c77f953c64a3e61b | d34cac40d2c7bfd1f95bbdb1e2c4704e | Test output of Full mode with one transformation (output SAPI and clean DB) | public class CobolFixedFormatSourceCleanerTest extends AbstractCobolTester
@Test
public void testCompleteCleaning() {
cleanAndCheck(
"" + "123456 PROCESS XOPTS(APOST)"
+ LS
+ " IDENTIFICATION DIVISION."
+ LS
... | 0 |
c0ea06e24923f5ffb8c19d02ea67a7c0 | 3d352f2d89e802963d9d1a1a5211aaea | Starts this service to perform action List with the given parameters. If
the service is already performing a task this action will be queued. | IBqRequestCallback callback, boolean autoRestart) {
BqServiceTask serviceTask = new BqPostServiceTask(
this, action, url, params, callback, requestHandler, autoRestart
);
addServiceTask(serviceTask);
} | 1 |
5201114d553e2baf8bc715b4104cd936 | d5a96eb194276f0982dd80f3712f15d2 | generate function returns the list of all possible numeric which correspond to the trialLog dictionary | for number in generators.allvalues(clue):
if '0' in str(number):
yield number | 0 |
9052f8fc49280a4a47a68b1104805b9f | b1593646b3f2ae2e05ed16e57a1ca274 | Removes qualification from the list. | public class QualificationsDisplay extends JPanel
public void clearSelection() {
qualificationsDisplayList.clearSelection();
} | 0 |
56b7fd8a9aafeaaa357f8064188fc981 | a52ee4c332dbdb73c77e7011e857475e | Return element at specified index. Returns null if element doesn't exist. | public class ExpandableArray
public Object get(int index) {
if (index >= backingArray.length) {
return null;
} else {
return backingArray[index];
}
} | 1 |
73e8ac9e5a1d0c2d0c180274b86d7e36 | f5be00725411ba833f727e2df02eefdb | All the annotations that the method intercepted has in runtime. | export class ReflectedMethod implements IReflectedObject
public getAnnotations(): Map<string, IDecoration> {
return this._annotations;
} | 1 |
9106e0535c4f934a6443762448c93a6f | 43459a0799ba8c49d87a60873970ce7c | Must be called to initialize the manager. This will connect the manager to
the daemon and start polling for devices. This method is safe to call if
the manager is already running and it may be used to restart it. | class Manager(object):
def initialize(self):
return self.__impl.initialize() | 1 |
19b2cbbc19b96d1a6260c617b11892bb | c91a3cb4d7043edfbb0dbd8aff574670 | Show or hide placement visual as needed. | {
placing = !placing;
if (placing)
{
AnchorManager.Instance.RemoveAnchor();
SpatialMapping.Instance.DrawVisualMeshes = true;
inControl = false;
}
else
{
anchored = AnchorManager.Instance.PlaceAnchor();
Spati... | 1 |
a5075ef5f114fe3d2129fe40e1e2cf21 | 9e0a2ec3b925bc9ccfeb2bb7c0ff3fbf | Returns associative array where keys are computed by given function | class Collection implements Iterator
public function indexBy(callable $function)
{
return indexBy($this, $function);
} | 1 |
a35ebc5c34d3bd315b394e6579b0d2bd | 17ea20f3e80cdcc23778272d56d058e5 | lowers the speed multiplier on the character stopping their movement | public class playerMovement : MonoBehaviour
void Update()
{
if (increaseSpeedTime < 0)
{
increaseSpeedTime = 10;
speed = speed * 1.1f;
}
increaseSpeedTime -= Time.deltaTime;
} | 0 |
f0c6d7b0baabc04bf6a814b7642e072c | f9d82b33c2dee98e92bc6217308dd445 | Delete confetti insert by ID. | public function deleteById($confettiInsertsPricesId); | 1 |
c112812daaf02692126844ea2303cf75 | 70cb80a568470e71fb5c26fab829b482 | 线性探查 | {
unsigned long index = hash(key);
while ((Term[index] != key) && (Term[index] != EMPTY))
{
index = linearProbe(index);
}
return index;
} | 1 |
77b64ad7c2b13d793745014577fde1c9 | cc8d3345f3165094998fa19fd73eaa0d | 读取电梯信息 | index_mess('读取中...', 0);
$.getJSON('room_detail_js.action?json='+roomId, function(data) {
if(data.status == 1) {
index_mess(data.mess, 1);
return;
}
index_mess('读取成功!', 2);
var style = data.style;
style.space = 6;
var cab_sort = {};
for(var i=1; i<=style.verNum*style.horNum; i++) {
cab_sort[i] ... | 0 |
d762d7104e285073f353fdc34e040f2d | 40dd989ae946496b12c5ea8cde840e7f | Attaches an incorrect message if the user entered incorrect credentials | public class SignIn_View extends JFrame
public void Error2() {
lblErrorMessage.setText("Invalid username or password.");
} | 1 |
d16e83ab81485a4f736e01f760532e11 | 7607bf89ec79c110fb9229bd8be6dd8b | Adds a note to an order if an associated referral's amount is updated. | class IsotopeCustomerNotes extends CheckoutStep implements IsotopeCheckoutStep
private function addNoteToOrder(): void {
$customerNotes = Isotope::getCart()->customer_notes;
$draftOrder = Isotope::getCart()->getDraftOrder();
if (!empty($customerNotes) && $draftOrder instanceof IsotopeProductColl... | 0 |
5d2dbda8e793f460b0405efd8067a97e | bef95842f5cd354febe3abdb31a834ad | Creates the HaFAS request body for a location search request. | class BaseLocationRequest(LocationRequestInterface):
def format_location_request(self: ProfileInterface, term: str, rtype: str = 'S'):
return {
"req": {
"input": {
"field": "S",
"loc": {
"name": term,
... | 1 |
f3c233967928a324d242c7785903f81b | 36208e94b4b399b9cab952d03f1d7791 | X11 Session是否活跃 | func XCanConnect() bool {
return bool(C.X11Running())
} | 1 |
5ce26408b7048d414575f6d783caa8d8 | 604618e71039b1102d76d1b9889d6ae5 | crops the frame to only get the latitude | def crop_disparity_map(disparity_scaled):
return disparity_scaled[:,160:] | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.