query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
5c7b01d97227e1dfe4bcf717a5f7f462 | dcd70595b627b219886197ad468a0c5d | Whether the output should be the contents of the repository (which is the default), or a link that allows CodeBuild to clone the repository before building.
**Note**: if this option is true,
then only CodeBuild actions can use the resulting {@link output}.
:default: false
:see: https://docs.aws.amazon.com/codepipeline/... | class DeployCdkStackActionProps(DeployCdkStackActionOptions):
def output(self) -> typing.Optional[aws_cdk.aws_codepipeline.Artifact]:
return self._values.get("output") | 0 |
321f56ef83121e774b96f90b10f38cc7 | dbe28c0f478b1226d1c485c9b324c29c | 本行包括多于一个字符的代码。即总行数-空白行-注释行 | let reg = /(?:^|\n|\r)\s*\/\/.*(?:\r|\n|$)/g;
let count = 0;
rows.forEach(item => {
let res = item.match(reg);
if (res && res.length) {
count++;
}
});
return count;
} | 0 |
88e2a5ca585832123f25e95bea562dd4 | 8957debf7fa646c8c532148f5d2cfba3 | Recursive content deletion | {
$NodeStruct = Nodestructures::where(['child_node_id' => $id])->delete();
return redirect()->route('nodes.index')
->with('success','Content delete successfully');
} | 0 |
fd88accb59947058ce5e235c06ff80f9 | 7f16a6b3813c8ef9c7dca9fa6d53771d | Enable the combobox | namespace WaremeteGadget
public partial class ConfigWindow : Window
private void EnableComboBox(bool isEnable)
{
this.comboBox_char.IsEnabled = isEnable;
this.comboBox_pose.IsEnabled = isEnable;
this.comboBox_dress.IsEnabled = isEnable;
this.comboBox_eye.IsEna... | 1 |
e284544edff2164b90d26b963e2993bf | ec4a701b8a207638282d3d62b8c57a73 | Returns the ID of this temp ship security message. | public byte getID(); | 1 |
59fa7bd9378aa34d1ef417d6144694ad | b4cb9170c39d362d05c997664ebbff35 | @summary: Retourne la dernière coordonnée de la liste de coordonnées à explorer | def find_end(labyrinth):
for x in range(0, len(labyrinth)):
for y in range(0, len(labyrinth[x])):
if is_end(labyrinth,[x, y]):
return [x, y] | 0 |
3a7a1bc7db8bd175522c101862eac714 | 2eea0ccfbad14414ca2c0c86b69f3076 | 如果file 节点引用的贴图在当前工程不存在 就copy 过来,并返回新的贴图 全路径 | {
auto it = container_.find(in_path);
if(it != container_.end())
{
return it->second;
}
auto texture = std::make_shared<DX9Texture>(in_path,direct3ddevice9_);
DEBUG_ASSERT(texture != nullptr);
container_.insert(std::make_pair(in_path,texture));
return texture;
} | 0 |
20d24f96a82e91ff820280af4506554c | 456f4e4f92c367677b454b8c41f851fd | Saves the current subset configurations, their sums, and their difference in weights. | if nval not in special_sum_set_infos:
special_sum_set_infos[nval] = []
special_sum_set_infos[nval].append([special_sum_set, subset_sums_set]) | 0 |
a3a3ddf43a05e75cda6fdb26e8a2420b | ba4211c16d6b778ae23c9417da1c0ab9 | check for blackjack and print if was blackjack | if (cards_value(hand->cards, hand->count) == 21) {
hand->bjack = true;
printf("%*s hit a BlackJack!\n", NAME_PADDING, name);
fprintf(file, "%*s hit a BlackJack!\n", NAME_PADDING, name);
}
} | 1 |
ce396b72a75e000de082016e1d367b1b | 61f88938b4779b5dda3f145bc9d74bf1 | Builds a 2d tree from a set of coordinates. | namespace AOC.Y2018.Day08
public static class Part02
private static Node BuildTree(List<int> input)
{
int index = 0;
return BuildTree(input, ref index);
} | 0 |
dd8771215f0635cc56f46a318291d2fa | 7032ccec9444e50a4338a21f00363f16 | TC - O(n), SC - O(n) | string removeDuplicateLetters(string s) {
string res = "0";
vector<int> cntr(256, 0);
vector<bool> visited(256, false);
int len = s.size();
for(auto& i:s) {
cntr[i]++;
}
for(auto& c : s) {
cntr[c]--;
if(visited[c]) {
continue;
}
... | 1 |
854e30645200111642f97550bd9e2719 | a589f6d793085ed0512d092ef2ecade0 | Calculates the real order or degree of the polynomial. | def poly_degree(P):
P = P.copy()
poly_norm(P)
if P[-1] == 0:
return -1
return len(P)-1 | 1 |
1a3a35460c0d928419fec4c529d3707f | d944c04de4665f7838aa80297ff9e7f3 | Busca uma força nodal na estrutura por um nome especificado | namespace ProjetoGrafos.DataStructure
public class Graph
protected Node Find(string name)
{
if(nodes.ContainsKey(name))
return nodes[name];
return null;
} | 1 |
8b5652964fe1539e06350f99d69b1197 | f8de64b05ddf40ec66de11b6f2d008ed | Get the Minimum version of the product where this Event is present. | public class Alert
public int getMinVersion() {
return minVersion;
} | 1 |
29e872da08b978efad9c8f5cb2c5d2bc | fac9d511e351e08e50f0a55d680aa735 | Returns an integer from a float for degrees | deg = 95
mins = 25
secs = 5
dd = (deg) + (float(mins)/60) + (float(secs)/3600)
return dd | 0 |
949697efe4ab69bc63e9b92a82e4fc6f | 372b67ee45cad23e2ec97ad03ae173f4 | 数据库,从ad_keyword中找出关键词对象列表,支持模糊查询 | Preconditions.checkNotNull(keywords);
List<Document> iterator = new ArrayList<>();
if (keywords.isEmpty() || keywords.contains("")) {
return iterator.iterator();
}
List<String> words = new ArrayList<>();
for (int i = 0; i < keywords.size(); i++) {
... | 0 |
01b11bf706b333c586c0e9ea9cef8011 | 226fcc7f659019125c57cce28d2b5c02 | This method gets the instance variables of Object o. | {
Dictionary<string, object> d = new Dictionary<string, object>();
FieldInfo f;
String s = "";
s = "This Class is " + o.GetType().Name + "\n";
s = s + "this Class is based on" + o.GetType().GetTypeInfo().BaseType.Name + "\n";
s = s + "This ... | 1 |
6fe2f93e6d1459c60d61b7121fd45cef | fba43af6ba7f9075b25636c9571a881c | Test that values are dropped correctly when a normalization channel is
missing. | X, y = make_classification(
n_samples=400,
n_features=20,
n_informative=8,
n_redundant=8,
n_classes=2,
n_clusters_per_class=4,
random_state=856,
)
X[X > 1.5] = np.nan
features = [str(n) for n in range(20)... | 0 |
4810efdca885376cbd0bac5610821bde | 09f932d21b05a1e439e85cc52616470b | r"""dict: Keyword arguments for send comm. | class Job(object):
def kwargs(self):
return self.doc['execute']['kwargs'] | 1 |
e28baed8631ab55cb9f50a37cf21b038 | 2e0fffb1db5b200c92596ee2ea4aded0 | GetCurrentTerm returns a TermInfo struct for the current academic term. | {
if (empty($date))
$date = Zend_Registry::get('nowdate');
$db = Zend_Db_Table::getDefaultAdapter();
$select = $this->select()->setIntegrityCheck(false)
->from(
array('term' => $this->_name),
array(
'term.id',
'term.name',
'term.startdate',
'term.enddate',
'term.sh... | 1 |
10d5568c4b0c1b96f2061cb3e4278b2a | df004fb76119b97cd9f35f0c44720531 | Return true if there's an obstacle in front/back of the robot. | class RoboPatrol():
def detect_obstacle(self):
return self.closest < 0.5 | 1 |
4a86a5632f2c7710f9bf7f9032c2efa9 | af791ce75764c364cb230ca5ea6ce313 | Return a vector with indexes to all empty tiles. | class TicTacToe:
def getEmptyIndices(self, curr_matrix):
return [i for i in curr_matrix if curr_matrix[i] == ' '] | 1 |
e79e60318c9dbd40327cc2faf5d6bda5 | a7c6ec87e8109fc38561605737871bd8 | 删除一个问题相关的图片在数据库中的记录 | public int deletepicreport(int id); | 1 |
e7fb16d8548e80453e6a300d5d3181c0 | 6a95237319c780d41c87c14b7251a1c0 | Returns the value of the '<em><b>PublishStartDate</b></em>' attribute.
<!-- begin-user-doc -->
<p>
If the meaning of the '<em>PublishStartDate</em>' attribute isn't clear,
there really should be more of a description here...
</p>
<!-- end-user-doc --> | Date getPublishTime(); | 0 |
044e2874f03a83ac55d860fbec55c5fd | 5d09e4770d8454b2985cb5ccf1e3c0e6 | Creates a new instance of the DataTable class. | class DataTablesForm
public function __construct()
{
$this->columns = [];
} | 0 |
0270964b71c5fe658417b191500bcd0d | 91f90f9d9dfbe59d43a540993843758c | Surround expression with parentheses | private fun wrapInParenthesis(expression: OtpErlangObject): String =
"(${toString(expression)})" | 1 |
73df439547c405b823ce0ea2cbef1780 | a6dada2ba22ed71085ebd2505f1b879f | 得到快递费用 | {
global $ym_express_type, $ym_uid;
if($uid==0){ $uid=$ym_uid; };
$fee = 0.00;
if($ym_express_type==1)
{
if(count($cart) == 0)
{
$cart = get_cart(1);
}
$amount= $cart['amount'];
$express = get_cache("express");
if($express && count($express)>0)
{
$arr = array();
foreach ($express as $k => ... | 1 |
fbd391e4375517703ba1680431521eb2 | e33727702d1ea01510b8321c42cda401 | Converts a feature value into the external representation | abstract class fieldBase extends _module
protected function external_to_internal($external_value) {
return $external_value;
} | 0 |
a48b9827869278865afe0bb3e9ebe1c2 | 349326e80d15f4670b0b2505fde22f47 | DoReckonCustomerTags 计算用户tags并返回 | {
if (empty($uids)) {
return true;
} else {
$uids = array_unique($uids);
}
$sql = "SELECT DISTINCT uid FROM lcs_planner_customer WHERE p_uid={$p_uid} AND uid IN (".implode(',', $uids).")";
$uids_exist = $this->doSqlQueryColumn($sql, true);
$uids_unexist = array_diff($uids, ... | 0 |
f51d8f8a4adcc81d0b9fd2d5e1f8ed7e | fe6c1135b50cfc6237671b02b14df329 | funcion que se encarga de rellenar el select con los cursos | namespace Parque
public partial class Matricular : System.Web.UI.Page
private void llenarListaDisponibles()
{
informacionCursosDisponibles = matricula.getCursosDisponibles();
nombreCursos.Clear();
cursosDisponibles.Clear();
cursosSeleccionados.Clear();
... | 1 |
8781004aa86f8a3da87652dbab8668a2 | c9ff464347caf6dce99ac59c340ca1fd | Function controls the visibility of progressbar using [visibility]
If [visibility] is true, progressbar is made visible and the recyclerview and textview
are hidden. Else, progressbar is hidden and the recyclerview only is made visible | public class VenueListFragment extends BaseFragment
private void progressVisibility(boolean setVisible) {
if(setVisible) {
mProgress.setVisibility(View.GONE);
} else {
mProgress.setVisibility(View.VISIBLE);
}
} | 0 |
5dbc914b93a634a0fc234d585d5959e3 | 9a4e180dffbe24853ee8a7f54868ca93 | 解析宝具卡 | data,
treasure_lv,
treasure_oc,
skill_lvs,
open_event
}) {
treasure_lv = treasure_lv || 1;
treasure_oc = treasure_oc || 1;
open_event = open_event || 1e6;
skill_lvs = skill_lvs || [0, 0, 0];
data = JSON.parse(JSON.stringify(data));
let output = JSON.parse(CONFIG_MODE);
let treasure = data.treasu... | 1 |
248765b6a0ae7e7ef9111b602762ac7a | fb45f9dac079034c86cf77c4c19b7005 | bench03 (Integer)
number of primes less than or equal to n (prime-counting function)
Example: n=500000 => x=41538 (expected), n=1000000 => x=78498
(Sieve of Eratosthenes, no multiples of 2's are stored)
(BitArray sieve1 = new BitArray(n + 1); // slower than bool)
(BitArray from http://www.csharpfriends.com/Spec/index.a... | var divisor = findDivisor(n)
if (divisor.length <= 0) {
return n - 1
}
var primes = divisor.filter((element) => isPrime(element))
var product = n
for (var i = 0; i < primes.length; ++i) {
product *= (1 - 1 / primes[i])
}
return Math.round(product)
} | 0 |
e76cd678d36bcb6013050b483218edc0 | 9efc92a9053ebac8e994280c22b0ee57 | 将js值转成c#值,参考凹大神的 https://gitee.com/aochulai/NetMiniblink | {
if (json == "null")
{
return (T)(object)null;
}
if (typeof(T) == typeof(string))
{
return (T)(object)json.Substring(1, json.Length - 2);
}
if (typeof(T) == typeof(DateTime) || typeof(T) == typeo... | 1 |
d0598ec16de1470b487b40c095d90643 | 14eb60198a3262b8193fdf0462a692ee | 粒子群の適応度を行列で設定します。 | double sumFitness = 0;
for (int i = 0; i < scale; i++) {
sumFitness += fitness[i];
}
for (int i = 0; i < scale; i++) {
this.pi[i] = fitness[i] / sumFitness ;
}
} | 0 |
043ffcebe2b55f27600ec9526609f970 | ade7a3adb854cc2cec595cfbd093a991 | Add data for multiple z values, for a single location. Series is in z-dimension. | def add_area_series(x, y, **kwargs):
return internal_dpg.add_area_series(x, y, **kwargs) | 0 |
8065a0b33464e195653f1519f462aa3a | 391fab5e30fae204b5056d4abe6dc828 | Add the node to the set, and add all of its connected nodes to the set. | for item in items:
if item not in self._nodes:
self._nodes.append(item)
complementary_items = getattr(item,
self.complementary_name)
complementary_items.append(self.owner) | 0 |
f93c7c338c22768a75936e7540c28cfd | 58b97385cf8bcb43f1b6950651711eaa | 下载补丁并显示在进度条中 | {
if (BytesToLoad == 0)
{
this.State = PatcherState.FINISHED;
}
else
{
this.State = PatcherState.PATCHING;
}
using (WebClient client = new WebClient())
{
client.Downloa... | 1 |
af9a6eac450a3aca2fade127e0c63861 | f808d576ce3f3270b060a5ec4eff5fec | 抓分集 | class Home extends Base{
function caiji()
{ set_time_limit(0); exit;
header("Content-type:text/html;charset=utf-8");
$m = new Gua();
$page = GetFile("https://m.k366.com/gua/",2,2);
preg_match('/<table style="BORDER-COLLAPSE: collapse" id="table1052" class=" FCK__ShowTableBorders" cellSpacing="0" cellPadding=... | 1 |
a83cc98d118cf4d77f4b667728388340 | f137e03c4d0e78504ecffab7ad83defa | Método que devuelve la descripción asociada al ID de un centro. | @ManagedBean(name = "traspasosController")
@Component
@Scope("view")
public class TraspasosController implements Serializable
public String obtenerDescCentro() {
try {
return catalogoCentrosLoaderTask.getCatalogoBean(
contextoUtils.getEntidad(), contextoUtils.getSucursal())
... | 1 |
7460723645adcb121be03f12d7969bf0 | 4b721a9bb0e28ec9156d03648ede53b7 | The amount the user has spent in the last month. | all_spent = []
week_ago = (self.__today - dt.timedelta(days=6))
for rec in self.records:
if rec.date >= week_ago and (rec.date <= self.__today):
all_spent.append(rec.amount)
return sum(all_spent) | 0 |
5670b4064304fadbf40cc6b25bba0672 | 7074b38496b03bc36de3cb823cc2ddd8 | Increase program token array to specified size. | void ResetTokenArray(void)
{
memset(token, 0, sizeof(token));
tokenIndex = 0;
} | 0 |
27e01ec9aea377661bb80b18d3aad254 | c257632e7e17ff99bed2bc9b6575f59d | Dreht den Spieler. | function rotatePlayer(e) {
var player = GameInfo.player;
player.rotate(e.movementX, e.movementY);
} | 1 |
890345d929233e4fe4ab700342da9fde | 3e333159658cd4828f4ca1175f6cf595 | 如果需要再请求服务器之前做一些操作, 则重新返回一个做过操作的的request如增加header,
不做操作则直接返回request参数 | public Request onHttpRequestBefore(Interceptor.Chain chain, Request request) {
return request;
} | 1 |
a98ef5963ba310c448f8ec305a3e484f | c52ce7fbcd98c3b04c14fc38246ccc12 | Check that "require ssl" works on h2 connections
See <https://bz.apache.org/bugzilla/show_bug.cgi?id=62654> | @CCMConfig(auth = true)
public class SSLAuthenticatedEncryptionTest extends SSLTestBase
@Test(groups = "short", dataProvider = "sslImplementation", dataProviderClass = SSLTestBase.class)
public void should_connect_with_ssl_with_client_auth_and_node_requires_auth(
SslImplementation sslImplementation) throws Exce... | 0 |
0f3202a15a7bf6c6734ef075981ef808 | 4165a455294cbf91900180c04b2005e1 | 根据书号获取粉丝数 | def fans_num(url_offset):
try:
resp = requests.get("https://movie.douban.com" + url_offset, headers=headers)
resp.encoding = "utf-8"
s = BeautifulSoup(resp.text, "html.parser")
return str(s.find('div', id="fans", class_="mod").h2).split('\n')[1].split('(')[1].split(')')[0]
exce... | 0 |
ba439bd26cdb9675607c3ee8f8b35285 | 73065c4cb26c27d1325b94e2465e02f8 | Returns listen address serial from a LibvirtLiveMigrateData | local collection, instance, secondary_collection, id =
self.url_segments[1], self.url_segments[2], self.url_segments[3], self.url_segments[4];
local prefix = "Redfish:Managers:"..instance..":SerialInterfaces:"..id
self:set_scope("Redfish:"..table.concat(self.url_segments,':'))
local serialprefix
local ip = stri... | 0 |
ed327e92a1b3edb7ea77137838249ddd | 70a2264d8df5255b37b3a98c9bca501d | 初始化 勾选框点击事件 | function dlgEvtInit() {
$(".lbl-group input").off("click").on("click", function () {
if ($(this).prop("checked")) {
$(this).next().addClass("lbl-checked").removeClass("lbl-not-checked");
var _siblingInput = $(this).parent().siblings().find("input");
... | 1 |
c38a6a0729277792ec36c576b1c6542f | 7fce230ec044a3340e2f84d1cf8d4b16 | Page du tableau de bord pour afficher les statistiques du mois | class StatisticsController extends Controller
public function index()
{
$count_absence = Attendance::whereRaw('EXTRACT(month from start) = ?', [Carbon::now()->month])
->where('user_id',\Auth::user()->id)
->count();
$count_abs_normale = Attendance::whereRaw('EXTRACT(month from... | 1 |
7a1a4721ecb281949cf896e1dc266b00 | ae28ffb3cf5d0ec1ac1e49d331025236 | Convert MySQL select result to tab separated
Copy and paste it to spread sheet easily. | $final = "<table class='$class'> <thead> <tr>";
for ($index = 0; $index < count($titles); $index++) {
$final.="<td>" . $titles[$index] . "</td>";
}
$final.="</tr></thead><tr>";
while ($row = mysql_fetch_row($result)) {
for ($index = 0; $index < count($row)... | 0 |
9a6436c2d63e12064a6b3fa7895360ff | e73f0c49158d85c44eca44b309593e7f | Ecrit le footer JPEG (marqueur EOI) dans le fichier de sortie. | namespace encoder.lib
public class JPEGWriter
private static void WriteEOISegment(BitStream jpegStream)
{
UInt16 endOfImage = 0xFFD9;
jpegStream.writeMarker(endOfImage);
} | 1 |
962cf6cdef5210be6bd512cefa6c1303 | 944c05df801398ea858e4e9f9b2958e7 | 添加弹窗的背景色 | public class CommonPopupWindow extends PopupWindow
public CommonPopupWindow setBackgroundColor(int viewId, int color) {
View view = getView(viewId);
view.setBackgroundColor(color);
return this;
} | 1 |
bdf21c13f6781e3f500f8f5dc88a27a2 | 5773ced15423224158e92fa08037643b | check that the standard file is enumerated correctly by the vfs | void
TestIoInternalFileSystem::testEnum()
{
afl::io::InternalFileSystem fs;
prepare(fs);
Ref<Directory> dir = fs.openDirectory("/d");
TS_ASSERT_EQUALS(dir->getTitle(), "d");
TS_ASSERT_EQUALS(dir->getDirectoryName(), "/d");
TS_ASSERT(dir->getParentDirectory().get() != 0);
Ref<afl::base::Enume... | 1 |
4cb3e235ecac89eaea5e700d20a75537 | 22ba78cf933966fe1fcce5dc639f151a | Setup function pointers | std::map<std::string, ReadableBase *> ConfigSetup::SetReadFunctions(void)
{
std::map<std::string, ReadableBase *> funct;
funct["InState"] = &in.restart;
funct["PRNG"] = &in.prng;
funct["FFKind"] = &in.ffKind;
funct["InParam"] = &in.files.param;
funct["InPDB"] = &in.files.pdb;
funct["InPSF"] = &in.f... | 1 |
77ddc9190ba127daa3951df929163b2e | ec6561a0cb72fdc114fbc9623d358463 | Überprüft Mitarbeiterliste ob bereits vorhanden | public class DatabaseHelper{
public boolean mitarbeiterFrei(String name){
Boolean frei=false;
try {
ResultSet rs=stmt.executeQuery("SELECT * FROM tbl_mitarbeiter WHERE UPPER(mit_benutzer)=UPPER('" + name + "');");
if (!rs.isBeforeFirst()){
frei=true;
}... | 1 |
58394e755b3f55b7bcc1fd2cb8266ea2 | 1945af5a3f2338bf0552ac71ae534d59 | Register a callback to be invoked when a seek operation has been
completed.
the callback that will be run | public class HiMediaPlayer
public void setOnSeekCompleteListener(OnSeekCompleteListener listener)
{
mOnSeekCompleteListener = listener;
} | 1 |
68c3c038da8ffe088cfdeb13f6193df0 | bc82e3c4e2409ec7e725ce0cdb59836d | Returns whether model directory already has a PipXP table | class _IO():
def model_exists(self):
return os.path.isfile(self._filename) | 0 |
d9316e92317090daac17c7c5b80bf47a | 58ae4bd5cab9a7d9da479a0d74956882 | Visits a proto map field. Which is represented by a soy map. | function visit(node) {
var type = (0, _camelCase2.default)(node.get(_schemaMapping2.default.attributes.visit.type), true);
var definition = node.get(_schemaMapping2.default.attributes.visit.definition);
return destinations['visit' + type](definition);
}
var destinations = {
visitObject: function v... | 1 |
37d29c5b72efbe5c7e1b9b76c94743dc | ae0c4a7231a09f4945318b2c971b7c3f | Update the profile for the logged in user | class UserController extends Controller
public function updateProfile(Request $request)
{
if ( ! auth()->check())
{
abort(403, 'You must be logged in to view that page.');
}
$this->validate($request, [
'first_name' => config('validation.user.first_name'),
... | 1 |
9c63310ab2cf66fb485dbe9b7179c975 | 7de0305eab478314fc360ce2fa3b9718 | Register registers formatter for specified media type. | namespace SPMS.Log.ObjectFormatter
void RegisterFormatter( Type objectType, IObjectFormatter formatter ); | 0 |
0bb02738b818342f3370157827ea45a6 | 37b7eb781860adc56351030816eae5f5 | This method constructs the application data element.
load information from database. | public void loadFromDB(); | 1 |
b14019bc9bdc534dde09f93fe1452565 | 4fe10a32ff01144ca490f0ad1c887464 | Utility method to convert Flash friendly constructor info instances to JMX constructor info instances. | public class GeneratedClassAdvisor extends ClassAdvisor
protected void addConstructorInfo(ConstructorInfo ci, Collection<ConstructorInfo> constructorInfos)
{
constructorInfos.add(ci);
SecurityActions.setAccessible(ci.getConstructor());
} | 0 |
44ba95a7cd8e0d8a4e129a53e622cd32 | 8f67c4314a857f97b1434e1ac309cbd2 | 根据仪表类型,仪表编号,年份获取月度能耗值 | namespace IERM.DAL
public partial class EnergyStatisticsDAL
public List<EnergyInfoModel> GetEnergyElectricityList(int proNo, int year)
{
string strSql = string.Format(@" select a.communityID,typeID,`year`,`month`,sum(engValue) engValue,insertTime FROM energyinfo a
... | 0 |
18ecf994d12813fe1363d9088eb98a7e | 1b2d6428d258e60c696da7061c0d0b98 | world_view上のキャラを削除。initCharaの前に | self.ox = self.oy = 0
@eagle_chara_viewport.rect.set(0,0,Graphics.width,Graphics.height)
@eagle_charas_w = @eagle_charas_h = 0
@eagle_charas_w_final = @eagle_charas_h_final = 0
end | 0 |
660f3dd1104d87891df3dfb54b302c57 | 708139a89586919e3bd722c076bd90aa | Convert to Unix EOLs unless the original file was Windows encoded. | def dos2unix(source_file: str, dest_file: str):
with open(source_file, 'r') as reader:
dos_content = reader.read()
unix_content = str2unix(dos_content)
with open(dest_file, 'w') as writer:
writer.write(unix_content) | 1 |
7f7f7892e72a4979762bdf18b859070c | d36d026aad779beaffac4862a973e5e9 | Realiza a devolução de um empréstimo | class EmprestimoController extends Controller
public function destroy(Emprestimo $emprestimo)
{
$emprestimo->delete();
return redirect('/');
} | 0 |
d92e59612437a9e062e790368291c560 | bf67c77fd0aa80df68a78eff7eeacf59 | 鼠标离开时延迟十秒后触发隐藏功能 | handleHoverOff () {
this.timeout = setTimeout(() => {
fastdom.write(() => {
this.hideContent();
});
}, this.config.timeout);
} | 1 |
d9e88129944f1f12716c3425008971e9 | 344246380b457c4e10452ecfbea683f4 | returns the single unique feature which has this tag | public class FeatureDB
public static NamedFeature getFeature(String name) {
String nm = name.trim().toUpperCase();
List<NamedFeature> features = featureMap.get(nm);
if (features != null) {
return features.get(0);
} else {
return null;
}
} | 1 |
716d6a54bbe0866fb37f67974387557a | 73c64bad1740bb2e275204823152183a | Determines if a move is valid
input: potential move to be made as an integer
Ouput: Returns boolean corresponding to validity of move | if(number == 0){
return true;
}else if((number < 0) || (number > board_size)){
return false;
}else
return moves[current_player][number];
} | 1 |
3644bc3a8eafdc7e4a5528d4e5289f55 | 5255a5f6f1e654b0ecd389194f71028b | <p>
Description:获得未分配的订单提醒<br />
</p> | public class PubOrderAlertServiceImpl extends BaseServiceImpl implements PubOrderAlertService{
@Override
public List<PubOrderVO> queryNotGroupOrder(PubOrderVO vo) {
return dao.queryNotGroupOrder(vo);
} | 1 |
102d37fdfae8f940c7b09d15c036a06f | 7b2d4bc1d62ce3292fec6b9d0c385031 | Cambia el directorio raíz del TreeView Principal mediante un cuadro de diálogo de selección de folder.
Si se presiona cancelar, el directorio no cambiará. | {
FTI.Shared.CBrowseForFolder bff = new CBrowseForFolder();
bff.Folder = m_ctrlRootFolder.Text;
bff.Prompt = "Select root folder : ";
bff.NoNewFolder = false;
if(bff.ShowDialog(this.Handle) == DialogResult.OK)
{
m_ctrlRootFolder.Text = bff.Folder.ToLower();
}
} | 1 |
6f9272415f1799bb0b6f6b18b8964960 | 913747109323b9a7fc13e264f3b82a32 | Modify the cover page of the book. Add new if it doesn't exist before | return if File.exists?("#{RAILS_ROOT}/public/images/cover-sm/#{isbn}.jpg")
Net::HTTP.start("images.amazon.com") do |http|
resp = http.get("/images/P/#{isbn.gsub('-','')}.01.TZZZZZZZ.jpg")
open("#{RAILS_ROOT}/public/images/cover-sm/#{isbn}.jpg",'w') do |file|
file.write(resp.body)
end
... | 1 |
dacf8db36a64b9112684fb8081c311a4 | 07f87158d2c5f71804e0bd301d00d5e8 | Reset the YM's state. | {
YM2612ResetChip();
SN76489_Reset();
fm_cycles_count = 0;
psg_cycles_count = 0;
} | 1 |
d53b14fd5a312340f8e260e1664d7796 | 6f9cc89cdc99414bec4ccda146799fd0 | The path in the agent class loader from which to get the content for the resource. | public abstract class ContainerBase<T extends Archive<T>> extends AssignableBase<Archive<?>> implements Archive<T>,
ManifestContainer<T>, ServiceProviderContainer<T>, ResourceContainer<T>, ClassContainer<T>, LibraryContainer<T>,
ArchiveFormatAssociable
protected abstract ArchivePath getResourcePath(); | 1 |
cc34ed6abe0a4a2e8274de1850ce6e01 | 9bcb2f29b0c00422984a3dafe9ada5df | Generates confirmation email message text. | {
String msg = "<html><body><div>" +
"<p>Dear " + user.getFirstName() + ",</p>"
+"<p>We realize you and the families you've referred are anxious to receive confirmation about "
+"December gift assistance from Our Neighbor's Child.</p>"
+"<p>If you included an e-mail address for any family you referr... | 1 |
e61a44246522672285e1f6a18f481bca | 09f8fd7fb956de3f95d3a9b45c8365ce | Periodically refresh twitter results | @Component
public class TweetScraperScheduleTask
@Scheduled(fixedDelay = 60 * 60 * 1000)
public void scrapeTweets() {
} | 1 |
e6fcf699369d295078efca7c9ebe987f | 587a971d28a876238a72b187019abfe8 | Run osprey-worker. | with Connection():
qs = sys.argv[1:] or ['process']
w = Worker(qs)
w.work(with_scheduler=True) | 1 |
f48a2fad539991ec13e575511a959771 | df1b8ede66ea1c8240a2db0e936ab7fc | # возвращает прямых потомков | $result= array($people);
$childs=$people->lapsed->inimened;
if(empty($childs))
return $result;
foreach ($childs as $child){
$array=getChildrens($child);
$result=array_merge($result, $array);
}
return $result;
} | 1 |
a6339dddc1deba3195d253d7e79ee6ae | 8e39989be362311158eb242c86dbfacf | Convert a test result status in to a number. | {
switch ($status_name) {
case 'broken':
return 4;
break;
case 'finished':
return 3;
break;
case 'in_progress':
return 2;
break;
case 'unsigned':
return 1;
... | 1 |
d42ba3d0b8ee69915c007d89c9b8bbc0 | eaaa59ec16c7a21c920b95349b7a6fe1 | Returns the index of the second fastest time in an input array. | int least_recent(int arr[][2], int arr_len){
int minimum = arr[0][1];
int min_index = 0;
for(int i = 0; i < arr_len; i++){
if(arr[i][1] < minimum){
minimum = arr[i][1];
min_index = i;
}
}
return min_index;
} | 0 |
9495750eaa88a004e4fd3cb7c8360eab | aff8ccc85aa2fe1f897c2588892ce2a1 | Restarts reconciliation following a registration or re-registration. | class ServicecontrolV1(base_api.BaseApiClient):
class ServicesService(base_api.BaseApiService):
def EndReconciliation(self, request, global_params=None):
config = self.GetMethodConfig('EndReconciliation')
return self._RunMethod(
config, request, global_params=global_params) | 0 |
5837801f80e246e7af13bd18b1008f53 | f718f2804b7b0ae8a5b2e216919af073 | Parse partial query. | expected_domains = [token.LEFT_PAREN, token.VAR_DOMAIN, token.WORD_DOMAIN, token.NUMBER_DOMAIN]
ast: AST = []
while self.current.domain in expected_domains:
if self.current.domain == token.LEFT_PAREN:
self._next()
ast.append(self._parse_simple_query())... | 1 |
dc68f01947b34fa8e46903e0205b2052 | 761521679f8899671090906752cb8168 | 각종 메세지를 팝업으로 표시한다. | RichOutputText outputText,
String message, String type) {
outputText.setValue(message);
if ("confirm".equals(type)) {
dialog.setTitleIconSource("/res/image/common/dialog_confirm.png");
}
if ("for_su... | 1 |
afe6bc0ac9edb94e8a4230ad14c06a68 | 7c8164726303e91113c9587a91e1dd07 | 缓存查询 xml结果解析成 Purge对象的列表 | String str="";
String cxqqStr = "";
String cxqqlistStr="";
StringReader read = new StringReader(xmlString);
InputSource source = new InputSource(read);
SAXBuilder saxbBuilder = new SAXBuilder();
try {
Document doc = saxbBuilder.build(source);
... | 0 |
9e022fe814604f1637743cf42442ff00 | 279feb40d7328dacbd62ef58e1944b32 | Test count for empty collection. | class CSearchLibTest(unittest.TestCase):
def test_count2(self):
fnvDeleteCollection(self.sCollectionName)
result = fniCollectionCount(self.sCollectionName)
self.assertEqual(result, 0) | 1 |
4360f607b3188ed8f8bf17b7f3cb49e1 | 45f78d4883c49fc82357048fc9c8713c | Returns an <see cref="IntPtr"/> pointing to the start of the method's jitted body. | void MyICJI::getAddressOfPInvokeTarget(CORINFO_METHOD_HANDLE method, CORINFO_CONST_LOOKUP* pLookup)
{
jitInstance->mc->cr->AddCall("getAddressOfPInvokeTarget");
jitInstance->mc->repGetAddressOfPInvokeTarget(method, pLookup);
} | 0 |
c0b8cf4440f7423abbcfc3f57362ea9b | 4b5792df34c94dcf456037c3b858fa22 | Retrieves a line of text from the document. | export class Document implements Shareable
getLine(row: number): string {
return this._lines[row] || "";
} | 1 |
58f68498e62de920e2ef841f7c99fe52 | f4063d11fcb0dbf712c707cebd9c5257 | Convert Py Object back into scheme readable string | valpy_str (PyObject *self)
{
char *s = NULL;
PyObject *result;
struct value_print_options opts;
get_user_print_options (&opts);
opts.deref_ref = 0;
TRY
{
struct ui_file *stb = mem_fileopen ();
struct cleanup *old_chain = make_cleanup_ui_file_delete (stb);
common_val_print (((value_obje... | 0 |
e042ba02cbcd65944a375e07b92ec346 | 05675bdc93c4b6878602d2878faae264 | Find the two tangent points on the circle that form lines to point <paramref name='b'/>. | {
int tangentIndex1;
int tangentIndex2;
int vIndex = 0;
while (!pointMakesTangentToPolygon(polygon, point, vIndex, epsilon))
{
vIndex++;
vIndex %= polygon.getNumberOfVertices();
}
tangentIndex1 = vIndex;
tangent1.set(polygon.getVertex(tangentIndex1).g... | 0 |
f4627c9a18334a10ead8d592a2b96fdc | d4a66ea8789fa63ca8a2732d59b55c1e | keyEq does case-insensitive comparison of ASCII strings. | md_ascii_case_eq(const CHAR* s1, const CHAR* s2, SZ n)
{
OFF i;
for(i = 0; i < n; i++) {
CHAR ch1 = s1[i];
CHAR ch2 = s2[i];
if(ISLOWER_(ch1))
ch1 += ('A'-'a');
if(ISLOWER_(ch2))
ch2 += ('A'-'a');
if(ch1 != ch2)
return FALSE;
}
... | 1 |
d303835365b707460c9f184d5f24d09c | 6b8b3334152eb742ba44026e60ffb49c | Atualiza se a empresa entrega material medico(se pode ou nao entregar). | public class Transporte extends LocalCodeName implements Serializable
public void aceitaMedicamentos(boolean state){
this.encMedicas = state;
} | 1 |
1dd3481528f0da5a4651520ecb96da14 | f33617d3441971b2575b61125d044e0f | Tests if the method detects a address request with a missing zip code field | class ProductTest extends TestCase
public function testGetAvailableProductsWithMissingZipcode() {
$this->expectException( WebException::class);
$items = array(
array(
'weight' => '9.5',
'length' => '10',
'width' => '10',
'height' => '10'
)
);
$this->api->getAvailableProducts( '', 'NO', '2... | 1 |
cfecadd70a8535b96cef1107fca079b3 | 018d3d5fc4ef280429faaf48866407dd | Create config interactively | {
$dialog = $this->getHelper('dialog');
$formatter = $this->getHelper('formatter');
$output->writeln(
[
'',
$formatter->formatBlock('Welcome to the Bldr.io config generator', 'bg=blue;fg=white', true),
''
]
);
... | 1 |
0aa471ef4540a5a03c67b1d08c779736 | e3c86b29cffcb9809e8cd6e8444e0d41 | Devolve os dias uteis entre dois periodos tendo em conta feriados e fins-de-semana | public int diasUteisEntreDatas(LocalDate d1, LocalDate d2)
{
int numUteis = 0;
while(d1.isBefore(d2) || d1.equals(d2))
{
if(!d1.query(UtilsDate::fimDeSemana))
numUteis++;
d1 = d1.plus(1, DAYS);
}
return numUteis;
} | 0 |
2779ee16d984a9cc758dc2c87ab4ac2f | 7e1235cf6dabed773181af52f227a40e | 增加奖品数量 | {
$key = $this->PrizeCountNum . $key;
$value = intval($value);
if($value >=0){
$result = $this->incrBy($key, $value);
}else{
$result =$this->decrBy($key, $value);
}
return $result;
} | 1 |
7d4c81b7aa9ad03b35bb1f5b1d476f29 | 5d1123b5158341e580647b080a0df0d1 | Set mock for attribute set validation | class deepsight_datatable_instructor_assigned_mock extends deepsight_datatable_instructor_assigned
public function __set($name, $val) {
$this->$name = $val;
} | 0 |
f79973a66eac9fda9f23b505cde4bbcf | 40aab279f216d2a65b932aa4cfbcfbb6 | Devuelve la duración en segundos del fichero de audio. | namespace ASCIIPlayer
unsigned int AudioSystem::GetLength(AudioFile &audioFile) const
{
unsigned int tu;
FCheck(audioFile.get(ID_)->LoadedObject->getLength(&tu, FMOD_TIMEUNIT_MS));
return tu;
} | 0 |
44e028e08128a37d1780e7b2b4ff5497 | 60b966f53690193828bc527f10579297 | rewrite!! | function rewriteRequire() {
let mm = AppModule.mm();
mm.$require = mm.require.bind(mm);
mm.require = (id, ...args) => {
return mm.has(id) ?
mm.$require(id, ...args) :
require(id);
};
} | 1 |
5001a71237b28133f161e39f120aa34a | 1c9cc8204cf0f92595e6c8684881458e | Adds labels to the training data images depending on how the trainer should perceive them.
It uses 1 for images to be considered correct and -1 for the opposite. | namespace Scissors.Utils.Drawing.ImageDiff.Labelers
int[,] Label(bool[,] differenceMap); | 0 |
8a7568d04918b99df604a7186a7b71e9 | 6607745f7ffa960a6335baecdabcba47 | Create new instance of object which is used for managing revision
inside the specified directory. | function RevisionReferenceSelector(trigger, options) {
return this.init.apply(this, arguments);
} | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.