query_id
string
corpus_id
string
query
string
code
string
label
int64
2ea8c9e0981008678c797e96f2ea2ca2
e0c4908db0ecf680dc3eb15f7358af35
@brief Function to perform left outer join between two tables
{ if (!$this->assertOrder("select")) { throw new \BadMethodCallException("The method fullJoin must be called " . "after a SELECT"); } $this->query .= "FULL OUTER JOIN $table ON $on "; $this->registerCall(__FUNCTION__); return $this; ...
0
40f7d6ef4bfc3bc8f9a792bcb10044fe
637488bc7725f976d29a3e013cf7a76d
Clear any previously-turned-on toggles in the option menus
{ m_ctl.MoveToggle.isOn = false; m_ctl.FightToggle.isOn = false; m_ctl.SupportToggle.isOn = false; m_ctl.DefenseToggle.isOn = false; m_ctl.PursuitToggle.isOn = false; m_ctl.RetreatToggle.isOn = false; m_ctl.AmbushToggle.isOn = false; m_ctl.VillagerTogg...
1
8d79a462e748e5bae1f255f935d56e90
d76eca1dfc2fe880b4acab2afade3577
随机生成不重复首字母
String[] chars = new String[]{"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"}; int num = (int) (random.nextInt(2) + 2); String fullName=""; for (int i = 0; i < num; i++) { ...
0
21718ca94ed9fa8d907863e191120224
3c27b9dae2a73a1bcb8ec1280935dc52
Get the cluster count, the number of cluster used by this body.
public class Cluster extends TrainingSample public final int getMeanCount() { return this.iMeanCount; }
0
47513d953f542e45db95956184e97e3b
8b904e5025fdf42d99073dcf5bd9b94f
统计报表-案件类型对应表-日期筛选
this.isCountByYear = false; this.isCountByMonth = false; this.isCountByDay = true; this.isCountByCustom = false; this.rp.dateType = '2'; this.rp.centerCode = this.stationCode; this.rp.profession = this.occName; this.rp.applyPurposeId = this.applyPurposeId; this.rp.applyResultId = thi...
1
989004a70e31a3daca542e5739a71d43
1149962b73ecae533ecd64e5a455629b
Set the JOnAS root directory.
public class Server implements AlarmListener, ClassLoaderListener, InvocationBuilder, Dependency public void setRootDirectory(Path path) { _hostContainer.setRootDirectory(path); Vfs.setPwd(path, getClassLoader()); }
1
317e88054a1c4663e098b0758f0b1ca1
792fc873eb6e1f1c395692a637093032
Hides all currently displayed modals. Supposedly only one is currently shown.
namespace OmniAPI.UI void ClearModals();
1
4c668bd2eb8c664c82ba580816df5974
73e331327722fa7f3f20f11f69079eca
根据parentId查询所有的栏目名称
public List<MdDataTitle> findMdDataTitlesByParentId(String parentId);
1
09e1f180a888b018a374eeb35c954648
04559c9b92c0c0aec79e7f98b9fcf84b
@Step("Устанавливаем роль лоан менеджер")
Optional<Manager> existManager = managerRepo.findById(req.getId()); existManager.ifPresent(exist -> { exist.setRoles(req.getRoles()); managerRepo.save(exist); }); return true; }
1
91246447d5e765d7944f076c5929af90
af231a09c02ea7ec1e8028218cd086b6
? Creates an empty message collection
class MessageContainer public function __construct() { $this->items = array(); }
1
49ecc11caea3caa9a45c24bfa3212f48
8ec14ef57cb13b411adca17a3eac952f
Convert from ECEF to Lat, Lon, Alt
x = r_ecef[0] y = r_ecef[1] z = r_ecef[2] aux = x**2 + y**2 r = np.sqrt(aux + z**2) rho = np.sqrt(aux) if r == 0: lat = 0 long = 0 height = 0 return np.array([lat, long, height]) if rho == 0: lat = np.pi/2 long = 0 height ...
1
a92a0bd9ec243cc2868777c0f1be9f9b
2b10d009299c4bc86f2861ebcf640216
Push a zero as a non-final placeholder.
namespace Narvalo.T4 public abstract class _MonadTemplate : VSTemplate protected void InitializeZero() { HasZero = true; }
0
1cde66e7e560345c7c4a6d82f26285c8
f929e183a5d282d74ac93265e9de6862
Gaussian random projection with an inverse transform using the pseudoinverse.
def randomized_projection(X, k, solver = 'lu', max_iter = 4): n, p = X.shape if max_iter == 'auto': _min = n if n <= p else p max_iter = 5 if k < 0.1 * _min else 4 Q = uniform(-5, 5, p, int(k), X.dtype) XT = X.T _solver = lambda x: lu(x, L_only = True) if solver == 'qr': _solver = lam...
0
fe726a859e1059aa556c7eda00d6b9ea
4de978785f6ef4bcead913b7404c256b
比较表单中N个字段的值是否相等
boolean result = true; for (int i = 0; i < srcCompareFields.length; i++) { String src = UtilString.isNil(rs.getObject(srcCompareFields[i].trim())).toString(); String dst = UtilString.isNil(mapDst.get(dstCompareFields[i].trim())); if (!dst.equals(src)) { result = false; break; } } return resu...
1
b7360572341f8566084882f4fd715c24
33ac455e372b5df9e4936bf577edc5a9
replaces some common parts of Ukrainian street names with their abbreviation
address = address.strip() d = { 'Березовая': 'Берёзовая', 'Дежнева': 'Дежнёва', 'Елочная': 'Ёлочная', 'Ильичева': 'Ильичёва', 'Минеров': 'Минёров', 'Могилевская': 'Могилёвская', 'Муравьева-Амурского': '', 'Проселочная': 'Просёлочная', 'Семе...
1
65c3f34979590c57b06a9e78f3699221
3011b2573e819c7ee9c4f552f3cb91cc
Tcp协议异步连接服务器
public class AsynSocketClient public void ConnectAsync(string ip, int port) { IPAddress ipAddress = null; try { ipAddress = IPAddress.Parse(ip); } catch (Exception e) { string err = $"AsynSocketClient Connect...
1
068ab6b8c9deb0ee751f7508c7f2051b
97848434c0cdb90a65fdb11f6961fcdb
GetAssociationsforNSG gets the Subnet and NIC ID associations of a given Network Security Group
options := &vpcclassicv1.GetSubnetNetworkACLOptions{} options.SetID(subnetID) nacl, response, err = vpcService.GetSubnetNetworkACL(options) return }
0
0f09d0a5cf1c43232f26b60d1ab09f94
8b7a3f5dcc80de8994ac9d70aff35815
Return normal datetime object (in case ducktyping does not work. Looking at you, mpl!).
try: if isinstance(self.time, dt.datetime): return self.time elif isinstance(self.time, dt.date) or isinstance( self.time, dt.date): return dt.datetime.combine(self.time, dt.time(0)) elif isinstance(self.time, pd.Timestamp):...
1
9bbb98bfdcb446195a499b87773d7272
483d7a6219b20efe3e93aa7b7e67b937
查询当天个人超赞数量
@Service public class AppraiseServiceV2 private boolean checkTodayPraise(String userId, PraiseDetail praiseDetail){ PraiseDetailBo pbo = buildPboByPb(praiseDetail); pbo.setStartTime(DateUtil.todayStartTime()); pbo.setEndTime(DateUtil.todayEndTime()); pbo.setpType(PraiseType.PRAISE.getType()); pbo.setUserId(u...
1
943a85d2cdad000e32111f01487e2361
1ec6aaa43c05e1e209ffe1cb96e5c6c9
Metodo para convertir un arreglo de bytes en un archivo
{ try { File.WriteAllBytes(pathdir, bytes); return true; } catch { return false; } }
1
6aed7b75c54dedd5648c369a7f63c15b
62e19721662335ce732c8141910bda8f
@brief Set the LSM6DSM gyroscope sensor output data rate when disabled
static int32_t LSM6DSV16BX_GYRO_SetOutputDataRate_When_Disabled(LSM6DSV16BX_Object_t *pObj, float Odr) { pObj->gyro_odr = (Odr <= 7.5f) ? LSM6DSV16BX_GY_ODR_AT_7Hz5 : (Odr <= 15.0f) ? LSM6DSV16BX_GY_ODR_AT_15Hz : (Odr <= 30.0f) ? LSM6DSV16BX_GY_ODR_AT_30Hz : (Odr <= ...
1
ce59642055589c065e88fa20292abc06
cf492ba18b46caed0ddb8cd7aac8d701
De speler geeft zijn berekende zet.
public class Challenge implements Serializable public Integer[][] getBoard(Player player) { return games.get(player).getValue0(); }
0
982cb52b7ef0c3dceafa2759fb9d8df7
1a91a3ec9f5f088da4bf498c0e4f2734
获得实例指定库的所有表名
ds := database if ds == "" { ds = schema } sqlStr := "select table_name from information_schema.tables where table_schema=?" operate := mysql.NewMysqlOperate(dbConnectMessage) result, err := operate.Query(sqlStr, ds) if err != nil { return nil, err } dbs := make([]string, len(result.Data())) for k, v := r...
1
457c21ce856413084940c2554c3faab9
f12a277a7fc92c8a4dfaf5f1a187f918
Класс для обработки и вычисления выражения
function Calculator(state) { this._state = state; }
0
f7e2f62a908e1b2c277b4bc32a1f832f
a92cc1bb20bb38b8970da87291a03622
奇链表
{ Linklist p = hc->next, ra, rb; *ha = hc; ra = hc; *hb = (Linklist)malloc(sizeof(Listnode)); rb = *hb; while (p != NULL) { if (p != NULL) { ra->next = p; ra = p; p = p->next; } } ra->next = rb->next = NULL; }
0
38cdaec5c11d49496b4381ce53afc568
f2e38afbb28d6ef4fbe5128f22c56895
모든 마을을 방문한 경우, 현재 마을에서 시작지점으로 갈 수 있으면 해당 비용을 리턴하고 아닐 경우 불가능 값을 리턴한다.
bool allVisit(int &dis) { bool rt_flag = true; for (int i = 1; i <= N; ++i) { if (vis[i] == 0) rt_flag = false; } for (int i = 1; i < path.size(); ++i) { if (net[path[i - 1]][path[i]] == INF) { dis = INF; return false; } else { dis += net[path[...
0
adb27700e95da7ce8b92fdd1cb6865cb
961666d1ddf5c793798df5f48aa61bc0
Verificando permissão de acesso ao recurso.
{ user = httpContext.GetActualUser(); return user != null && (Objeto == new int() || UserHasAccess(user, Objeto)); }
1
590b5847dcc4ad7530773d98d4c3a383
79508a9186b9a83e3fe4020b5b0470ea
GET: CEO
{ var vIP = db.VIP.Include(v => v.EMPLOYEE); return View(); }
0
5587e7b2c89c750ae2b6aadc3d53516f
ee4b260229e1815344d375049cb739f1
Returns the number of horses.
class Grid getHounds() { return this.hounds; }
0
968e9677f36ff39d93cfefebd4d77c08
9e03c762d95f0a22162f02e4d94961f1
根据RTXid查询员工
public class StaffUtil public static Staff rtrvStaffInfoById(Long id,String rtrvStaffInfoByIdUrl) { RestTemplate restTemplate = new RestTemplate(); SingleCriterionRequest singleCriterionRequest = new SingleCriterionRequest(); singleCriterionRequest.setCriterion(String.valueOf(id)); singl...
1
98a72fe59d45900626f4f2782e26815a
1a3a05cf77aaaedc7c3c53427c371425
Generates Metha tests
data class ForEachStatementChecklistNode( override var description: String = "", @OptionTag(converter = PsiConverter::class) override var element: PsiElement? = null, val iteratedValue: String = "" ) : TestingChecklistLeafNode( description, element ) override fun generateTestMethod(project: Project)...
1
4b2ae03ad5011326df230443ccc08813
4c68ef3cd6bdc8af6f8e5bf7e7bc53d2
Add server group.
namespace DD.CBU.Compute.Api.Client.Interfaces.Network20 Task<ResponseType> AddServerToSecurityGroup(addServerToSecurityGroup serverSecurityGroup);
0
e27c592e1bcfaef923c4ff7e0a0bae46
06a2fe5d779ffc2d5e36214b7c5c1b39
поскольку дроби сокращены, достаточно сравнить числители и знаменатели
class Fraction: def __eq__(self, frac): gcd_value1 = math.gcd(int(self.numerator), int(self.denominator)) self.numerator /= gcd_value1 self.denominator /= gcd_value1 gcd_value2 = math.gcd(int(frac.numerator), int(frac.denominator)) frac.numerator /= gcd_value2 frac.denomi...
1
97fc2a384ec32eca6c06f09db143fa04
405b714f1b50b336b17df5e83d16706f
Resets the scroll position of the text area.
{ var scrollViewer = TextEditorScrollViewer; if (scrollViewer != null) scrollViewer.ScrollToHome(); }
1
8c0439efee2de12a6620467d208d5d04
bce9fad2c46719b3e3d662bd731671ad
Creates and deletes a vnf package.
def deploy_vnf(body): if connexion.request.is_json: body = Body.from_dict(connexion.request.get_json()) return create_server(body.vnf_name, body.flavor_id, body.node_name, body.user_data)
0
1ccbf2f6897d20551694d3092112210c
9004d4611dc0251de1fd8b8cb296e1f5
给自动完成的方法获取所有符合条件的企业名称
public DataList getStoreAutoComplete(Parameter param);
1
83d910720ee5be10e4e1a7dc6c0525c3
51e999ac2a4fdaf7b433b959f42829ff
Returns string name of end page
class ScopusAbstract(object): def endingPage(self): return get_encoded_text(self.coredata, 'prism:endingPage')
1
25f51dae691100815ec69ebe4de96644
d8b6a3d4fd70c3b6576b670291f37fd7
Function to power cycle the radio
class SIM900: def power_toggle(self): logger.info('Cycling power...') GPIO.output(11, GPIO.HIGH) time.sleep(2) GPIO.output(11, GPIO.LOW) return
1
335670249adbcc5c338f1508c4a61ea7
d2f41d260d68c187b1d6d7c67d0f0cd6
用坐标获取城市编号
int CarPlateRecgnize::getCityIndex(vector<Rect> src) { int cityIndex = 0; for (size_t i = 0; i < src.size(); i++) { Rect rect = src[i]; int midX = rect.x + rect.width / 2; if (midX < 136 / 7 * 2 && midX > 136 / 7) { cityIndex = i; break; } } re...
1
d965edb870ce04755e9438451536d53f
456ddd31da62eb02491f1f08ea39e65b
CDebugWatchWin
class HudDebugWinBase void HudDebugWinBase( Widget widget_root ) { m_WgtRoot = widget_root; }
0
fe46a58bcb5575a0b390164871b3c5a0
e6611d210c233ea6f2f75c58da522a9c
The function we will use as predicate in LINQ to find extreme candles
{ if (High[index + 4] > High[index + 3] && Low[index + 4] > Low[index + 3] && High[index + 3] > High[index + 2] && Low[index + 3] > Low[index + 2] && High[index + 2] < High[index + 1] && Low[index + 2] > Low[index + 1] && Open[index + 2] < ...
1
ecd2028d49126a6efff956c175811437
0f3d99055329b8e040145523c8cd4555
Classifies and adds the task based on user input and displays msg in terminal.
public class MainWindow extends AnchorPane @FXML private void handleUserInput() { String input = userInput.getText(); String response = duke.getResponse(input); if(input.toLowerCase().equals("nbcb")) { dialogContainer.getChildren().addAll( DialogBox.getUserDia...
0
c61889bda2322ce8f0aaaf5fe59aafcc
a766fe57a95aba429af35006eee4ef06
print OK when x != 0, and fail when x = 0
int divide_by_zero(void) { volatile int x = 0; x = 1 / x; return 0; }
0
ab3fcbbf85ac7a8820d7180d282b89d8
4ed1712b5aa8537e2c1fd3ce168b55c6
Filter the query by a related \ORM\Stock object
{ if (! $company_id) { $company_id = Auth::user()->company->id; } return $query->whereHas('stock', function ($q) use ($company_id) { $q->where('company_id', '=', $company_id); }); }
1
1732ad04c7a06a4ed31daadb0e3564d8
d230ca47b53355ef36c5eb54923b0b04
Function for filling array with markers ( with randomly selected icons)
function addWaypointsMapMarker_unfill(waypoints) { var truckIcons = []; for (j = 0; j <= 99; j += 1) { var svgMarkup = '<svg width="24" height="24" ' + 'xmlns="http://www.w3.org/2000/svg">' + '<rect stroke="white" fill="#ed0034" x="1" y="1" width="22" ' + 'height="22"...
0
810b2785df2d72cae6b42e3a086557c7
5a0e824007df912de7234eda7b36ef9b
Get a temporal password that is required in the option "Reset password"
class ForgetpassController extends AppController public function TmpPass($length = 8) { return substr(str_shuffle('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890'), 0, $length); }
1
d780da43aadfd99bf8001085e3ec0204
7a39f76e69d3c20fb43fe99f948bb5ab
Displays proposals of a given account.
class ProposalsController extends Controller public function index() { return $this->jsonResponse(['proposals' => Proposal::latest()->get()]); }
0
89f0915ca008d8d8bf500f86c8631932
de40d1519187863286bbe4fd9460efcc
Consumes a command object from the parse tree. Adds output to internal state. Returns True if there were no conditions or if the condition was empty, False otherwise.
cond_in = str(cond) if isinstance(cond, list) and cond: need_extra = False if isinstance(cond[0], str) and cond[0].startswith("$"): cond_name = cond[0][1:] if cond_name == "all": res = True for sub in cond[1]: if not par...
0
ab7585fbbde431f6dfa746403b7fdfcb
2f10366797ec9a94397ad7f666b21e8f
<para>Round acceleration, for better consistency and lower bandwidth in networked games. </para>
{ float headingRads = e.Rotation.ToRadians(); float xNew = (float)Math.Sin(headingRads) * AccelerationPower * direction; float yNew = (float)Math.Cos(headingRads) * AccelerationPower * direction; if (Speed.AbsoluteValue() < SpeedLimit) { Speed = new Vector2f(Speed.X - xNew, Speed.Y + yNew); } ...
0
5e503ccf33272777cd24e927bcb8cfec
0b8c165427735a724d3003b9e4635dcc
This method is to "double buffer". If it wasn't here, the animations would flicker. No need to modify/comment anything in this method.
class JuMEG_TSV_Plot2D(wx.Frame): def SwapBuffers(self): self.canvas.SwapBuffers()
1
fac8cfa3e63eb4fe101d5f4df9abd1d4
cad74fdc8f1aa0d11679fca66a80abbd
Filter out Saturday and Sunday.
{ switch (d) { case DayOfWeek.Sunday: case DayOfWeek.Saturday: return false; default: return true; } }
1
f15347d0a0756f3285cc2fbf4cdbd6e1
371385573a4a41e7e6b0c606e63fdf4d
assets_static_css_admin_login_css reads file data from disk. It returns an error on failure.
bytes, err := ioutil.ReadFile(p) if err != nil { return "", err } return string(bytes), nil }
1
8924bb5a972c98aa286d297e59fb0d20
2cf0fbe0a4133d1c20c1beca0bc6745b
Returns a list of all subdomains for this domain.
class Input extends EventEmitter public function subDomains() { $parts = explode('.', $this->host()); return array_reverse(array_slice($parts, 0, -2)); }
1
b39dea2866252efee0ecaf34a7886afb
8142727d43edf41b4f4127b9d029ded6
Given 2D matrix of data, where rows are individual examples, shuffles the order of rows
def shuffle_data(X, Y): permutation = np.random.permutation(X.shape[0]) return X[permutation, :], Y[permutation, :]
1
2ec4375c0b36fa48cfc904cef1475ff1
403d08789dfd30e9b6e77fb4e946ea78
enable gpio0 and gpio1
int main(void) { LPC_GPIO0->DIR |= (1 << 1); SystemInit(); general_spi_init(); pwrmon_init(); LED_ON(); flash_spi_init(); flash_init(); flash_setup(); spi_shutdown(); wipe_mem(); init_write(); if (wm8737_init() < 0) { while (1); } uint32_t i = 1000*1000*3; while (i-- > 0); radio_in...
0
ca87932834b8468e95b1012922e247e4
7b3f756581124a457de17639d082542e
Update the colors for the slider.
$H.slider( "value", theColor.h); $S.slider( "value", theColor.s); $L.slider( "value", theColor.l); }
1
cb6e5421c9e929fc2432e617bd159e8b
e76f75c6b88ed8372001adaf0f609f7b
Check values of all parameters and raise `ValueError` if incorrect values are found.
class Component(ComponentBase): def validate_parameters(self): parameters = [self.parameters.get(x) for x in EXPECTED_PARAMETERS] return None not in parameters
0
29967a0d41072a551c4072c1b558a720
e073d4333e4ac5495d095e23e536682b
compute moments of interactiveness
for l in range(v.l + 1): norm2 = simps(v.bdg_u[l]**2 - v.bdg_v[l]**2, v.R).reshape(v.index[l], 1) tmtii1 = ((2 * l + 1) * v.bdg_u[l]**2 * v.ndist[l].reshape(v.index[l], 1)) / v.R**2 / norm2 tmtii2 = ((2 * l + 1) * (v.bdg_v[l]**2 * v.ndist[l].reshape(v.index[l], 1) + v.bdg_v[l...
1
5506f2f910ed6425019bda1c67202a95
26233d94f5e21ca5b91d1c2862be8098
Method to create a public user model and the relationship model between public user and SSO.
class SSOAuthInfo(CommonModel): def __init__(self, *args, **kwargs): super(CommonModel, self).__init__(*args, **kwargs)
0
3d4322d93a70bedb108add43a6c6177f
bb7f8dc3db621522613723a5972b5e75
Returns the element attribute named |attrName|.
public DataElement getAttributeValue(int attrID);
0
ba7f2e308d41e44f76d129e5886189f5
c47a23bf238334dd27be68453233773b
Returns tracked search action by its id and user id
namespace Org.OpenAPITools.Api System.Threading.Tasks.Task<GetActionResponse> GetActionByActionIdAsync (string actionId);
0
46a135d4272828fb862194f8f10f9fba
d054a36c1c967d9d98c835714efcdca7
Append request parameters from the specified String to the specified Map. It is presumed that the specified Map is not accessed from any other thread, so no synchronization is performed. <p> <strong>IMPLEMENTATION NOTE</strong>: URL decoding is performed individually on the parsed name and value elements, rather than o...
public abstract class NanoHTTPD protected Map<String, List<String>> decodeParameters(Map<String, String> parms) { return this.decodeParameters(parms.get(QUERY_STRING_PARAMETER)); }
0
e011bdd490b8ddcf4f39589fe5a229c8
e6abf6dca4c9399076333b39f513052f
Returns the customer's credit card with the matching UID. <br> If no matching credit card is found then null is returned.
namespace DynabicBilling public class CustomerService : ICustomersService public CreditCardResponse GetFirstCreditCardForCustomerByReferenceId(string siteSubdomain, string customerReferenceId, string format = ContentFormat.XML) { return _service.Get<CreditCardResponse>(string.Format("{0}/{1}/ref...
0
ec52e65c7926c0d7ccc90a0f553e84e2
0e06ffa3da94f4c01656376aae0e9141
判断资源文件后缀,仅当.yml才使用 YAML loader
class IniFileLoader implements FileLoaderInterface public function supports($resource) { return is_string($resource) && 'ini' === pathinfo($resource, PATHINFO_EXTENSION); }
0
b7bc41e690f81b06c258864a0c1ac980
66e3ccaa84bacf68127c813ccdd9c97d
更新微博账号valid有效字段,
user.updated_time = sys_now() user_fake_account = UserFakeAccountService.get_by_fake_account_id(user.id) if user_fake_account: user_fake_account.fake_account_name = user.nickname db.session.commit()
0
c3a6365e66049b549e73c9d60505c046
075e8171a8a76d8e66c3ca829c21d441
Minutes w/leading 0; 00..59
public class TTimeTick public int minutes(){ return (int)(_value / RDateTime.TicksPerMinute) % 60; }
0
d9bceff988e2c89f24ad453711f510e9
788ff0606ca24bc20409aac794cf73e6
range update function
def main(): def range_update_pre(lower,upper,new_value): q=[[0,1]] while q: i,f=q.pop() width=pow(2,depth-f) kagen=(i-pow(2,f-1)+1)*width chuo=kagen+width//2 jogen=kagen+width k=2*i+1 if lower<=kagen and jogen<=upper: ...
1
10208baeb7c391e432853ecde73458b6
3e9df97d415aa9d65c2f283613e57bee
#Display most common payment values
xmarginleft <- 0.25 xmarginright <- 1.0 ymargintop <- 0.75 ymarginbottom <- 0.25 palette <- "Paired" legendname <- "Grouping" plot <- ggplot(data=mdata, aes(x=as.Date(Var1, origin="1970-01-01"), y=value, group=Var2, colour=Var2), xlab="", ylab="Payment Amount ($)", palette=palette) + geom_li...
0
5467cd8c071b4aff92d0ed185f198957
a51132041d486723186d7a9c44d895dd
_copyIndexScan
Datum *values, bool *isnulls, ScalarToDatum *transferFuncs) { int rows = vecScanBatch->m_rows; ScalarVector *vec = vecScanBatch->m_arr; ScalarVector *sysVec = vecScanBatch->GetSysVector(SelfItemPointerAttributeNumber); reltuples += rows; for (int rowIdx = 0; rowIdx < rows; ...
1
53e06acfebeaa5d8c41e5ce3201a74b7
35d02f91c631a79c6011d7c3a95b80ba
========== Create Get Request and set to UI ===========
function getRequest() { console.log("Inside the function") $.get(document.getElementById("urlQuery").value, (data, textStatus, jqXHR)=>{ let type = cleanContent(jqXHR) console.log(type) console.log(data) console.log(type) if (type == "html") { document.getElem...
1
061c461f3a2ec27cc87fc5ea0fd2d008
cdba3e40a9c6b0fcf5431a30e11031fe
Returns the indeces for a set of coordinates. Necessary to sent the output as par Returns true if the grid point is within the active domain. Note that Column and Row may have positive values and still the point is outside of the active domain Note this may return a different value than the DFS-file!!!
public abstract class GridBase3D{ public boolean In(double x, double y, double z){ int xInt=(int)Math.floor(x); int yInt=(int)Math.floor(y); int zInt=(int)Math.floor(z); return In(xInt,yInt,zInt); }
1
6fd580a96c832f57f6021d75e66d3816
dfc50d15f6ad1fceefbe2ea17bb59566
Figures out what child item is and calls it's constructor class.
switch(i){ case 51: return new DoubleJumpItem(i, x, y); case 102: return new StopTimeItem(i, 5, x, y); case 53: return new ImmortalItem(i, x, y); default: return null; } }
1
2edca2b980c87aea7ce8f38dfb357cd7
7dd73b5aa9414d8f16d82e4ca01e6502
construtor que recebe uma referência do sistema que vai operar e guarda o seu endereço para executar as operações
self.LC = 0 self.queue = Queue.Queue() self.sst = threading.Thread(target = server_socket_thread, args=(selfport, self.queue)) self.sst.daemon = True self.sst.start() self.selfport = selfport self.vm1port = vm1port self.vm2port = vm2port self.clock...
0
781773b0f2ec2ae44e925509b7b8894d
d10b01d3ff1954c725b82420da110a3d
设置ViewPager的监听事件 当ViewPager的某个页面被选中时,需要相应的选中BottomNavigationBar控件的对应标签。
bottomNavBar.setTabSelectedListener(object : BottomNavigationBar.OnTabSelectedListener{ override fun onTabReselected(position: Int) { } override fun onTabUnselected(position: Int) { } override fun onTabSelected(position: Int) { changeFr...
0
a6c09699ead929cc0b58ce49fe4beb70
7899c88cade788b6e7821d7dcbefca02
Exit from pynicom shell
class Pynicom(Cmd): def do_quit(self, string=""): self.do_serial_close() sys.exit(0)
1
8e8daf83982adab68b551295e653d19e
04f170a6d0b38c14bb829ce2dc7a3d06
Gets Shared Access Signature for a single blob
function generateSharedAccessSignature(connectionString, containerName, expiry, blobName, start, permissions, usePrimaryEndpoint) { if (blobName === void 0) { blobName = ""; } if (start === void 0) { start = null; } if (permissions === void 0) { permissions = null; } if (usePrimaryEndpoint === void...
1
fa66b8764134fddf00296cb475cb134b
888d60aae0bdaf926b22195a1222dc2d
Update all applications "updated at" parameter with current date on save some configurations
class Product extends \AppBundle\Entity\Product implements \Doctrine\ORM\Proxy\Proxy public function refreshUpdated() { $this->__initializer__ && $this->__initializer__->__invoke($this, 'refreshUpdated', []); return parent::refreshUpdated(); }
0
5c2b33c9931e00a1ea3027808f383fd7
05652bbf689727ecfc4f8f028142c214
Returns {@code true} if binaries created by this {@link Target} can be launched, i.e. it produces executable binaries.
File getExecutable();
0
1e606ad6c1285e9f1b325c054d73fd72
d64bf68f2fd130f485478e32d736e31e
Inicia uma nova sessão para um usuário já autenticado
class AutenticarController extends Controller public function makeSession($sessao = array()) { try { Session::push ( 'usuario', $sessao ); } catch ( \Exception $e ) { Log::error ( $e ); } }
1
478910529e89a8de04b6b7cc9686fd14
5eb262355e5d3eb66a52da0026e50026
Version of Raspbian. Returns: str: Raspbian version.
args = [ executable, "-c", "import sys,json;print(json.dumps(tuple(sys.version_info[:3])))", ] result = tuple(json.loads(subprocess.check_output(args))) if not as_string: return result return ".".join(map(str, result))
0
f0e20534e48f5acdb57883687de86834
d0cd8810ccf746c9142b278424a765d3
api/chronam/ API description response with URLs to list resources
res.status(200).send(` <table> <tbody> <tr> <th>Method</th> <th>URL</th> <th>Query params</th> <th>Description</th> </tr> <tr> <td>GET</td> <td>/patients</td> <td>&nbsp;</td> <td>Read all patients</td> ...
0
c93b44600915664f214f2b09e27f4729
f6c98284d7360c9638bf317f918a79f2
string formatting.
number = 14 string = 'The number is {}'.format(number) print(string) print(f'Printing number using "f" string : {number}')
1
0368f4f5c58a95dbb72a17e549a43eaf
68467f0bbca785f7aca8d6e893f3b0aa
Returns a copy, sorted by key.
ISorted<T> Snapshot();
1
949ae2d285379fe1576cdcbec62098a7
205ea107a3a1710b700e1fdbb0ff8399
Obtain the collection of constructors.
foreach(Type type in types) { bool isCandidate = (!type.IsValueType) && (!type.IsAbstract) && (type.IsPublic || type.IsNestedPublic); if(isCandidate) { ConstructorInfo[] constructors = type.GetConstructors(BindingFlags.Public); Contract contract; ...
0
ed4c67a91b18b558c89796cd8d11da83
901197d45c76b5d909ffba6642bd438f
EntriesAreEqual compares the Japanese and English fields of an Entry for equality.
{ var item = obj as EnglishLanguage; return item != null && LocalizedName.Equals(item.LocalizedName); }
0
8ca86e8889d6a33904085bbf89125351
1f7a333fac5c02dc4b0bd330c4a9555b
将牌阵分拣为:万,筒,条,字
namespace MahjongAlgorithmForLHZMJ public class MahjongGeneralAlgorithm private static byte getWanTongTiaoTing(List<byte> card) { card.Sort(); switch (MahjongGeneralAlgorithm.GetMahjongColorValue(card[0])) { case 0x00: if (MahjongGenera...
0
9b945707b0b186d83c7e3848bef504b8
d5cb7216ac56f0659b389ae9918f252b
Проверяет есть ли программа в автозагрузке
namespace Caps2CtrlSpace public partial class MainForm : Form private bool IsAutoStart() { RegistryKey rk = Registry.CurrentUser.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", true); var currValue = rk.GetValue(AppName); #if DEBUG Console.WriteLine(currVa...
1
809c5b8cb59bfd6cb3835e59f6a63a1b
e2ebb7e791a6b79adf9f090997163dac
Gets whether control was pressed.
boolean isPressed();
1
726a7e1d3acf89a33a44283ca30503d8
c6d71071e3047c15690fddf14467e7c5
Sets the board to be customizable before starting the game
function handleBoardSelect(e) { customMode = false; switch (e.target.value) { case "easy": { initializeBoard(easy); break; } case "medium": { initializeBoard(medium); break; } case "hard": { initializeBoard(hard); break; } case "extreme": { initi...
1
2bacaf84caa53413ce59dc46df8158d1
35b071632daf348750c86bc1315cdb8d
'slave transmitter' mode, just before data is copied to output register
{ g_ucPS2Mode = HOST_TO_SLAVE; g_ulTXCode = txb; g_ucTXDataBitCount = 0; g_ucPS2TXState = PS2_STATE_DATA; IntDisable(INT_GPIOA); GPIOPinTypeGPIOOutput(PS2_BASE, CLK_PIN | DAT_PIN); GPIOPinWrite(PS2_BASE, CLK_PIN, 0); delayMicroseconds(60); GPIOPinWrite(PS2_BASE, DAT_PIN, 0); GPIOPinWrite(PS2_BASE, CLK_PIN, CL...
1
181f9408dc4b69a820949aded9c81e59
33411089d1ab63458e46121c8075f075
得到一个Enum中的所有Int值
if (!clz.isEnum()) { return null; } Enum[] enums = clz.getEnumConstants(); List<Integer> rels = new ArrayList<Integer>(); for (Enum en : enums) { rels.add(en.ordinal()); } return rels; }
1
dec1192b16f38df3ed7a78e48996a467
53d5ef83f9918b9a561a4049e33593c2
Esta funcion realiza la intersecion de los conjuntos
IConjunto<T> conjuntoResultado = new TConjunto<>(); INodo<T> actual = otroConjunto.getPrimero(); while (actual != null) { if (this.listaConjunto.buscar(actual.getEtiqueta()) == null) { conjuntoResultado.insertarElemento(actual.clonar()); } actu...
0
aec329187b08af6725bf984c6634efe2
c4efceba39e952c6dff205c38f7954a0
#This function generates a CART tree from a dataset.
node_splits <- c() node_means <- c() node_indices <- list(1:N_train) is_terminal <- c(FALSE) need_split <- c(TRUE) while (1) { split_nodes <- which(need_split) if (length(split_nodes) == 0) { break } for (split_node in split_nodes) { data_indices <- node_indices[[split_node]] ...
1
8264537b26ddf53363e30367c16f0a62
aa32a1e037f4664694592df0948045c8
调用冻结模块接口,将代理商信息冻结
@Log(title = "用户信息管理", businessType = BusinessType.UPDATE) @PostMapping("/sysFreeze") @ResponseBody public R sysFreeze(@RequestParam Map<String, Object> params) { return agentUserInfoService.batchSysFreezeAgentUser(params); }
1
f6df578ad79ba485efcf758e96038bfb
87ab7d004437466cf65a289d4c0fa173
根据head和relation构造一个不同于head的corrupt_head
rels_emb = self.relation_embeddings(rels_idx) h_emb = self.recover_project_normalize(heads_idx, normalize_=True) t_emb = self.recover_project_normalize(tails_idx, normalize_=True) return - self.dissimilarity(h_emb + rels_emb, t_emb)
0
1d12c40e13bc4719a97b7bd119c2e83d
49e62a76b04ca9c2fcc10ec177f0b875
过期秒杀商品的缓存移除
public void removeSeckillGoods() { List<TbSeckillGoods> seckillGoodsList = redisTemplate.boundHashOps("SECKILL_GOODS").values(); if (seckillGoodsList != null && seckillGoodsList.size() > 0) { for (TbSeckillGoods seckillGoods : seckillGoodsList) { if (seckillGoods.getEndTi...
1
1faab1e9825c05a312af2560ccb791cb
7698712a166b1d7ec00944f5523b3435
Обработка полученного ответа для разрешений
async def process_allowed_request(validation_result: str, verb: str, name: str, content: str) -> str: if validation_result.split()[0] == ValidationStatus.ACCEPT: if verb == RequestVerb.GET: content = await get_data(name) if content: response_to_client = create_respons...
1
af4daa030a6b67bb8f1864ee4fd4085f
ca8bcd0dcfde8b998ab1dcbc2658147a
Updates the nodes on the graph to represent the current status of the algorithm
class SteinerExpansion: def setGraphState(self): numOfNodes = self._G.getNumOfNodes() for i in range (0, numOfNodes): timeInfected = self._G.getNodeAttribute(i, config_keys.NODE_KEY_TIME_INFECTED) if timeInfected == 1: nodeCost = self._G.getNodeAttribute(i, config...
1
07ad52f3d19c43f650c66cd83ec77e9d
8ab55c815b76ec869bb0667f0371fd26
Save samples as a JSON file.
with open(path, 'w') as f: writer = csv.writer(f, lineterminator='\n') self.Sample(writer, *sample_args) return path
0
5a9d7dc1aff30a456837e5151ef6280c
02b2533c98c9de8a4fae3c15082b237b
Gets the error schema associated with the form.
namespace djarva.Web.UI.Data public abstract class DynamicFormBase : CompositeControl protected abstract FieldSetSchema getFormSchema();
0