query_id
string
corpus_id
string
query
string
code
string
label
int64
5b03d77e121064a5ac0eb25019533abe
ce1ba3d6dd99b9f12350b3df2c77cb6d
0x9E SBC A, (HL) : Subtract value pointed by HL and carry flag from A Flags affected: Z - Set if result is zero. N - Set. H - Set if no borrow from bit 4. C - Set if no borrow.
namespace xnamame036.mame partial class Mame public partial class cpu_Z80 : cpu_interface void op_9f() { { uint ah = Z80.AF.d & 0xff00, c = Z80.AF.d & 1; uint res = (byte)((ah >> 8) - Z80.AF.bh - c); Z80.AF.bl = SZHVC_sub[(c << 16) | ah | res]; Z80.AF.bh = (byte)res; }; }
0
5d2a2ea650598910d3cc00542e8456c6
134af6f6fb788ee52cd1695bd37f9a40
一定時間待機して、操作端末への開始指示をリトライします。
namespace PublicDomain public class CGameManager・ゲーム管理者 public void waitウェイト(int _ミリ秒数) { waitウェイト(_ミリ秒数, true); }
0
a519c4dd84b1b235dce01a81c78e95da
58ca6887c9e095d9ed64abb0078cf09a
creates a wall round the level
drawWall(0,0, Gdx.graphics.getWidth(), 5); drawWall(0, Gdx.graphics.getHeight(), Gdx.graphics.getWidth(), -5); drawWall(0, Gdx.graphics.getHeight(), 5,- (Gdx.graphics.getHeight() / 3.0f)); drawWall(0, 0, 5,Gdx.graphics.getHeight() / 3.0f); drawWall(Gdx.graphics.getWidth(), ...
1
91b79b7dc834882b2143fe10d560e363
750a7cb05fb915b7696bae0c492e0531
NewFindServersOnNetworkRequest creates a new FindServersOnNetworkRequest.
func NewFindLearningResources(ctx *middleware.Context, handler FindLearningResourcesHandler) *FindLearningResources { return &FindLearningResources{Context: ctx, Handler: handler} }
0
8f1ed985ae8c4c73a7bd4ee064d337f8
5032fc91e54e6663e8ed01ed09257815
Bellman Ford implementation to compute minimum distances from a src to all destinations
void BellmanFord(int graph[][3], int V, int E, int source) { int dist[V]; for(int i=0; i<V; i++) { dist[i] = INT_MAX; } dist[source] = 0; for(int i=0; i<V-1; i++) { for(int j=0; j<E; j++) { if(dist[graph[j][0]] + graph[j][2] < dist[graph[j][1]]) { dist[gra...
1
74d2cfe13abf08ea0addec14d2da7233
debad51ced4e450a84434d569ede9baf
現在処理しているジョブのジョブフローIDを返す。
public class FlowRun public String getFlowId() throws GenericEntityException { return getRun().getString("flowId"); }
1
a52613513e81b8fd4b34cf76f85a7e07
4c6fb0a45a1e16cd19f360207608f51f
Checks whether a string has UTF-8 encoding type.
{ return preg_match('%(?: [\xC2-\xDF][\x80-\xBF] # non-overlong 2-byte |\xE0[\xA0-\xBF][\x80-\xBF] # excluding overlongs |[\xE1-\xEC\xEE\xEF][\x80-\xBF]{2} # straight 3-byte |\xED[\x80-\x9F][\x80-\xBF] # excluding surrogates |\xF0[\x90-\xBF][\x80-...
1
bbd20b3f97de007678643f30d564a4be
384a583ee47d972f5ff09f02049a0c6c
Picks a random nameserver from the configured list.
class Proxy_Config static public function getRandomServer() { shuffle(self::$_aList); return current(self::$_aList); }
1
dc599d045beff5759ca931985b684424
f2a2ccd99fc62bdaeda5b095870c6b25
FUNCTION NAME: check the command's first parameter is a string-like parameter (string or keyword) None None
{ DATA_OBJECT_T item; if( ix_arg_count_chk(env, "lexeme?", EXACTLY, 1) == -1 ) { return(FALSE); } ix_return_unknown(env, 1, &item); if((typeof(item) == SYMBOL) || (typeof(item) == STRING)) { return(TRUE); } else { return(FALSE); } }
1
739509e138c4230bf019f678841dd5f5
d36447ac9b63b4cd57f8141e418ca4ae
Get a new treasury yield.
@Entity( tableName = "SymbolInfos", primaryKeys = { "symbol", "timeOfCreation", } ) public class SymbolInfo public double getYield() { return yield; }
0
586caf6132551f3ba6fc8a0e47164ff2
9e9b389f8acef596972f7029cd7f956d
If set, the viewer will show the entire document a span is in.
final class Builder public Builder showFull(boolean value) { object.setShowFull(value); return this; }
1
eb6d504e887481bc501abe7b1c59a844
d2287e5a6050755205778d1787c97bba
xml序列化,去掉xml声明和命名空间
namespace NFLibrary public class SerializationHelper public static string EntitySerializeToCleanXml<T>(T obj, Encoding encoding) { string result = string.Empty; try { XmlWriterSettings xmlWriterSettings = new XmlWriterSettings(); xmlWriterS...
1
9cbdb9db3f1222dd94ebf72fe26c31bb
4457226ebf3e40dbfc62454ca77e2c05
velocity = change in distance / change in time.
def vel(q, t): dq = np.zeros(len(q)) for i in range(0, len(q)-1): dq[i+1] = (q[i+1]-q[i])/(t[i+1]-t[i]) return dq
1
67222e1df9b74f585ea4775f7231e126
6e6bc154c6f4d3669b639dffa74f327b
会员概况-昨日活跃会员
{ $where['sid'] = $sid; $where['date_time'] = time2format(strtotime('yesterday'), 2); $count = $this->where($where)->sum('pay_member'); return $count ? $count : 0; }
1
a70e929c449e0e1e30de46750364e53f
cc71df58a0147ca28e7edc0354adb8a5
获取某个楼盘的周边楼盘信息
public ResultVo getSimilarByOneLoupan(InfodataEntity infodataEntity) { String cityName = infodataEntity.getCity(); String regionName = infodataEntity.getRegion(); String propertyType = infodataEntity.getPropertytype(); String features = infodataEntity.getProjectfeatures(); St...
1
51e56c810d95d4e21b49be3bedc9bf66
dcf4910e264df127d4c5ce80ff04317f
FUNCTION DESCRIPTION Function handles a zero key long press input of dialer box PARAMETERS void RETURNS void
{ U16 length; U16 *digit_list; U16 i; media_aud_vrsi_read_dgt_rcg_result(&length, &digit_list); if (length == 0) { if (g_vrsi_cntx.retry <= MMI_VRSI_MAX_RETRY) { mmi_vrsi_util_play_tts((U16*) GetString(STR_ID_VRSI_DIGIT_PROMPT), mmi_vrsi_ddial_start_command); ...
0
71e2ce25cd2053d3cb2b5571ee1843bc
5e56e010eb0106efded3060e659d5694
Add the figure to the tracked files and increment the figure count.
def add_plotted_files(name, filepath, echo_dart): global plotted_files if echo_dart: echo_dart_tag(name, filepath) found = False for p in plotted_files: if p[0] == name and p[1] == filepath: found = True break if found is False: plotted_files.append([ ...
0
d0c686c68877ea046bd8bc74e2d803fc
b8ce36f4bee327d6a9efaa4f66bb7be3
Get the value if set by cmdline args as member variable named same as option, otherwise get from conf file
value = getattr(cmd_line_options, attrib, None) if value is not None: return value if attrib in config_file_data: return config_file_data[attrib] if required: raise KeyError("{0} must be specified".format(attrib)) return default
1
b462e2490552a9d0bc86466b4901a07f
53afb577f281725b5b0f30686c971c6d
Determines if the isValidVip has been modified.
boolean hasValidChanged();
0
7c3f69a1365aa59da40e61a997be5f41
e220e58cecc3f9967056535ce5f2c095
limit events by the BYSECOND field
if (devID) { sendCmd(gwID, devID, ep, 0x800B, [sec]); } else {} }
0
4c4278ff332a6c75a60a12e0e6c9c559
99f1ef29904dbd3e75934460ad435655
返回当前是否是在首页
public class FloatWindowService extends Service private boolean isHome() { ActivityManager mActivityManager = (ActivityManager) getSystemService(Context.ACTIVITY_SERVICE); List<ActivityManager.RunningTaskInfo> rti = mActivityManager.getRunningTasks(1); return getHomes().contains(rti.get(0).topAc...
1
7761540f684810ab0e072d6473a651ba
19543315a95085859f52d555732854c8
Se a cidade já existir, através do nome, ela será usada. Retorna a cidade id.
{ $city_to_use = City::where('name', strtolower($city))->get(); if ($city_to_use->isEmpty()) { $city_to_use = new City(); $city_to_use->name = strtolower($city); $city_to_use->description = $city; $city_to_use->save(); } return $city_to...
1
c7d45772837cca79ef81296f14940778
d15679dcf0e010b37c8f2363bc03517b
通过周数反溯星期一和星期天 周数 年份
try { Calendar calendar = Calendar.getInstance(); calendar.setMinimalDaysInFirstWeek(7); calendar.setFirstDayOfWeek(Calendar.SUNDAY); calendar.set(Calendar.WEEK_OF_YEAR, yearWeek % 100); calendar.set(Calendar.YEAR, yearWeek / 100); calendar.set(Calendar.DAY_OF_WEEK, Calendar.SUNDAY); return calen...
0
95b3ed323200c2e7a921d6112f9e41ff
8581c9dd046eb0aa808b1a3838069baf
获取投注额
class BetUtil fun getBetMoney(webView: WebView, choseMap: LinkedHashMap<Match, ArrayList<BetBean>>, typeList: ArrayList<String>, mutil: Int = 1, lotteryId: Int = LotteryIdEnum.jczq.id) { val optsArray = Gson().toJson(getOpts(choseMap = choseMap)) val array: Array<String> = Array(typeList.size, { "" }) ...
1
6f41c7b78e19c17085ec4258a5f21892
92b9fc6b02660cb099dcaa91a0ceb282
could pass LuoguP
int main(int argc, const char * argv[]) { if(argc<5) return 0; std::cout << "Hello, World!\n"; string str = "/Users/milk/test_data/zata/soc-LiveJournal1"; string f = "/Users/milk/test_data/index/"; clock_t startTime,endTime; Graph graph(argv[1]); graph.read_graph(); startTime = clock(); ...
0
827ba949e00d21f19d28ab665dd33598
719062023526d3061f97062f1af40567
The arrayList that contains all the points the ship is on
if (positionPoints == null) { positionPoints = new ArrayList<>(); } return this.positionPoints; }
1
748aae0896b85c317be49550843d9e7a
8e39944d4e76c27af53e48834c455778
<summary>Copies debug line vertex data to a preallocated buffer</summary>
class PrimClipper static const CGVertexData* outBuf() {return &sm_voutBuf[0];}
0
bcff8b8aa318c9a11d4965a37bdd503d
075e8171a8a76d8e66c3ca829c21d441
minute of the hour
public class TTimeTick public int minutes(){ return (int)(_value / RDateTime.TicksPerMinute) % 60; }
1
72d40d68d90c1c74d3f729fe677cf08d
ce88984faffd867d958d4eb51c6c22d7
Register the target event listener delegate with the given type event in the type parameter. It fails if the listener has already been registered to this event type.
{ if (EventListeners.ContainsKey(eventType)) { var eventListeners = EventListeners[eventType]; if (!eventListeners.Exists(p => p == onComplete)) { eventListeners.Add(onComplete); } } else { List<Actio...
0
4b0de799873a66b8317ddfb52408f2e2
f762ac9c41fe81e9f057a00dfb915516
Updates the source file before launching the decorated method.
class TemplateMonkey(object): def update_file_fields(self, line): match = self.file_field_regex.search(line) if match: if not match.group('full_match') in self.ignored_methods: line = self.file_field_regex.sub('\g<prepend_char>\g<field>.\g<method>', line) return line
1
6cc409110db3df07ef2b4c5bbba03516
c50c5a35705415ae560847b75fc07fc2
Set the line-flags of the current line
void GCode::setN(int32_t line) { n = line; fields |= 1; }
0
9e55d4d5ef046e49bd6424cf2871e998
ad530fdab7cae423bd2bf9414880c01d
提取es node节点缩容参数方法(只支持data node 的缩容)
public class DdmClient public ExpandInstanceNodesResponse expandInstanceNodes(ExpandInstanceNodesRequest request) { return hcClient.syncInvokeHttp(request, DdmMeta.expandInstanceNodes); }
0
9cd0487aa105a2c3d3543faca04a815b
e6b057011c6915b6d52e96eca3b6d4aa
Used to run code when the program exits. Called on SIGINT (ctrl^c) none nothing -
def signal_handler(sig, frame): print("Closing Program...") datalocker.ProgramRunning = False
1
f98d348ad0ede6a471ab0d2d944eacb3
ea66e779dfc6ef2bbdc5da64b64ebfda
show hover timer and move hover timer along playhead
public class Player_move : MonoBehaviour public void Hover_move(float speed) { if (Input.GetKeyDown("space")) { if (hover_style == 0) { hover_style = 1; } else if (hover_style == 1) { hover_style = 2; } ...
0
ff5532d42f149c5056bfce1f317e1ee9
f8972e0a1ac2462125355abd864d4d91
Perform analysis on textual input.
class BaseAnalyzer(object): def analyze(self, text): raise NotImplementedError
1
e367f1ca218549d7f5ec141034ef1dd3
ce3ba2dc5b329e1c0c78140f3f544b22
Mark mandatory fields with a
public class BillEntityBuilder private void fillMandatoryFields() { }
0
8e614f5128db11fb098e388f23016979
4655593f20ae4135f7039d8b18be66a5
get fields of currently selected comic and fill out form input fields
function stripChanged() { selectedComic = comicList[this.selectedIndex]; urlProvider = selectedComic.urlProvider; showImg(); }
0
eb49abe9e9b66a5717d968a9b1467650
aec7fc2c41e467c792fcdc77e398e9a3
returns the fieldname/sql name of the "display" field.
public class BugFields implements BugzillaMethod{ public class Field public String getDisplayName() { return (String) wert.get("display_name"); }
0
06db45130b9b2767d390de730070204e
80610db93a69fed40171c235b9b377be
Queue a document for indexing.
{ if (document == null) throw new ArgumentNullException(nameof(document)); lock (_Lock) { _DocumentsIndexing.Add(document.GUID); } Task.Run(() => AddDocumentToIndex(document, tags), _Token); }
1
830b3f0ee7782081d273f0f469688b62
7a6c2141c469b18be296f97d804cd1e4
Get current Audio position in milliseconds
double TestLauncher::getCurrentPosition() { return mushraAudioPlayer->getCurrentPosition(); }
1
0f9b78d8253c75cb9dd5156895858fdf
1e69af5d0767528045cfeca02a93e455
Get only sequence number as string
class ICEEntry(): def get_seq(self): return self.__dna['seq'] if self.__dna else ''
0
cdde80d07e9e0b148f7106a0f3b2c1e9
cb348e539298053710b0b4decca943e4
Redirect to select hospital page when back arrow is tapped
{ Intent earlierPrescriptionScreen = new Intent(); earlierPrescriptionScreen.setClass(getApplicationContext(), ExistingPrescriptionsActivity.class); startActivityForResult(earlierPrescriptionScreen, HkpConstants.ACTION_EARLIER_PRESCRIPTION); }
0
2d2b589d177dad8a425dd07d5ab7e7cc
14e1d27b3e6cb0a9d077407af3919c1f
In a BST, keep only nodes between range
def trim_BST(root, L, R) -> TreeNode: def trim(node): if not node or node.val is None: return None elif node.val > R: return trim(node.left) elif node.val < L: return trim(node.right) else: node.left = trim(node.left) node.r...
1
3353d910637f90f06eacafb3e8138307
529957dcf41c4d38c0376394c6a9e3e9
Kill the running tcpdump command(s)
class IPsniffer: def kill(self): self.p.terminate()
1
1739b0d2fff099ccc21e52ef11587bf0
1429e6db7b20c043b03b491dd5b566e9
A setter for installation parameters. usage: s = Seed.new s.lang = 'ja_JP.eucjp' # => changes 'lang' to Japanese
define_method(:"#{name}=") do |value| write_attribute(name, value) end define_method(name) do |*args| read_attribute(name, {:locale => args.first}) end alias_method :"#{name}_before_type_cast", name end
1
a2eaa6320ae312dc1ad7dc14a4ceeba2
306583094af64dbb577abfe18da271eb
Выход клиента из игры
namespace DOST public partial class GameWindow_EndGame : Window private void ExitButton_Click(object sender, RoutedEventArgs e) { if (player.LeaveGame(game)) { try { chatService.LeaveChat(game.ActiveGuidGame, player.Account.Username); Close(); ...
1
34d8f93d54d59a281364d51c3656a836
ea9ecfd20674ebabbf64660a70654039
Get the 2d distance between 2 Point objects. Does not account for elevation. Returns distance in meters.
class LocalinoPublisher(asyncore.dispatcher): def get_two_points_distance(p1, p2): return math.sqrt(pow((p1.x - p2.x), 2) + pow((p1.y - p2.y), 2))
1
c4b1f2391c3139d45ed36008cf47982c
8efd7796f3936294c1bfe9c12010d3bc
Retorna um vetor com retorno mensal
$mes = array(); foreach ($this->read(NULL, 'atualizacao', TRUE) as $art) $mes[date('Y-m', strtotime($art['atualizacao']))] = date('m-Y', strtotime($art['atualizacao'])); return $mes; }
1
d50e806b4e9b2f6a26c1e49af9dc241d
fbac2996350ec1f5d30268eda08b8254
根据当前控件数量 更新默认的一个控件开始时间和结束时间
if(supportFragmentManager.findFragmentByTag("startTime_dialog") != null){ startTimeText.text = "%1$02d:%2$02d". format(hourOfDay, minute) }else if(supportFragmentManager.findFragmentByTag("endTime_dialog") != null){ endTimeText.text = "%1$02d:%2$02d". format(hourOfDay, minute) ...
0
7306c62da1077cfb4bd60d1652931f79
c75f98f5094362ab45a6f2955d2261b0
Sort list in increasing order of date.
public class Report extends Fragment public List<Record> sortList(List<Record> recordList) { for (int i = 0; i < recordList.size() - 1; i++) { int min_idx = i; for (int j = i + 1; j < recordList.size(); j++) { int mid_index_date = Integer.parseInt(recordList.get(min_idx)....
1
b9538e7e6088940a627edc2a6ee2af01
c23d2ab42dc62f4d090bd9e56513ac0f
Returns the latest known event stream token
class OrganizationEventsEndpointBase(OrganizationEndpoint): def latest_event_id(self, snuba_args, event): return self._get_terminal_event_id(Direction.NEXT, snuba_args, event)
1
0e197d0681f9df1932adbde3f53fc96f
1b7051943d2625b5b1626a59fda01920
将阿拉伯数字转化为简体中文
namespace CreateWord.createcompanies public class CreateCompany public string NumberToChinese(int number) { string outString = string.Empty; char d; try { if (number > 12) { string year = number.ToString(); ...
1
15f6f8dc036519d7fe15b39338f6e5db
7f61448ad6da3ef0f9cb03f40c5be655
twelve
cases like (1)
0
7d0bc04995463cc2042f58e061a895f7
fe04ebd2573d01f77148222c70ee6798
获取 绑定厨师ID
class dbs_chef_list extends dbs_baseplayer public function get_mainchefid() { return $this->getdata ( self::DBKey_mainchefid ); }
1
6192a2ca1537d0c1fb48d2c3065b8807
184b77f6ee95279bdda25eb357c7304b
对于每个非终结符 是否推出空
Set<Character> emptyOK = new HashSet<>(); Set<Character> emptyNO = new HashSet<>(); Set<Producter> gs1 = gs; Map<Character, List<String>> gs2 = GSBuilder.gsHelper(gs); for(Producter produc...
1
824a5070f0c565113963d7a1df5ff8e4
a5d519fd654772141fbd978e7b6d337e
Input - data set(x, y, z coords) with labels Output - series of files that contain 3d plots at different angles -- gif file can be created from 3dplots using imagemagick ~ convert -delay 50 3d_TSNE*.png animated_nmf.gif
mat4 = sio.loadmat('dataset_1.mat') sample4=np.array(mat4['samples']) result4=np.empty(shape=(50000,784),dtype='float') result4 = sample4.reshape([50000,784]) label4=np.array(mat4['labels'][0]) model = TSNE(n_components = 3, random_state = 0,perplexity=30,n_iter=1000) tsne_data = model.fit_...
0
be4b4102021992e30f1451f311520156
87979b1011ba1edc1478320844e4d017
Determine the value of the chromosome, which is just the sum of the metric over its observations multiplied by the score for the times chosen.
class BaseChromosome(abc.ABC): def calc_score(self):
0
cbe899d6f2f8a5f77fd9f4a8c8c4cfac
ee04a005d22c6872636434716d3c8861
Get a list of preference fields that should not be displayed in the Preferences List
class GridService extends AbstractTca protected function getExcludedFieldsFromPreferences() { $excludedFields = $this->getModulePreferences()->get(ConfigurablePart::EXCLUDED_FIELDS, $this->tableName); return is_array($excludedFields) ? $excludedFields : array(); }
1
44eca2ad8b57a88c8c430c13e570500f
1f291fa54491346b3509e04d18e1f3c0
Looks at the function body of a call back function and gathers all the phone variables that are accessed. This is determined by seeing all expressions with a dot accessor ie x....
def findCalls(): pass
0
f2605436ff8cb363eebf6e61e184df16
7599f72f1f123ee6add021a2da36d91f
Saves categories against a news article
{ $categorie = $options['categorie']; $articleId = $options['article_id']; $cat2check = $this->categorie->where('name', $categorie)->first(); if(!$cat2check){ $cat2save = new Categorie(); $cat2check = $this->save($cat2save, $categorie); } if(!$...
1
1d3703f7e57f3823ae496d61d5817c09
670e7db168939d5fdcb0f6f453f1370c
Performs the detection logic for whether a track was skipped
bool result = frame >= skipEndFrame; if (result) { skipEndFrame = frame + skipAddFrame; } return result; }
1
49fced2afef86d4dc30cb063e98f98d1
b244c0cc589e883dac35b788605e25f2
it gives error: can't re-declare 'a' in the same scope
function foo() { console.log( a ); var a = 2; }
1
47e1b1a2552d68be1adca68e9e3687a6
6e98cc44ba9d0cfc64d75f773a2c6a7b
Get a random non-subscriber user.
$stmt = $this->db->prepare( 'SELECT ' . 'u.user_id,' . 'u.name, ' . 'u.email ' . 'FROM ' . 'user u ' . 'WHERE ' . 'u.user_id <> :user_id AND ' . 'NO...
0
b2820a59120cf64486e00aed7e8c4825
91b836c60f4dc0d265f1d1ca46dcc5c5
未チェック数変更を通知する
{ if (isflag) { PrintData.Add("--カウンタ不一致--"); JPDataEditForErrorAdjust(request, response); } else { PrintData.Add("--都度カウンタ不一致--"); JPDataEditForErrorPrint(request, response); ...
0
311872599c701eb922761619ff139171
cfdd521b5b3e76835880e43c3d642825
Carga la vista de buscar los cupones
class SearchController extends Controller public function search() { return view('Facturacion.Facturacion'); }
0
b746d0a5c3d6521a76d6a0dce9fb4c92
530364d80b907d649966be8ef980dcf3
Enable and set custom handler for Display List Interrupt
void TouchGFXHAL::enableLCDControllerInterrupt() { TouchGFXGeneratedHAL::enableLCDControllerInterrupt(); }
0
289f0f5d457b1c0330c326dedb01e0b3
0407cc8e8f5f9daa18ae4d0220f5f1fe
Removes unused indexes from disk.
if not os.path.exists( indexes_conf_path ): return old_backup_ext = ".old" comm.copyItem( indexes_conf_path, indexes_conf_path + old_backup_ext, isDryRun ) stanzas = comm.readConfFile( indexes_conf_path ) keys_to_remove = ['_actions' , 'max...
0
eba07e407c7d857da3db89e6f4f7f486
8ae253a093e69b9c8d10dd47178f9e0b
Does the file from S3 located in this directory?
def checkIfS3FileExist(s3FullPath): s3util = S3Util.S3LocalUtility() bucketName, s3filePath = parseS3filePath(s3FullPath) return s3util.ifS3FileExist(s3filePath,bucketName)
1
29c60ca6f67abc4f2049c5fce56a31f1
7df326a22b27cb07104bb9655aa8cdb9
A function that returns the string formatted API query for Arkime v3.x.
size = 'full' now = datetime.datetime.utcnow() if self.mode == 'DAILY': if self.lastUpdate and ((now - self.lastUpdate).days < 90): size = 'compact' elif self.mode == 'INTRADAY': if self.lastUpdate and (((now - self.lastUpdate).total_seconds() - 3...
0
a55bf147f8ba3db7068b0872b9d3c559
35cd1150bce19c9c66fc0ae7cf79d395
pathToCSV: input csvFile outFile: output gpx file name input file must have lat and lon columns Converts simulation csv to gpx file for easy viewing
strTemp = "" infile = open ( inputfile , "r") strTemp = infile.read() infile.close() strTemp = strTemp.replace( "STOP","\n" ) outFile = open ( outputfile , "w" ) outFile.write(strTemp) outFile.close() return
0
6a3f6c02e4959d907e19e015b50d85ee
cb58cd0361fa26b5489e6177eb357421
This Boolean function returns True if the sequence argument (called sequence) is the same forward as backward, False otherwise.
lst=[] l = len(seq) for i in range(l): if seq[i] == seq[l-1-i]: lst += [True] else: lst +=[False] if all(lst): return True else: return False
1
c9fd78f60408c1b75059cfbf6817102f
94c170a82541162690cd8cb96bc5a7c7
Function arranges node and its subtrees to satisfy the heap property.
if (pos > 0 && (arr[pos] > arr[pos-1])) { while (1) { if (pos < 1) return; if (arr[pos] < arr[pos-1]) return; node_t temp = arr[pos-1]; arr[pos-1] = arr[pos]; arr[pos] = temp; pos--; } } else if (pos < n-1 && (arr[pos] < arr[pos+1])) { while (1) { if (pos > n-2) return; if (arr[pos] > ar...
0
a9cae079f9a581eaf95ac62c6be138be
c3a3b9018b48ecc297fa6b2a6d1d0848
Returns size of deploying content. If the content is not binary hex string, it raises an exception.
byte_count, uint_byte_string = read_next_uint_bytes(content) uint = uint_byte_string.bytes.map{ |b| b.to_s(2).rjust(8,"0") }.join.to_i(2) [uint, byte_count] end
0
af8f65405e397a7c76a79cf1ec8c0a75
bec717339a877ff453f4b77933608db6
Apply the backed up theme
class Theme private syncTheme() { if (!this.themeDom) { return; } const themeStyleText = Object.keys(this.themeConfig).reduce( (styleText, key) => styleText.replace(key, this.themeConfig[key]), this.themeTextBackup, ); this.themeDom.innerHTML = themeStyleText; }
1
ff072617bb4791924bea68e55e100f91
0934bb804e800683ce95815e5f6f4695
This draws a specific Jewel as a small ellipse, representing that it is matching with other Jewels.
final Graphics2D theGraphics, final int theX, final int theY) { final Graphics2D g2d = theGraphics; switch (theLetter) { case "I": g2d.drawImage(myEmeralds.get(BLUE_EMERALD), ...
0
daeb4e00dc8fca05107b8030696ef609
2d332f4665d218bfb2e61b4ad8d271ce
Compute the cycle length of a given number.
previous_numbers = [] while n not in previous_numbers: previous_numbers.append(n) n = get_next_minion(n, b) index_of_num = previous_numbers.index(n) if index_of_num == len(previous_numbers)-1: return 1 return len(previous_numbers[index_of_num:])
1
3b6af86cd89051bfa75ef5cc1f266db0
a82fb6e1c13d75cfdbb3da97c7bcb6b0
插入工程信息, 支持批量插入
{ if (entitys == null || entitys.Count() == 0) { return 0; } var sql = InsertBuild(); var row = Session.Execute(sql, entitys, CommandType.Text); return row; }
1
91d7b4d99baf637a6d187c0967f92b27
2439e7bc5b8e26262eb1240678f77d49
指定のメッセージの先頭に現在日時を付けてファイルに出力します。
namespace Nop.Core public class XFileLoger public static void WriteLog(string format, params object[] args) { WriteLogEx(DateTime.Now.ToString("yyyyMMdd"), format, args); }
1
5f79c849ffe4beb073bd4281fef030a4
0906e6b708ffccc95c3385316a93d461
Method to modify an existing cable.
errors = [] if old.element_type() != new.element_type(): errors.append('element type mismatch') if old.element_count() != new.element_count(): errors.append('element count mismatch') conn_match = False for (end1, end2) in ( [ ['A', 'Z'], ['Z', 'A'], ] ): if old.conn('A') == ...
1
d61fbf453d805134bd652f5a4f85d821
f22adc5dfaa7b0325aca488200f67a51
Lists all available storage nodes @execution_method = sync
class NAT def list super end
0
1f71f028852b0a25778298078619702f
64844ed8ae6ae74acec5f24bfe2ba2b2
部屋エリアについて、隣同士が別ブロックだったら連結する。 1回だけ
[RequireComponent(typeof(Tilemap))] public class DungeonGenerationRefactored : MonoBehaviour private void ConnectRooms(Vector2Int first, Vector2Int second) { Assert.IsTrue(first.x == second.x || first.y == second.y); if (AreConnected(first, second)) return; if (ParentOf(first) != ParentOf(second...
1
de6ad79439596435150564bb8a36b2bc
4845d16bfa1a1d84b248789289842046
Sorts and refreshes the list of <see cref="Expense"/>s.
{ int itemsToShow = 10; var objects = this.CarMon.ExpendatureHandler.Expendatures .Take( itemsToShow ).ToArray(); var adapter = new ExpendatureAdapter( this, objects ); FindViewById< ListView >( Resource.Id.ExpendatureList ).Adapter = adapter; }
0
11b2a874b66268abff25eb1a0340c2e4
69b34cb6c8feac358a8aea5493669f84
Restituisce lo uniqcode del coupon ordine se presente
class WPXSmartShopSummaryOrder public static function orderCoupon() { $result = ''; $order_coupon = WPXSmartShopSession::orderCoupon(); if ( isset( $order_coupon ) ) { return $order_coupon; } return $result; }
1
4b8f5392cfbc77a5daffac2a4c7005bd
1d13cada0c91b401222d4f4392b98d51
# setter of wrapped matrix - clears cached inverse
setInverseMatrix <- function(pInverseMatrix) { cachedInverseMatrix <<- pInverseMatrix }
0
4d23df1aff600729736126f76c0b9c62
951437007b126e3ed414b99395c18c6c
Returns the type for transactions of this bundle. That is, `TYPE_CHARGE` or `TYPE_REFUND`. The transaction type.
class Transaction(payloads.IInventory, IInteroperable): def inventory_type(self) -> payloads.InventoryType: return payloads.InventoryType.TX
0
97790281b67d9341ad5cd10951e765c5
617939c571d039952f3f4c47eaeb75dd
like getline but considers both \n and \r as delimiters
void getline_enhance(string &t, char delim) { cin.clear(); cin.ignore(std::numeric_limits<std::streamsize>::max(), delim); getline(cin,t,delim); }
0
e10918037235fed3411d15d46d729628
3a5c86f12f9865d1b03e8373e4c5bf6c
Take two trajectories and append them together.
new_traj = np.zeros((2, max_length)) new_traj[:, :traj.shape[1]] = traj new_traj[:, traj.shape[1]:] = np.nan return new_traj
0
cbf88fa5d5780de68d4e99ee7b7cd9da
785026ecc4ff3822c81e1a6538a93362
是否玩家(非宠物和伙伴)
class Role extends Base get isPlayer() { return this.p === 1 }
1
b90f73c1a60f3195ea51e4707658e5eb
a8178bd84399b6e89ef4348cf0d90625
Rekord módosítása előtt lefutó metódus.
class EActiveRecord extends CActiveRecord public function beforeSave() { $this->logUpdate(); return parent::beforeSave(); }
1
e9e108fa1672b5459d45d0fb6c803c6d
79cf42e839acba56d9f2c65dd90594f8
Gets query for [[Entidads]].
class EntidadController extends Controller public function index(Request $request) { $query = Entidad::orderBy('Apellidos')->orderBy('Nombres'); if ($request->input('showAll') == 'false') { $query->where('Estado', 'ACT'); } if ($request->input('search')) $quer...
1
a716a3555486c07edf74cf6b7d799798
78b2f7c2f36559010585d3965b95751c
@brief Set the whether CMFD acceleration is being used.
void CObject::SetIfRotationAccelerationShouldBeUsed(bool bUseRotationAcceleration) { mbUseRotationAcceleration = bUseRotationAcceleration; }
0
df0b3dc15ade237ddbaf68f426978ad6
a4ea30c00e435142dcbfeb08fcd97f94
显示所有菜品(按菜品销量从高到低排序输出)
@Select("select * from dishes where alive=1 ORDER BY dish_id DESC ") List<VarietyOfDishesVO> selectAll();
0
9f98ec78682b65ec821a96bdcb7bf5b4
6d953e90428175a77f050ee6b1e33499
生成node节点,默认为红色
TreeNode* GenerateRBTreeNode(ElementType _data) { TreeNode* node = GenerateNode(_data); node->LeftChild = node->RightChild = _NIL; node->Color = Red; return node; }
1
fae555675a9f4d36b9673b10108d156c
2e4b7fd47150ca6020cf88235bfa240a
go through models directory and gather models into one object
var files []os.FileInfo if f, err := ioutil.ReadDir("./models"); err == nil { files = f } else { return nil, err } models := make([]Model, 0, len(files)) for _, f := range files { var data []byte if d, err := ioutil.ReadFile("./models/" + f.Name()); err == nil { data = d } else { return nil, err ...
1
afa3ec848f015235a7a545a56d350790
a03d7cb366ecca9f49f3473918f1417b
回车转html换行
function key(event) { if (event.keyCode == 13) { $(this).parent().parent().html($(this).val()); } }
0
c360bbbb71524ea140888f294e3453e9
54c6683cf7b47f02df3cdac8cda522d2
fiFc2StateClosing() FC2 closing state.
class stateObject(object): def closingState(self): pass
0
4998e4318ea2311d5a7befa5326fcc69
e6a9e9b28e158fe1b510fb5cd1033a23
Returns Pandas DataFrame of RV realisations used when last run
class Graph(object): def get_rvs(self): return self._rvs
0
5fbefb75e489ea355260944a545d1f8f
3ab9fe1cc884fd45d2c9c6333c39f175
Returns the priority of the current step.
namespace StateMachine int GetPriority();
1
73cac529e53095157ecd95ec0527ba98
edf66789358f4408d2c75a4cd837d075
删除临时文件,及其上层目录
@Slf4j public class FileUtil extends FileUtils{ public static void deleteFile(File file, BufferedInputStream bis, BufferedOutputStream bos) { closeQuietly(bis, bos); if (file.exists()) { if (file.delete()) { log.debug("delete temp file [{}].", file.getName()); } } }
0
c2de41f2127357e6695b77b4ccf08282
8df668bf8ed6f208ae9c944317a873b7
递归删除子项和任何子级子项。
{ if (_ListForSubItems.Count > 0) { foreach (var item in _ListForSubItems) { if (item.Count > 0) { foreach (var subitem in item) { if (subit...
0