query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
9b835c534daf1e89e49f081d20443dff | 7fd497215a97dbbe37bb5f2e68ed1479 | 使用注释断言出现异常 | this.runConformTest(
new String[] {
"X.java",
"class X {\n" +
" void fun1(int x) {\n" +
" class Local {\n" +
" FI test= () -> {\n" +
" try {\n" +
" } catch (Exception e) {\n" +
" int x;\n" +
" };\n" +
" };\n" +
" }\n" + ... | 0 |
626c55f76154484ee89c83c42e2fc870 | de75f926a2184911856ee15e5b02fa29 | 修改同樣名稱的次數 | namespace Music_Station
public partial class newCreate : System.Web.UI.Page
public void update_singer()
{
SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["UsersConnectionString3"].ToString());
try
{
conn.Open();
... | 1 |
356ef2630c91c6754631f4fa4b991236 | 6c00564e5f54709d86ac135ac050157d | Provide Drupal-like escaping of replacement values. | {
return str_replace(
["'", '"'],
[''', '"'],
preg_replace('/\x00|<[^>]*>?/', '', $value)
);
} | 1 |
b102626bf3b56ffebc66e3d56e9f07a9 | 5f91e2a60273e1a91b0bb12a4c6d9b67 | Sets the translator to use in the string locating and translating process. | abstract class AbstractListEntryValidator extends ConstraintValidator
public function setTranslator($translator)
{
$this->translator = $translator;
} | 1 |
5475ea19d440eda7422f86f30f026dd7 | fd79b5cddc017e45a2742bc6ff3be347 | 根据借用人信息查询登记记录 | public List<LdrkxxBean> queryLdrkZzxxByRybh(String rybh) throws Exception; | 1 |
b6c874c9909a824eeb3c7bac8e0b9329 | bf813816fe3374cd4dc9963855718dde | Display a listing of the OrganizationCategory.
GET|HEAD /organizationCategories | class OrganisationController extends Controller
public function index()
{
} | 0 |
ba604ce22a4fe35174abb8ecfcf949d7 | 4a123b8c08cbdd3524aa4dd6f313b025 | Tämä funktio pilkkoo pdf-tiedoston sivut erillisiksi pdf-tiedostoiksi uuteen kansioon. | fname = os.path.splitext(os.path.basename(pdf_input))[0]
for i in range(num_file):
with open(pdf_input, 'rb') as open_pdf:
pdf_reader = PdfFileReader(open_pdf)
pdf_writer = PdfFileWriter()
if (i+1)*num_page <= pdf_reader.numPages:
for page in range... | 1 |
276fe1decff51d9d1b42e74d9d38fab8 | 1d7c2b79526e9509856c6b3c05f17f8e | Get the maximum upload size from php.ini. | class ilDAVServer extends HTTP_WebDAV_Server
private function getUploadMaxFilesize() {
$val = ini_get('upload_max_filesize');
$val = trim($val);
$last = strtolower($val[strlen($val)-1]);
switch($last) {
case 'g':
$val *= 1024;
case 'm':
... | 1 |
765e940d1140811e6be26686858fc5ee | 18a212cb736947585a6385f2fbe29cea | digitalRoots() calculates the series of numbers that make up the digital root of 'n'. | function digital_root(n) {
if (n < 10) {
return n
}
const newSumNum = Array.from(String(n), Number).reduce((sum, currValue) => {
return sum + currValue;
}, 0);
return digital_root(newSumNum)
} | 0 |
42bd36d15ff343cb75a329eeafb45874 | 64e79e85e0715fd3bd2a886b3f5856f4 | Méthode de disparition du saboteur | if (isBig()) {
sounds.getJumpSuper().play();
} else {
sounds.getJumpSmall().play();
}
Thread thread = new Thread(() -> {
boolean movingBMonster = isMoving() == false;
int i = 0;
setState(State.JUMP);
if (main.getMapC... | 0 |
cca819a9e23d97d0690beeff0875a0b7 | 0f40af6538c0e5391116eb5d4455caf5 | Handles events when the depht button in the GUI is clicked | namespace Fractals
public partial class FractalRenderWindow : Form
private void depthUpDown_ValueChanged(object sender, EventArgs e)
{
fractal.MaxDepth = (int)depthUpDown.Value;
pictureBox.Refresh();
} | 1 |
f1f16047efd026ae9b844941299a7bb6 | 03358759e6870bf9215bfc2d4177b4cf | Waits for a complete button press and release, with button debouncing. | void buttonWait()
{
while (!getButton1());
delayMs(30);
while (getButton1());
delayMs(30);
} | 1 |
02d85c14c0650d53e24cdd8b449a503f | b4a3910fb4da64c10be7aa8b7c7661c7 | 合并数据(特判更改;将国家相同的数据相加) | export class ReturnComponent implements OnInit
public mergeData (data: any) {
const result: any = [];
for (const item of data) {
const flag = this.itemInResult(result, 'date', item.date);
if (flag === true) {
result.push(item);
} else {
... | 0 |
b316af5a3b9e202bbe1cda1c14b2f1e4 | 10df4dc4ea2ab5e9492e0e970d91764e | Removes duplicates from the given reports. | public class Entry
private static MultiMap<ResultSinkInfo, ResultSourceInfo> removeDuplicates(MultiMap<ResultSinkInfo, ResultSourceInfo> results) {
MultiMap<ResultSinkInfo, ResultSourceInfo> resultsMap = new HashMultiMap<ResultSinkInfo, ResultSourceInfo>();
ResultSinkInfo[] resultSinks = results.keySet().toArray(ne... | 1 |
ab19b363d458958eb2ba304e93ec1fdc | c6f801b6ea13f0a9de354decbdae6fa7 | Determines if elements of this object are in other. | {
if (other == null)
throw new ArgumentNullException (nameof (other));
if (Count != 0)
if (other is RankedSet<T> oSet)
{
RankedSet<T> set1, set2;
if (Count > oSet.Count)
{ set1 = t... | 1 |
1bbacd48d1004c4ab90b76c6a5e42808 | 18e597796f590402b2a10f1268437f7d | read/convert/write COLR->RGB scanline | {
BYTE *src = pRLEBytes;
BYTE *dst = out.at(sx, sy);
int w = nWidth;
while (nDataSize > 0) {
int8_t width = *src++;
nDataSize--;
if (width < 0) {
width = -width;
if (width > 65) {
width -= 65;
nDataSize--;
if (*src++ != 0 && dst < out.end() && dst > out.begin()) {
w -= width;
dst[-... | 0 |
9f509575444666ee718bb8e1fa6e7817 | 1722f6875cd4c01f16aa03e485cf454e | Get the Replica selection policies of the volume (replica selection). | public class PowerVmAllocationPolicyMigrationFUSD extends PowerVmAllocationPolicyMigrationAbstract
protected PowerVmSelectionPolicy getVmSelectionPolicy() {
return vmSelectionPolicy;
} | 0 |
a98e2d2383ae0a8eb064d0c382ea16df | 8434daef7262b13a24dd17e0c5f2184c | 分析扑克,按照4个相同的牌,3个相同的牌,2个相同的牌,1个牌 分类 | {
let tmpCards = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,]
outCards.forEach(element =>
{
let index = this.GetCardIndex(element)
tmpCards[index] = tmpCards[index] + 1
});
let counts = [0, 0, 0, 0]
let cards = [[], [], [], []]
... | 1 |
6f938cee6e709ac418018e2e810405d7 | 82fc6575f87951354698eed374699f06 | 对每个样本计算二值化邻接矩阵 | class AlgorithmLbp(object):
def get_lbp_feature(self, img_mat):
m = img_mat.shape[0]
n = img_mat.shape[1]
neighbor = [0] * 8
feature_map = np.mat(np.zeros((m, n)))
t_map = np.mat(np.zeros((m, n)))
for y in range(1, m - 1):
for x in range(1, n - 1):
... | 0 |
4889d2783b8ff1a5c320a48d0b9f8479 | 81966b2ccc48b577badb56be0a051672 | Add a close X to the top right corner of a tooltip | if (typeof ($popup_id) == "undefined")
return;
if (jQuery("#" + $popup_id + " .modalbox_close").length)
return;
jQuery("#" + $popup_id + " .modalbox_title").append('<div class="modalbox_close">x</div>');
jQuery("#" + $popup_id + " .modalbox_close").bind("click", function() {
if (... | 1 |
3c7e30f5c97ac0f8d8044184064a0815 | e108e9364710d2440350444470be9973 | 子表单选地址簿JS | var num=getSelect('.address>.words>ul')[0];
var data=ChineseDistricts[86];
var str='';
for(var attr in data){
str+='<li><a href="#'+attr+'">'+attr+'</a></li>';
}
num.innerHTML=str;
var str1='';
var all=getSelect('.address>.words>.address_info')[0];
for(var attr in data){
str1+='<div id="'+attr+'">'+
'<... | 1 |
616cbd60276e71ea976479afaa96bb06 | 429581cd85d4df8c7fffd064def9fc13 | Getter du libellé du lieu-dit origine. | public OriginPlace getOriginPlace(); | 1 |
5e2901879b6ef5b53dcbc4bbba57437f | ebe27d62804c240cc09e5416384aebbd | Sets the page property.
Updates the data only if stored value and value to be set are different. | global.ApplicationLog.Log("UpdatePageProperties: Entered");
objContext.dispatch({
"type": "SET_STATE",
"payload": {
"PageDetails": [
...objContext.state.PageDetails.map(objTempData => {
if (objTempData["iPageId"] === obj... | 0 |
6a00b0d73f88993aae43cb25d9674f8f | dae30fa48d3344100c9b862c868a5cc6 | 根据产品相关DUR获得提示用户列表 | var messageNotStart = "";
var messageRemind = "";
var ddlSale = $("#ddlSale");
var ddlSaleValue = ddlSale.find('.select-title').attr('data-value');
if (ddlSaleValue == 1) {
messageRemind = " "+ getI18n('15909') + "\n";
}
else if (ddlSaleValue == 3) {
messageNotStart = " "... | 0 |
caae8b0acf7bfc07cfa0899c96fb7c67 | 8d0c340d62bb46ac8866ce24435f821d | 强制更改指定文章的赞数 | "update article",
"set agree_number = #{agreeNumber,jdbcType=INTEGER}",
"where id = #{id,jdbcType=INTEGER}"
})
int updateByPrimaryKeyFabulous(FabulousDto record); | 1 |
9cc67333e46b3ae5f964446b514eb5e0 | 5d8abc072294888de50012820a151257 | Populate website languages (The installed sitecore languages). | {
dropDownListSiteLanguage.Items.Clear();
dropDownListSiteLanguage.Items.Add(new ListItem("Select here..."));
Item siteLanguagesRoot = DbMaster.GetItem(configConstants.LanguagesPath);
if (siteLanguagesRoot != null)
{
foreach (Item sub_i... | 1 |
8152174f00ec92cbd4e24ac3833cf62e | 3e8243fa4565423d8226eb69dca6ba60 | Computes the minimum of four values | namespace Aardvark.Base
public static partial class Fun
[Pure]
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static double Min(this double a, double b, double c, double d)
=> Min(Min(a, b), Min(c, d)); | 1 |
f2adc426eec414d0d047cb814e0821e3 | 22f40e852357627d3be3e269b5076443 | 保存为excel文件,默认2007格式 | namespace Base.Controls
public partial class MyListView :ListView
public Base.ImExPort.Data.ImExportClass.ImExportReturnValueStyle Export2007(string filepath)
{
imexport._ExportType = Base.ImExPort.Data.ImExportClass.ExportTypeStyle.Excel2007;
return imexport.Export(this,filepath);
... | 1 |
3615ccce8ce62eff51c5f96f3124b571 | 6be482a34e086b18fc60f0bf593fda02 | Function that connects to ganache client. | const accounts = await window.ethereum.request({ method: 'eth_accounts' });
return accounts[0];
} | 0 |
1b7ec03516678307a61f5d55a1c05a78 | 41185fd70a2dbebe2bc593c2d63a6b7f | Return the total minutes recorded as sleeping | diff = self.wk_end - self.wk_start
return (( diff / 60 ) - self.rest)
end | 0 |
dddd88a8047a6c78769316e7a9bb083e | 120a97d886aa639ae9c417053bd4e2c6 | Remove an entry from an Ext2 directory. | {
const char * basename;
int namelen;
struct m_inode * dir, * inode;
struct buffer_head * bh;
struct dir_entry * de;
if (!(dir = dir_namei(name,&namelen,&basename)))
return -ENOENT;
if (!namelen) {
iput(dir);
return -ENOENT;
}
if (!permission(dir,MAY_WRITE)) {
iput(dir);
return -EPERM;
}
bh = find_... | 1 |
ccc88aa8fec1235246b20622976d1f1d | 22df89a89d03378bb175753d56132f35 | Gets the list of bars from given destination and property | bars_data = []
for _ in range(1, 6, 1):
bar_data = {}
try:
annotate = dev.ownerProps[f'bar{_}Annotate']
color = self.fix_rgb(dev.pluginProps[f'bar{_}Color'])
legend = dev.ownerProps[f'bar{_}Legend']
... | 1 |
e21f187079a6ddd51ea572d298a81342 | 91b2ce27a30dad5171c28b95c82c7ffc | move the nodes to their foci/cluster | ArrayList<Pattern>inputPattern = null;
if(this.patterns != null) {
inputPattern = this.patterns;
} else {
inputPattern = Launcher.inputPattern;
}
for(int inputSignal = 0; inputSignal < inputPattern.size(); inputSignal++) {
Node newNode = new Node(inputPattern.get(inputSignal), IDCount);
IDCount++;... | 1 |
cea854cd73a522cacce7f48da5dea3dc | c7f4bcec6948b17b7150d4418d7c389a | Gets the host CPU vendor. | {
const unsigned int CMD_GET_VENDOR_ID = 0;
char strVendor[16] = {0};
unsigned int buffer[4] = {0};
vendor.clear();
bool bRet = this->ExecuteCPUID(CMD_GET_VENDOR_ID, buffer);
if (bRet)
{
memcpy(strVendor, &buffer[1], 4);
memcpy(strVendor + 4, &buffer[3], 4);
memcpy(... | 1 |
c707864948fa3364d4c4c91c0d443547 | 9d8b1edf3f042e04b4546fc35759ee71 | Retrieve the photo bytestream. | class FamilyMember:
def get_photo(self):
params_photo = dict(self._params)
params_photo.update({"memberId": self.dsid})
return self._session.get(
self._acc_family_member_photo_url, params=params_photo, stream=True
) | 1 |
35c907d97807314947cc574a6382925f | 20bcde130d7f1b403660f5f2b568391a | paints the board with rectangles | self.form_grid()
row = self._rows
col = self._col
board = self._gamestate
for rows in range(row):
for columns in range(col):
if board[rows][columns]._get_element() != '.':
self._window.create_rectangle(int((columns*self.width)+self.... | 1 |
0ba1f61e100216b2e4fd316f2b5d6efd | a1cb42ab58c61ccf07d52204d7ab0adf | Remove an activity from triggering a role.
Roles and activities with multiple words need to be surrounded in quotes.
You can get the name of your current activity with [p]gameroles currentactivity. | if (
ctx.guild == None
or Database.Bot["sleeping"]
or not self.valid_command(ctx.guild, command)
):
return
handle = self.perm_handle(ctx, command)
if (role == "any") or (role == "none"):
if role in handle["_roles"]:
... | 0 |
d321e1032643b2cbe88a6e90132dd1b7 | 5dea1adc028ab36a3cad91e0965a4c02 | Returns item ID.
<code>
$itemId = 1;
$item = new UserIdeasItem(JFactory::getDbo());
$item->load($itemId);
if (!$item->getId()) {
...
}
</code> | public function load($iItemID)
{
if (!isset(self::$hStatement[$this->sTable]['load']))
{
self::$hStatement[$this->sTable]['load'] = $this->getDatabase()->prepare("SELECT * FROM $this->sTable WHERE $this->sIdColumn = :ItemId LIMIT 1");
}
settype($iItemID, 'integer');
self::$hSta... | 0 |
3e3630d486a119c40b64d3e9a7f92ad6 | c7e3f45800f257936c2ba6d2aaac0464 | Method to handle "OK" click of "NoInternet" popup | @SuppressWarnings("ALL")
public class FirebaseDbManager
private boolean handleNoInternet() {
return false;
} | 0 |
909030d8861d8e5640e5b8e5386f560e | 6f3f5f303b5c84185503456b71e2409e | From `tensorflow/python/ops/init_ops.py` | def _get_init_fn():
if FLAGS.checkpoint_path is None:
return None
if tf.train.latest_checkpoint(FLAGS.train_dir):
tf.logging.info(
'Ignoring --checkpoint_path because a checkpoint already exists in %s'
% FLAGS.train_dir)
return None
exclusions = [scope.strip()for scope in checkpoint_ex... | 0 |
bc5012efa1cda4a802dd1ebad80738d8 | 843c2d0839a1e293ec370a617992f142 | sample a random index and map it to coordinates | x = a[0] + random.randint(0, a[2]-1)
y = a[1] + random.randint(0, a[3]-1)
ex = b[0] + random.randint(0, b[2]-1)
ey = b[1] + random.randint(0, b[3]-1)
while x != ex or y != ey:
if x < ex:
x += 1
elif x > ex:
x -= 1
else:
if y < ey:
... | 0 |
f62fb05afc3de7298d9060ec8d7cedfc | 782a559a0bff09c4cb75b24ca1a2d260 | ルーチンの定義情報を得る。 | {
if (_lazyRoutineInfoField == null)
{
_lazyRoutineInfoField = module.SynthesizedManager
.GetOrCreateSynthesizedField(Container, this.DeclaringCompilation.CoreTypes.RoutineInfo, $"[routine]{this.MetadataName}", Accessibility.Internal, true, true, true)... | 1 |
23d16dbe6ff5c8fc4fa1f29f3cedf2de | ece6cc0ef6534c830993b93a934c4fe2 | Clears the query table | public class TwitterFavouriteSearches extends Activity
private void clearButtons() {
queryTableLayout.removeAllViews();
} | 1 |
cb1f98277421110a3e4b8163b48129bf | ac224ada41dc70800fd6461425648986 | 设置子项点击是否平滑滚动 | open class BaseViewAdapter<T>(private val context: Context) :
RecyclerView.Adapter<BaseViewHolder>()
protected fun setChildListener(viewHolder: BaseViewHolder, shake: Boolean) {
mOnItemChildChange?.run {
for (childClickId in childClickIds) {
val view = viewHolder.itemView.findVie... | 0 |
830196e68741fa5e3bfad47ada645ef8 | c08a8a51302a6362d2cfbe05edbc6c80 | Move game object away from a target object. | namespace BlobDefense
[Serializable]
internal abstract class MovingGameObject : GameObject
public void Move()
{
var moveDirection = new PointF(this.CurrentTarget.X - this.Position.X, this.CurrentTarget.Y - this.Position.Y);
ExtensionMethods.SetMagnitude(ref moveDirection, this.M... | 0 |
76713d11208f4231758e26b8297c15fd | ff8a2ab14f994f4bf972ff8cad986463 | This function checks to see if there currently is a loaded model. | bool ModelFactory::HasActiveMesh() {
return activemesh < model.meshes.size();
} | 0 |
11ba5b54591aaea0df818e407be3547c | 2f797d60935d2730c9973d4875bc81f5 | Send Light xyL get command | void mesh_light_xyl_client_default_get(wiced_bt_mesh_event_t *p_event, uint8_t *p_data, uint32_t length)
{
wiced_bt_mesh_model_light_xyl_client_send_default_get(p_event);
} | 1 |
7d0147c84ddb264b6b5162ab36508b79 | fa6ec98df682a65d81e193e49d4cac03 | 经销商批量拒单 | @RestController
@RequestMapping("store/invalid")
public class InvalidController extends AbstractController
@RequestMapping(value = "/rejectBat", method = RequestMethod.POST)
@ResponseBody
public RestResult rejectBat(Integer[] ids) {
RestResult restResult = new RestResult();
logger.info("/invalid... | 1 |
ab005ef7e856e8c14218e6f6af3e0c80 | 5059fbd6c84a9acc965fcf387432aff8 | Calculates the global entropy (in bits) of *this bitmap. | float entropy = 0.0f;
for(int i=0; i < COUNT_BYTES; ++i) {
if(array_frequency[i].value == 0) continue;
entropy += array_frequency[i].value * log2(array_frequency[i].value);
}
return -entropy;
} | 1 |
8cd97e966477648a78b2b2e2865b9828 | 8cc24b69b86fb2de4b5a77f27edfdd4c | Gets the text which shall be displayed on the 'dismiss' control. | public String alertgetText(); | 0 |
3f77efc9e907c06833b73f082fa7f0d8 | 846f0c3d34c862e24a383df1bd9eec92 | Visszaadja az ital id-jat. | class SastojakModel extends Model
public function dohvatiSveId() {
return $this->findColumn('idSastojka');
} | 0 |
4dc587b33f732f4b6515790adf395913 | f0891358fd564d6f3048ee710e8755e5 | Define new subcommand.
For accepted arguments, see `argparse.ArgumentParser.add_argument`. | class SubCommand(abc.ABC):
def add_arguments(self, subparser: argparse.ArgumentParser) -> None:
raise NotImplementedError() | 1 |
af87fb22251926f1fc2e554922fe62d1 | adfa9f682e2a34d6ae2a7a1f554c2c35 | when the game starts, the state is preMenu. | public class GameStateManager : MonoBehaviour
public void PregameState()
{
gameStateMachine.SetTrigger("ExitToStart");
print("pregame");
} | 0 |
f494e78e42a0b3d5eab9ecc7dc1755f3 | 3cb3a0b64d88c6e71820a8b9e0355062 | 指定されたファイルからクッキーを取得する | {
List<string> files = SelectFiles(url, GetAllFiles());
List<Cookie> cookies = new List<Cookie>();
foreach (string filepath in files)
{
cookies.AddRange(PickCookiesFromFile(filepath));
}
cookies.Sort(CompareCookieExpiresAsc)... | 1 |
5c9cb23ab0dd698da0b339dcc6414d6d | b9a2392d711cc1c88fa36b3880b1b97c | Returns a tooltip to be used when this search result is shown in the UI. | String getToolTip(); | 1 |
cf0d0752775a9de2deef3137c899dc8f | 9a99b99fd81b43128af38a065d93ce68 | Cancels all dialogs in dialog provider collection. | {
this.dialogState = this.conversationState.createProperty("DialogState");
const dialogSet = new DialogSet(this.dialogState);
const dialogContext = await dialogSet.createContext(context);
return await dialogContext.cancelAllDialogs();
} | 1 |
d670fd8bb3a3b1cce0237831b3d5cfdd | 6888214adb346dffb663a874b26a4d90 | Check validity of seqno | try {
long a = Long.parseLong(seqid);
if (a < 0) {
return false;
}
} catch (Exception e) {
return false;
}
return true;
} | 1 |
ae4a456bf5a496c325c1859e4ad17708 | 3a7c4693cdfb91728ae37984921ca117 | 通过uuid删除消息 | ResponseMessage delete(String uuid); | 1 |
2e7b97c491a6e4150440ad6dee74900e | 2672bbe3130ebaf533e40b115633ddb4 | Enable inbound PCI config cycles for agent/endpoint interface | {
out32(BRIDGE(LOCAL, CFGADDR), 0x50000080);
iobarrier_rw();
out32(BRIDGE(LOCAL, CFGDATA), 0x32000000);
iobarrier_rw();
out32(BRIDGE(CPCI, CFGADDR), 0x50000180);
iobarrier_rw();
out32(BRIDGE(CPCI, CFGDATA), 0x32000000);
iobarrier_rw();
} | 1 |
e32c97d7073f1e5dc001ba45864efb65 | 08356f26352db29cb4aed1d099f6f2bc | Get environment variables for the verticle | List<V1EnvVar> EnvList = new ArrayList<>();
V1EnvVar v1 = new V1EnvVar().name("FABRIC_LOGGING_SPEC").value("DEBUG");EnvList.add(v1);
V1EnvVar v2 = new V1EnvVar().name("ORDERER_OPERATIONS_LISTENADDRESS").value("0.0.0.0:8443");EnvList.add(v2);
V1EnvVar v3 = new V1EnvVar().name("ORDERER_MET... | 1 |
7164d2a676b10cd349c9bec86aa62897 | 3aac03b50b458c16f5ad60385f1380a5 | Replace all encoded colons in field names with the single colon character
to be decoded | public class BPEL4Chor2BPELGroundingAnalyze
private String replaceColons(String inputStr){
if (inputStr.contains(":")){
return inputStr.replaceAll(":", "_");
}
return inputStr;
} | 0 |
5aab0244813cbf794186bab7f0c2c194 | 52e76200d5c889c6f12b1498e52a1a35 | 显示录屏悬浮窗按钮(默认不显示) | windowManagerParams.x = defaultScreenWidth;
windowManagerParams.y = FLOAT_WINDOW_DEFAULT_Y;
if (windowManager != null && captureFloatWindow != null) {
windowManager.addView(captureFloatWindow, windowManagerParams);
}
bCaptureFloatWindowShowing = true;
} | 1 |
2f13c939fb017c45afe5ade673236d43 | 6637945deedc76aa56b80471dec8fe23 | 遍历对象并对值加密 | if (null == object) {
return;
}
Class<?> parameterObjectClazz = object.getClass();
if (AnnotationUtil.fieldHasAnnotation(Encrypt.class, parameterObjectClazz)) {
LOGGER.debug("class : {} has Encrypt annotation", parameterObjectClazz.getName());
Field[] ... | 1 |
b04da838bf317120e7bc999740f73bd4 | 52e8f0c0b01863b5d09a5ab697a1689c | 주소지 추가 화면으로 가기 | Intent toInputRow = new Intent(AddressActivity.this, InputRowActivity.class);
toInputRow.putExtra(InputRowActivity.KEY_INPUT_TYPE, InputRowActivity.TYPE_INPUT_ADDRESS);
startActivityForResult(toInputRow, 100);
} | 1 |
86afa989a8279cfbdc85e53f6a483d7c | 0301cb0c31c521e14a6297e1547fb7bb | 获取收音机信号强度,结果以回调方式返回 | url = self.get_url(info, 'signal_strength')
data = {
'sequence': str(int(time.time())),
'deviceid': info['sub_id'],
'data': {}
}
return self.send_data(send_url=url, send_data=data) | 0 |
a827882e3f7a87ccaf14bf0a531e161e | 2671794611c58d98c0a792e4a403ae00 | <p>
Gets information about the Auto Scaling groups in the account and Region.
</p>
<p>
If you specify Auto Scaling group names, the output includes information for only the specified Auto Scaling
groups. If you specify filters, the output includes information for only those Auto Scaling groups that meet the
filter crit... | public DescribeAutoScalingGroupsResult describeAutoScalingGroups() throws AmazonServiceException, AmazonClientException; | 1 |
5ee43a334d81043ced226d8e8e663577 | 172cc6e95100be4a9a3e364b86b99963 | Verify that deployment tasks have agent information set for task history | public void testParentTaskNotModifiedWhenTaskIsHistoric() {
TaskKey lParentTask = new TaskBuilder().hasToolsReady().build();
TaskKey lTask =
new TaskBuilder().withParentTask( lParentTask ).asHistoric().hasToolsReady().build();
new SchedStaskUtil( lParentTask ).assertToolsReadyBool( true... | 0 |
e37b248b66c05a590948b5f9ee769836 | e77075548e514352b028f899a7fcc677 | 根据CellOperator获取指定行的ops | @Service(value = "carrieroperatorService")
public class CarrieroperatorServiceImpl extends BaseServiceImpl<Carrieroperator, Long> implements CarrieroperatorService
@Override
public List<Carrieroperator> findByOperationPosition(String operationPosition) {
return carrieroperatorDao.findByOperationPosition(operationPos... | 0 |
d5a0ee8a058eec29a5d5eec9cf95bc78 | cf367d8235ab85a3f2fc88ebdcdf5887 | itself has been closed or the client that created it has been closed. | class SharedFClient(FClient):
def is_closed(self):
return self._is_closed | 0 |
07d27712aefea527f515d2b06f0c5dee | 96423f9959688b8a1e2673f54271ca16 | This function compute the digest value according to the XEP 0078 for Non-SASL Authentification. | int trtsp_auth_digest_HA1sess(const char* username, const char* realm, const char* password, const char* nonce, const char* cnonce, tsk_md5string_t* ha1sess)
{
int ret;
char *a1sess = tsk_null;
tsk_sprintf(&a1sess, "%s:%s:%s:%s:%s", username, realm, password, nonce, cnonce);
ret = tsk_md5compute(a1sess,... | 1 |
351cf16b79c8910abfaa2207a1e5f5f1 | b73f4b86658d77fe126ccdde307421fe | converts to improper fractions | public class Calculate
public static String toImproperFrac(int wholenum, int numerator, int denominator) {
int answernumerator;
String answer;
answernumerator= (wholenum*denominator)+numerator;
answer = (answernumerator+ "/" + denominator);
return answer;
} | 1 |
efd58b0967a2da41504049aecb9fe84e | 9d740e9bb112a174725b465bbdff87d7 | izbriše celotno zalogo vrednosti | class table
public function clear_value()
{
$this->value = array();
} | 1 |
a2f735ecd6b41ee999beb4e7489547ef | a14322162d492a9ec46151e007fe6dd9 | Enables or disables the decimal button | if (display.value.contains('.')) {
calc.bdec.disabled = true;
} else {
calc.bdec.disabled = false;
}
} | 1 |
6ed075dca6869919037cd9829223b70e | 4a9fd6b82f60fc9c1f6cb58551ad3284 | 初始化店铺装修信息表(草稿表) | $model_store_decoration = new StoreDecorationModel();
$store_decoration_info = $model_store_decoration->getStoreDecorationInfo(array('store_id' => $_SESSION['store_id']));
if(empty($store_decoration_info)) {
$param = array();
$param['decoration_name'] = '默认装修';
$param['store_id'] = $_SESSION['store_id'];... | 1 |
e8abe2ddd88e8b8b31ecfa9bda7afb5f | d8a9159978a8b779ab9cd46588c263a4 | 判断薪资、社保任务是否已经建过
建立规则同人,同月,同企业,同类型不能重复 | Long id = map.get("id") == null ? -1L : Long.valueOf(String.valueOf(map.get("id")));
Long memberId = Long.valueOf(String.valueOf(map.get("cMemberId")));
Long cAccountId = Long.valueOf(String.valueOf(map.get("cAccountId")));
Long cPostId = null;
if(null != map.get("cPostId")
... | 0 |
cf965dc7d1448cd83594f31e5bd00385 | b9951c9a6883623cb844d77d1b8b82bd | Конвертер игрового поля в строку | {
string str = "";
for (int i = 0; i < playingField.GetLength(0); i++)
{
for (int j = 0; j < playingField.GetLength(1); j++)
{
str += playingField[i, j] + " ";
}
str += "\n";
}
... | 1 |
98b76ebbeb19d0c659d1f42d904894ef | ebe96e2ff3d62f9f310917f903f32431 | Determines which tiles are covered with water. | List<Integer> land, int xVal, int yVal){
for (int y=yVal; y<Y_TILES; y++)
{
for (int x=xVal; x<X_TILES; x++)
{
Coordinate tile = grid[x][y];
if (!tile.isVisited())
{
int totalFertileArea = floodFill(g... | 0 |
7db77313632b22f89eb5dea8ff86afd4 | be3cc55298b5e2a0da4626224e19c60f | scanPropertyFiles | final class Core
private function scanFile($path)
{
if ( ! preg_match('/\.feature$/', $path)) {
return;
}
$feedbackMap = $this->validate($path);
$this->output->write($feedbackMap->count() > 0 ? '!' : '.');
if ($feedbackMap->count() === 0) {
return;
... | 0 |
d3c73243fda64fb8f8dece44f75325d4 | f79c8aa0d4d381eb20c8ef72b791594e | Unit Type을 통해 Hero 가져옴 | function Hero.Init(hUnit)
Hero[hUnit] = {
handle = hUnit,
values = {},
}
setmetatable(Hero[hUnit], Hero.hero_meta)
return Hero[hUnit]
end | 0 |
5da70383f29770d3ca1c8c401693368a | 1aff53b4d99a778525d11d7f360159ec | Returns the wait time between connecting flights. | public class AirportGraph
public int getFlightTime(String start, String end) {
return airport.getWeight(start, end);
} | 0 |
f30ceb101ac8f7765f780e8529a85ab8 | bbfbf12eb9e3111eb14b2938615f2a88 | Methods, only accessor | class User2
get age(): number {
return this.internalAge;
} | 1 |
e0b8f8747638eddace622f201226552c | 70c6a7082cb62a7d5c236077811e0cd3 | Utility for converting option keys, from fooBar to foo-bar | class myconf(configparser.ConfigParser):
def optionxform(self, optionstr):
return optionstr | 0 |
00ff9a05303ec3a759b09ab6f7c6c054 | c1a678f40701d01a06e185f40e75ded9 | 替换掉sql语句中参数标识 | for (int i = 0; i < parameterName.size(); i++) {
String string = parameterName.get(i);
sql = sql.replace("#{" + string + "}", "?");
}
return sql;
} | 1 |
4e9118bd06e357cf3eed48b3e7d2f2ca | 36d8705128865980be3f7fc7fcf694b0 | These if/else statments help determine what direction the member
Runs off in based on their current location and legal moves | board = self._board
populated_direction = self.get_current_player_initial()
proposed_row_change = center_to[1] - center_from[1]
proposed_column_change = center_to[0] - center_from[0]
forty_five_degrees = False
if proposed_column_change != 0: ... | 1 |
6ac6c11c29ae0a8203e9c2983b81a08a | ad2c7235256147e9a75a80809a2ceab7 | #> item.params.convert Andersen item parameters calculated from Power Series Distribution | dico <- expand.grid(from = c("Ai", "ai", "AI", "aI"),
to = c("Ai", "ai", "AI", "aI"),
KEEP.OUT.ATTRS = FALSE, stringsAsFactors = FALSE)
dico$coef <- c(1, n^b, n^(2*(b-1)), n^(b-2),
n^(-b), 1, n^(b-2), n^(-2),
... | 1 |
cce25e03d52e9f9f709f42b5abaa6ecc | 4627ebb37a80e059ff1300065f9cf4e8 | Сброс модификаторов ручного изменения значений | {
tbsOutTimeIsModified = false;
tbsInTimeIsModified = false;
tbsNameIsModified = false;
tbsShiftIdIsModified = false;
tbsIdIsModified = false;
tbaOutPhotoIsModified = false;
tbaInPhotoIsModified = false;
tbaOutLatitudeIsModified = false;
tbaOut... | 1 |
51bb72e9fce3292ccf70375f78ee7906 | 721add96e7a97161dfccae0901a116bc | 最近拜访老师记录 | class Teachers extends CI_Controller{
public function workrecord(){
$data['id']=$this->session->id;
$data['username']=$this->session->name;
$tea['teacherid']=$this->session->id;
$mystu=$this->connection_model->tea_stu($tea);
for($i=0;$i<count($mystu);$i++)
{
$dat['id']=$myst... | 0 |
7ca9e212e789515a14d3e0dbe5f5ea9f | 984f489428562b3b2232bf1c4144f4de | The model card for this model. | DescribeModelCardResult describeModelCard(DescribeModelCardRequest describeModelCardRequest); | 1 |
357b1e0f7588ff708d1954b899f961b8 | 39642ba2774a16b157f3d6ea49e4a283 | Perform initialization
default to bypassed, both speakers output | void BSP_init(void) {
if(BSP_AUDIO_OUT_Init(OUTPUT_DEVICE_BOTH, 100, AUDIO_FREQUENCY_44K) == 0)
{
BSP_AUDIO_OUT_SetAudioFrameSlot(CODEC_AUDIOFRAME_SLOT_02);
}
} | 1 |
5bfff613c23c342159ef75fa49209565 | fec8568677199f3fcd3d2ac305fdf6b6 | 发布找到的东西 | @Controller
@RequestMapping("/user")
@SessionAttributes(value = {"basePath", "goodsList", "carList", "enterList", "check", "hasGoods",
"currentCustomer", "plaList"
} )
public class CustomerController
@RequestMapping("found")
public String found() {
return "found";
} | 0 |
e6e45e1ed93259ff7f9adae8c6209bf8 | d90ab4bca633d5321ee5cb67ae185b60 | Get all replies of a comment according the specified pagination. | return new Promise((resolve, reject) => {
fetch(`${getRoot()}/api/comments/reply/${cno}?p=${page}`, {
headers: {'Content-Type': 'application/json'}
})
.then(response => {
if (response.status === 200) {
resolve(response.json());
... | 1 |
4e2ad16786c3ba8000079cc56dd78a52 | 560265aa4bf7f9468095e2c98e0df144 | Iterates through all CvUnitInfos. | class CPUInfos(object):
def itervalues(self):
return iter(self._cpu_infos.items()) | 0 |
8fbdf29b2b66bd70509e0fc7d50a330e | 6bc1f381025bc7c0e2053fb856e41d23 | Función empleada para confirmar el abandono de la partida, y llevar al jugador a la escena seleccionada | public class menuPause : MonoBehaviour
void QuitConfirm () {
SceneManager.LoadScene("ex00");
} | 1 |
0e3fced4e6f750065446cf5103ccdc4f | be7cd8308e8d735452ecdbbb89519f22 | miRNAs = dict(k='miRname', v='miRseq')
Returns seedDict = dict(k='m2m8Seq', v=[miRnames]) | fasta=""
dict={}
mydict={}
for i in gene:
if ">" in i:
i=i.strip()
i=i+"@"
x=i.strip().split('\t')[0]
fasta=fasta + x
genes=fasta.split(">")
genes=genes[1:len(genes)]
for i in genes:
i=i.split("@")
dict[i[0]]=i[1]
for k, v i... | 0 |
cc056e3bb1c7cb9581c7a7ee3b18f5b5 | 69a7338887e1aa9217a39e8716417ca3 | free the allocated memory for the agency matrix
MEM NOTE:
if agencyMatrix is NULL nothing is done | virtual ~Agency() {
delete agencyName;
} | 0 |
f19a5eee9f860b4b46f61f9991bac6c5 | ad337c3c212ed2b5dd17dd2538a22258 | Save controls from the meta boxes | if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {
return;
}
if ( ! isset( $_POST['gb_meta_box_nonce'] ) ) {
return;
}
if ( ! wp_verify_nonce( $_POST['gb_meta_box_nonce'], 'gb_meta_box_nonce' ) ) {
return;
}
if ( ! current_user_can( 'edit_post', $post_id ) ) {
return;
}
if ( empty( $_POST['_gb_meta... | 1 |
b63d60082fabf6a4f6477cff15ed4c37 | 317f49c944cb15009c0a9551529df75e | wikiモデルの作成 | split_lines = '----------------'
wiki_page = WikiPage.create(
:creator => self.creator,
:title => "STORY - #{self.id}",
:content => "#{self.how_to_demo}\n#{split_lines}\n#{self.tips}",
:product => self.product,
:from_model => self
)
wiki_page
end | 1 |
60b7d3d293d525107eba207a79f3247a | 628cbbbf5f85e56a2c97d85e9648b55e | Adds Identity support for Umbraco members | namespace Microsoft.Extensions.DependencyInjection
public static class IdentityApplicationServiceCollectionExtensions
public static IServiceCollection AddIdentityApplication(this IServiceCollection services)
{
services.AddIDGenerator();
return services;
} | 0 |
62f48beb01f7348ba06f443c659b5353 | 811a04864d8c218e4e0d87828ab7d5c8 | r"""The Transport Protocol for the session.<br/>Possible values = TCP, UDP, ICMP. | class AH(IPsec[Data_AH, Schema_AH],
schema=Schema_AH, data=Data_AH):
def protocol(self) -> 'Optional[str] | NoReturn':
if self._extf:
raise UnsupportedCall(f"'{self.__class__.__name__}' object has no attribute 'protocol'")
return super().protocol | 0 |
2d0bbfefd8b001705ab9b196746e9c15 | ec48eca0ad07a4502a4fe64ee73205e6 | Presenterar ett felmeddelande i rött med önskat meddelande. | {
Console.BackgroundColor = ConsoleColor.Red;
Console.ForegroundColor = ConsoleColor.White;
Console.WriteLine(message);
Console.ResetColor();
} | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.