query_id
string
corpus_id
string
query
string
code
string
label
int64
7d59dc0f3184a63ae2a8342d67de0c2b
3a4ed5b02f481e6dc7c4bc8f7d0b355d
Deletes given file from the database
class ItemRepository implements ItemRepositoryInterface public function deleteFile($fileId) { $file = $this->findFile($fileId); if ($file) { $file->forceDelete(); return $file; } return false; }
1
853ac680fb9746330cf82bf66d0c4eaf
b08ac303a8fefee045d59916954fb3e0
传入ReadFile()处理文件后返回的列表,返回关键词的个数
def count_keyword(lines): keywords = [ 'auto', 'break', 'case', 'char', 'const', 'continue', 'default', 'do', 'double', 'else', 'enum', 'extern', 'float', 'for', 'goto', 'if', 'int', 'long', 'register', 'return', 'short', 'signed', 'sizeof', 'static', 'struct', 'switch', 'typedef', 'union', 'unsigne...
1
4677311b34a01979b694294b6b0a6122
ebb49115055d8784389eeebe267a2211
ERASE MARKS
{ int colsCur = img.cols; int rowsCur = img.rows; int colsCur_1 = colsCur - 1; int rowsCur_1 = rowsCur - 1; cv::Mat marker( rowsCur, colsCur, CV_8UC1, cv::Scalar::all( 0 ) ); for ( int i=1; i<rowsCur_1; i++ ) { for ( int j=1; j<colsCur_1; j++ ) { uchar *ptr = img.data + i * img.cols + j; if ( ! *ptr ) ...
1
8638b8f87df65a76f35c0821ae7f719d
6613d76dd2a0b2b547bbc4bfc3d7da15
ensure autobuilding is turned off
public abstract class BuilderTest @Before public void createFreshProjectEverythingDisabled() throws Exception { IWorkspaceDescription wsDescription = workspace.getDescription(); if (wsDescription.isAutoBuilding()) { wsDescription.setAutoBuilding(false); workspace.setDescription(wsDescription); } rodinPro...
1
36f4a0a77ab0e6a20e917f0053b368a1
8f3e5199e91cb985113e717713d8d8c6
This method return a list of the string which match the given regex.
List<String> matchString = new ArrayList<>(); Pattern pattern = Pattern.compile(regex); Matcher matcher = pattern.matcher(sourceString); while (matcher.find()) { matchString.add(matcher.group()); } return matchString; }
1
4b8dae97daab6fcb2a9d66db78d087fc
ebf4439e983b400804dc2ccf24769b56
Returns the keyword wich is the current token
class JackTokenizer: def key_word(self): return self._curr_token
1
9d34165fc7015e4cb36739abd65ac73f
3d16f7c5a150f8ea4a4b8ad7792bc6aa
迭代 DFS 从出发点到终点的所有路径
if (start === target) { temp.push(start) res.push(JSON.parse(JSON.stringify(temp))) temp.pop() return } let node = this._graph.adjacent(start) while (node) { if (node.val && !visited[node.val]) { temp.push(start) visited[start] = true this.allPath(te...
1
59f4cbc084122c2aba55f72048889f54
d7c287f918d11a1d5fa982c423563e5e
Metodo para mostrar que boton esta seleccionado
namespace TEA.Views public class OnButtonClickAgenda : MonoBehaviour public static string BotonActualAgenda() { string botonActual = EventSystem.current.currentSelectedGameObject.name; return botonActual; }
1
36c6c3f254a101dc53265ddbfe40381f
19694edd34ff5e8bc73129d1ea0d64f2
Check the times of both players and determine the winner.
void checkWinner(Blackjack player, Blackjack ai) { if (player.didBust() || ai.didBust()) { return; } else { if (player.getValue() > ai.getValue()) { std::cout << std::endl << "You win!" << std::endl << std::endl; } else if (ai.getValue() > player.getValue()) { std...
0
f7074d5bed0b89ec0c779931cd5afc7b
3b9a45f9e5a870be000e4328cf69686a
Sets whether the display is allowed to sleep while the program is running. <para>Display sleep is disabled by default. Some types of input(e.g.joystick button presses) might not prevent the display from sleeping, if display sleep is allowed.</para>
namespace Scada.DBUtility public static class SystemSleep public static void ResetIdle(bool keepDisplayOn = true) { SetThreadExecutionState(keepDisplayOn ? ExecutionState.SystemRequired | ExecutionState.DisplayRequired : ExecutionState.SystemRequired); }
1
ae988895c42b2fecf37798e27d8c876a
c323eeef750473d45e6b8eb1f8a0c7bb
Register SIGINT handler.
int main() { struct sigaction sa_int; sa_int.sa_handler = sigint_handler; sigemptyset(&sa_int.sa_mask); sa_int.sa_flags = 0; if (sigaction(SIGINT, &sa_int, NULL) == -1) { perror("sigaction failed"); exit(1); } srv = server_init(); server_loop(srv); return 0; }
1
052f713297f7cd6e352cce1ff18277aa
0ceeb2434b8470d5a82065603acad547
获取bucket下指定路径的文件集合
export default class Qiniu getFiles(opts) { const bucketManager = this.bucketManager(); const { bucket, ...otherProps } = opts; return new Promise((resolve, reject) => { bucketManager.listPrefix( bucket, otherProps, (respErr, respBody, respInfo) => responseHandler(res...
1
6fb47e0aa7376bb6aebfe5f1825fdf3a
f566e14d35d8f0b6e67313528800be61
跳转到登录页.
try { response.sendRedirect(request.getContextPath() + WebConstant.LOGIN_URL); } catch (IOException e) { throw ExceptionUtils.unchecked(e); } }
1
aa31966336e5551ce6f67d1a3cf4c326
2f051b463e693f937f2ee9d7bcc6a4c4
Overridable method, invoked when the document is being opened.
namespace LuaSTGEditorSharp.EditorData public abstract class DocumentData : INotifyPropertyChanged public virtual void OnOpening() { }
1
f4b74befdc31a5dc692c514247cc3b17
9f06af3de4e6fbb8d5a8efae452ce498
继承父级window全局变量
function setGlobal() { global["mainWindow"] = mainWindow; global["popWindow"] = popWindow; }
0
cebca58053b1dd0d7a5fdc0a5d99d68f
e94b193d561c368c8692e97598bf1c83
補充予定数(<code>PLAN_QTY</code>)の検索値をセットします。
public class ReceivingResultSearchKey extends DefaultSQLSearchKey public void setPlanQty(int value, String compcode, String left_paren, String right_paren, boolean and_or_toNext) { setKey(ReceivingResult.PLAN_QTY, HandlerUtil.toObject(value), compcode, left_paren, right_paren, and_or_toNext) ; }
1
7f2fa72560d1dcdee7c20826c0b97c3f
f2c26ad8961dbeed513742baffcb3c37
获取正在运行却没有URL的notebook
var that = this,config = that.config; return that.getPromiseJSON(config._notebook._note_url,{ 'notebook':bookpath||'', 'oauth_token':token || config._access_token }); }
0
1fc7ba3979a462b620c2e44e4b4b1331
6fcc7b9735c287db934d09369ebac1c1
Funkcja rysująca Trójkąt Sierpińskiego
public class Sierpinski public static void sierpinski(int n, double x, double y, double length) { if (n == 0) { return; }else{ filledTriangle(x,y,length); sierpinski(n-1,x,y+height(length),length/2); sierpinski(n-1,x+(length/2),y,length/2); sierpinski(n-1,x-(length/2),y,l...
1
98d8170c71f89d3f2c95a15a347ff4c0
9b02231362a33f1255f7a01191b42b3e
Run the void saveProperties(String,Properties) method test.
public class PropTest @Test public void testSchrijfProperties() { System.out.println("schrijfProperties"); Prop instance = new Prop("schrijfTest", false); instance.setHostAddress(DUMMY_HOST_ADDRESS); instance.setPort(DUMMY_PORT); instance.schrijfProperties(); Prop rea...
0
1a1bdb8429f0f1ff8c02f0c489c1664a
85af728b786c9c4ed622ada4a291ab09
Replace parameterized nonterminals with specialized copies. For example, a single pair `nt_name: NtDef(params=('A', 'B'), ...)` in `grammar.nonterminals` will be replaced with (assuming A and B are boolean
class Operator(Callable): def _specialize_exprs(cls, expressions, **kwargs): return expressions
0
928a556ec62b9767eb40f1145d787e26
95c96aaa825d6577e574f08badc52c57
Metodo que valida o login de uma loja
Matcher m = _loja.matcher(entry); if(m.find()){ g.registaLoja( m.group(1), m.group(2), new Ponto(Double.parseDouble(m.group(3)), Double.parseDouble(m.group(4))) ); g.registaConta(m.group(1), m.group(1) + ema...
0
2849930237aac2dc2d82e4f736175680
535046acb4d426cb13c1281c7cdac16e
Return the current state, the reward and terminal status.
class GridWorld(object): def observe(self): return self.state
0
70c75112ef7700d97052971278b9de2e
c2a6a217cda0b8121898f91bb65fa461
자유게시판의 내용을 삭제할 수 있게 해주는 기능.
@Log @RestController @RequestMapping("/board") public class BoardController @PostMapping(value = "/post", params="remove") public String remove() { log.info("remove"); return "success"; }
1
41ab37b124b2a3635b1e15dd4345bca0
d3cbeb5114d9eb68e06ab3a566019772
同步服务端素材到本地数据库
class MaterialController extends Controller public function actionSync() { $type = Yii::$app->request->post('type', 'news'); $model = new MaterialModel(); $model->sync($type); }
1
2d8ad05aa7f5542fb1b2f39bb1336b40
36fe489baa4dd21f9743e691326032a2
Operations to perform after snapshotting a virtual source.
class BaseVD(object, metaclass=abc.ABCMeta): def after_volume_copy(self, context, src_vol, dest_vol, remote=None): pass
0
3609743f39c3032d510d145dbc3719e5
1342d4385b146946d979b1a71b170298
滚动中处理函数
function scroll() { if (option.auto < 1000) { return; } stopScroll(); interval = window.setTimeout(function () { animate(1); }, option.auto + option.time); }
1
18e7b4c5bbb6ba57f54a07ee0b76b33b
185c4ba6b08c9b8d37755c58e100bfe9
移除指定的 Fragment 的回调监听
public class SupportManager public static class Builder public Builder remove(@NonNull Fragment fragment) { ft.detach(fragment); ft.remove(fragment); return this; }
0
bf61d893eefc60b873464ecf5de730b3
095ff5b17bbcd23fc75c387c391d8121
<para>「選択可能な値のリスト」についての情報を取得します。</para>
namespace Microsoft.AspNetCore.Mvc public static class EnumHelper public static IEnumerable<SelectListItem> GenerateList<T>(T? selectedValue) where T : struct { return GenerateList<T>(selectedValue, null); }
1
e46f53545024ece9aa4aca765aecd7c1
9d61b06e507e3dc1c1dd8e7396d50df3
加载宝贝库存信息
@ResponseBody public Wrapper<LoadGoodsInventoryVO> loadGoodsInventory(@PathVariable(value = "goodsCode") String goodsCode) { GoodsInventoryDO goodsInventory = goodsInventoryService.load(goodsCode); LoadGoodsInventoryVO rsp = goodsInventory.parse(LoadGoodsInventoryVO.class); return WrapMapper.ok(rsp); ...
1
be7013d994a6d78df36881cdf46f52ca
accb959a7748361bcb48abec82934a4c
Returns a category by index.
if (isset($this->categories[$idx]) == true) return $this->categories[$idx]; $category = $this->db()->select($this->table->category)->where('idx',$idx)->getOne(); $this->categories[$idx] = $category; return $this->categories[$idx]; }
1
a7479c99a810be24153eebe327637de2
06c543971c372f1a763db600d9a6c4ef
Prefetches all card images
if self.cards is None: raise ValueError('Please first either load the cards or fetch them from the server') existing_images = self._get_image_ids() logger.info('{} images found from disk'.format(len(existing_images))) for card in self.cards.values(): id = card['id...
1
4db649291e3631ab874eff81ed4d2161
328ae046b448da18574c14efd5201371
constructs matrix from row vectors
class Matrix4f Matrix4f::Matrix4f(const Vector4f& v1, const Vector4f& v2, const Vector4f& v3, const Vector4f& v4, bool readRowWise) { if (readRowWise) { m00 = v1.x; m01 = v1.y; m02 = v1.z; m03 = v1.w; m10 = v2.x; m11 = v2.y; m12 = v2.z; m13 = v2.w; m20 = v3.x; ...
1
9d622542fe0132f88498430260c736e5
9ffeae8798aa0299fbc1780d336d5069
Returns a sequence of precise extent geometries.
List<StreamExtent> getExtents();
1
7894027d359753ee1f5c9df1037f15ea
1f764a99e0de7895014324d3fd9246e9
Gets all versions of available SNVPhyl pipelines from the given settings file.
public class Version implements Comparable<Version> public static List<Version> getVersionsFromSettings(Setting setting) throws Exception { logger.debug("getVersionsFromSettings"); logger.info("Getting version list from setting"); VersionsParser parser = setting.getVersionParser(); List<...
1
9912bc60ac8fc53583a6400394edffbf
3415b9a669288fd60218aac054d2ff90
Set the notification recipients for successes.
if group is None: group = self.group self.feedback.append(Feedback('set_success', priority='positive', result=True, group=group))
0
3353da053a39fd7cd14331990309c148
9cd1d65c3877f25c2b59391129f4f4cc
Check if we are on the same side of the hemisphere
{ return hemisphere != 'N' || hemisphere != 'S'; }
0
7398d9f328b036e38c5c17a584a07964
e564c1945c9eeb52bd34f47a49c19849
Находим ID документа по артикулу
{ $record = Db::selectRow('select * from product where product_article = :product_article', array('product_article' => $product_article)); if (!$record){ throw new \AlarmException("Ошибка. Запись {$this->object}({$product_article}) не найдена."); } return $thi...
1
c4a53e1af32a3f511c097b0b5ed83019
f9fbedfe9e80e0894b694e870432b872
Create expression that selects map items identified by values and returns selected data specified by returnType.
{ byte[] bytes = PackUtil.Pack(MapOperation.GET_BY_VALUE_LIST, (int)returnType, values, ctx); return AddRead(bin, bytes, GetValueType(returnType)); }
1
de8a37b7ef58a03108bc8fbc0afaa809
53aadc3c9d85138f2bd8f5da3bad71ff
0x06 LD B, d8 : Load 8-bit immediate into B Flags affected: None
int LD_B_d8(Registers& reg) { reg.B.val = reg.RAM.get(reg.PC+1); reg.PC += 2; reg.addCycle(8); return 1; }
1
144c85b36b90971bc2142e1bd5dab94b
5c43ec0679202a63d3052a6102703bf6
Use this method to get simple input as python object, with all templates filled in
class InputForm(ABC): def get_input_form(self): pass
0
057483452c97360cd2766aed6fcfe10a
b4a4f9adb447b3188e1e82a3ef00da61
Arrays are realized as lists. Parses children of array element and appends them to new created array. Returns array.
bool leaveObjectsAsStrings) { cJSON *child; if (*value != '[') return 0; item->type = cJSON_Array; value = skip(value + 1); if (*value == ']') return value + 1; item->child = child = cJSON_New_Item(); if (!item->child) return 0; value = skip(parse_value...
1
cfe24ea69c814f9f8d85c6a3df542284
2e52377f848f2d99fb8ed83a7e052ff2
Plot the (sorted) base frequencies for each of the significant offsets.
freqs = freqs.sort_values() amps = amps.loc[freqs.index] freqs_mesh = np.tile(np.array([*freqs.to_numpy().T, .5]), [2, 1]) y_mesh = np.tile([idx_data - 0.5, idx_data + 0.5], [len(freqs) + 1, 1]).T ax.pcolormesh(freqs_mesh, y_mesh, amps.to_frame().T, cmap=cmap, norm=norm, zorder=-3)
1
750167fb43999e97ae24741603924a3a
44429d6b1ef4f6c025b93c937d349cba
Initiates the asynchronous execution of the ListIndex operation.
ListIndexEndpointsAsync(new ListIndexEndpointsRequest { Parent = gax::GaxPreconditions.CheckNotNullOrEmpty(parent, nameof(parent)), PageToken = pageToken ?? "", PageSize = pageSize ?? 0, }, callSettings);
1
75fd670dc079333be7798d14213b5557
75bf5c7966828c5a8acf085fb7e16ce4
Deletes all contents of the specified folder. This is generally used to empty the trash (wastebasked), but could also be used on any other folder.
namespace Dropboxifier static public class FileUtils static public void DeleteFolder(string dir) { DeleteFolder(new DirectoryInfo(dir)); }
0
cb40a7580134a6caa515b9f496bbf8c3
cdc3f9125cd01e88b952ff794f6f50a2
Add the provided Entity to the CosmosDB table.
namespace InvestingOak.Data Task<EntityEntry> AddEntityAsync(object model);
1
cc2288d22bceb593bff67aa9c41a3553
6832bd63a6329c22cfe61323b3d264f3
把UserView对象放入session中.
public class BaseController protected void setSessionUser(HttpServletRequest request, User user) { User u = new User(); u.setId(user.getId()); u.setUserName(user.getUserName()); request.getSession().setAttribute(Constant.USER_CONTEXT, u); }
0
f043ef3906753a121ae6d36605908897
128274909409764d056ea1552fccc42d
Funcion para obtener el backtracking una vez que se encuentra la meta, recibe el estado y un arreglo con todos los nodos
solution[Nsol] = aRow * 6 + aCol; printf("We are on (%d,%d)\n", aRow, aCol); if (aRow == fRow && aCol == fCol) { printf("LLEGAMOS!\n"); return 1; } if (aRow > 0 && board[(aRow - 1) * 6 + aCol] == '1' && !checked(aRow - 1, aCol, solution, Nsol)){ if (backtracking(aRow - 1, aCol, fRow, fCol, board...
1
24e7159071630fe56fdc8b6843fb7c12
9fd9d3e6e87fc648ea57974c9d03293d
Performs a free-form Search which handles the most fuzzy of inputs handling any combination of address or POI tokens.
namespace pb.locationIntelligence.Api GeoEnrichResponse PoisAutocomplete (string longitude = null, string latitude = null, string searchText = null, string searchRadius = null, string searchRadiusUnit = null, string travelTime = null, string travelTimeUnit = null, string travelDistance = null, string travelDistanceUnit...
1
d96e60007494df5b78b56fa721c39872
2b5e46736e7318acb038922c05efe5d7
Returns string like <input type="hidden" name="bms_req_tk" value="adsf&amp;asd&#32;"
$targetHtml = ""; $counter = 0; foreach ($inputArray as $key => $value) { if ($counter != 0) { $targetHtml .= "&"; } $targetHtml .= $key . "=" . $value; $counter++; } dump($targetHtml); return $targetHtml; }
0
66947043ac269e008523a541b5134f1f
a794426fe39b873af1563eb99a93f6a1
リストの中のランダムな要素を1つ返します
impl RandomizedSet fn get_random(&mut self) -> i32 { let idx = self.gen.gen_range(0, self.list.len()); self.list[idx] }
1
a9d035760ea0d3a935c0676066d44223
7f61448ad6da3ef0f9cb03f40c5be655
same as above but will be used for pairs of atoms as keys
cases like (1)
0
fa5064526f9a88561d407bb592957651
febfa67dde562267f170352357709f29
Sets the scan units. See MPS_AVAILABLE_UNITS for accepted values.
int Page::setUnits(UNITS u) { PageScale.setUnits(u); return 0; }
1
b6eb5152317a9a1f3f0e3c8f355ea971
1e15a6920c4cc83dba4972cc75243e02
根据字段的类型从从map里取出数据转化为String
String data = null; Jedis conn = getConnection(); if (conn == null) { return null; } try { data = conn.hget(mapKey, field); } catch (Exception e) { log.error("redis putStringToMap kv failed", e); }finally { returnCon...
0
7ca2461aa7dedb6f8193b8ffd8b9b0c5
8b2c05b4d1d36a419dd50aad3ef280b9
Generate random number in range 1 to 6
int generateRandomNumber(void) { return rand() % 6 + 1; }
1
c1487301fa295aaefcb741ca03904dac
943625e7f433aafcd6346c836b6a9e13
Counts all countries in the repository.
public class CacheRepository public int getCountriesCount() { Cursor c = db.rawQuery("SELECT COUNT (*) FROM " + DataBaseHelper.TABLE_COUNTRY, null); if (c.moveToFirst()) { int count = c.getInt(0); c.close(); return count; } return 0; }
1
1cfbca5ac938b0e86905a231150d64f9
2f86b6dad6c9eedec91fa6ed278d4955
更新经销店最后上报日期
String sql = "UPDATE JSZHZD T SET T.LAST_INT_CHARGE_DATE =? WHERE T.JSZHZD_BH=? "; dao.executeUpdateExt(sql, bizDate, acnt.getJszhzdBh()); }
1
dc0fecc4708ea149cce13ef3d4e69e23
e2d0174c7d54e44d72a62b1d0b0f9d8b
Get the total yearly income tax.
public class Model public double getNetIncomeYearly() { return this.yearlyIncome; }
0
168050a9917121ff49513e9c1650419a
77cfb34def6ed3ad0c98b53233a02c47
Слот для добавления операции
void MainWindow::on_AddOperation_clicked() { selectingAction("Добавить"); }
1
9867752d391994c8d0540d8ba19d9ead
1bf05b029ab951dc0a8a545bbc7061b0
Computes average monthly deposited amount in the last n months
{ double lastMonthTotalRating = 0, lastMonthAverage = 0; int counter = 0; foreach (var rateStruct in _allRates) { if (CheckIfRatingIsLastMonthRating(rateStruct.Value.RateDate)) { counter++; la...
0
e07d2e9e34f4e9687f5bdff583f055c3
7aec2ad2f6001942d7d7f0506f9e2cf5
Tests how Zuora client's on-demand auth check.
mock_chkproj, mock_check_billing): mock_chkproj.return_value = False self.gcp_env_runner.client_id = "test_client_id" self.gcp_env_runner._SetupProject(self.gcloud_runner) self.assertEqual(mock_setproj.call_count, 0) self.assertEqual(mock_setid.ca...
0
4cb8162ac55f13720a0b3bf248fdcc68
3a6763b7f851597c79b249f4f2cbf14d
是不是必需的
{ foreach ($must as $v) { if (empty($params[$v])) { return false; } } return true; }
1
7d3b638360b2f267116c5648dc26977d
fabc374de0513b79a5c61290c1bbf879
Check that method returns the dictionary __objects
class TestFileStorage(unittest.TestCase): def test_all_returns_dict(self): self.assertIs(type(models.storage.all()), dict)
1
8dc9fae1d3b793702cc1969b1391cd67
054ec970c7b4c6040ce6406042159103
Clean up eventTable every time a new level loads.
namespace com.dogonahorse public class AudioEventManager : MonoBehaviour void OnLevelWasLoaded() { RemoveRedundancies(); }
1
112e64368dc7f53d3895891aa594e5c1
ee627213b2f9b63b53dd1a67565cbc8c
Clears the cached Cognito ID associated with the currently configured identity pool ID. Use this to manually invalidate your cache if the identity pool ID was deleted.
public function clearIdentity() : ServiceInterface;
1
9b8af5102f5e802048c5325298390155
d9b62fc4c8937408e6b06f4ced23c363
call when ship is hit by an obstacle
public class PlayerController : MonoBehaviour public void HitEnemyShip(){ Time.timeScale = 0.25f; gameObject.SetActive(false); SoundManager.instance.PlaySingle(SoundManager.instance.playerExplosion); Instantiate(deathParticle, transform.position, Quaternion.identity); Invoke("Exi...
1
26d462c69c2ed818b7be4a5d7d416c7e
19e5f35a2fb40b1fc6674ddfe7985054
this retrieves all the different coding languages used
def getLanguages(): return lang.all()
0
b7979c9f651d5d3027d910c16611923f
3df4b191783425013556cb6baa5a4257
브릿지씬이 종료된후 불려지게될 씬번호 등록
public class ChangeScene : MonoBehaviour static public void SaveSceneAsPreviousScene() { PlayerPrefs.SetInt("LastSceneNum", SceneManager.GetActiveScene().buildIndex); PlayerPrefs.Save(); }
1
b84292f81629ee037b83e65f6c2418ed
877d17e86f5cf8d8642392e3b195c738
通过ID播放媒体资源 R.raw.xxx
class SimpleUseActivity : AppCompatActivity(), View.OnClickListener private fun playRaw() { mediaPlayer = MediaPlayer.create(this, R.raw.music) mediaPlayer.start() }
1
3548e0844cc8b55b8533dbfcf5abdd66
acd4a961f19aa06c954283cc0773f165
r"""Represent the content of the tabular in LaTeX syntax. This adds the top and bottomrule when using a booktabs style tabular.
class GenerateLaTeXStatisticsTable(ReportTask): def __header(self): return r"""{ \centering \tabulinesep=4pt \setlength{\tabcolsep}{.3em} \tabulinesep=.3em \begin{longtabu}{lX[r]X[r]X[r]X[r]X[r]X[r]} \taburowcolors2{white!95!LightGray..white!80!LightGray} \rowfont[c]{} {} & Min ...
0
e76028046fa33080d345bd69b49988de
0d49948fe397b3ea94b2e2d0fc19c04a
POST: api/Contact/Delete
namespace DotNetCoreContactsAPI.Controllers [Route("api/[controller]")] [ApiController] public class ContactsController : ControllerBase [HttpDelete] [Route("{id}")] public ActionResult<DeleteContactResponse> DeleteContact(string id) { var result = _contactsService.Delete...
0
2977ee67715630967ed6cce289f7a6a2
e1b390a58dd116256a4d330ff0388995
10、药店单据往B2B系统传递任务
int offset=1; int pagesize=20; int readtype=0; List<Map<String,Object>> list=dao.getYhbh(); if(list.size()!=0){ for(int i=0;i<list.size();i++){ String yhbh = list.get(i).get("yhbh").toString(); String wxh = list.get(i).get("wxh").toString(); String xm = list.get(i).get("xm").toString(); ...
1
42bf9619e36ee7db301024a5f5e0ca8a
7588994022b2bc7668116b9fb9967ae5
set or change all of the information of an artist
artist = ArtistModel.objects.filter(id=pk) if not artist.exists(): return Response(status=status.HTTP_404_NOT_FOUND) artist = ArtistModel.objects.get(id=pk) data = request.data if "name" in data.keys(): artist.name = data["name"] artist.save() ...
0
4ee23fe350f781172fa0ccf8d9cf4871
b225ca60a8b9ccc81fcc2bfe1ad197ba
주문 당 주문상품 종류 개수
public class ProductDAO implements InterProductDAO @Override public int getTotalCoutBySType(String stype, String sword) throws SQLException { int count = 0; try { conn = ds.getConnection(); if( !"".equals(sword)) { String sql = "select count(*)as CNT\n"+ "from product_order_detail A \n"+ "jo...
0
98c70f815a9473d6b5282750973a8eeb
1a1c208c400a3cced7e486a9d67f32fb
Creates a venue and sets self.venue_id to it's id. Used as before_create.
@venue = Venue.new(venue_params) @venue.user_id = current_user.id @venue.images.attach(venue_params[:images]) if @venue.save render json: @venue, status: :created, location: @api_venue else render json: @venue.errors, status: :unprocessable_entity end end
0
c272a6f65845a8d8241045abc30159c2
5b428accb78e948f656e8cea51b1f835
Retrieves all properties of a given <paramref name="targetType" /> which are flagged with at least one <see cref="ValidationAttribute" />.
{ if (null == type) throw new ArgumentNullException(nameof(type)); return TypePropertyCache.GetOrAdd(type, t => t.GetProperties()); }
0
2e759b773a3b514b3309810b7b1e7d44
405a66f86425c740d7b483ac8a1a8d9f
Handles the KeyDown event of the ComponentsConfigGridView control.
namespace D8058 [SmartPart] public partial class F8062 : BaseSmartPart private void ComponentsConfigGridControl_TextChanged(object sender, EventArgs e) { try { this.EditEnabled(); } catch (Exception ex) { Except...
0
b90b66c7eb91d441a6d5625d8e3aef36
f0ac50da7255c5d581a0b17e17a9bf90
更新日期描述,对已有日期判断并更新
public class Util public static void updateTips(CalendarCellView mCell, DateTime dateTime) { Lunar lunar = Lunar.getInstance(); lunar.setCalendar(dateTime.getDate()); String lunarStr = lunar.getLunarDayString(); String holiday = lunar.getChineseHoliday(); String solarHoliday = lunar.getDateHoliday(); String...
1
8fb72093756349b0794f5d199a8a53bb
b15c09fe97578fe9482e319e3a2a3276
Ponyfill for Array.from
function toArr(arrlike){ return Array.from?Array.from(arrlike):[].slice.call(arrlike); }
1
88cb6eec2a19867ecfc69b9f4fac850f
cbab3c63322610bb6f2ea49b8c486169
Empty out the DB table data for page field, but leave everything else in tact. In most cases this may be nearly identical to `Fieldtype::deletePageField()`, but would be different for things like page references where we wouldn't want relational data deleted. #pw-group-deleting
function acf_delete_field( $id = 0 ) { }
0
002606e7183b738c453e26a1f92c788c
ea9c1330046c737b6b72e9d72e224d6a
分页按条件获取排行榜数据列表
namespace YSWL.MALL.BLL.Members public partial class RankDetail public DataSet GetListByPage(string strWhere, string orderby, int startIndex, int endIndex) { return dal.GetListByPage( strWhere, orderby, startIndex, endIndex); }
1
f967939e63e8de0d44806348f610a7b2
c805738fea13e83cd83c936ff5c03c56
# 计算模型系数 # 映前预测总票房或首周票房
ret = Ret.dropna(axis=1, how='all') result = [] lsret = [] for i in ret.columns: if method == 'EW': temp = pd.concat([X[i], ret[i]], axis=1, keys=['a', 'b']).dropna() temp['group'] = pd.qcut(temp['a'], q=q, labels=False) if all_: temp1 ...
0
001dcbf0c8631a11452d00b1c7e8a84c
b35e9b42e12dbbf9396e4100e7d3dc32
将本地的GPMS对象通过RMI暴露出来
class HelloAgent private static void viaRmi() throws MalformedObjectNameException, NotCompliantMBeanException, InstanceAlreadyExistsException, MBeanRegistrationException, IOException { MBeanServer mBeanServer = ManagementFactory.getPlatformMBeanServer(); ObjectName objectName = new ObjectName("jmxBean:n...
1
8bc1f12aa6068cada0090b6d70b34747
63b2885a0f4df945a1b137fea1e3320b
Compute grouping key from move line
{ String key = ""; int start_index = 0; if (line.Contains(" (aka ")) { start_index = 8; } if (line.Contains("MV:")) { start_index = 4; } for (int i = start_index; i < line.Length; ++i) { if (line[i] == '(' && i + 1 < line.Length && (line[i + 1] == '1' || line[i + 1] == '2')) { ...
1
2e908f03e5b0372b3d58ce945d5d18a3
1ad0c222aa7ff1e46bbb0a6ba239cf80
The deposit function takes the depAmount args and adds it to the balance. This is relayed to the user through a message box
function depositFunds() { var amount = $('#amount').val(); amount = parseInt(amount, 10); accountBalance += amount; updateDisplay(); addToDeposits(amount); }
0
a32164ecb346a837d4ddbee95c14b0d4
e624803da79ee54a59147359b43c796d
Add an empty parameter block.
if (CQL_UNLIKELY(data_->queries.empty())) { throw cql::LogicException(CQL_CODEINFO, "please call addQuery before openParameterSet"); } data_->queries.back().parameterSets.emplace_back(); return *this; }
1
686f4dd4ebe49de557093781cc302376
2799de575e295d099c59ee4fe72c72d1
Получает леммы для указанного текста построчно
namespace PePets.Services public class MorphyService public string[] Lemmatize(string text) { string[] words = GetWordsFromText(text); List<string> lemmaWords = new List<string>(); foreach (string word in words) { if (string.IsNullOrEmpty(word)...
1
b3f689e427611a2e7a52cec7c46baa05
5fac943c7b143f1ed14e0f435460b0d3
获取第i个园的半径
Rectangle ComposedShape::get_vectR(int i)const{ return vectR[i]; }
0
33bb4f96a37b82d2b3f58da78dbd69ee
948ec008f96e91d4122579265a20e3a4
Returns whether this is the {@link #SECONDARY} type.
public abstract class BaseTextureBackground extends BaseBindableNode implements VRMLBackgroundNodeType @Override public int[] getSecondaryType() { return SECONDARY_TYPE; }
0
82243361e4b6f3a3c401867370f4e020
b50dcef68220ef9d89ac978d115c5507
Updates an Amenity object
namespace Lab12RelationalDatabases.Controllers [Route("api/Rooms/Amenities")] [ApiController] public class RoomAmenitiesController : ControllerBase [HttpPut("{id}")] public async Task<IActionResult> PutRoomAmenities(int id, RoomAmenities roomAmenities) { if (Convert.ToInt32(id) !...
1
1142203efb07d07927e47f39821096cd
dcc1ac45e4eb7ab00be9f71effb88056
设置请求头, 如果该Header已存在, 则删除原Header
public class ResponseWrap implements Response @Override public Response addHeader(String key, String value, boolean flag) { if (flag == true) { deleteHeader(key); } this.header.add(String.format("%s: %s", key, value)); return this; }
1
5799b03e55bfcef30a09df692784db64
38389a4aabf3062c3ba8ac294942e042
From the given variation object, build a variations description to be used in simple text fields.
public final class ChronoHistory implements VariantSource, Serializable @Override public String getVariant() { StringBuilder sb = new StringBuilder(64); sb.append("historic-"); sb.append(this.variant.name()); switch (this.variant){ case PROLEPTIC_GREGORIAN: ...
1
557c4b876c2618c4846ea43c504a9107
f6d7c60de2a68cd54b031b17de53e841
根据订单ID获取payId(支付宝流水),payOuterId(系统流水),payPrice money(支付金额)
namespace Contract [OperationContract] string GetPayPalData(int id, int order);
0
750683169c41221c1edeec2279edbfe0
6a10c5c6c243896964f1d9424bff1915
Mapping of the previously set capacities before the actual optimisation. Similar to capacity mapping, but without the fine param: capacityVariablesOptimum.
all_allot=np.zeros((len(real_alloted_capacities),len(real_alloted_capacities))) for d in range(1,len(real_alloted_capacities)+1): if d in new_flows: d_index=new_flows.index(d) sum_demand=sum(teavar_allot[d_index]) for v in range(1,len(real_alloted_capacities)+1): ...
1
3ed661144fd804c26a12283dcc59b529
6a880e39a6d511d63316212c6a770720
Find news articles that do not have a scientific paper pairing
querystring = """prefix lbt: <http://librarybase.wmflabs.org/prop/direct/> prefix lb: <http://librarybase.wmflabs.org/entity/> SELECT DISTINCT ?s WHERE { ?s lbt:P17 ?r . MINUS { ?s lbt:P19 ?o . ?s lbt:P3 ?l . } }""" self.rawquery(querystring) textlist = ...
1
de8f00f5b2f0c517c88ca535a58204d9
180b6f09f5a4b126bc824533c49f4ade
Method to set the value of field ap_spec
def writeAp(str1): global currConfig currConfig['ap'] = int(str1) writeConfig()
0
6fd9078274f1ba132f940b10cc72591e
fa575dbdf10cb5c205819fe0542eb336
Return the structure of the hessian in coordinate format. That is, return (rows,cols) where rows and cols are both numpy ndarray objects that contain the row and column indices for each of the nonzeros in the hessian. Note: return ONLY the lower diagonal of this symmetric matrix.
class SVDMethod(LeastSquaresMethodImplementation): def getHDiag(self): return _algo.SVDMethod_getHDiag(self)
0
89197ad30bb1c341fbde4a9cf5cb27a1
5b7a46e79163fb87418409c9c1e9b31a
按照创建时间降序获取所有用户文章或者某个特定用户的所有文章
namespace blog.Services.Impl public class ArticleServiceImpl : IArticleService public string GetAllArticlesByUpdateTime(int userId) { List<Article> articles = _articleContext.Article.Where(art => art.UserId == userId).OrderByDescending(a => a.InDate).ToList(); if (articles != null) ...
1
e298ca60c9f654024ec8e27a9f833f68
fcf74fa92f73afc5f2305f26eb628832
load game data from file then insert character selection into variables to be used
function loadGame() player.pets[1].name = fileLine(1,'file.txt') player.pets[1].strength = tonumber(fileLine(2,'file.txt')) player.pets[1].stamina = tonumber(fileLine(3,'file.txt')) player.pets[1].carisma = tonumber(fileLine(4,'file.txt')) time = tonumber(fileLine(5,'file.txt')) player.coins = t...
1
2b616ea2c96bfca2d778d6f54abb134c
ef16075c9c05cb92ba4f0987b187db6c
涂色,返回是否遇到冲突
namespace force2{ bool color(int x){ for (int i=head[x];i;i=G[i].next) if (vis[G[i].t]<0){ vis[G[i].t]=vis[x]^G[i].v; if (!color(G[i].t)) return false; } else if (vis[G[i].t]!=(vis[x]^G[i].v)) return false; return true; }
1
409a7e28ac1c2f348aca979793710fcc
7b791548a3c9f73583e20a4eb177118f
Set the lot ID to the given value, e.g. "ABC1234"
namespace Origen void Site::lotid(string val) { lotidSet = true; _lotid = val; }
1