query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
107e86d6f8f607a58ebe05366832b25a | b5d47ae3530837f342ca822f434fa7c8 | ToParamSpecs generates param specs from the params | m = make(parameterMap)
for _, paramList := range params {
for _, param := range paramList {
m.add(param)
}
}
return
} | 0 |
6dba4b73e7c10904cd79815fdea5bf4e | f687470a7dca25d8c2da60407190882c | creates the url table | print("Creating routes table");
$sql = "CREATE TABLE routes(route_id VARCHAR(10) PRIMARY KEY, route_short_name VARCHAR(10), route_long_name VARCHAR(20), route_type VARCHAR(4), route_url VARCHAR(50), route_color VARCHAR(10), route_text_color VARCHAR(10))";
if(mysqli_query($link, $sql)) {
print('Sucess!');
}
... | 0 |
180bc7e28fbb26d8f955a9ebb026c3e9 | 2919b0277c274f23d00881c19644600f | Eventhandler für die Berechnung aller Ergebnisse. | {
if (Aufgabe.OK)
{
Ergebnis.Wert = Aufgabe.WertA + Aufgabe.WertB;
Ergebnis.Erfolg = true;
}
} | 0 |
89431b3f5468c098b24a6e93e7c56c90 | 354ac30214844566a3742d146e8b6cdd | Calculates arrival time and sets active value based on current map and public transport state | {
if (this.PartOfTheRoute != null && this.PartOfTheRoute.Count > 0)
{
PartOfTheRoute lastElement = this.PartOfTheRoute.LastOrDefault();
if (lastElement == null || lastElement.InputTime == null)
{
lastElement = this.PartO... | 0 |
0702666e94997e0878ee7ee9832844dc | dd7702816cf1b95688ac4108200010c1 | Mass action to cancel payment | {
DB::transaction(static function () use ($request) {
collect($request->data['ids'])
->chunk(1000)
->each(static function ($bulkChunk) {
CampsPayment::whereIn('id', $bulkChunk)->delete();
});
});
return response(... | 1 |
f6c70c00d5e857ac267c87a9c68a23a5 | 7eae5c61ad7aaf44a55529fb3c39a5d7 | 订单提交之前,对支付订单增加抵扣状态 | public Map<String,Object> doProcessBefore(PayGateWayRequest payGateWayRequest, MDataMap mDataMap) {
boolean flag = false;
Map<String,Object> paramDataMap = new HashMap<String,Object>();
MDataMap orderMap = PayServiceFactory.getInstance().getOrderPayService()
.getOcPaymentInfo(payGateWayRequest.getC_order());... | 0 |
0ed52a544169092f92adb81fc8abca48 | d33d7dc935f263aee69eacfea530bad1 | Move half a page down.
This is essentially one half of Page-Down.
Suggested key combination: `Alt-Page_down` (As long as you don't use Wing's
folding.) | width, height = doc.ui.viewport_size
offset = doc.ui.viewport_offset
new_offset = move_n_wrapped_lines_down(doc.text, width, offset, int(height / 2))
doc.ui.viewport_offset = new_offset | 1 |
2cf351b5410195d811fbbda339b5f8c0 | 8e528da4483f863fe5c8137d0a55072c | Очистка текста до последнего слэша | def clean_data(bytes_text):
text = bytes_text.decode("utf-8")
return text[:len(text)-2] | 0 |
1911b960adf5575af8e96af845a2f5ab | 8889f4f18d9c34c799faf5306fda0258 | 显示公开简历列表 | class CenterController extends MemberbaseController
public function resumelist()
{
$userid = sp_get_current_userid();
$user_resume = $this->resume_model
->field(array('cmf_resume.*', 'cmf_deliver.resume_id', 'count(cmf_deliver.resume_id) as deliver_times'))
->join('LEFT JOIN ... | 0 |
6408c9ef8acc7fdc90f8dc0ab6518ce9 | d065c865876aeb5e2c7c94f460aad5f4 | Set attenuation on instrument, read back and save value. | class AttenuatorInstrument(attenuator.AttenuatorInstrument):
def get_atten(self, idx):
if not (0 <= idx < self.num_atten):
raise IndexError('Attenuator index out of range!', self.num_atten,
idx)
att_req = urllib.request.urlopen(
'http://{}:{}/CHAN:{}:... | 0 |
43c15f00e5a84c725900355763c15dc7 | 4fd84f34ce0bc70850f264d9a2be8a47 | Creates a new dispose scope for the current thread. Any tensor created within the dispose scope will
be automatically disposed once the dispose scope is disposed. | self._dispose_request.value_ref.append(value_ref)
if len(self._dispose_request.value_ref) < self._dispose_batch_size:
return
dispose_request = self._dispose_request
self._dispose_request = executor_pb2.DisposeRequest()
_request(self._stub.Dispose, dispose_request) | 0 |
eee4c6e1b625543c35c0b3c5883b1286 | a5c844efc65acc39afc51a90c5c82de7 | ログインユーザーのメールアドレスを取得する。 | class AuthorRole implements Role
public function getMailAddress (?string $lang = 'ja') {
return MailAddress::create(BS_AUTHOR_EMAIL, $this->getName($lang));
} | 0 |
82a4db39ff685f55a6a94616958deb95 | f71f8b405575f6e36ed52c15516a0dac | 处理经过softmat得到的向量,将最大值的维度设置为1,其余维度设置为0 | def transform_form(output, num):
output = np.array(output)
output = output.ravel()
index = []
for i in range(num):
max_index = 0
max = -999999
for j in range(len(output)):
if j not in index and output[j] > max:
max_index = j
max = outpu... | 1 |
dcc1917132b41b0f97d1f014259d0407 | 5baf0795df4166b6c3dd37b14dc3b678 | thinkphp构造函数
检查用户登录情况 | class User extends Base{
public function __construct()
{
parent::__construct();
$nologin = [];
if(!in_array(ACTION_NAME,$nologin))
{
$this->checkLogin();
}
} | 1 |
c66a40cc26eb5b74928e0c32b91d9a3b | 03e67d0700cd1219c4e39249fef9a7c8 | 群是否存在
<br>
判断在Redis里是否有群相关数据 | public boolean isGroupExist(String groupNo); | 1 |
fe3265602293fd7316565657a644d59c | 83a4971d404d68ab51325ffb74cf6174 | Updates our scan circle to match our location | public class MapActivity extends AppCompatActivity implements
OnMapReadyCallback,
Listener,
GameManager.LoginListener
public void updateScanCircle() {
scanCircle.setCenter(position);
} | 1 |
022c17f9d6468268871f9fd2f5f8c8d6 | 5846010441ba88733825e993a6f1d4fa | Test of setProductSet method, of class Purchase. | public class JUnitTest
@Test
public void TestPurchase1() {
Functions.addProduct("HONOR");
assertEquals("ERROR",Functions.addPurchase("HONOR", "0","1000", "01.01.2019"));
assertEquals("ERROR",Functions.addPurchase("HONOR", "1","0", "01.01.2019"));
assertEquals("ERROR",Functions.addPur... | 0 |
8fb21ea48d58a5ff75bc0ca1507a2932 | 8278e97feb4eafb45b019403723cc984 | Returns the name of this e s f province. | public String getName ( ) ; | 0 |
37389a2d36ead1a3823c2d10b2c24ebc | 25670e63c46c31bf41264116b87f4b1f | Returns the list of videos queued for recoding | namespace BR.App public class VideoPlaylistManager : MonoBehaviour
public List<VideoEdges> GetCurrentVideoList() {
return currentVideoList;
} | 0 |
1b38d45b4738183379fa904261222d3e | d7cabdb62d9052c8d8f66bc885dad91f | 云支付-查询合同可关联门店接口 | JsonResponseModel<QueryContractRelateShopResponse> rsp = null;
String rspStr = "";
req.setSkipSign(false);
try {
Type type = new TypeToken<JsonResponseModel<QueryContractRelateShopResponse>>() {
}.getType();
rspStr = this.internalRequest(re... | 1 |
d15c3002e5fce0dadbc23803bbf72951 | a8dbc600b469f0c0170b1b46f5cee177 | Detects Gadget file type (type 1 or 2; resp. without or with the 16
byte block headers). | if( this._detectGzip ){ return magic1 == 31 && magic2 == 139; }
return false;
} | 0 |
b8b458ec315326ed29c0f9127792a397 | 239aa60a0d2506a209b53df3a60875d7 | Prefixes lines with [RepoName] and adds colours | if line[0:2] == "+ ":
return f"{green_start}{line}{reset}"
elif line == "+\n":
return f"{green_start}{line}{reset}"
elif line[0:2] == "- ":
return f"{red_start}{line}{reset}"
elif line == "-\n":
return f"{red_start}{line}{reset}"
elif line[0:3] == "@@ ":
retur... | 0 |
b7e92126bc8001dd613801052b885ff4 | 588e2ccc3f4b4f6be88a13aeed35f1fe | 外键查询:通过表pur_order的pur_ware_id查询表warehouse的ware_name | String getWarehouseName(Integer warid); | 1 |
9088ce5f186420c61392c847c398dc8c | d48f5a82968718342a06efde10f50560 | Извлечение данных о контрагентах из БД | {
$rsContractors = CIBlockElement::GetList(
array("id" => "asc"),
array("IBLOCK_ID" => self::IB_CONTRACTORS, "ACTIVE" => "Y", "XML_ID" => $this->_needUpdate),
false,
false,
array("ID", "XML_ID")
);
while ($arContractor = $rsContract... | 1 |
8fb5e835c9c8fb8cba164e1fc5fdcc69 | f27ade0a504beab550c076324f865a37 | 用户支付后企业账户加款 | @Service
public class EnterpriseBankCardServiceImpl implements EnterpriseBankCardService{
@Transactional
public boolean addEnterpriseUserBalance(EnterpriseUser user,Double balance,BankCard bankCard){
EnterpriseUser u = new EnterpriseUser(user.getId(),(user.getBalance()+balance));
int a = enterpriseUserServiceImpl... | 1 |
f3e3113561f270c8c17ac9d613f618ab | 2cab5e1b9f5b93089e59798586859732 | called on execution of task. Sends the new testcases to the Testservice. | public class UserSelectionActivity extends AppCompatActivity implements View.OnClickListener
private void startTestCases(String inStrTcType) {
Intent launchAllTestCases;
launchAllTestCases = new Intent(AllStaticStrings.CTX_MainActivity, ForegroundService.class);
launchAllTestCases.putExtra(AllSt... | 1 |
437284533366ce2111c4fcd2db9af50a | 4b5ec97c55727c480d0805d43143a75d | 还原带单位的货币金额 | export default class PrintTask extends Component
returnUnit(item) {
return (item.type === 6 || item.type === 8) && this.returnCustonValue(item) !== '' ? item.unit : '';
} | 0 |
1027f2843a9c8df0b55a8bc2558c2db6 | d97712d739227a9b7eb77dca386c7536 | When converting a Boltzmann Machine (BM) model to Ising, first
formulate as Quadratic Unconstrained Binary Optimization (QUBO) and then
transform to Ising. | class Problem(object):
def convert_to_qubo(self):
if self.qubo:
raise TypeError("Can convert only Ising problems to QUBO problems")
new_obj = copy.deepcopy(self)
qmatrix, _ = ising_to_qubo(qmasm.dict_to_list(self.weights), self.strengths)
new_obj.weights = defaultdict(lambda:... | 0 |
30910dc322b095040d735ab8871175ac | b51446fb4e0e8bc9a37846dc8f0491a0 | 更新fabAction的位置 | export default class Panel extends Component
moveFAB (height, duration = 2700) {
const fabContainer = this.elements.fabContainer
if (window.innerWidth < 480) {
fabContainer.style.bottom = height + 16 + 'px'
setTimeout(() => {
fabContainer.style.bottom = '32px'
}, duration)
}
} | 1 |
9d22a2753e5d4e414a2090c6d660ff04 | 3281f97060c688d6cb0ed1a1d9a72ee0 | Getter for <code>ISBM_ISBM_LST.NAME</code>. | {
synchronized (monitor())
{
check_orphaned();
org.apache.xmlbeans.XmlString target = null;
target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(NAME$0, 0);
return target;
... | 1 |
f49e55a848f786e24ddee93e0b1cd07b | 41098b54bb1d4c7d9b26ccbee6a03580 | Switches between 1 or 2 answer input windows | {
advisors1_shown = !advisors1_shown;
advisors2_shown = !advisors2_shown;
AdvisorOpinions1.SetActive(advisors1_shown);
AdvisorOpinions2.SetActive(advisors2_shown);
} | 1 |
a6c0aa31dedfeb43bc62f110d4441ab5 | f696d48f7a2a3fff103cafefa48d0b11 | Berekent de totale waarde van de woning met de extra vrijstand die de woning heeft | public class ExtraArea
public double getExtraArea(double windowArea, double doorArea) {
return (windowArea + doorArea);
} | 0 |
4ee7f7ec464827766abf84a09f5f0e2e | 88dcbea3cc3c404bef765bdc93a63b00 | Retorna a string do que está presente no arquivo. Em caso de erro, retorna FALSE. | class FileMinifier
private function readFile(string $sPath)
{
try
{
return file_get_contents($sPath);
}
catch(Exception $e)
{
return false;
}
} | 1 |
424ed54ee6adbcb691b34d3c6f49912c | 03ef0cd1dc92e94d2ddc4c41c481c05c | after building, returns the set of all nodes | public Set<N> getNodes(); | 1 |
8dc35680b0067d9058b1b25d9b9c554b | 4bbcd94e2dd8308cbef32184997b6a0c | 返回:若至少选了一个项,返回true;否则,弹出消息提示,返回false | var objs = $("input[name='" + name + "']");
for (i = 0; i < objs.length; i++){
if (objs[i].checked){
return true;
break;
}
}
alert(msg + "必须选择一项");
return false;
} | 1 |
01428c22b6cb9b5c4ef739f58abed4bc | 4b9b29ebc2145f5b2df8397e6e3ef24e | Adjusts an item variation's current available inventory. | namespace Square.Connect.Api
System.Threading.Tasks.Task<ApiResponse<V1InventoryEntry>> AdjustInventoryAsyncWithHttpInfo (string locationId, string variationId, V1AdjustInventoryRequest body); | 1 |
0325028ae5c1d9e1d5196277ad36a9cf | 61083dcb51264adaf355e666ed4c21a4 | 해당 컬럼의 레이아웃 존재 유무를 반환 | $sql = 'select count(*) as num from bbs_layout where id=?';
$stmt = $db->Prepare($sql);
$res = $db->Execute($stmt, array($bbs_id));
$rows = $res->FetchRow();
if ( $rows['num'] ) {
return 1;
} else {
return 0;
}
} | 1 |
5ae3e106c39de6750f52fb73b0e10509 | 29c7c27d29491b99e458352741229dc7 | Elimina una reservación de vehículo de la base de datos | $db = Database::instance()->db();
$stmt = $db->prepare('DELETE FROM Reserva WHERE idReserva = ?');
$stmt->execute(array($reservation_id));
} | 1 |
b83eb858d0be0acb9f236410f4486690 | c92ec53d777920963e2d66244cbbde36 | 部门预算执行排名数据 | {
string ans = null;
List<Niandukaopingjieguo> info = GetBumenLishiKaoPing(deptname);
if (info.Count > 0)
{
List<Niandukaopingjieguo> rank = (List<Niandukaopingjieguo>)ExcludeNoRank(info);
List<Niandukaopingjieguo> norank = (List<Ni... | 1 |
a678781c7e3fd833fe18c88d48c3fa2f | 247e8da0f28dd659b52832d4b43432ec | 获取指定商户分类下服务人员列表 | class Technician extends BaseController
public function getList(){
$row = ['errmsg'=>'','errno'=>0,'data'=>[]];
$sid = $this->request->param('sid');
$field = 't.id,t.name,t.mobile,t.service,t.cover_pic,t.intro,c.name as c_name';
$list = Db::name('technician')->alias('t')
->jo... | 1 |
21c01c1151f0b71c3846dc154d82057c | 4044c7ceb1ee272f59842240c8f34efe | 在ServletContext中添加过滤器,并把过滤器应用于DispatcherServlet。 | public class WebServiceServer extends AbstractServer
private void addDispatcherServlet() {
ServletHolder servletHolder = new ServletHolder(new CitrusMessageDispatcherServlet(this));
servletHolder.setName(getServletName());
servletHolder.setInitParameter("contextConfigLocation", contextConfigLoca... | 0 |
52fdbff1ab5a77ddcdc575689044028e | 6a754e73d3504ddbd80591bbd41ade6e | Nodeにあるimportのテキストの位置(ノードを編集する時に使用する)を取得する。 | if (node == null) {
return 0;
}
return node.relativePosition;
} | 0 |
5df3c47ccca60600e25181d2d5f0d0ed | e2ca1091c7b004417c28f4677595356a | 找出符合条件的第一项,没有匹配项抛出异常 | public final class FilterUtil
public static <T> T requireFirst(Iterable<T> collect, Predicate<? super T> tester) {
for (T item : collect) {
if (tester.test(item)) {
return item;
}
}
throw new NoSuchItemException();
} | 1 |
bee988882966ac61d0477042abf856da | 17f1ffd475074514da86736e3f1324a1 | 机器人服务数据-机器人转人工会话量数据非负校验 | public Integer countRcsBotTagss(); | 0 |
cced273aab8069e7a7affb363dfa9f2a | fda16e0395a35c3646fdfea3472e12b1 | Place the instructions and words in the correct place in memory | class CORDIC_PE{
void loadMemory(){
string line;
ifstream file;
file.open("Instructions.txt");
short memLoc = 0;
while (!(file.eof()))
{
getline(file, line);
if (line.length() == BITS)
{
for (int i = 0; i < BITS; i++)
memory[memLoc][i] = line[i] - '0';
me... | 1 |
83c58c41ea66463b0cea4d8afb746b77 | 041a89ab2ad29eb6bee53a1cb0b838f8 | Log activity (subscribing) | class TrackController extends Controller
public function actionSubscribe()
{
$track = Yii::$app->getModule('logis/v1')->getTrack($this->provider);
try {
$track->subscribe();
} catch (\Exception $e) {
Yii::info($e->getMessage(), __METHOD__);
} catch (\Throwabl... | 1 |
76016a83ace8048f99a92ef52f259430 | b7191fd053a1a9b9edf613d008228e6a | Loguru formatter to return a compact JSON string for JSONLines output.
`record` documentation: https://loguru.readthedocs.io/en/stable/api/logger.html#record
Based on the `_serialize_record` method:
https://github.com/Delgan/loguru/blob/44f6771/loguru/_handler.py#L222
```python3
from calcipy.log_helpers import serializ... | module = ModulePath(record.pathname).resolve
if len(module) > 30:
module = module[:27] + bool(module[27:]) * "..."
raw = logging.Formatter(self._log_format.format(module),
self._timestamp_format).format(record)
if record.exc_text:
function = record.funcName
... | 0 |
d701a93e317a0da019ee949d04db8381 | fb2babc79f1781967d6b7a5c230aacc3 | 格式化福利字符串 | class UserProperty(BaseModel):
def format_invite_award(self,award):
res = u''
if 'coin' in award:
res += u'%s、' % utils.get_msg('other','coin_special_invite') % award['coin']
if 'gacha_pt' in award:
res += u'%s、' % utils.get_msg('other','gacha_pt_special_invite') % award[... | 1 |
3a1a28494a17a0b21687a1fcb5db96a2 | 7508a7729aae0bdae42f60f5a2ab3782 | 定期サポートメールログの更新 | {
try {
$this->dbMaster->beginTransaction();
$table_data = array(
'contact_date' => $this->getStrYmdHi('contact_', $data),
'staff_name' => getDataValue('staff_name', $data),
'user_type' => getDataValue('user_type', $data),
'nick_name' => getDataValue('nick_name', $data),
'catego... | 0 |
7318bded0a1a5bdae2f822278166a23d | e5525b1d5f6e7213e93e2af015142a8b | Returns true if the widget is focused. | public class PaperTab extends PolymerWidget
public boolean getFocused() {
return getPolymerElement().getFocused();
} | 1 |
19153ee65eb2a79747bf95320bc5e336 | 2ab0b71afc84b3429b8a49e4d2ef184a | Wrap wraps the Transport of given http.Client to trace http requests | client := &http.Client{
CheckRedirect: func(req *http.Request, via []*http.Request) error { return nil },
Transport: &Transport{
&http.Transport{
Proxy: http.ProxyFromEnvironment,
DialContext: func(ctx context.Context, network string, addr string) (net.Conn, error) {
host, port, err := net.SplitHos... | 0 |
964a58a1d5333446df62837258657106 | b6ff39dbfa4398cff659267359458418 | 后端WebSocket向Android端推送设备信用信息时,调用此接口处理数据 | @Component
public class ReportMessageHandler extends BaseMessageHandler
@Override
public void processDataMessage(CommonHeadMessageVo commonHeadMessageVo, String[] mesasge) {
MongoDeviceReport mongoDeviceReport = parseReportMessage(commonHeadMessageVo, mesasge);
Ssqb queryDeviceRentWxDetailSqb = Ssq... | 0 |
6bba1469648dd5408a41ebd583c01ae2 | 31f35e75122ebf93c3f48c4ce1ca38c2 | Метод получения значения времени разложения. | public class CalAnimation
public float getTimeFactor() {
return timeFactor;
} | 1 |
aca32d8d01afe8a991306e6fa2911fb7 | e1f41359a30cbe0514d665056b60d865 | キーワードからツイートの数を検索してくる。 | def search():
search_key = input()
tweets = api.search(q='"{}"'.format(search_key), lang='ja', result_type='recent',count=5)
num = 1
for tweet in tweets:
print('twid : ', tweet.id)
print('user : ', tweet.user.screen_name)
print('date : ', tweet.created_at) ... | 1 |
b9d84ca03ec6f1014ddd3a971ef9133a | 92938c2cd7ec0f289c561f7aff5f6afd | 标记固定的岩石的位置 | let markConfig = new MarkConfig();
this.addMark(id, markConfig.sewagePlantPosition, undefined, markConfig.simpleMark3Config.billboard);
} | 0 |
6357c1d05e446ca81b7c3990e4dd9933 | 896d9f02818940df2f4ee78fd0bf36de | Sprawdza, czy klient jest ostatni w kolejnosci na trasie | public class Route
public boolean isCustomerLast(Customer customer) {
return customersInRoute.get(customersInRoute.size() - 1).equals(customer);
} | 1 |
7481d3224822112378b0fa7088686a98 | 27306e10e16d6a0e5b3e8c6370a2c447 | Event handler for when an accordion is activated | function accordionActivate(event, ui) {
var offset = ui.newHeader.offset();
if (offset) {
offset = ui.newHeader.offset().top - $(window).scrollTop();
if (offset < 0 || offset > window.innerHeight) {
$('html,body').animate({ scrollTop: ui.newHeader.offset().top }, 200);
}
}
} | 1 |
a8f939a0fc2f59470f3443c3730179ab | 1a15ecb5874762a7d1e7f179939f730e | <summary>
Turn Call Button light ON/OFF . | function releWOnOff(status)
if (status == 1) then
fibaro:call(79,'turnOn')
elseif (status == 0) then
fibaro:call(79,'turnOff')
end
end | 1 |
7d97381512c43f5ada9698ec1ddd525b | 0ef8647938fca16049ff6d1d7c3c6d47 | 查找所有挂起的任务 | void findDeadlineTask(); | 0 |
c5f33b2840f6047648c672f73ddb4cb1 | 6bea07d58941919256e71dff94840b3e | Function to return list of all files in search folder path, sorted alphabetically | def getlist(filepath):
list= os.listdir(filepath)
list.sort()
return list | 1 |
fb48f80c0eab24d05056c1d5a4244e63 | fe033bbb5b62e4aedbf7022aba571ee0 | Adds selected attribute(s) to attribute group | {
if (!$attrParams['apply_to'] || in_array($this->_type, $attrParams['apply_to'])) {
$this->_attributes[$attrSetName][$attrParams['code']] = $attrParams;
}
return $this;
} | 1 |
eaf390213d4e6286f3380dc5b6901120 | 12e61aec543d8a4e5006d4e71a2adb07 | Transform a string from "snake_case" to "camelCase". | def snake_to_camel(val: str) -> str:
val = val.strip("_").split("_")
return val[0] + "".join(map(lambda s: s[0].upper() + s[1:] if len(s) > 0 else "", val[1:])) | 1 |
47473e4fa58fd3104e4944f50099cde9 | 3c4e92c93e56bb1f3ebf9005b06f3674 | get the current minimum col size | public abstract class AbstractColumn<M, I, S> implements IGridColumn<M, I, S>
public int getMinSize()
{
return minSize;
} | 1 |
56764fa5a279c594bee8e655fcbaad35 | 67d6ef530130ef3abad8e669424fbc3a | сортування кодів методом бульбашки | {
if (rad_insertionsort.Checked == true)
{
lst_Code.Items.Clear();
lst_Code.Items.Add("void InsertionSort(int a[], int n)");
lst_Code.Items.Add("{");
lst_Code.Items.Add(" int i, pos, x;");
lst_Code.Items.A... | 0 |
8d3e32a694e76e61e6020193f3196186 | 55e5ad6c8f5bca2bd664645213e53460 | Turns raw images into processed images by running them through the graph. | def process_image(encoded_image, config, thread_id=0):
return image_processing.process_image(encoded_image,
is_training=False,
height=config.image_height,
width=config.image_width,
... | 1 |
a71999ce88873ec972848098cec722eb | 11d10a52b4ef0313a56c42d801666e95 | 用户根据出发地、目的地、出发时间查询航班信息 | List<CrazyAirResponse> findFlights(String origin,
String destination,
LocalDate departureDate,
LocalDate returnDate,
int passengerCount); | 1 |
3c62e105d840d51b7cac33e09238391e | 89a4186561fd185adc5ef35379ef2480 | Insert section headers for each "page" or "section" on the website with links
for going to the top of the page or to the top of various sections. | if (!empty($links) || $makeExpandable) {
global $lSection;
$name = str_replace(" ", "", stripHtml($title));
if (file_exists(templatePath."/sectionHeaderExpandable.template.php")) {
include templatePath."/sectionHeaderExpandable.template.php";
}
else {
echo "<table width=\"100%\" cellspacing=\"0... | 1 |
78bdb3d6ae569486f05c1f58623c29af | 176781f9c9377c1b885da5279d7c6013 | Blink caret | local text = self.text
local caret = self.caret
local s, e = text:selection()
local x, y, w, h = text:selection_rect()
local text_s = text:text()
if #text_s == 0 then
x = text:world_center_x()
y = text:world_y()
end
h = text:h()
if w < 3 then
w = 3
end
if not self._focus then
w = 0
h = 0
end
care... | 1 |
ee75f9131280f01b4547d4ca1f50e32e | 818a5146be37f81b2941c0a1a4535667 | wypisuje ladny wstep | void wstep_i_menu_2()
{
brzeg_ramki();
cout<<":: ::"<<endl;
cout<<":: ::"<<endl;
cout<<":: ::"<<endl;
cout<<":: Kazdy X oznacza, ze ... | 1 |
f2bbc191015885b8c8e22258cc0ee542 | 904e1edde218ed20c652badfee9cd4f6 | Remove the netCDF dimension groups hierarchy for all components of
the given type.
Some components exist within multiple constructs, but when written
to a netCDF dataset the netCDF names associated with such
components will be arbitrarily taken from one of them. The netCDF
names can be set on all such occurences indivi... | class NetCDFUnlimitedDimensions(NetCDF):
def nc_clear_unlimited_dimensions(self):
out = self._get_component('netcdf').get('unlimited_dimensions')
if out is None:
out = set()
else:
out = set(out)
self._get_component('netcdf')['unlimited_dimensions'] = ()
re... | 0 |
38ebf3f2c968b20f077228e022c33ec9 | 6c6a8eb5d26f20ed514db06277469abc | Risposta integrazione | class Talk
public function talkItalian()
{
return "Ciao !";
} | 0 |
44ddc1e3faab4deccc7cdffb52c6113a | 890c6ca0d0487b9d2d230f2ff7355d77 | returns the body of the loop | def _loop_body(para):
i, f, L, ref_z, ref_array, x = para
return _smooth(i=i, f=f, L=L, ref_z=ref_z, ref_array=ref_array, x=x) | 1 |
0b1a575c84f2935bf74dcf55efd66af4 | 5fe0a0c68621be79599919cf1c991ae2 | 获取当前上班迟到时间 | startdate = '%d-%d-%d'%(year-1, 12, 24)
enddate = '%d-%d-%d'%(year, 12, 25)
cur_path='php/attendancefs.php'
payload = {}
payload['action'] = 'GetAttendanceBookByAttendanceID'
payload['appointmentdate'] = '2015-06-09'
payload['attendanceid'] = employee.attendance_i... | 1 |
55ca45a21e65250cfede90abca198945 | 9060520e27090ac1fdac3b8102ed6329 | TestFakeClient demonstrates how to use a fake client with SharedInformerFactory in tests. | fakeClient := dynamicfake.NewSimpleDynamicClient(runtime.NewScheme())
for i := range objs {
obj := objs[i]
gvk := obj.resource.GroupVersionKind()
mapping, err := mapper.RESTMapping(gvk.GroupKind(), gvk.Version)
if !assert.NoError(t, err) {
t.FailNow()
}
r := mapping.Resource.Resource
fakeClient.Prepe... | 0 |
94851f26ace108f419c55f15705f4025 | 4225cc408fcb0a90413af9d0edd84eb0 | Returns a promise indicating if the API key can read the object type. | public class LocalUser
public boolean userCanRead(Class<?> objectTypeClass, String instanceId) throws XtentisException {
return findLocalUser().userCanRead(objectTypeClass, instanceId);
} | 0 |
ada7e9be423336c0a09ac0a11131abd0 | 764034ec6ea167159f7b3f1dc8fbda32 | GET: Approvers | namespace COOP.Banking.Controllers
[Route("api/[controller]")]
[ApiController]
[Authorize(AuthenticationSchemes = "Bearer")]
public class ApproversController : Controller
[HttpGet("All")]
public async Task<ActionResult> GetAsync()
{
var approvers = await _approverService.GetA... | 1 |
b82c767a20f50e3fc945b790c9ea6197 | dcedc5d2d376f1137a5259255527a6be | Copy event to a specified calendar | void moveCalendar(BwCalendar val,
BwCalendar newParent) throws CalFacadeException; | 0 |
867040d7299a44597fa95ecca80bd17d | 5ce63ffb49c3d033af02fda7b67db7e1 | Returnerer en referanse til det spesifiserte elementet hvis det finst i dette
BS-treet, null ellers. Bruk av rekursjon | boolean done = false;
Node<E> temp = root;
while(!done){
if (temp == null){
return null;
}
if(temp.getData().compareTo(data) == 0){
done = true;
} else if (temp.getData().compareTo(data) > 0){
temp = temp.g... | 0 |
73f712929f817ad6109b839a9b1763ca | 4348dd33cf5639490f5fa4d351dc5b97 | 获得随机运算数字 | def random_operate():
op = random.choice(['+', '-', '*', '/'])
return op, random.choice(operate[op]) | 0 |
1557895411c6356ce13e9a71e3b5d908 | 423fbbc08b8329f4479c9d8b1dc00aba | 封装支付宝支付订单信息 | String alipay(AlipayBean alipayBean) throws AlipayApiException; | 1 |
7999c41894167116dfe03bc2295136f7 | a00a1ccd63f58e2befd75d723ffd3634 | trim pascal field strings to specified length | {
if ( trim( $str ) === '' )
{
return $str;
}
preg_match('/^\s*+(?:\S++\s*+){1,' . (int) $limit . '}/', $str, $matches);
if ( strlen( $str ) === strlen( $matches[0] ) )
{
$end_char = '';
}
return rtrim( $matches[0] ) . $end_char;
} | 0 |
54eef83dba21dedfac94c86181c09dc5 | a91f26390a2872dab94e45c990bd49be | Returns True if this polynomial is 0, False otherwise. | public class BigPolinom
public boolean isZero()
{
return factors.size() == 1 && factors.get(0).isZero();
} | 1 |
37fc50bba4a8baec8bbba90a193148d7 | 6133a0861cbba35abc4378522a02b7c3 | Creates a Titled Panel with a Header and a Content | public class Main extends JFrame
private JPanel createPanelTitle() {
JPanel panelTitle = new JPanel();
panelTitle.setLayout(new GridLayout(1, 1, 0, 0));
{
JLabel lblOthello = new JLabel("Othello");
lblOthello.setBorder(new EmptyBorder(20, 0, 10, 0));
lblOthello.setOpaque(true);
lblOthello.setForegroun... | 0 |
541bc8a888e6081598dbb3d6415b8a85 | 5a265ca7cc98a7c0670dd828e511995d | Adding a new column to a kanban board | column_name = request.json['name']
column_board = request.json['board_id']
added_column_id = data_handler.new_column(name=column_name, board=column_board)
return added_column_id | 1 |
be0507a966325c3ddda84a58314d554f | da8ca8a6a9dbf71fe87294d0bb330f57 | 安裝Python模組 | def moduleInstall(module_name):
os.system("cd " + module_name + "&& npm install")
print "------module install end------" | 0 |
1f4f5b3793c2ab62bd7b19256c44b20f | c564ab884cf02b8912eae69a87ba1625 | kolik mi zbyva, abych mohl mit dopravu zdarma (do hranice pro nulove dopravne u dane dopravy) | int resMin = 0;
MissionRate missionRate = missionRatesRepository.findOne((long) 1);
Set<AutoClassPrice> autoClassPriceSet = missionRate.getAutoClassPrices();
if(autoClassPriceSet!=null){
List<AutoClassPrice> autoClassPriceList = Lists.newArrayList(autoClassPri... | 1 |
1d6d3b09e89b5b749a306fcb21b889e5 | 58a76269e0a83b2bead62ceaa6278797 | returns true if cell is alive next step, false otherwise | boolean liveCell = getCell(world, col, row);
int neighbours = countNeighbours(world, col, row);
boolean nextCell = false;
if (neighbours < 2) {
nextCell = false;
}
if (liveCell && (neighbours == 2 || neighbours == 3)) {
nextCell = true;
}
... | 1 |
1d983873ee7d303dbc64eba7b5339ced | d5b3d6981bcc625195935ef6604b0261 | Remove injective functions of one argument: replace with a child | class FuncVar(Node):
def rewrite(self, child, replacement):
return | 0 |
729c33284e7adc9c08e9ec514a03f373 | 3e40cca455a4d8f4e7608f9ff770ad53 | 获取商品的相对向量 | item_ids = [self.name_to_id[name.lower()]
for name in item_names
if name.lower() in self.name_to_id]
if not item_ids:
return np.zeros_like(self.ann.get_item_vector(0))
items_vec = np.mean([self.ann.get_item_vector(artist) for artist in item_ids... | 1 |
522b1ff73e1289d9812bde7e5d3e6e34 | d23884fda1a9966bb7435aaae839d1fb | Attempt to complete the current word as a command argument value | {
cmdLine->line[(*cursor)++] = 0;
if (cmdLine->line[*cursor] == '>')
{
++(*cursor);
cmdLine->cmds[cmdLine->used].cat = true;
}
char* startOut = nextWord(cmdLine, cursor);
if (*startOut == '\'')
{
++startOut;
cmdLine->line[(*cursor)++] = 0;
while (cmdLi... | 0 |
7dfd9c1644d185cc816a9be609602fc8 | 468b7b1397328d43e0bafb3f4520901d | Retorna o país | String getPais(); | 1 |
7435ef3d9092e85c9ba9c64a354c9996 | d223c5ced7fb7223608c445e6337195a | 多个自定义realm测试 | public void testSingleRealm() {
DefaultSecurityManager defaultSecurityManager = new DefaultSecurityManager();
Realm singleRealm = new RealmSingle();
defaultSecurityManager.setRealm(singleRealm);
SecurityUtils.setSecurityManager(defaultSecurityManager);
Subject subject = Secur... | 0 |
759ba1e75749c0079521e1666447995c | 0e44249d4f8456dec12142805048c853 | 设置写入蓝牙设备的指令 | class BLE_SDK
writeBluetooth (value) {
let device = this.device
wx.writeBLECharacteristicValue({
characteristicId: config.writeId,
deviceId: device.deviceId,
serviceId: config.serviceId,
value: value,
success: (res) => {
},
fail: (err) => {
this.onError(err)
... | 1 |
b75f719b1901695e8e9c5497d5fcd5ef | a4d524df9cccac3fa34d01b238256f5f | Метод проверяющий равны ли квадраты по площадям | class Square:
def __eq__(self, other):
return self.area() == other.area() | 1 |
8efdd8d1a49e1aef9a7d24b968634f16 | d118a3e7e832dd619d1063fb85ea943d | 根据配置隐藏身份证部分信息 | public class OilCardApplyActivity extends Activity implements View.OnClickListener{
private void initDisplay() {
boolean isHide = true;
switch (Integer.valueOf(getEnterpriseAccountType())) {
case 0:
isHide = true;
break;
default:
i... | 0 |
39ddf22fd04f94b4f17e451089683feb | 25fa68736b49a8a818663d84a1cde3e3 | 初始化朗读功能 | public class SpeechManager
public void initStart(Context context) {
RecognizerHelper.getInstance().init(context);
TtsHelper.getInstance().init(context);
} | 1 |
64777993b10416480825405ff4c5297a | cc117227db2720f9b32aaa4fe175dc9c | function to generate list of selected options | class CalibFrm(Frame):
def generateChoices(self):
if(self.opt==None):
self.opt=("NEXT",)
self.optBtn=MyButtonGroup(self.cont,self.opt)
self.optBtn.pack()
setLblFont(self.optBtn,"Calibri 20")
self.optBtn.var.trace_add("write",self.trig) | 0 |
5a94b2b76af06b563a3a7ae4b1940406 | b81a8751bd33279c6887fea6af91ff5b | Hole class that defines the hole positions on which the dowels in the joint will be designed based on the type of joint and the beam | self.node1End = None
self.node2End = None
self.type = None
self.overhang12 = 0
self.overhang21 = 0 | 0 |
cb4dc6c1244c5b2ead68ea6546a0ae6e | 74643a4d4f4545b34cafa049e7b9780e | Performs a XML-RPC query against the grid server returning mapblock information in the specified coordinates | if ($this->isDBLayer($tileset)) {
if ($this->isModified($tileset) == TRUE) {
header('HTTP/1.1 304 Not Modified');
}
if ($flip) {
$y = pow(2, $z) - 1 - $y;
}
try {
$this->DBconnect($tileset . '.mbtiles');
$result = $this->db->query('SELECT grid FROM grids... | 0 |
0869d9a3c89d68ecac0359f72a198361 | 03c87b8c94bed03afee519a147f050f6 | returns the most relevant features as numeric values | class Logistic():
def feature_extraction(self):
return | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.