query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
ed2a0bc21c93010845273f3ad26484ec | c3842dcbc771d7591d4681bce3f74f0e | Sums spike data over trials.
Returns | steps = int(self.TMAX / self.dt)
average_spike_train = np.zeros(steps)
n_spike_trains = len(observed_spike_times)
for spike_train in observed_spike_times:
spike_train = spike_train/self.dt
spike_train = np.array(spike_train, dtype='int')
average_spike_... | 1 |
f008a34fa756835d71ec5f3a613ea24d | 43963b463c5845c4244d61217fd01da8 | Compute the (maximum) log likelihood of the Powerlaw distribution fit on a degree distribution. | excess_distance = ut.function_with_fixed_arguments(cls._excess_distance, fixed_positional_arguments={0:current_lw, 1:loglik, 2:current_exp, 3:chi_sq_dist})
if excess_distance(1 - 1e-12) <= 0:
return 1
return brentq(excess_distance, a=current_exp + 1e-12, b=1 - 1e-12) | 0 |
f8a53e2061b055f19bb67bebf050c92c | 56ef49fbcd2b44c010ea9eb56d7d84c5 | Stream image by chunks | loop {
if @position < @size
if @connection.get_outbound_data_size > BackpressureLevel
EventMachine::next_tick {stream_one_chunk}
break
else
len = @size - @position
len = ChunkSize if (len > ChunkSize)
@connection.send_data( "#... | 1 |
3cca053ad1e18f76c14062d249d1027e | 5e2312f1688801afe71f0fa012fdbfec | Método que transforma de minutos a segundos | public class MeasurementConversions
public static double minToSec(double min) {
return min * 60;
} | 1 |
2a61dac5db0228935cb72072c0b73830 | 16540ca3e592ecf9237619da9a81b34b | @brief Destroyes a Mifare connection object. | {
MPFCB *mpfcb;
void *mempool = NULL;
ATR memattr = 0;
ER ercd = E_OK;
CHECK_MPFID(mpfid);
CHECK_DISPATCH();
mpfcb = get_mpfcb(mpfid);
knl_LockOBJ(&mpfcb->lock);
if ( mpfcb->mpfid == 0 ) {
ercd = E_NOEXS;
} else {
DISABLE_INTERRUPT;
mempool = mpfcb->mempool;
memattr = mpfcb->mpfatr;
knl_wait_delete(... | 1 |
b401f7539dcc42117b031a862f50336e | 9c78a047148f7e9a86c3648d3ceb64d4 | 获取SessionId生成策略 | @Configuration
public class ShiorConfig
@Bean
public JavaUuidSessionIdGenerator sessionIdGenerator(){
return new JavaUuidSessionIdGenerator();
} | 1 |
720aa12cf66c568f0561fb3d9be94199 | 42ad438227393cd9537fd56467f26a40 | 如果查询到数据,将数据记录,否则去数据库注册 | public final class HtmlTableProducer implements java.io.Serializable
private void regLookUp()
{
if(!isRegData){
tableInfo.regDatas(dsRepData);
isRegData = true;
}
} | 0 |
a8ae840de9686f9c5c59ed36d9427f5f | 0a8bf8be0d6ff8b26c6a16f04e348fe4 | |
| send acquisition message to Vnmr
|
+-------------------------------------------------------------- | void vega_calibration(){
for(int i = 0;i<=20;i++){
uprintf_to(&VEGA_USART,"ACTR");
}
uprintf("send vega calibrate message\r\n");
} | 0 |
9f3f7cafc443e46f308290d2b79f9894 | 21d753f80a4f501e76bf2ad94f6ab8e4 | Creates a data source from a list of matrices (sequential vectors) | namespace BrightWire.ExecutionGraph
public class GraphFactory
public IDataSource CreateDataSource(Matrix<float>[] sequenceList)
{
return new SequentialDataSource(LinearAlgebraProvider, sequenceList);
} | 1 |
6bd565ea2f98a7cd0b71c1835b49dd7b | 1d8b9bf84c3f940d504d95f5896ed33d | Tests the case where the broadcasted original matrix is permuted | {
const auto& engine = get_test_engine();
auto input = memory::allocate(engine, { data_types::f32, format::yxfb,{ 8, 2, 1, 1 } });
set_values(input, {
1.f, 0.f, 5.f, 1.5f, 2.f, 0.f, 6.f, 5.2f,
3.f, 0.5f, 7.f, 12.f, 4.f, -0.5f, 8.f, 8.f
});
topology topology(
input_layout(... | 1 |
dbe687302e9c02a778c2392386c973ff | bd18657e1bcc72647783b53666669927 | Torna si s'han llegit tots els missatges de la conversació | bool CommunicationManager::messageAnalyse()
{
return messageFini;
} | 1 |
84c04456144c6ceb6e52e0a28faa72b9 | 9f90f4211b1ed10080b2ac8665033643 | The Begin Creating Service Certificate operation adds a certificate to a
hosted service. This operation is an asynchronous operation. To
determine whether the management service has finished processing the
request, call Get Operation Status. (see
http://msdn.microsoft.com/en-us/library/windowsazure/ee460817.aspx for
m... | string vaultBaseUrl,
string certificateName,
CertificatePolicy certificatePolicy,
Dictionary<string, List<string>> customHeaders = null,
CancellationToken cancellationToken = new CancellationToken())
{
throw new NotImplementedException();
... | 0 |
6e59146c9da11a45ea387d6c248f8830 | 4f9a16741c448fee0f5ebdb7147cdf90 | Set the destination port ranges. | public class DDoSSpeedLimitConfig extends AbstractModel{
public void setDstPortList(String DstPortList) {
this.DstPortList = DstPortList;
} | 1 |
d779d81e2daa09030677140b3e800e91 | 4790d335e609d0bc224f96379889645d | 判断字符串是否全为大写字母 | function string.isupper(str)
if str == nil then
return nil, "the string parameter is nil"
end
local len = string.len(str)
for i = 1, len do
local ch = string.sub(str, i, i)
if ch < 'A' or ch > 'Z' then
return false
end
end
return true
end | 1 |
e8e07f1055f32c9eaf1f8b40bf176e66 | 086a4eeecbd09267d80a85b4f4bfac83 | Mark that we have lost synchronization with the server. | void SSEClient::MarkAsDead() {
_dead = true;
close(_fd);
} | 1 |
8fa4551528493614b8aaf9891a29afd9 | fc666f466031fcdf13f75d04671f7e31 | 获取公会学院数据 | axios.get(`https://dbcd.qfstudio.net/read/college?token=${token}`)
.then(function(response) {
callback(response.data.data);
})
.catch(function(error) {
alert(error);
})
} | 1 |
2ac8b8986998c8a8e06eea64f8f54ab7 | 87091d76a368d5a31d6514fafbcf00d3 | Create an instance of {@link UpdateUserRequest } | @XmlRegistry
public class ObjectFactory
public UpdateCustomer createUpdateCustomer() {
return new UpdateCustomer();
} | 0 |
4c7d584669e45ad5e99b8942210503b2 | 765329ea7fce18c100af4ac3a0625e5f | chap 목표 설정 페이지에서 해당 스터디id의 책 정보 출력 | String loginId = request.getParameter("loginId");
int subject = Integer.parseInt(request.getParameter("subject"));
MainDAO dao = new MainDAO();
DTO planDTO = new DTO();
DTO dto = dao.plecturePlan(loginId,subject);
HashMap<String, Object> map = new HashMap<>();
map.put("dto", dto);
Gson gson = new Gson()... | 0 |
b1f4c3af11e53d267af71270ba70d33b | 70616fce2f59889e06eb8af3c8371808 | 获取底部NoMore的Item个数 | abstract class RLRecyclerAdapter<T> : RecyclerView.Adapter<BaseRecyclerViewHolder>()
open fun getFootersCount(): Int {
return mFootViews.size()
} | 1 |
ebf2e0f977ea54d1209760deb68196f9 | aa0a585dd590804cf4d96d85ccda86d5 | 用于顺序扫描根网页下所有链接的方法 | def scan_page(url, soup):
get_text(url,soup)
for tags in soup.findAll("a",href=True):
yield urlparse.urljoin(url, tags["href"]) | 1 |
87ed4dfa52b3f2f72a3828627f0acf6e | 91fc81c231c76582ba450b894fe91efb | Call command with no checks configured. | class TestMyMCAdmin(unittest.TestCase):
def test_rpc_command_default(self, config):
config.return_value = config
config.rpc = None
self._do_rpc_command('localhost', 2323) | 1 |
e67e75e537d4f84bfb3da028bd489ed5 | 66001617a9b250551dc25c26242c0f23 | Covariance between the latent variables as an unstructured 2-dimensional tensor variable | class gaussCGRNN(_CGRNN, object):
def cov_function(self, input):
with self._graph.as_default():
return self._sess.run(self.CovV_h, feed_dict={self.x: input}) | 1 |
4d81908132e7b6498e40e641adc88424 | 4294ae962df6cfdfaa9844816cfaa9cd | Get the correct min. and max. available dimensions for submitted dimension (width / height) | var elId = ed.dom.getAttrib(el, 'mce_advimageresize_id');
var ratio = ed.originalDimensions[elId].width / ed.originalDimensions[elId].height;
var lastW = ed.lastDimensions[elId].width;
var lastH = ed.lastDimensions[elId].height;
var deltaW = Math.abs(lastW - w);
... | 0 |
2d0aa644e8379971779f615316001881 | f7058355140abf483592a92307ad305b | Get the path to Jupyterhub deployment configuration. | class BasePathService(ABC):
def config_path(self) -> Path: | 0 |
e5616e5b04ea487e33e4f557c5bd1cd0 | cf62615b79224eab7a7e95e6e6f62045 | the last component of the package path to be used as the package name. | public class BazelLabel
public String getPackageName() {
var result = getPackagePath();
var i = result.lastIndexOf(BazelLabel.BAZEL_SLASH);
if (i != -1) {
result = result.substring(i + 1);
}
i = result.lastIndexOf(BazelLabel.BAZEL_COLON);
if (i != -1) {
... | 1 |
bd30f026200fbea1d438e38c1e4f30a8 | 7d8316bd45b5dd5f2214525c410f937c | 当目标List为空时,为起实例一个,防止空指针异常
需要判断的List | namespace ZqUtils.Extensions
public static class ListExtensions
public static List<T> DefaultIfNull<T>(this List<T> @this, List<T> defaultValue = null)
{
return @this ?? defaultValue ?? new List<T>();
} | 1 |
f28f752070f8e14f0c54c77f0913a64d | 3edecd1e87e8b8a0ba6904c54677cf6d | Returns a long display name | public abstract class Field extends WdkModelBase implements ScopedField, NamedObject
public String getLongDisplayName() {
return (_longDisplayName == null) ? getDisplayName() : _longDisplayName;
} | 1 |
dd97dd8f03526d962d6295cc2c23704b | dfea44388babe108c4273c680fbe727d | Sets the boxcar size | void CollisionDetection::setSize(glm::vec3 _size)
{
m_boxSize.x = _size.x;
m_boxSize.y = _size.y;
m_boxSize.z = _size.z;
} | 1 |
97f16730828a32a93f67e068abe897d1 | e3c2a67b10ddde81ad5ae91bbaffb07d | Test selecting the same property path in the same query multiple times
doesn't generate overlapping aliases. | public class ReferencePropertyPromotionTest extends TestCase
public void testAliasedPropertyValues() {
EObject sub = addChild(root, "child");
IPropertySource rootPs = ModelUtils.getPropertySource(root);
IPropertySource subPs = ModelUtils.getPropertySource(sub);
assertEquals("root", rootPs.getPropertyValue("name... | 0 |
1bc5046d2a942a003628bb3215824e95 | 1bd981cee2daab72f8205c7db8984ed8 | Gibt die berechnete Breite des MenuItems zurück.
Diese setzt sich aus dem Padding (links und rechts, je 16px), dem Icon (wenn vorhanden, 15px) und der berechneten
Textbreite zusammen. | class TextIcon extends Base
getWidth(): number {
return this.graphicIcon.oW + this.space + this.length;
} | 0 |
ad778feae31454e39eaaa6216ea8727f | 9dc183fb0fb0bb81a4a22032e5880e66 | Tells if teh grid is being painted or not. | public abstract class AAxis implements IAxis, PropertyChangeListener
public final boolean isPaintGrid() {
return this.m_paintGrid;
} | 1 |
457ee254aa3b2bb6ea92f187be2b1f60 | 004bab575b58253bea18c3b8bec13e87 | Set sort order for Order count | {
$db = &JFactory::getDBO();
$db->setQuery(" UPDATE `{$this->table}` SET `ordering` = '$val' WHERE {$this->id} = '{$key}' ");
$db->query();
} | 1 |
36b94987f69bffa7c3128ca324af3dfb | 754678581b74f9e86a67aa4ea4ee4c87 | Returns the deviceID in the container | public class Credential
public String getDeviceID() {
return deviceID;
} | 1 |
f4a65c348e87133c52c1ade3dbbe72e1 | 07b56f9709a8b67c56f616ef1046a6a3 | Function to replace each element of the array by its rank in the array | {
int i, j;
for (i = 0; i < arr_num; i++)
{
rank_value[i][0] = score_arr[i];
}
} | 0 |
45aa0ff838fd8d5f1b75728f31e8348d | a4ba3d9758ca24e2a3bf7c2fab1f401b | 随机选择数组,排除部分。 | $arrnew = array();
$arrk = array_rand($arr,$num);
foreach ($arrk as $v){
$arrnew[] = $arr[$v];
}
return $arrnew;
} | 0 |
103fbeccb1c2439a9e15fc35402d7bbd | 8fa1ff0b9f3e5c31dd1799f8d43d0ee1 | Gets the RGB LED located on the shield. | public Boolean getLEDrd(); | 0 |
3f57cf68f9e2c7e55cd1a16c4785b357 | e42224302efa14ea3cd72effdf0677bd | Allows the ui presenter implementation to have extra behaviour when the data defined for the presenter is set | namespace QPP.Wpf
public class ViewModelBase : ObservableObject, IPresenter
public virtual void SetArgs(DataArgs args)
{
} | 1 |
d32980ce3ac153f286477da91f173943 | 8274e759d3371747aca178a4f165a2e6 | Writes to option's text. | class OptionWriteSelector extends React.Component
tooltipText() {
if (!this.isWritable()) {
return WriteStateStore.state.description;
}
} | 0 |
c7029af436e13243625a81d6d0b2ab8c | a20026ccc666f3c9addb04274a4e5111 | Mark the future done and set its result. | class AgentRunAsyncTask:
def _set_result(self, exc: Optional[BaseException]) -> None:
if not self._done_future or self._done_future.done():
return
if exc:
self._done_future.set_exception(exc)
else:
self._done_future.set_result(None) | 1 |
5186a4d50b6baf82ae8e201d09ee01c7 | ab837b6788903c2aaf30fe5f8fc19d15 | Checks the temperature inside the spectrograph box. | bool result = false;
List<byte> sendData = new List<byte>();
List<byte> receiveData = new List<byte>();
sendData = _enc.Ascii("GET BOXT");
if (!_usb.Write(sendData)) { _isUsbFailure = true; return false; }
receiveData = _usb.Read();
if (receiveData != null) {
_boxTemp = new List<double>();
... | 1 |
c9f05fee02cbf1ead491b85b4bb639bf | 78afbee601e8da1cb5db56cafe3d39b1 | @brief Blink an LED in a stand-alone cog | {
OS_ERR err;
BOARD_LED_ID my_led = (BOARD_LED_ID)(((uint32_t)p_arg) & 0xFFFFUL);
uint32_t dly_in_ms = (((uint32_t)p_arg) >> 16UL);
for (;;)
{
protectedLED_Toggle(my_led);
OSTimeDlyHMSM(0, 0, 0, dly_in_ms, OS_OPT_TIME_HMSM_STRICT, &err);
}
} | 1 |
11bb6b6c05c648ab94320fecfab1a7e2 | 88a18d50a03b8b4ea0981aa6878dcbc1 | Handles the InitializeRecord event of the DataGrid control. | {
SetupFields();
try
{
InitializeObject(this, dr);
}
catch (Exception)
{
throw;
}
} | 0 |
e9ea72dccdf692ddf9168e1ea0bd5f8f | e9e7d45394dd00f8f81986d270a583a2 | Returns true if the durability api was used for configuration. | public class MaterialManager
public boolean getDurabilityResetTimerEnabled(String material) {
return durabilityMaterials.containsKey(material) && durabilityMaterials.get(material).getResetEnabled();
} | 0 |
808b413de9f8f905bb6c89ac7a61f7c0 | 7b86d802e1f3e33197937aa8e6a0685c | Does nothing, this is here to prevent use | local function dummy()
end | 1 |
f680edd359630f053d47f07ef9adbdb7 | c81c4b1cbae63758d3abfa4224052e6b | Scan Concours Entries and generate a lable for each. These should be placed on the envelopes
handed to eache entrant upon arrival. | void generateParcelContainerLabels(LabelResponse labelResponse, LabelTypeFormat format)
throws UnprintedLabelException, IOException, PrintEngineException, StateNotAllowedException, EventLogicException; | 0 |
0695effca6d7cb54307cfc258eeebce1 | 29cd13fbcb30d7f497e36a8bc715177c | 获取当前登录用户的工具数量 | class Tool_cabinet:
def sum_tool(self):
print(f'工具总数:{len(self.tool_list)}') | 0 |
046a63a346610d942ea7ed7ceb60956a | 12b52c0a69edd5ddeb5dfd05cac976d5 | 获取管理层查看签证申请列表 | {
StringBuilder sbVisaOrder = new StringBuilder();
DataSet dsVisaOrder = OrderBll.GetList(0, "orderType="+Convert.ToInt32(TravelAgent.Tool.EnumSummary.OrderType.签证) +" and clubid=" + clubid, "orderDate desc");
TravelAgent.Model.VisaList model = null;
string strpic... | 1 |
8ab5f4d6b4c528f34872d8649c81cc5a | b83e3ee3829914f92eb425b5ce6cec26 | 隐藏min播放器 | [types.CHANGEMINI_PLAYER](state) {
state.showminiplayer = true
} | 0 |
82ce4193caad13a4ba28facc253e4ffd | b5e0ab9c21acdbd5963b96abd193abdc | 更新组织机构缓存 | public String updateOrg(CacheRbacOrg cacheRbacOrg); | 1 |
287e9ce99b5fbfd5eaa2b262f7204dbe | 83e2b603c33188e4a1d810d16eda5270 | Derived feature function: indicates whether the avg of years of studies
of head of household and partner is > 9
Requires years_of_education feature to be computed beforehand | class IrsEins extends \Entity\IrsEins implements \Doctrine\ORM\Proxy\Proxy
public function getHas990()
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'getHas990', array());
return parent::getHas990();
} | 0 |
70f361e3aa125946f2565452dda59212 | 34fea11c13236b6c19861089ae11a78d | Tính ra thành phần cho mẻ trộn cần | public class Main
private static int calculate(int numberOfBolts, int percentageLostBolts, int boltCosts, int numberOfNuts, int percentageLostNuts, int nutCosts) {
double lostBoltsPart = percentageLostBolts / 100.0;
double lostNutsPart = percentageLostNuts / 100.0;
int notCouple = 0;
int... | 0 |
416fb96f53b0e3b4f210f9c03ebb746f | e73f2be28017cb44af9d56df461ec802 | Removes provided monster from provided passage. | public class Room
public void removeMonster(Monster m) {
this.monsters.remove(m);
} | 0 |
0a6c29b5641215fd744854eb3902d934 | 08eccb1e3cb9e3fbc4f81a0dcf700437 | Returns a new object of class '<em>Logo Program</em>'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | MyRacketProgram createMyRacketProgram(); | 0 |
bbfcf9b1918ba44a04ecc4dff2bfe4e5 | 9e4826a77b5f9b2d36560d36eb074d86 | 获取excel中指定sheet名称的索引 | {
int index = 0;
for (int i = 1; i <= masterBook.Worksheets.Count; i++)
{
Worksheet selectSheet = (Worksheet)masterBook.Worksheets[i];
if (sheetName == selectSheet.Name)
{
index = i;
break... | 1 |
9df96a72e264784da2f8cfc688afb162 | 76dab04173af2f65013d3b9c36877ed9 | Sets the constant parameters used for feature normalization. | namespace daal
namespace algorithms
namespace neural_networks
namespace layers
namespace batch_normalization
namespace interface1
Parameter::Parameter(double alpha, double epsilon, size_t dimension) :
alpha(alpha), epsilon(epsilon), dimension(dimension)
{} | 1 |
e1e5860c380b50d9eb2de8047dd894ae | 7aca60c925dfd478000e9978c7ad1a32 | Type of gun
<p>
This is mainly used for display to the user
but in some cases can be used to modify how
the weapon is animated and held by the player
model. | GunState getGunState(); | 0 |
296bd23903a3bb9572ef4caed6d3433b | 95cc6313bf00ea7c74febae1fb8acce4 | @brief == operator for the Point class | {
os << p.m_x << ", " << p.m_y;
return os;
} | 0 |
63b1f61b9d4adb9f7d79013604c4841a | d6994fed637960b99d9f02810edddb77 | 获取自己是否是庄 | function niuniu_data_manage:IsBanker()
local isBanker = false
local myChairId = player_data.GetUserLogicSeat()
if self.BankerData ~= nil then
local bankerChairId = self.BankerData._para.banker
if tonumber(myChairId) == tonumber(bankerChairId) then
isBanker = true
Trace("我是庄家")
end
end
return isBanker
e... | 1 |
97532e7f667f3dcc339f3dc7fccae172 | f43e2078e5fc5c4f77d78a91b5db7d62 | Test case for list_service_account_for_all_namespaces | res = kube.GET_api_test(url+'/api/v1/serviceaccounts',headers)
assert res.status_code == 200 or res.status_code == 404
res_print(res) | 1 |
862ab46f0d7876ed5ae3f7792141df6b | a61888eeacc55112abd45bed57779bce | Simple method to display the Frames Per Second in the window title | namespace Lengine{
void Window::displayFPS(Uint32 frames){
SDL_SetWindowTitle(_window, std::to_string(frames).c_str());
} | 1 |
968224db38334b83eef8bf282381705f | 478e9f5fc1a5e7538c3da7e93bc7e546 | Test that probabilities are fit correctly to nodes that are caused by other nodes | assert(@sim.num_nodes == 0)
n1 = @sim.event('addNodeAtLocation', 10,10)
assert_raise (TopologyError) {
@sim.event('addNodeAtLocation', 10,10)
}
@sim.event('addNodeAtLocation', 9,9)
@sim.event('addNodeAtLocation', 9,10)
@sim.event('addNodeAtLocation', 9,11)
@sim.event('addNodeAtLocation', 10,11)
@si... | 0 |
b794f6415ec71881583d4c9897469241 | 657b057120d8a6a2f1b615459ec35ea2 | Gets the auto top up setting by customer id. | namespace Telecom.ApplicationServices.AppServices.Interface
SetUpAutoTopUpResult SetUpAutoTopUp(ManageAutoTopUpSettingsModel autoTopUpModel); | 0 |
3d957da6046abf0f49d7feecfe871907 | 5752c0e521f0b9597eaf66fe27a29597 | 提携メディア削除のお知らせメールを送信します。 | $log =& $this->_core->getLogger('deleteTeikeiMedia');
$tables = new CampaignDbTables($code);
$name = $tables->getTableName_Media();
$db =& $this->_core->getDBForUpdate();
$sql = "delete from {$name} where teikei_media_id=?";
$param = array($teikeiMediaId);
$log->info("delete media_id.{$mediaId}");
retur... | 0 |
ef9c6aa40488166baf45e093bb707d13 | eaa4ffc0293aae76a99df8f20ef14000 | (Decorator) Require all roles specified to run the command. | @wraps(wrapped_method)
def decorated(*args: Any, **kwargs: Any) -> Any:
require_one_of_roles(set(required_roles))
return wrapped_method(*args, **kwargs)
return decorated | 0 |
d5c63756588d33b4c3c0d09f68b3c0f8 | 3ac7586640043588f8e39bfacbb3b397 | Generate one valid sample and write it to the destination arrays. | void
generateSample( sampleSet* sampleSrc, sampleSet* sampleDest)
{
if (sampleDest->allocatedSamples == 0) {
*sampleDest = initializedSamples( sampleDest->allocatedSamples,
sampleSrc->minX, sampleSrc->minY,
sampleSrc->maxX, sampleSrc->maxY);
}
if ( sampleSrc->alreadySampled) {
int s;
... | 0 |
e052cc7c08b66293b868adf23b6c2b49 | 262d9957ed8cc553ec43a9739768208c | 先手番局面と後手番局面を合成 | namespace Assets.Scripts.Shogi
public static class Zobrist
public static HASH_KEY Hand(Color c , Piece hand_pc)
{
return hand[c.ToInt(), hand_pc.ToInt()];
} | 0 |
204cc3d30f6515db883b366ca8ee9b5f | 6ed32b59749e7efb5b469eaf3578d5fc | 根据会议ID查询审批意见
Author Wp | public List<VoteBaseInfo> findVoteByMeetId(Long meetingId); | 1 |
538079d9ef47495aa945480dab298e88 | 155eb5913b9a711d599dda8d8a6e97e6 | Handles Save Button click Event -Save Contractor Job Security Information | {
dvView.Visible = false;
dvEdit.Visible = true;
btnBack.Visible = true;
btnSave.Visible = false;
btnEdit.Visible = true;
Contractor_Job_Security objContractor_Job_Security = new Contractor_Job_Security(PK_Contractor_Job_Security);
} | 0 |
09e7f8e9699c800c15efc513acc9bc47 | f14da0f0f696840815d746db77a52a92 | deletes all rows in the given range from LP | SCIP_LPI* lpi,
int* dstat
)
{
int nrows;
int i;
SCIPdebugMessage("calling SCIPlpiDelRowset()\n");
assert(lpi != NULL);
assert(lpi->spx != NULL);
invalidateSolution(lpi);
assert( lpi->spx->preStrongbranchingBasisFreed() );
nrows... | 0 |
8809a0dff6aaf915c10150229be931f8 | e114bf174ae3bfda532f64166ee4908d | Vrátí řetězec pro ověření korektnosti přijaté odpovědi | {
if (Errors.Keys.Contains(serviceAnswer))
throw new RuCaptchaException($"{Errors[serviceAnswer]} ({serviceAnswer})");
else if (serviceAnswer.StartsWith("OK|"))
return serviceAnswer.Substring(3);
else
return serviceAnswer;
... | 1 |
5e03599104d4ba88aa76d26a07d3940d | c4e3f5a5ba8a0e89a759c2648dd5ed7e | Checks if the condition of the Erdoes-Gallai inequality
is fullfilled | t = 0
for i in range(len(A)):
if 2 * abs(A[i, i]) > np.sum(abs(A[i])):
t += 1
else:
break
return t == len(A) | 0 |
66344b42292edae2577d28994b43aa64 | f9e06238e33b8bd46a93c86e1ef39e1b | Get a fixture for a complete IP message. | return (Ether(src='00:00:00:00:00:01', dst='00:00:00:00:00:02') /
IP(src='1.2.3.4', dst='4.3.2.1') /
UDP(sport=10000, dport=20000) /
Raw('\xa5' * 100)) | 1 |
9f0edf771718567c8c63dde9f4f35705 | 1758369366a513e65373a39de461e4d9 | Provides access to a collection inside current database connection. If such
collection doesn't exist, it is created. | namespace SqlNoSql
public class DocumentStore : IDocumentStore
public IDocumentCollection<T> Collection<T>(string name)
{
return provider.GetCollection<T>(name);
} | 0 |
64e8c587d29f99f74624c060cb745233 | d31bb496253ca1a7afbb946aff7472a8 | Draws eyes using circles and lines | def eyes(x,y):
turtle.color((255,155,192),"white")
turtle.penup()
turtle.setheading(90)
turtle.forward(-20)
turtle.setheading(0)
turtle.forward(-95)
turtle.pendown()
turtle.begin_fill()
turtle.circle(15)
turtle.end_fill()
turtle.color("black")
turtle.penup()
turtle.se... | 1 |
48dc205d9161495fdb43dee8aa61d8f6 | a3c380f975d0bf0bb7c24db9512570d8 | Kargers Min Cut Algorithm | MinCut = []
while len(G) > 2:
v1 = random.choice(list(G.keys()))
v2 = random.choice(list(G[v1]))
G[v1].extend(G[v2])
for x in G[v2]:
G[x].remove(v2)
G[x].append(v1)
while v1 in G[v1]:
G[v1].remove(v1)
del G[v2]
for key in G... | 1 |
cb00b2358f693d53a3b5d17af0dd8dd3 | 70b4ffa88d9e91e0ea3e38db26809092 | Initialize each location to have no tile. | {
IntStream.range(0, MAX_WIDTH).forEach(x -> {
IntStream.range(0, MAX_HEIGHT).forEach(y -> {
Location loc = getLocation(x, y);
loc.setVisited(false);
});
});
} | 0 |
ba5ff1b55be936b892adbf06282ea525 | 687144c3fd5d61356af18af4fea5eeb0 | Checks whether all the required transaction fields have been set. | super(SegTransaction, self).check_valid(store)
LOGGER.debug('checking %s', str(self))
if self._address is None or self._address == '':
raise InvalidTransactionError('address not set')
if self._balance is None or self._balance == '':
raise InvalidTransactionError('... | 1 |
cadb10c1d06c0a63bfa402e7400ecac9 | 49a76d1094824849e582d00e8cf2e265 | Retourne tableau contenant l'alphabet dans un ordre aléatoire. | def shuffle():
A = [0 for i in range(26)]
for i in range(26):
r = randint(0,25)
while chr(ord('A') + r) in A:
r = randint(0,25)
A[i] = chr(ord('A') + r)
return A | 1 |
26b0fec7fc93f4cf71987859ef8a7915 | 8dd4ae2bcf009c02a56ffafbccc556a5 | 根据开关选择武将 | if(GroupBox::check1-> isChecked() == true)
{
hero-> setIcon(QIcon("://picture/hero_1.jpg"));
CardOut::myHero_1-> setIcon(QIcon("://picture/red.png"));
CardOut::myHero_2-> setIcon(QIcon("://picture/red.png"));
CardOut::myHero_3-> setIcon(QIcon("://picture/red.png"));
CardO... | 1 |
80e3695737ebd122a7988d092ebd67bb | 0271c4510fe465b27f3fd0eb1f10132c | Анализирует успешность трека | {
$response = $this->client->checkRequest($trackId);
var_dump($response);
if ((int)$response['obj']['status'] == self::SUCCESS_STATUS){
return true;
} else {
sleep(self::RETRY_TIME);
return $this->requestChecker($trackId);
}
} | 1 |
90850ca6b7ee2955c9cfe78c508b9ce7 | 4d798ec6dc60e08546a0550ae8b978ae | Transformation that will be applied to the title value when it is set. | namespace WorkSuite.Library.Asp.Net.Mvc.Server.ShiftCalendars.Dynamic.StaticDefinitions.Definitions
public class DynamicShiftCalendarStaticDefinitionBuilder<S>
public DynamicShiftCalendarStaticDefinitionBuilder<S> title(Func<string> the_title_expression)
{
definition.title = m => the_title_expre... | 1 |
e8ac5e84c430057535695773cd12ef8c | 985cf21ae1d73f9b55ae2e699081479b | Return the number of sequences from SwissProt
and the list of corresponding accession numbers and cluster numbers | def getHMMclusters():
fh = open('frag.ClusterList.txt','a')
hmmOut = [line.strip() for line in open('hmm.out','rU')]
qids = []
hids = []
for line in hmmOut:
if not line.startswith('#'):
words = line.split()
query = words[2]
target = words[0].split('.')[1... | 0 |
5a47067a1d51784168c2f9bc0ef34445 | 3b0701237a2279114a1f5fa8aba4138e | limits the memory consumption of given function.
If limit set is very low it will not behave in expected way. | function ext_RaiseMemoryLimit( $setLimit ) {
$memLimit = @ini_get('memory_limit');
if( stristr( $memLimit, 'k') ) {
$memLimit = str_replace( 'k', '', str_replace( 'K', '', $memLimit )) * 1024;
}
elseif( stristr( $memLimit, 'm') ) {
$memLimit = str_replace( 'm', '', str_replace( 'M', '', $memLimit )) * 1024 * 10... | 1 |
0c1efb6b563f65bdcb2fccb93f41c54e | 7367f19a18ace67fb62ff3e87be77741 | Valida el inicio de sesión de un usuario comparando el password ingreso con el que se encuentra almacenado en la base de datos.
Si es correcto se crea una sesión. | function iniciar_sesion(){
global $conexion;
$usuario=escapar($_POST['usuario']);
$acceso=$_POST['acceso'];
$query=$conexion->query('select * from usuarios where username="'.$usuario.'"');
if($query->num_rows>0){
$datos=$query->fetch_assoc();
if(password_verify($acceso,$datos['acc... | 1 |
c710d99e4ffeb614277c0ae0b046691d | 91795115b02f21efb95e96f2f80b4b2d | 获取语言列表api | route(router) {
router.get('/getLanguageList', async (req, res) => {
let data = await langCtrl.getLanguageList()
res.json(data)
})
} | 1 |
380d85d93acb3b701851d59531ba633f | 1767bab107c1e22610c1e6a8effddeed | Gradually accelerate to a specified turn value. | stopping_threshold: float = 0.15) -> TaskStatus:
def _get_turn_state() -> Tuple[TaskStatus, float]:
angle = get_angle(origin=np.array(self._avatar.frame.get_position()),
forward=np.array(self._avatar.frame.get_forward()),
po... | 0 |
25c6b4c7cee74d0cbcc752f4139a1f56 | 4599496c78dc7b6adbe07bea7a1dacc2 | 根基景点id查询景点评论 | String sql = "select a.*,b.spName,c.customerName,c.jf from t_scenicspot_comment a,t_scenicspot b,t_customer c " +
" where a.user_id=c.uid and a.scenicspot_id=b.spId and comment_id=?";
List<Map<String, Object>> list=JdbcUtils.find(sql, comment_id);
return list.get(0);
} | 0 |
afcb836f3de0b9572a322241ef7ec257 | c2ac34d467385bff54a877834e22fc44 | prepare to print (current setted printer)
return value == 0 : success
< 0 : error code, -1 : parameter mismatch, -2 : I/O error, -10 : unknown error | super(Fab, self).prepare(svg = svg, name = name, config = config)
self.send("Initialize printer", b'\012\034');
pass | 0 |
da97798b11511addd47f03a745fb1e4e | 64bc31b79598506cf1cca132da312ab3 | Display list of Sites based on users SchoolID to which user is associated. | {
$result = DB::select('SELECT s.intSchId, s.strSchName, s.strSchCoorName, l.strLCLocation FROM tblSchool AS s LEFT JOIN tblLearningCenter AS l ON s.intSchLCId = l.intLCId WHERE s.blSchDelete = ?', [0]);
$area_options = DB::table('tblLearningCenter')
->where('blLCDelete', 0)
... | 0 |
a395923cc338fab23e6cd9c9bab771e3 | 2a9e152dbd48340c1329eb50d54d2111 | 清除所有缓存,清除后回到缓存查看页面 | @Controller("adminCacheController")
@RequestMapping("/admin/cache")
public class CacheController extends BaseController
@GetMapping("/clear")
public String clear(ModelMap model) {
Long totalMemory = Runtime.getRuntime().totalMemory() / 1024 / 1024;
Long maxMemory = Runtime.getRuntime().maxMemory() / 1024 / 1024;
... | 0 |
268019c92a9066e74e0c80b4a049a475 | ff5864d22eede6a2e07028d9cdacdcdb | リンクとタイトルが書かれている区画から、リンクとタイトルを抽出 | with open(file_name,'r', encoding='utf-8') as f:
soup = BeautifulSoup(f.read(), "html.parser", parse_only=only_a_tags)
l_link = [link.get('href') for link in soup.find_all("a",target="_blank",title=True,href=True)]
l_title = [link.get('title') for link in soup.find_all("a",target="_blank",title=True... | 1 |
5d9691654bd9adfad53015c894368b66 | 8ec486379d9229a4746ad1e828314122 | 入力値のリスト | N = int(input())
keyword_list = []
for i in range(N):
keyword_list.append(input())
print ("検索中です・・・\n")
return keyword_list | 1 |
8ae45e12047ed80dbae7acd3cd49cf7c | dafc44f6c88bcac98b32b34d27d5078a | 隐藏端口扫描列表 | $(".noData").hide();
var columnsData = [[
{ field: 'ip', title: '首次扫描活跃IP', align: 'center', width: 140 },
{ field: 'activetype', title: '存活方式', align: 'center', width: 140 },
{ field: 'NMAPdetail', title: '首次扫描端口详情', align: 'center', width: 240 },
{ field: 'FirstNMAPdate', titl... | 0 |
d2bc7e51d551db846fa4ae52167308f2 | 68cea6153fdb2744f8bda495be4ac3d4 | AnimationSize as integer to work with in Animator. | void BackgroundAnimation::setAnimationSize(const int size)
{
this->animationSize = size;
} | 1 |
17a5eec67be9656849622fce7672c5c4 | 05610bac55783d63915200c07e75e1b8 | ensure unsigned int data is read as double by default | double value;
data((double)-13371337.13371337);
d >> value;
EXPECT_EQ(value, (double)-13371337.13371337) << "double was not correctly deserialized";
EXPECT_EQ(size(), 8U) << "double was deserialized with wrong size";
EXPECT_FALSE(d.error()) << "Not enough data to deserialize double";
} | 0 |
beb755a9c02a617a3ebfc8e995344bb0 | fac47b6e90d84cdae51e06d0b1b954e7 | Executes the video render process. | {
if (this._helper.Player == null)
{
return;
}
drawingContext.DrawVideo(this._helper.Player, new Rect(default(Point), base.RenderSize));
} | 1 |
e8a3f881794577d7416d6b06e62ee42b | b9136d49057b265ee7dc97b2122bc5fb | input=Ni*B
output_diff=No*B
weight_delta = output_diff*input.trans() = No*Ni
In Fortran:
weight_delta = Ni*No = (Ni*B)*(B*No) = input.trains()*output_diff | void swCalcWeightDelta(ConvData* param){
printf("mlp.c: Enter swCalcWeightDelta\n");
char transa = 't';
char transb = 'n';
int B= param->_B;
int Ni= param->_Ni;
int No= param->_No;
Type alpha=1.0;
Type beta = 0.0;
int lda=B;
int ldb=B;
int ldc=Ni;
dgemm_(&transa, &transb, &Ni, &No, &B, &alpha, param->input,... | 1 |
9ad8c933cd192304192c1f86907ee07b | 56a1c28eae3d10dcd24e10ac5cc55369 | 更新UI显示的Checksum值的方法 | class MainActivity : AppCompatActivity()
private fun calculateChecksumAndFindCorrectIDs(listOfInputString:List<String>){
updateUI(UIStage.calculate)
val calculateChecksumHelper = CalculateChecksum(listOfInputString)
val resultChecksum = calculateChecksumHelper.calculateChecksum()
val fi... | 1 |
b87e611b18164daab95c16b46f53bd84 | bf7ef485821441159a91cdde31a23834 | Funkcja odpowiedzialna za automatyczne ładowanie klas aplikacji Testina
Ładowane są tylko klasy w określonych przestrzeniach nazw | function TestinaClassLoader($name){
$name = strtolower($name);
$name = str_replace('\\', '/', $name);
$namespaces = ['api', 'auth', 'database', 'entities', 'log', 'session', 'utils'];
$is_found = false;
foreach($namespaces as $ns){
if(substr($name, 0, strlen($ns.'/')) == $ns.'/'){
... | 1 |
e5e9deae2dff46bce916d7ded518ae67 | 4fb77360062af764d24cb42385a6ce95 | Find first (least significant) bit set | static UInt32
ffsbit(UInt32 *s)
{
UInt32 offset, mask;
for (offset = 0; !*s; offset += INT_SIZE, ++s)
;
for (mask = 1; mask; mask <<= 1, ++offset)
if (mask & *s)
return (offset);
return (0);
} | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.