query_id
string
corpus_id
string
query
string
code
string
label
int64
e9c6b2eb3f5e5c946a103d9bb849f787
6f0a852220054751f9bcfa36f350bd8b
Обнуляет счетчики ID Использовать только, если все списки связей и узлов в последствии будут очищены
public final class IdGenerator public static void clear() { idCounters.values().forEach(c -> c.set(0)); }
1
bd036d08e7510c100598d1081ffc76c2
7efcc3efaa15a287138f20c65d340d5a
@brief Tests if EINA_FALSE is returned for null header field value.
{ llhttp_settings_init_ExpectAnyArgs(); llhttp_init_ExpectAnyArgs(); expectedValCbRetVal = LLHTTP_STOP_PARSING; pFieldLocToReturn = &pTestResponse[ headerFieldInRespLoc ]; fieldLenToReturn = headerFieldInRespLen; pValueLocToReturn = &pTestResponse[ headerValInRespLoc ]; valueLenToReturn = he...
0
a60cd07df4f0c63c5b96b29e3306dbf2
7f61448ad6da3ef0f9cb03f40c5be655
returns the input
cases like (1)
0
6ce5a3a0fde1a7d294799e44e6bd04de
2144174aaff5d1fb040f33ae25db2abd
Example of creating credentials list
def v3_listCredentials(request): pass
0
2b073a30e6a9e03d22ff58c9c24b97da
ba5b04f2aa9e09a9a026da82987e2708
@brief Converts given volume from cubic inches to cubic metres.
namespace fdm class FDMEXPORT Units void UnitsTest::cuin2m3() { double v1 = fdm::Units::cuin2m3( 1000.0 ); double v2 = fdm::Units::cuin2m3( 2000.0 ); double v3 = fdm::Units::cuin2m3( 3000.0 ); QVERIFY2( fabs( v1 - 0.016387064 ) < 1.0e-4, "Failure v1" ); QVERIFY2( fabs( v2 - 0.032774128 ) < 1.0e-4, "...
1
6bb0c89f275751f4bc78b4d837768a06
5e5c92bc40e0be8b6eec21683f12a668
利用Unsharp Mask(USM)提高缩略图的质量(清晰度)
class CV249: def unsharp_masking(self, img): k = 1 f_mask = img - self.blur(img) return img + k * f_mask
1
e8759db1f6f1aaf5387a0ef35f5d3777
df120786dade6b8375d3661c307aaaa2
差分滤波
namespace WindowsFormsApplication1 public class ImageClass public Bitmap FD(Bitmap oldBitmap, int Width, int Height) { Bitmap newBitmap = new Bitmap(Width, Height); Color color1, color2; for (int x = 0; x < Width - 1; x++) { for (int y = 0; y <...
1
52eb73320f1520a80e9674c023d0c028
d008dba09417c69a68705d0d69d3970a
Tests that key signature is not applied to notes with accidentals.
public class MusicEditorModelTest @Test public void testPlayBeat03() { this.model.addNote(new Note(1, 1, 0, Pitch.A, 1, 1)); assertEquals(new ArrayList<Note>(Arrays.asList( new Note(1, 1, 0, Pitch.A, 1, 1))), this.model.playBeat()); this.model.addNote(new Note(1, 1, 1, Pitch.A, 1, 1)); ...
0
7da636839276139c63c3d10c87f42426
3d67cbd793e9a0e85fb6e4109e5a7b81
これを実行するフラグメントをリフレッシュする関数
when (fragment) { is MyUserFragment -> { bookshelfFlag = false } is ChartSelectFragment -> { graphFlag = false } else -> { postFlag = false } ...
0
dc3408ba0aabe8401c2136b588c99fd3
1715ce78b21ea3e8f6a972a168047913
Setze alle Kugeln des Clusters auf Home
public class Clusterer private void reinitializeCluster() { for (int i = 0; i < noOfClusters; i++) { centerOld.add(i, center.get(i)); if (!clusterGroup[i].isEmpty()) { center.set(i, average(clusterGroup[i])); } } }
0
aa2eac6df80f4f6f0f8e149aa00d0a95
2087e00dd6e2fb8b96b039a4304cdbaf
Get the nearest applied element (e.g. RunFonts, Languages) in the style hierachy. It searches upstream from current $obj til reach the top of the hierachy if no found.
$xpath = new DOMXPath($this->getStyles()); $nodeType = str_replace("StyleRange", "", $node->nodeName); $type = "Applied{$nodeType}Style"; $style = $node->getAttribute($type); if (!$style) { throw new Error("Unable to find style node for given {$node->nodeName}."); ...
0
35c655d194ee6be5bc20c0281858d735
40d00632e3bc783b4b7a12ac08f6ee9d
获取order:先从缓存中获取,没有则取数据表中数据,再将数据写入缓存
public abstract class CacheableOrderService implements OrderService @Override public final OrderEntity getOrderById(int orderId) { final String key = ORDER_DETAIL_PREFIX + orderId; String orderJsonStr = cache.get(key); OrderEntity order; if (orderJsonStr == null) { order = doGetOrderById(orderId); if (o...
1
e1b3b370e1802ade09e04c7450252981
c701b91301e3c34bb0f02ca8eb0662d3
Get UUID of atom
get UUID(): string { return this._uuid; }
1
464e714c06663a19ab5e8f6c205a146c
ac4595ba7e4c96ab44ea31d9c139a269
功能说明 :保存外观巡检项
[Authenticate] public object Ems00003DetailSave(JObject request) { DataLogerService.writeURL(request.Value<string>("Token"), request.ToString()); UtilBussinessService.WriteLog(UtilBussinessService.detoken(request.Value<string>("Token")), "设备巡检维护", null, "保存", request.ToSt...
1
e9476adf8b6fbc3a2ad63722b18eab67
e6f359678b7d31834433763727fc9a8c
构造一个错误处理页面,严格遵守HTTP响应格式
class MemoApp def error(env, code, body = nil, content_type = 'text/plain; charset=utf-8') path_info = unescape_path_info(env) if body body = [body.to_s, path_info] unless body.kind_of?(Array) else fullpath = file_search("/#{code}", {views: @themes}) ext = split_extname(fullpath)[1] locals = {e...
1
22afc9af799d7c34d40fb012a0ba3a5f
ad46c3fdf2626f9ffdb8b9aab2ff43be
Dataprovider for testCheckValue.
class RegularPriceTest extends \PHPUnit\Framework\TestCase public function testGetValueDataProvider() { return [ 'With price' => [100.00], 'Without price' => [false] ]; }
0
c4479f5a61c905cf31b03095a39bab55
37de55e95dfbddf8de4bffd798316d28
文本转独热码
MAX_SINGLE_LENGTH = 36 vec = np.zeros(MAX_SINGLE_LENGTH*len(txt), np.uint8) for index, c in enumerate(txt): single_vec = np.zeros(MAX_SINGLE_LENGTH, np.uint8) if '0' <= c <= '9': pos = ord(c)-ord('0') single_vec[pos] = 1 else: c = (''+c).lower() ...
1
20d1696440a3aa8aa19182347018d7a6
ebb75c56e51f07ba79aeedb4887d8c31
Returns the contents of the specified file from storage.
class GaufretteStorage implements StorageInterface public function getItemContents($id, $revision = null) { return $this->getFilesystem()->read($id); }
1
59ace5a1d95375da606a0a5a843aa027
d015855db3ed3866b60b6b5096771c9b
Return {@code true} when {@code regionInfo} has a size that is sufficient to be considered for a merge operation, {@code false} otherwise. </p> Callers beware: for safe concurrency, be sure to pass in the local instance of {@link NormalizerConfiguration}, don't use {@code this}'s instance.
boolean hasRegion();
0
3624afba3314c6a84ef1e0506ee4609d
0d80a634f5907ae685c47c761e4a5902
redimensionnement intelligent de l'image a la largeur indiquee
class Image(Objet): def smooth_scale(self, width: int, height: int): self.surface = transform.smoothscale(self.surface, (width, height)) return self
1
664994a730aeaa87cb07657f894810e7
a24271f791ac515eb2acdbed2968dd7d
Actions carried out when the player is about to try and look inside this item.
public class EquipmentObjectManager public static void onPlayerLook(EquipmentObject equipmentObject, PlayerCharacter playerCharacter, Session session) { Map<String, Object> lookMessage = new HashMap<>(); EquipmentObjectAppearance appearance = new EquipmentObjectAppearance(equipmentObject); appe...
1
c8979e956f4b3d523b940c6e52eeb374
b67de0cdc1b0a05e5d54cf5714e3c2ee
This handles the input from the power button menu - without it, menu options do nothing
static void do_powerbtn_menu() { int pwr_input = powerbtn_menu_show(kcugui_get_fb()); if (pwr_input == POWERBTN_MENU_EXIT) { kchal_exit_to_chooser(); } else if (pwr_input == POWERBTN_MENU_POWERDOWN) { kchal_power_down(); } }
1
d34624d28442cda0b5c1799caa416cd9
7713616c6a53624cbac2ee3159880c7e
Prints how to use this program.
print("\n" + "The following are arguments required:\n" + "\t-i: the input directory.\n" + "\t-o: the output directory.\n" + "\n" + "Example Usage:\n" + "\tpython filter.py -i \"./data\" -o \"./pitchers\"\n" + "\n")
1
3f2a704a5c6bbdb41fac3cd4fa7a887c
9a48dec9ce47871dd6eb7181be181409
Update node's own ips in the route table.
nsm_snmp_route_entry_update (struct nsm_ptree_node *node, struct rib *rib, struct nexthop *nexthop, struct cidr_route_entry *route_entry) { struct pal_in4_addr routemask; struct prefix_ipv4 addr; pal_mem_set (&routemask, 0, siz...
1
3f8ac0bafaaf0bd3c84c7feffafb9945
c5a5b17cb9d9c428b14bdedb06286ab8
Eval data available for a single example.
class Parser(video_input.Parser): def _parse_eval_data( self, decoded_tensors: Dict[str, tf.Tensor] ) -> Tuple[Dict[str, tf.Tensor], tf.Tensor]: image = decoded_tensors[self._image_key] image = _process_image( image=image, is_training=False, num_frames=self._num_frames, s...
1
b1aca571a4890a5888d570fa6c8b57e0
053b4ccb0bdd5f74b369d1a66c766611
Base62编码(反转字母表模式)
public class Base62 public static String encodeInverted(final CharSequence source) { return encodeInverted(source, Charset.UTF_8); }
1
860ba2cbd799dddb73066c2afb207ff2
c2a313ea5eb557671e891c9e407c9cb6
jika tidak ada hasil berupa nilai null
def searchout(): for i in range (len(matriks)): if (matriks[i][len(matriks[0])-1]==0): return i
0
357665839da5f0be18baa76306eb399e
c7b721f4835b12b41ca52b7a1e886537
Transforms an array of Campaign Events into a single array with all the summed values
{ $out = []; foreach ($this->_data['stat'] as $item) { $id = $item['id']; $data = $this->_data['ads'][$id]; $data['id'] = $id; $data['spent'] = 0; $data['impressions'] = 0; $data['clicks'] = 0; $data['reach'] = 0; ...
1
6a6ca5ffba8a33c654caecdcae3680f5
389e88049995dd025033f053d9ad1515
Generate Database Documentation for PostgreSQL Usage (from command line):
def main(): print('Generating Database Migration') args = parse_args() util.source_config_vars(args.config_vars) paths = util.get_project_paths() alembic_path = paths['db'] / 'alembic.ini' alembic_cfg = Config(alembic_path) alembic_cfg.set_main_option('sqlalchemy.url', util.get_db_str()) ...
0
6c3d2bb20be0ba99735ff686732f4dad
7ea4b7b8bc69056eed9349359faa2ece
Remove a given number of items from the source.
namespace akarnokd.reactive_extensions public static class ObservableSource public static IObservableSource<T> Skip<T>(this IObservableSource<T> source, long n) { RequireNonNull(source, nameof(source)); return new ObservableSourceSkip<T>(source, Math.Max(0L, n)); }
1
ef88cdafcd33a522dfbcb5e38078161a
0e94d6625042aa0e0ae9f0aa7dbbcbfb
Check if the logs are redirected to a log server
class CommandsTest extends ApisearchServerBundleFunctionalTest protected static function saveLogs(): bool { return false; }
0
a9b15d5823f2f0dbaaa05566a3adf9e4
e36111cfcae2d12e2e8fa7f502f01079
Creates a copy of the current IOpcRelationshipSelectorEnumeratorinterface pointer and all its descendants.
namespace GH public static partial class WinAPI [PreserveSig()] uint Clone( out IEnumIDList ppenum );
0
3b597890ad1eeb324d82c61d8bc86f86
3fd76c18955f33cfaa65fe7d76c572ae
把序列向量 汇聚成 N维logit输出
class AttentionPool(torch.nn.Module): # 把序列向量 汇聚成 N维logit输出 def __init__(self, out_dim, dim=768, n_head=2, dropout=0.1): super().__init__() self.query = torch.nn.Parameter(torch.rand(1, out_dim, dim, requires_grad=True), requires_grad=True) self.attn = attentions.MultiHeadedAttention(h=n_hea...
1
43726f753272122598620696a4f41b56
12c01bc63beabd3ca27f99f16a32eceb
Test Linked List if accepts each iterable value.
sll = iter_list_int_data curr = sll.head for node in sll: assert node == curr curr = curr.next_node
1
62cfa7a615241472176ab98eb3d40205
adf69e862f3c08cfe619be3561b03d37
索引文件不存在则训练,否则直接加载索引
class Parse(Task): def parse_index(self): if not os.path.exists(self.index_path): raise FileNotFoundError('You must download the index_page(索引页) first.')
0
e6b76cc06696dee7b14c417d24c0a88d
35e0db92843ccc9b17a4d6aa872d86d7
TraceHandler will pass the call from /debug/pprof/trace to pprof
flag.Parse() go func() { if *pprofFlag != "" { log.Println(http.ListenAndServe(*pprofFlag, nil)) } }() }
0
e30fbc73af885517066cd596c650af54
a813e3f89fdb9db997495bb3fd891ee0
Calculate Know Sure Thing.
def vsk_imm(x): _x = [_ for _ in x if _ > 0 and _ < 1 and not numpy.isnan(_)] mu = numpy.mean(norm.ppf(_x)) s2 = numpy.mean(numpy.square(norm.ppf(_x))) - mu * mu _p = norm.cdf(mu / numpy.sqrt(1 + s2)) _r = s2 / (1 + s2) return({"Rho": round(_r, 10), "P": round(_p, 10)})
0
90c07e4d5b0a29d52b7aa3173111bfea
aaa6a7761f728aa6d3d6036a55cb5858
@brief Assuming right eye is fixating cached point, get left eye position.
void CCyclopeanEyePositions::GetLeftEyeFix(double& xDeg, double& yDeg) const { xDeg = m_xDeg - (0.5 * m_devDeg); yDeg = m_yDeg; }
1
6964f77b1244b94d8aaa85996467114c
f24868250f5707df87222710edf49ebe
Marks a message for deletion. Only will be deleted if the disconnect() method is called.
public void markDeleted();
1
8d350a66fa889a2edf02945d83bd8aca
6428d19180aae1281ef18a42b242e0d7
Returns a random expression containing the given number of points.
expression = [] number = gen_number(max_num) expression.append(str(number)) d = random.randint(1, 3) s = d while d > 0: symbol_flag = random.randint(1, 4) if symbol_flag == 1: expression.append("+") elif symbol_flag == 2: expression.append("-") ...
0
8c707dc57722d95bb1c1b688a212a654
7fa05982cce66694f21e7f794ef3dd10
Apply texture offsets
{ IZ_INT nTexIdx = pShader->GetSrcTexIdx( 0, m_nTechIdx, m_nPassIdx); graph::CTexture* pTex = pShader->GetTexture(nTexIdx); IZ_BOOL ret = pShader->SetTextureOffsetParameter(pTex); return ret; }
1
0cdb84605eaf6545bbad5278fa326f5f
bbc7be5e441fdae9fd53d1bd24af0301
產生角色金庫設備報表
namespace IMClass [Serializable] public class Jo public DataSet Get_Mfg_JoRpt() { ComDB db = new ComDB(_db_type); StringBuilder strSQL = new StringBuilder(); DataSet ds = new DataSet(); strSQL.Append("SELECT ...
0
c8972c9c59e8f29e46c108fd753084c1
84ce1121c403349584f9d4fe545be6e0
member_seq로 멤버찾기
@Log @AllArgsConstructor @Service public class ProjectmemberServiceImpl implements ProjectmemberService @Override public long findProjMemberSeq(long projSeq, long memSeq) { return projectmemberMapper.findProjMemberSeq(projSeq,memSeq); }
0
c491a89953263580140d8f147dd63b7a
7b8bdc465302ff527c50840284076ec8
<p>usrUkoFlg を取得します。
public class Ntp040ParamModel extends Ntp100ParamModel public int getNtp040UsrUkoFlg() { return ntp040UsrUkoFlg__; }
1
71b8af53c3a472aeeac2d9f94392eb03
92e1a7ee67de39d8efebb3577dbf3711
Provide visibility into a distant room from your script. The target room object will be available on the next tick.
if ( IsValid(self.target) ) then local targetPhysicsObject = self.target:GetPhysicsObject(); if ( IsValid(targetPhysicsObject) ) then targetPhysicsObject:Wake(); end; end; physicsObject:Wake(); physicsObject:ComputeShadowControl( { secondstoarrive = 0.01, teleportdistance = 128, maxangulardamp = 1000...
0
8f708098fac398a4204ece7cbef20223
cfe1e8c2e2638601943e5a12569f3dbc
初始化DAC8562寄存器
void DacInit(void) { DAC_InitTypeDef DAC_InitStructure; DAC_InitStructure.DAC_Trigger = DAC_Trigger_T8_TRGO; DAC_InitStructure.DAC_WaveGeneration = DAC_WaveGeneration_None; DAC_InitStructure.DAC_LFSRUnmask_TriangleAmplitude = DAC_LFSRUnmask_Bit0; DAC_InitStructure.DAC_OutputBuffer = DAC_OutputBuffer_Disable; ...
0
2905dc486e4ef26bbc87ffd5141fbb14
65c35e2c4e978b965619d9ccf5e5efc8
funkcja ustawiająca tekst do przykładu cyklicznego grafu
{ puts("Pierwsza Zmiana"); putchar('g'); putchar('\n'); putchar('\t'); putchar('G'); putchar('\r'); putchar('\\'); putchar('\n'); return 0; }
0
076d3aa7f05a5bdb800ffb2ecca174ad
38c269a1c3930640b3279e3b1fe9e59d
Determines the object associated with the ComboBox choice. This object is passed into the populateDialogBox method to be cast as type Background.
{ EnsureChildControls(); Guid? cpGuid = _componentPicker.SelectedValue.AsGuidOrNull(); if ( cpGuid.HasValue ) { if ( cpGuid.Value == Rock.SystemGuid.EntityType.PROTECT_MY_MINISTRY_PROVIDER.AsGuid() ) { return Bac...
1
73bb043abc5ca44c418e3c145109cbeb
31f394ec8fee493ba1e89115efd92909
获取当前注册的appkey
try { return SharedUtil.getString(context, Constants.SP_APP_KEY, null); } catch (Throwable throwable) { } return null; }
1
eb3817271c914ee17c87a2623b1ee4b8
98988b9b2af4309b2caaa50e43687b4b
Gets the managed feedback select manager.
class SuggestionsController extends Controller protected function getSuggestionsManager() { return $this->get('ongr_category_manager.suggestions_manager'); }
0
6c50c82ae5529a967282f97a62213e1e
14c697672dbf8f83a350cc52af4e930c
The size of one token.
static get size(): number { return 128; }
0
4347579e08ed81983120d9432eb30aef
303a63961b7725ada1a719f105ca4301
Reset's a channel's stream key. Authentication is required. Required scope: channel_stream
InvalidRequestException, APIConnectionException, APIException, ChannelException, RateLimitException { return delete(id, null); }
0
19fed061cac4e2889c40601d4486f922
2efa0b0b9af45cd64ea23fb48ef2c5dd
What to do when Streams window is destroyed
class InertialMeasurementUnits: def __del__(self): try: if self._streamer.is_alive: self._stream_event.clear() self._exit_event.set() except AttributeError: pass try: if self._viewer.is_alive: self.hide() except AttributeError: pa...
1
bf67f1f65866cf6efaedee6295296814
3b4d5a907dfad010138d7a66623918f6
Puts a interacting entity block into the specified builder.
public class GateBlock : Block, IWideConnectable, ICombustible, IFillable, IComplex protected override void EntityInteract(PhysicsEntity entity, Vector3i position, uint data) { var orientation = (Orientation) (data & 0b00_0011); bool isClosed = (data & 0b00_0100) == 0; if (isClosed && ...
0
9d0aa5f2d8c808e6f3ad7b2cbc24fe3e
665cd01a10295ca85fa2db2db1f829a4
Send out mail using the mass_mail task.
task['body'] = format_body(task) text = format_new_mail(task['body']) users_list = self._db.get_users_list() for user_id in users_list: try: self._bot_instance.send_message( user_id, text, parse_mode=...
1
8d68117d26554c3fc1d8845081c49636
9c5f52605fba1cb8abe807dcf33d6db0
Ensure decorator caching works.
def test__cache__no_args(decorator: DecoratorType, kwargs: Any) -> None: @decorator(**kwargs) def _function() -> int: return _counter.inc() @decorator(**kwargs) class _Class: def a_method(self) -> int: return _counter.inc() @staticmethod def a_staticmethod()...
1
54e18cdefd883f2c6162188749e30254
15b51722ac9303c009a2397c5ffed66c
Sets the state of the contract resolver to either insert, update, or upsert.
public class UpdateOptions public boolean isUpsert() { return upsert; }
0
32fea202f54986ebffb7d445aeb72750
00b5d1e1e082dab09755a5dc0b53d0ca
CTextRun::SetStart Sets the start of the associated TextRange.
long ITextRange::GetStart ( ) { long _result = 0; HRESULT _hr = get_Start(&_result); if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); return _result; }
0
7da3b158f05333b19c5646bda789148c
26467e0b5bf89c2952b10f61678b430c
将选取图片的信息写入input中
var textMsgInput = '.ft-row'; $(textMsgInput).val($(textMsgInput).val() + selImg.id); if ($("#chatContent").val().length > 0) $('.ptc-foot .ft-submit').css('backgroundColor', '#685a86'); else $('.ptc-foot .ft-submit').css('backgroundColor', '#d7d7d7'); $(textMsgInput).focus(); }
1
c54f924d7c71ca8083fc5e2c8e6fd821
6db2b5a6e0f63571f08b58c71c7b312d
质检动作
$where_log = array( 'log_id' => $log['log_id'] ); $res = M('log')->field('wash_start_time, wash_end_time, normal_status')->where($where_log)->find(); if($res['normal_status'] > 'F'){ $this->redirect('Home/Index/qrcode_error', ['type' => 'trigger']); } ...
1
a5145febbbc90491aaa0cfd87851e820
f16dbd5928d5d75a0f9d79a47498f152
GET: api/IllnessHistories
response = {} if request.method == "GET": with sqlite3.connect("dentists.db") as conn: conn.row_factory = dict_factory cursor = conn.cursor() cursor.execute("SELECT * FROM illness") ill = cursor.fetchall() response['data'] = ill res...
1
1dc153012f720bcc960ad89014597256
78e9449603fcd57b3ae02eed6f71c7a3
Updates channel layout based on the number of channels set by a client stream. Set a default value to format if the update call fails.
{ const uint64_t *p; uint64_t best_ch_layout = 0; if (!codec->channel_layouts) return AV_CH_LAYOUT_MONO; p = codec->channel_layouts; while (*p) { int nb_channels = av_get_channel_layout_nb_channels(*p); if (nb_channels == 1) { best_ch_layout = *p; return best_ch_layout; } p++; } return codec->cha...
0
0382864d8c4806d7fe5c5336b3d40dc4
1257b07b9df41e8562a3baa5873eb907
更新兑换数量级总消耗积分
function NestsExchangeView:updateNum(eNum) self._needLabel:setString(tostring(eNum) .. "个") self._needLabel:setPositionX(self._numTxt1:getPositionX() + self._numTxt1:getContentSize().width) self._numTxt2:setPositionX(self._needLabel:getPositionX() + self._needLabel:getContentSize().width) self._greenPro...
1
ff9d77cfac6159b90609a47a7b4a7440
8a1e8c498cf1a681f01d94c6b2192384
某个会话的消息总数
@Service public class LMessageServiceImpl implements ILMessageService @Override public Integer totalMessage(String conversationId) { return lMessageMapper.totalMessage(conversationId); }
1
f6d2aff30d891f42d46c2c4c81e32808
e89d98e0d7e13ea18f180abfdb4f5d03
Simplified method form for invoking the ListHostedZonesByName operation.
namespace Microsoft.Azure.Management.Dns public static partial class ZoneOperationsExtensions public static ZoneListResponse List(this IZoneOperations operations, string resourceGroupName, ZoneListParameters parameters) { return Task.Factory.StartNew((object s) => { ...
0
6217a9ff115231ba3dc0c725b1488279
59ea725bc3cddfcc1f4db485328e6c47
Returns the "find one for customer" query.
StringBuilder sb = new StringBuilder(); queryDef.define(new CustomerOrderQuery(sb)); return new Fragment<>(name, "CustomerOrder", sb.toString()); }
0
9a1e06a7aa9d570740d60d40127024cc
a57cc62f9386f3b2560ce1feaf62a985
Getting opposite node ID.
public class CATANMapLink : CATANMapElement public CATANMapNode GetOppsiteNode(CATANMapNode node) { if(node == a) { return b; } else if(node == b) { return a; } return null; }
1
5a5961c789a6f3fab42d3cc18fe4d585
64fa92b5f955231ff96ddc35cfa00431
Corrijo toda una serie de typos que encontré. Sujeto a agregar más.
def corrections(x): y = x regexes = [ ('praC','pfcC'), ] for old,new in regexes: y1 = re.sub(old,new,y) if y1 != y: y = y1 print('Correction: %s -> %s'%(x,y)) break return y
1
a949b8703266f0006f82a8600bf9499e
e6835ba84af567001403f6616f75c407
Recogemos la magnitud del impacto y apartir de esto podemos decidir si el objeto muere o no.
public class Debris : MonoBehaviour void OnCollisionEnter2D(Collision2D coll) { if (coll.relativeVelocity.magnitude > GlobalValues.MinCrashMagnitude) { if (coll.gameObject.GetComponent<Rigidbody2D>().mass > GetComponent<Rigidbody2D>().mass) { Breakdown(); } } }
1
69fe5ff6516f24f6776086c17f0ce8b5
bc8ed2447af775b77a51c7757642a1a9
微信支付数据组装校验
$tenpaySign = ''; if (isset($pars['sign'])) { $tenpaySign = strtolower($pars['sign']); unset($pars['sign']); } if (isset($pars['_URL_'])) { unset($pars['_URL_']); } $vars = array(); foreach ($pars as $key => $value) { ...
1
4d352e1900bc5c580ed8058b9edfecbb
d251ffc4016fb598b5591e0ac0eb9e45
Determine the knot intervals at which we'll fit the data points. This is based on the chord length between interpolation points.
if (!get_knot_interval(handle)) { return false; } else { auto& he = get_e(handle); he.knot = interval; return true; } }
0
10f7f147d564e42c9645b16793933cd4
40e0b120f5fbc22dc7f07ca672bda0ae
Checks current environment Checks if current environment is ENVIRONMENT_BETA
class EnvUtil public static function isBetaEvn() { return defined ('YII_ENV') && (YII_ENV === 'beta'); }
1
ddb7a575ff8a6713d2835ba8e2f08223
3b4761c7e0948cc44732c640d53b03f0
2-3. 급여대상자별 월변동지급공제조회
@Service public class IA5300 public IA530003OUT calcJrlzTrgtAmt(IA530002IN inParam) throws EnfraBusinessException { if(LOGGER.isDebugEnabled()) LOGGER.debug("----- deleteAmndJrlzHist -----"); inParam.setUsrId(serviceComponent.getSessionVO().getUserId()); inParam.setJrlzBzwkCd("S13"); int...
0
25eb56693175112cc0bee0d3a4f5d700
7d775e0e6124983147c6aac1a7ca41e8
Sets the dimensions of the canvas. If there were already rectangles on the canvas when this is called, those rectangles will be removed. Be sure to call this method before you call AddRectangle for the first time.
this.canvasDimensions.WIDTH = width; if (opt_height) { this.canvasDimensions.HEIGHT = opt_height; } }
0
e2b2a157ad7043cb5695bdce1232aab6
acd15c376078d9e550fdaf2a981e6ffa
show faculty data through table
class FacultyController extends Controller public function index() { $faculties=Faculty::paginate(10); return view('faculty.index',compact('faculties')); }
1
29d8e88c0ff9393874a29c5e2fd095e0
107210439898dc63f9ddd8834b681ce2
通常の決済と登録カード使用時の決済で$objFormを切り替え
$this->objCartSess = new SC_CartSession_Ex(); $this->objSiteSess = new SC_SiteSession_Ex(); $objPG =& LC_Mdl_PG_MULPAY::getInstance(); $objPG->printLog('##### Au Start: '. print_r($_POST, true)); switch($this->getMode()) { case 'AuReturn': $this->auReturnMode(...
0
3fab2edf87a341d8c36fe7303ae84ba2
26aaf75e52e640b6af5f9b9d508e1cc7
修改众筹订单
{ $user = $this->userService->getUserInfoFromJwt(); $sku = ProductSku::find($request->input('product_sku_id')); $address = UserAddress::find($request->input('address_id')); $amount = $request->input('amount'); return $this->orderService->createCrowdfundingOrder($user, $addres...
0
68be9d49073805a7d6b4b613652d2ea5
68bb83eafdb28edc2c2de3f3a620b3eb
Function to read doctor information from doctor.json and display
class CliniqueManagement: def searchDoctorbyId(self): doctor_dict = self.readJsonfileofDoctor() doctor_list = doctor_dict["doctor"] id = int(input("Enter doctor Id you want to search:")) for i in range(len(doctor_list)): if id == doctor_list[i]["Id"]: print("D...
0
b1c12d8ad3aa27250165ec4473971f95
05202a0c4034fa67304dacd180dec634
判断字符串是否由相同字符组成
public final class Validator public static boolean isSameSymbol(String s) { if (StringUtils.isEmpty(s)) return false; if (1 == s.length()) return true; char chacter = s.charAt(0); for (int i = 1; i <= s.length() - 1; i++) { if (chacter != s.charAt(i)) { return false; } } return true; }
1
c5cf2b34bbd8a4205d2c741cdac5cd23
00bd520c90c3a4fde9f22a8ba9e7cb91
Translates a BitSet to a long.
public class BB2 public static long llFlatten(LinkedList<Long> ll) { long out = 0L; for (long i : ll) { out |= i; } return out; }
0
a662bac936301f8b370e71ee2cc2e513
8e79a492bf5ab141dbc4709109057497
Dispatch update error action.
async error(callbackEvent, error) { const errorAction = new ErrorAction(callbackEvent); await errorAction.execute(error); }
1
622e1058de4a5bfb8e952b55e5868a69
40b949325ca37d86fb3795c5d8a8c3c9
function to store rate table and work hours value
{ cout<<"Enter No. of services: "<<endl; cin>>N_services; cout<<"Enter frequency of services: "<<endl; for(int i=0; i<N_services; i++) { cin>>Frequency[i]; } }
0
cd01dd37ed278f09684237a9c1092e2f
a4e6167d6deb7e14f9882a2072f7a8d3
Dummy object to spare some if statements elsewhere
class OldObject(BASE): def __init__(self): pass
1
cb305219a10c77df0659ce764ca8e9be
b73637a44b987443b708d43dc0d6ae6f
Refreshes Swing UI panel controls form the currently selected nested doc.
public class MainInterface extends JFrame implements ActionListener public void refresh(Documents documents) { if (isSyntaticMerge) { documentsTabMerge.refresh(documents); if (documents.getSize() >= 3) { miMerge.setEnabled(true); mergeBtn.setEnabled(...
1
ed7833696a71a8fbc78cb37f0bd101c0
87c5878fdd497311ec6e46fe43600611
Gibt ein visuelles Child, welches eine übergebene Bedingung erfüllt zurück
AutomationElement element, Condition condition) { try { return element?.FindFirst( TreeScope.Children, condition ?? Condition.TrueCondition); ...
1
5806396007b0f7e1c111bcc7e8a662e8
79bb2f5cd76b2c2f2fecd9e6abdc0e89
Function that will return the amount of wood we get for a given height
if x % interval != 0: prevH = surface if x // interval >= 1: prevH = solidGroundLvl[(int)(x//interval) -1] nextH = solidGroundLvl[(int)(x//interval)] yDiff = prevH - nextH return prevH - ((x % interval) / interval * yDiff) else: return surface - solidGroundLvl[(in...
0
a769cb298cdd2d42a753de59c84ec54d
a5f881fc2768a01b90ac96c308f18d4e
Assuming this user is hosting a third party sourced identity under an alias personal URL, we'll need to check if the website's HTML body has a http-equiv meta element with a content attribute pointing to where we can fetch the XRD document.
protected static boolean checkDasherDomain(String domain) throws IOException { String endpoint = DASHER_XRDS_URL_PREFIX + domain; URL url = new URL(endpoint); String contentType = ((HttpURLConnection) url.openConnection()).getContentType().toLowerCase(); logger.fine("retrieve xrds, r...
0
463d52e7ceef190c1b76dbcbb32abd98
8a1c345c24208fd47c9b94792cc65924
Retourne le temps en seconde entre le tweet choisi et l'heure actuelle
function getHeatTime ($date_debut, $date_fin) { global $sqlite; $past = strtotime($date_debut); $present = strtotime($date_fin); $db = new SQLite3($sqlite); $results = $db->query("SELECT round(count(timestamp)/60.0,2) as heattime FROM temp WHERE timestamp > $past AND timestamp < $present AND consigne > te...
0
8f60f92c86ef8c6d39f9f4d01fd87229
b43a54a8afca428fa28cf80d702069a4
RegisterSpan - inject spanId in response header
t.Run("with trace and span in header, should put traceid and spanid to context", func(t *testing.T) { var outRequest *http.Request middleware := tracing.NewTracingMiddleware(func(w http.ResponseWriter, r *http.Request) { outRequest = r }) resp := httptest.NewRecorder() r, err := http.NewRequest(http.Metho...
0
73f3cd230afd011b8193a3304bb7f88d
972bf8c800b01a6cca4d1a2ca3fb71dc
Adds premade logdata for building For testing functions
import os self.chatbot = ChatBot("Test Bot") if not os.path.exists(self.chatbot.log_directory): os.makedirs(self.chatbot.log_directory) log1 = open(self.chatbot.log_directory + "/log1", "w+") log1.write("robot,2014-10-15-15-18-22,How do know so much about swallows?\n"...
1
1697d93f8078841678092bc08e54a1d8
33c9b2ae18fd95f775182e8b44add28a
通过将给定对象POST到URL来创建新资源, 并以{@link ResponseEntity}的方式异步返回响应.
<T> ListenableFuture<ResponseEntity<T>> postForEntity(URI url, HttpEntity<?> request, Class<T> responseType) throws RestClientException;
1
ebeb701f6a8ded23a93e05955ed21d1e
156001f0327923f3bddeb99f00efe273
Method to increase or decrease the value of numeric wrapper Params(see {@code isNumeric})
if (cmd === '+') { this.#number += newNbr; } else { this.#number -= newNbr; } }
1
05804b04d9de5ee02e9fc4ef9911246d
0c068c352358e233dcc3debb3f617606
Check whether the patient is in this list or not
public class PatientList implements Serializable public Boolean patientExists(String username){ return patients.contains(username); }
1
ecd1ff563ba1beac1df017f5d0037558
0057c1852d8e4263c931a4dbbc3d739a
计算Haar特征
hog = cv2.HOGDescriptor(winSize, blockSize, blockStride, cellSize, nbins) descriptors = hog.compute(res, winStride, padding).reshape((-1,)) return descriptors
0
e81db3c8932a5663cdae1f30b7e994a6
d3dfe0bdaaeb0420f3b4ecfe8ce0cc1a
Поиск (для автокомплита) по фио
Session s = sessionFactory.openSession(); s.beginTransaction(); Query q = s.createQuery( "from Client where firstName like :fn and lastName like :ln and patronymic like :pn" ); try { q.setParameter("fn", "%" + firstName + "%"); } catch (NullPointerException e){ ...
1
9b0efa15fa8b4835a94976688fcbfc47
84977f7e3036bb06e217c12279ff0c2b
分页查找区间风险位置信息
public class PDIsSueServiceSpringImpl extends GenericDaoHibernate<PDIsSue,PDIsSueId> implements PDIsSueService @Override public Page findRiskByCondition(QueryRule findRiskRule, int pageNo, int pageSize) { Page riskPage = this.find(findRiskRule, pageNo, pageSize); return riskPage; }
1
31e34d9dc86684cd2227f86de64b5527
bcaad72ba0c594cf24f4ed0fcbaebf23
run method for the add from layer list part
const li = this.createEmptyListElement(removeFunction, modifyFunction, layerId); this.fillListText(li, text); this.setDataId(li, layerId); const ol = $("#allLayers"); ol.append(li); }
1
b0829b7913a2ae6f29f975cfa028af0a
df0f45745eabfdd3583e4ebbaa647027
визначення порядкового номера рядка, що містить запис з унікальним ідентифікатором
class docTableModel(QAbstractTableModel): def getRowOfDocID(self, doc_id): for i in range(self.arraydata.shape[0]): index = self.index(i, 0) if self.data(index, Qt.DisplayRole).value() == doc_id: return i return -1
1
f79880bc5e47829a9d762acb7558ed0f
e4e62fb4e96189940254f0835233f9a6
教师成绩管理菜单
public ModelAndView viewQueryScores() { Map resultMap = new HashMap(); resultMap.putAll(getMenuMap()); SystemUser user = getUser(); String personCode = user.getPersonCode(); resultMap.put("user", user); List<String> courseNames = studentService.queryClassScoreCourseNa...
0
0a4236744d11b3f2763664b6b8528839
db907d3f4093ff132bf4410379bbedd0
Convert nanoseconds to hours
var second = Math.floor(micro_second / 1000); var day = Math.floor(second / 3600 / 24); var hr = Math.floor(second / 3600); return hr; }
0