query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
94f743a6d44c01e28822e7cae383b307 | ff9ce935593adb76aa9a16fb6be7b601 | Plot humidity data | hum_percent = (abs(hum_thick - air_thick)/air_thick)*100
plt.figure(fig_number)
plt.plot(hum, hum_percent, '+', ms=20, markerfacecolor='none')
plt.xlabel('Humidity (%)', fontsize=20)
plt.ylabel('Swelling %', fontsize=20)
plt.title(title, fontsize=30) | 1 |
0e98b0c9b8f5b3bb2c9a4fe263203dc6 | 30ba1ca1619af82701c1a525e45e6e6b | Creates a throwaway database using the connection string provided. No need to set the Initial Catalog as it will get replaced by the name of the database that will be created. | namespace KORT.Helper
public static class DBHelper
public static void Reset(string connectionString, string databaseName)
{
} | 0 |
10278c66da0612deb16b482b7cbce730 | 9c9704ae829239cda804b19470b333d0 | Takes a list of discrete categories and converts them into numerical binary feature arrays.
NOTE: This is unnecessary for certain algorithms which can accept categorical data. | result = []
for i in range(0, len(categories)):
category_string = categories[i]
result.append(get_category_index(category_string))
result = np.array(result)
return result | 0 |
1f791bf9f92f8b3c9ba7d54801e52da5 | 81cc8cad30da653c67a750332f5c17f6 | 将扫描到的音频文件数据转换成一个实体对象。
<p>
注意!返回 null 时,将忽略当前音频文件。 | Music music = null;
try {
MP3File mp3File = (MP3File) AudioFileIO.read(new File(filePath));
MP3AudioHeader audioHeader = (MP3AudioHeader) mp3File.getAudioHeader();
String songName = getInfoFromFrameMap(mp3File, SONG_NAME_KEY);
String artist = getInfoFromFr... | 1 |
457bf7c8d8dffc662885e19aafbfe245 | 388a098e3eeb7de347678080d6a491e6 | Добавление бонуса к характеристикам от выбранной расы | {
var dispIo = evt.GetDispIoObjBonus();
var item = dispIo.obj;
if (item == null)
{
return;
}
var material = item.GetMaterial();
if ((material == Material.stone || material == Material.metal))
{
dispIo.bonlist.AddBonus(2, 0, BONU... | 1 |
de542c4053edfae8aafb5b8d4b3e2941 | 3ad861866523e31c069754a3d1c1d137 | Initialize meme engine with the location of output directory. | class MemeEngine():
def __init__(self, output_dir: str):
self.output_dir = output_dir | 1 |
56f65e220cfc17577414a901b1c05f85 | 6a33f18af6d7343153471a6e251e1ef0 | 下载作者的插画及漫画
存放在以作者pixivUserId的文件夹中 | @Slf4j
@Service
public class PixivPictureUtils
public static Set<String> getAuthorIllustAndMangaId(String pixivUserId) {
String respJSONStr = PixivRequestUtils.getResponseFromAjaxUserProfileAll(pixivUserId).orElse("");
PixivAuthorProfileBO pixivAuthorProfileBO = PixivResultParser.getAuthorIllustAndManga... | 0 |
a7735ec777479a0c7f5e02abc60f2b97 | 7f47cc5964565106f42c6b096d47b1e9 | \brief Returns true if the node has at least one child node with the given tag name. | bool ContainsChildNode(string childName); | 1 |
6b5a5e90f333ef4464552540961fe76b | 38c13e9e68de4c83f85b9dccf2bb8535 | Note: bytes_to_send can be empty
Return(bool): is final chunk sent | if data.find(b"Transfer-Encoding: chunked\r\n") == -1:
return False
else:
return True | 0 |
34a021481b8fc6f5fc6688a89412cfdd | a1d39430b7ab5c3c94f6cc297fea9c5f | Convert all current LIDAR data to cartesian coordinates | class Lidar(CarlaSensor):
def parse(self, sensor_data):
points = np.frombuffer(sensor_data.raw_data, dtype=np.dtype('f4'))
points = copy.deepcopy(points)
points = np.reshape(points, (int(points.shape[0] / 4), 4))
return points | 0 |
2a9dbc3155883a57660c29a1713a1d04 | bcb5f45c713f8090ec0c5c8c3c8e92fe | Asks user to enter date and time and returns this value. Keep asking user until you get valid entry. | public class Utilities
public static LocalDateTime getLocalDateTimeFromUser(String query, DateTimeFormatter formatterP)
{
boolean isCorrect;
DateTimeFormatter formatter = formatterP;
String userInput = "";
do
{
try
{
userInput = getStri... | 1 |
6b6eb21f01ce5fef49edf2d0a6c442dc | b3002879cebafe4394f5e8ee2f047a16 | 選ばれたユニットのステータスを見せる | void chkUnit(Army *unit){
int pikArmy;
do{
cout<<"Choose which unit you want (1-6)"<<endl;
cin>>pikArmy;
}while(pikArmy<1||pikArmy>6);
cout<<"Number (icon): "<<unit[pikArmy-1].symbol<<endl;
cout<<"Name: "<<unit[pikArmy-1].name<<endl;
cout<<"Class: " <<unit[pikArmy-1].type<<end... | 1 |
1740d7bc27efe13c967300634f5550cf | e2db049c3be4c33cf5927350de004fef | Converts a distance from the target to launcher speed in r/s. | void S_ConvertRc2TargetSpeed(void)
{
} | 0 |
f7f1f00bd880d10355388dd70dea3afa | 6e1a2b313fb358cacee91153b7831545 | The й-rule, VйC -> ViC | {
List<Symbol> vi = new List<Symbol>(),
new_symbols = new List<Symbol>();
List<Rule> new_rules = new List<Rule>();
while (true)
{
foreach (var rule in _P)
{
if (rule.right.All(... | 0 |
5b99e2918469213c31c54985b9ff5506 | 1aeb721c234c917f6dc99be115da00d5 | Grouped phones by base phone | class Processor(object):
def grouped_trip(self):
return self.gdf.sort_values(["MMSI", "Trip", "BaseDateTime"]).groupby(
["MMSI", "Trip"]
) | 0 |
de1e81ce4a881d94924fed8ca3917596 | 485e8e91db3c47e942181c9d48d0c98e | convert the grid coordinate to something the union method can use. | function gridPoint(x, y) {
return {
"x": Math.floor(x/sizeUnit),
"y": Math.floor(y/sizeUnit)
};
} | 0 |
99cb8ec4124eefa20184b3d7bf81ea06 | d35480235e214084e533a409325cd914 | Stop the gripper motion. | public class GripperInCommand extends Command
@Override
protected void end() {
GrabberGripperSubsystem.getInstance().setGripperSpeed(0);
} | 1 |
b10efe84f0f9595146a2b0e6056342a3 | 21453ff4bc79f3e4bc5e7f228d3033f1 | Returns the total amount of not-yet finished jobs for a grid | public class GridSchedulerNode extends UnicastRemoteObject implements Runnable, GridSchedulerNodeInterface
public int getWaitingJobs() {
int ret = 0;
ret = jobQueue.size();
return ret;
} | 1 |
7d351ef43057e05f4443a8f012c26b0b | a4343665787bdf942ce16dff70945262 | Pega o último address_component, solução para quando a api retorna multiplos resultados, e o último parece ser o mais preciso | class Gmap_Geocode
private function get_address_components( $_json ) {
return end( $_json->results ) ;
} | 1 |
1866cc3032f4e494268c11bca413ad05 | 4771665e1a4305a8a87d015214759e6c | Fetch service version/configuration from Marathon | class MarathonCollector(Collector):
def update_version(self):
api_version = "v2"
api = "info"
path = 'version'
info = self.request(version=api_version, api=api)
version = ""
try:
version = self.dig_it_up(info, path)
except Exception as e:
l... | 1 |
2b79fc75f8f161214c9a1d6c059d46dd | 4759f7a2916544b7de1523cd8f644ead | 删除命令是否可执行 | namespace JariSoft.YangFan.ClientCommon
[Obsolete("已过时,应使用JariSoft.YangFan.ClientCommon.MVVM.CurdViewModelBase代替", false)]
public abstract class EditableEntityViewModelBase<TEntity, TContext> : EditableViewModelBase
where TEntity : Entity, new()
where TContext : DomainContext, new()
protected vi... | 1 |
3fb4c9c05a202bca02780495d8babc40 | 7aac9f7ca3c9c2e9a4f79a307ef8984c | Evaluate number of bets in cookies | {
$check = array('01', '02', '03', '04', '05', '06', '07', '08', '09', '10');
$bet = explode(' ', $bet);
$bet0 = array_unique($bet);
if (count($bet) != count($bet0) || count($bet) > 10 || count($bet) < 1) return 0;
foreach ($bet as $bets) {
if (!in_array($bets, $c... | 0 |
26db3cccf75c17887e44202e4ebf22cb | f23e56764b2bf7394a222c8dcabc4477 | Heuristic to determine whether a document looks like a request. | class Eyerequest
public static IsRequest(obj: Object): boolean {
return obj["url"] && obj["title"];
} | 1 |
6a9f4f8781ee2d6f7b9e71686cab653c | 055c364e80b69349bef7c87ce3f0b7eb | Обработчик запросов от LiqPay со статусом платежей. | {
try
{
$requestBody = json_decode(\Bitrix\Main\HttpRequest::getInput(), JSON_OBJECT_AS_ARRAY);
if(!$requestBody['transaction_id'])
{
return [
'message' => 'Заказ не найден!'
];
}
if($requestBody['status'] == 'PAID')
{
\CSaleOrder::PayOrder... | 1 |
a6c915a64d7700784081add327ad25a4 | f06b46f4c476e8c05b7012858fe22437 | Get the cmap value. | class Visualizer(object):
def cmap(self):
return self._cmap | 1 |
53d4fbb294ea8b8ff45b70fc1523503a | db8d84d3ae7e30d4a34d67a38273cc31 | This method creates a gensim models.TfidfModel object from the
'bag-of-words' list created through methods above. | processed_corpus = [[token for token in text] for text in all_data]
dictionary = corpora.Dictionary(processed_corpus)
corpus = [dictionary.doc2bow(line) for line in processed_corpus]
tfidf = models.TfidfModel(corpus)
return tfidf | 1 |
13007311f0cdd3062a9d597d99b1533b | b05a61f3b5f46c48e3ef6d5c4b0c4642 | 在一个有序数组中,找<=某个数最右侧的位置 | public class LeetCode_69
int findLastLessEqual(int arr[],int len,int key)
{
int left = 0,right = len - 1,mid;
while(left <= right) {
mid = (left + right) >> 1;
if(key < arr[mid]) right = mid - 1;
else left = mid + 1;
}
return right;
} | 1 |
0e2252679e7154bf2d302c1d1f7a27e6 | 42526329440876a67016997ad35e4b26 | 是否需要靠近目标 | {
if( target == null )
return false;
if( dist >= Vector3.Distance(transform.position , target.transform.position) )
return true;
return false;
} | 1 |
4f0827d8fbc296d30bd24715b3dfef4b | 04653edfb770bfd816c1d8394b062851 | <p>Метод возвращает название таблицы ограничений на применение скидок. Метод статический.</p> <p>Без параметров</p> <a name="example"></a> | public class DbUtil
public static String getDiscountRateTableName(String memberId) {
return "discount_rate_" + getMod8Table(memberId);
} | 0 |
9a2f876b42b49687c77ed988c40f6740 | 63bc2f9e190151e677f0edcf57fdefb5 | Метод верификации введенных параметров для Billing Address | [params[k] for k in ['method', 'email', 'street', 'zip']]
params['method'] = 'AddressVerify'
return self.__request(params) | 1 |
282f6eebe4ee33af4693c8698ae12a54 | 679adaa9afeb454759609e8e74c086ff | Method to add a Floor to the database | public void addOneFloor(PostFloor postFloor); | 1 |
cb670e87af4a1b384ab5ad765fb111a3 | abeb440de5ae0c371a8689a4a92f6f4d | 算法14.2 步骤(4) 迭代收敛条件的计算方式
计算样本和其所属类的中心之间的距离总和
一次迭代前后,距离总和小于阈值时停止,说明中心点变动较小 | ret = 0.0
for item in dataSet:
blItem = B
minDist = distance(item, B)
for index, currentCenter in enumerate(center):
if currentCenter == A:
continue
dist = distance(currentCenter, item)
if(dist < minDist):
blItem = currentCenter
minDist = dist
oldItem = 0
for index, currentCenter in en... | 1 |
b1047f5ced7f8636bd030d982383f6ba | 408081399e643e4aaf10cd6d02dfa205 | Get the value of staff | class StaffScheduleItem extends Lib\Base\Entity
public function getStaffId()
{
return $this->staff_id;
} | 1 |
762ea6686b6cdb4bcc98b63d0a3ab283 | 986c8ebf28dfdf97958692b9fd9cdcc9 | 根据一些必要的信息创建RPC体 | abstract class AbstractRPCClient
protected function toRpc(string $method, array $params, int $id = -1): array
{
return [
'id' => $id > -1 ? $id : self::$id++,
'jsonrpc' => '2.0',
'method' => $method,
'params' => $params,
];
} | 1 |
4292f38189595956a06c0831773386bb | 9d76ee2355de1146a4fd11a5e6af2f3b | Returns the selector op flags this event is interested in. | {
int sel = 0;
if (wxsel & wxACC_SEL_TAKEFOCUS)
sel |= SELFLAG_TAKEFOCUS;
if (wxsel & wxACC_SEL_TAKESELECTION)
sel |= SELFLAG_TAKESELECTION;
if (wxsel & wxACC_SEL_EXTENDSELECTION)
sel |= SELFLAG_EXTENDSELECTION;
if (wxsel & wxACC_SEL_ADDSELECTION)
sel |= SELFLAG_ADDSE... | 1 |
5d3c703e0586d1cb69e932cf7b8cef41 | 6304f42e08f7d1572702d25cecfdedf8 | 向现有的URL末尾添加查询字符串参数--参数为url,名称,值 | {
string keyWord = paramName + "=";
int index = url.IndexOf(keyWord) + keyWord.Length;
int index1 = url.IndexOf("&", index);
if (index1 == -1)
{
url = url.Remove(index, url.Length - index);
url = string.Concat(url, value... | 0 |
b52fc1e10a3463fcecd12ab5ce3cf500 | e03d5f61e2895c3ecdb138d599ac2f15 | Returns the ith initial node. | class MerkleTree:
def get(self, i: int) -> bytes:
return self.nodes[self.first_leaf + i] | 1 |
c0bed21597e40783ebc2adbcf78b2602 | 11aae5e9cbcf9a4e53d092247c018188 | Deletes an issue comment with given identifier. | namespace FalconerDevelopment.MantisConnect
bool DeleteIssue(long issueId); | 0 |
e82b9285d05adfb187b613c0e4dafcbc | d2ab0fcc8d0a01c07f828164524a4bab | Checks to make sure that the input delegate throws a exception of type exceptionType. | namespace AutoMapper.Test.Should.Core.Assertions
public class CustomizeAssert
public static T Throws<T>(ThrowsDelegate testCode)
where T : Exception
{
return (T)Throws(typeof(T), testCode);
} | 1 |
6391b51e9bc6abc415ab14246af51a68 | 78f570e72c3de775c27b5714ca8c5473 | 分页查找未删除的科目 | PageHelper.startPage(pageNum, globalConfig.getPageSize());
SecondLevelDisciplineExample example = new SecondLevelDisciplineExample();
SecondLevelDisciplineExample.Criteria criteria = example.createCriteria();
criteria.andDeletedEqualTo(false);
List<SecondLevelDiscipline> books = ... | 1 |
78735c2741c6fc893a3eb95e930f5b69 | 22648aa8262efa5044cf1953f7b223c4 | Create a Dirac matrix from Pauli matrices. | pauli = PauliOperator("", 1)
for i in fermion_item:
op_qubit = i[0]
op_str = ""
for j in range(op_qubit):
op_str += "Z" + str(j) + " "
op_str1 = op_str + "X" + str(op_qubit)
op_str2 = op_str + "Y" + str(op_qubit)
pauli_map = {}
pauli_map[op_str... | 0 |
40035e359003d476407a073bb25dfb99 | 81b8227ce025c7b8e7db2946bb25d32d | Gets the id of a process given an executable path | PROCESSENTRY32 pt;
HANDLE hsnap = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
pt.dwSize = sizeof(PROCESSENTRY32);
if (Process32First(hsnap, &pt)) {
do {
if (!lstrcmpi(pt.szExeFile, pname)) {
CloseHandle(hsnap);
return pt.th32ProcessID;
... | 1 |
c3fd445195c2f4da29b1524fdbbe4dad | ed56f05b240afa257d077f91c88b5ed0 | Expand all deviation profiles from a restriction | def cluster_designs(score_lines, ind):
mutation_profiles = {}
for l in score_lines:
m_cols = l[ind:]
m_prof = ''
for i in range(2, len(m_cols), 4):
if m_cols[i] not in ['NO', '=""']:
locus = m_cols[i-2]
mutation = m_cols[i]
m_prof += locus + mutation + '_'
m_prof = m_prof.strip('_')
if m_prof... | 0 |
782fb4799801004974ede2527cba0396 | d396fd319dc99a802c89b23d00f3c656 | Return a collection of talks viewed by admin | class TedTalksController extends BaseController
public function index()
{
$talks = TedTalk::orderBy('id', 'desc')->paginate(10);
return view('admin.ted_talks.index', compact('talks'));
} | 1 |
5269230b2eec404228c7fda3acc954bb | 2cf6be7fd3a1ac71397b5f67c529a57f | @brief Transforma linha de CSV em regsitro de veículo | void lerRegistroTexto(TregistroDados *reg, char *buffer) {
int start = 0, end = 0, count = 0;
char *tok;
for(end = start; buffer[end] != '\0'; ++end) {
if(buffer[end] == ',' || buffer[end] == '\n' || buffer[end] == '\r') {
buffer[end] = '\0';
tok = &buffer[start];
... | 0 |
8b443fd0c1b323f379b20fa418721ad6 | 712e2215b220676db5da6e05e080cb68 | 获取包涵当前鼠标点坐标的停靠面板(在DockButtonManagerForm的Timer_Tick(...)里被调用) | namespace GISShare.Controls.WinForm.WFNew.DockPanel
[Designer(typeof(GISShare.Controls.WinForm.WFNew.DockPanel.Design.DockPanelContainerDesigner)), ToolboxItem(false)]
public class DockPanelContainer : SplitContainer, WFNew.IRecordItem, WFNew.ISetRecordItemHelper, WFNew.IArea, GISShare.Controls.WinForm.WFNew.IS... | 0 |
01a15ced4f0108c2f33bfa69f2804572 | c9013670a0d8b4183b4e08d934afcf13 | 根据交易号和退款批次号,更新退款信息
{tradeNo:交易号,
refundAmount:退款金额,
refundBatchNo:退款批次号} | public int updateInfo(RefundApplyModel refundapplyModel, DBConn conn); | 1 |
237c1bafc040403553b1dfcef80faef5 | ca5cb73d188fbfc8999584f3fa0b8b8b | 获取指定游戏物体的所有直接子游戏物体 | namespace RoomBuildingStarterKit.Common.Extensions
public static class GameObjectExtension
public static void GetChilds<T>(this GameObject obj, ref List<T> childs)
{
obj.transform.GetChilds(ref childs);
} | 1 |
740e82129794027da186e4242ea69c32 | 0ce50496df005cca4b0e747095a37350 | Compose a path to the temporary directory that protofiles are extracted to. | def GetTempDir():
return os.path.join(TEMP_DIR, 'run_{0}'.format(FLAGS.run_uri)) | 1 |
d4e931beb8eb6ec0a86f846451d7d336 | a54583a61d1eeff701b8d28e4a8e7768 | Gets the moving as 'react' effect. | return [getEffect(
clone({
invertRotation: !!this.usingGyroscope
}, this.config, {
container: this.container,
layers: this.layers
}))];
} | 0 |
81acd63c52523623e000770b2aff5c6f | cfddfff282e8a06f98d216e23330bf6e | Guess browser time zone | public function guessTimezone(Request $request); | 1 |
ff1755f83fc741c83f00b9b9b4aae407 | 0b02a8b99a2baa5b92ac2d7ba5f1790e | 获取应用标签的Hash数组 | function get_linked_tags($tag_data)
{
$app_list = uc_call("uc_app_ls");
if ($app_list == '')
{
return '';
}
foreach($app_list as $app_key => $app_data)
{
if ($app_data['appid'] == UC_APPID)
{
unset($app_list[$app_key]);
continue;
}
... | 0 |
dea74f3a006abcc5932a74785b8f2e05 | 5d8217fd8580f8f5e03debdba826d99c | Batches multiple operations as a single undo/redo step. | namespace WindowsAzure.Table.RequestExecutor
IEnumerable<T> ExecuteBatches(IEnumerable<T> entities, Func<ITableEntity, TableOperation> operation); | 0 |
c0841ea5706829ef8ef262549a3a0cef | fa7d81a7a3cd76970462924f7371ece7 | Play last downloaded video (yt or play) | {
Configure::write('debug', 1);
ini_set('mysql.connect_timeout', '6000');
set_time_limit(6000);
App::import('Vendor', 'YouTube', array('file' => 'class.YouTube.php'));
$VideoTube = new YouTube();
$videos = $this->Video->find('all', array('conditions' => array('is_down... | 0 |
34fc0e335ef605d96aea1fcfa4d61598 | f8c42bf582122ace26a6b8661190ce9e | sets the whimpy of the character. | public class RPCharacter
public boolean setWIS (int WIS) {
this.WIS = WIS;
return true;
} | 0 |
a383e9850b73b9e250af0eeadf0ddf4d | b4ca4f904b7a2b8aa60770472c6b1f15 | Brighten the image up from its natural levels to improve freesurfer's
ability to read it | bw = skimage.img_as_float(im)
while bw.ndim > 2:
bw = blacker.reduce(bw, axis=-1)
median = np.median(bw)
if median < 0.5:
bw = np.where(bw <= 2 * median, np.zeros_like(bw), np.ones_like(bw))
else:
bw = np.where(bw < 1 - 2 * (1 - median), np.zeros_like(bw), np.ones_like(bw))
return bw | 0 |
f7cecc9a0fb56141fd04652243934ba4 | d75dd377b0a11e90dccd34a49ebe09be | Test of equals method, of class Member. | public void testEquals_1()
throws Exception
{
Entity fixture = new Entity("", "", "", "", "", "");
fixture.addIsA("");
Entity obj = new Entity("", "", "", "", "", "");
obj.addIsA("");
boolean result = fixture.equals(obj);
assertEquals(true, result);
} | 0 |
660e3ff4cd08217eb17e717a585377f0 | 4f366e7bf4ba86c759a58c55ab1ac3a7 | Fill Slider Model with given column values | var inputs = document.getElementById('fieldModel').getElementsByTagName('input');
var i;
var value = [];
for (i = 0; i < inputs.length; i++)
value[i] = inputs[i].value;
var el = new Everlive('9PEejRqNBdrhDrjj');
var data = el.data('field');
data.create({
'fd_name': value[... | 0 |
f47818beff964a33abcd583408833083 | e69759c816b38549a971246c419d608d | Function provides tranlation of the word to the normal form where first char is upper-case and each other are lower-case. | String firstCharacter = word.substring(0,1).toUpperCase();
String otherCharacters = word.substring(1,word.length()).toLowerCase();
return firstCharacter.concat(otherCharacters);
} | 1 |
729734b33ddfe6255d863adb44de78a8 | 5128ba4d35bb099d2efe44b240062d6c | Called by Eclipse when creating the editor. Adds bracket matching. | public class SmlEditor extends TextEditor implements ISmlProgramListener
protected void configureSourceViewerDecorationSupport (SourceViewerDecorationSupport support) {
super.configureSourceViewerDecorationSupport(support);
support.setCharacterPairMatcher(new SmlBracketMatcher());
support.setMatchingCharacterPain... | 1 |
7a2a440381d2712e37554d276d9cd01f | 21348aa63ca0a61d1420e5118efbe312 | Clear questions table before each test | function clearQuestionList() {
document.getElementById("questionForm").style.display = "none";
var questions = document.getElementById("questionTable");
for (var i = questions.rows.length - 1; i >= 0; i--) {
questions.deleteRow(i);
}
} | 1 |
d3d4f70236cb27735f0d7c7b0c8ad13b | a99b2df8222eb95bd7d17d39857972d6 | @brief Low level graphics display simulation driver initialization. | void BSP_GG_Init(void)
{
GgDrv->Init();
} | 1 |
ae21d91e9048e2684f67a450da517a52 | 358a03cb919d7e8575b63c789f7646ff | Clear Hidden Address Lines Field. | {
try
{
grdContent.Columns[7].Width = 0;
grdContent.Columns[7].Header = "";
grdContent.Columns[8].Width = 490;
}
catch (Exception Ex)
{
ErrorLoger.save("wndShipmentDetailPage - _hideBarcod... | 0 |
e76c9ab24898900c0dff4368b7a6bd3c | 6ff40447189301e55b1702d357d668cd | 是否是在Fragment的使用的 | public abstract class BaseProcessor extends AbstractProcessor
public boolean isFragment(TypeElement typeElement){
TypeMirror fragmentTm = elementUtils.getTypeElement(Consts.FRAGMENT).asType();
TypeMirror fragmentTmV4 = elementUtils.getTypeElement(Consts.FRAGMENT_V4).asType();
if (types.isSubtype... | 1 |
8d7027789662cef907f034b8b4c20a74 | af01b853849572942919718db7fd5b52 | Aplica la descomposicio QR a una matriu A i resol Ax=b si b != NULL | TriangleMatrix A = TriangleMatrix(B.dat);
int m = b.size();
vector<double> x;
if (abs(A.getDet()) < eps) {
return x;
}
vector<double> bk = A.transformVector(b);
return revStep(bk, A.dat);
} | 0 |
0fed476d5e1e7b57c436e1eb91d4f7e7 | 079b49f9baf63b9ea22b353d6265eae8 | Python 3.8 | def is_even_v2(n):
if int(n) % 2 == 0:
print('Even!')
else:
print('Odd') | 0 |
63c2dbca835bf7ab02b0355ff3e00b4a | d2c2be2dbeb1c3161404595c6b403396 | Lista de padres directos a un tipo de show. | {
return array(
'images' => array(self::HAS_MANY, 'Images', 'showmanID'),
'videos' => array(self::HAS_MANY, 'ShowmanVideos', 'showmanID'),
'weddingsArray' => array(self::HAS_MANY, 'Weddings', 'showmanID'),
);
} | 0 |
c7e0965c0094657da6f06649a71f9d26 | a5a8468ac6a53f98881268c10db7a52f | function to rotate towards the player | public class FractionEnemy : Enemy
protected override void SeekPlayer ()
{
transform.Rotate(new Vector3(0, 0, rotateSpeed * Time.deltaTime));
base.SeekPlayer();
} | 0 |
ada68fec02db67c6ae1d41686afa55c7 | fc40f2d824d18b201a0f280cd90195a9 | Compute the mean of the series | double sum = 0.0;
for (int i = 0; i < seasonLength; i++) {
sum += (series[i + seasonLength] - series[i]) / seasonLength;
}
return sum / seasonLength;
} | 0 |
71c3fdf8a23aecf369a6ede46f86f844 | ef65830d416092568e5b3acc94f80182 | #Determine the number of chromosomes to be crossed | if (nsub < 10000) {
blksnps <- 5000
} else if (nsub < 25000) {
blksnps <- 2000
} else if (nsub < 50000) {
blksnps <- 1000
} else if (nsub < 100000) {
blksnps <- 500
} else if (nsub < 250000) {
blksnps <- 200
} else if (nsub < 500000) {
blksnps <- 100
} else {
blksnps <- 50
}
... | 0 |
103f705358e1648a5e26fd29523f3fe0 | c09ca3ba34a6ed3e5fc2e69755d2a142 | Método para obter todos as despesas da viagem de acordo com o Código de Adiantamento | {
string sql = "Select * From fotos_devolucao_pagto Where idDevolucaoPagto=" + idDevolucaoPagto;
return objPersistence.LoadData(sql).ToList().ToArray();
} | 0 |
2e6f200fd63f00f328fad7544df98e0a | c8fd066c53cb5231320ae779245f50a2 | 通过反射获取剪切板服务的远程Binder对象 | public class BadElfService extends Service protected static class BadElfBinder extends Binder{
public BadElfService getServiceInstance(){
return weakBadElfService.get();
} | 0 |
c20adefaacef81e9dfca6df120634d00 | a19e039e78503a0e0c0defc44ba32be5 | Returns ``True`` if the subprocess stopped because it timed out.
.. versionadded:: 1.3 | class UseCaseResult:
def timed_out(self) -> bool:
return self._timed_out | 1 |
ab74a99f769a7bfd2157bbf1192f99ce | 519a504a0f723264712955894c5fd3bd | 添加单条频段信息到收藏数据库 | {
if (!IsFreqNameValid(strName))
{
return IDS_STRING_FREQNAME_INVALID;
}
if (IsFreqNameExist(strName))
{
return IDS_STRING_FREQNAME_EXIST;
}
if (!IsFreqValueStrValid(strVals))
{
return IDS_STRING_FREQVAL_INVALID;
}
FreqNameValPair freq = {strName, strVals};
ConvertFreqStrToVals(strVals, freq.vstrValues... | 1 |
13b5b7a64b7834c0a9bb72e0d0a20c7e | bd1dcc2534e4a8d0073cbf2f70f8d6e0 | Opens the Excel document and sets class variables. | {
app = new Microsoft.Office.Interop.Excel.Application();
wbook = app.Workbooks.Open(filename);
worksheet = (Worksheet)wbook.Worksheets[1];
} | 1 |
35e56e0110df8ad737d65020f21f1049 | 6e96e85faaee39c2d591bcc7834d89bc | Test wrong temp_photo image type values (gif/xlsx/txt/mp4/other)(FT-HTJK-125-008). | def test_uploadphoto_invalid_file_type(_pre_setup, images_url):
token_1 = _pre_setup[0]['token']
with pytest.raises(error.InputError):
u.user_profile_uploadphoto(token_1, images_url[1], 0, 0, 200, 200) | 1 |
b27b4209229f9f57b48e6c01a9ae1cff | 87fc6d830cee22164ae836c1c871d2f1 | 显示倒计时,并且在时间到了之后把买票按钮显示出来。 | showTime(countdown) {
let self = this;
self.isShareCount = true;
self.isShowBtn = false;
self.isShowFalseBtn = true;
document.getElementById('showtimes').innerHTML = countdown;
if (countdown == 0) {
self.isShareCount = false;
self.isShowTimer = true;
self.isSh... | 1 |
01fb99f9be121efb0d02295a652ea74f | 2e1a8f2453bdafa4792f8db4492f06d6 | Retrieves all the user actions.
This is an asynchronous method. | {
await RenewAuthCookieIfExpired();
var actionsResp = await GetActionResponse("last_actions");
JArray actionsJson = null;
using(var respReader = new StreamReader(actionsResp.GetResponseStream()))
{
string json = await respReader.ReadToE... | 1 |
13b3a0e9fa04ce503ba70cff112473ae | c81dca82d0cddeabddd06fa05dc73c98 | 已退款的状态 | $p = $_GET["p"];
$condition = "status = '已退款'";
$res = $this -> queryOrderBySql($condition,$p);
if($res){
$page = $res['page'];
$ordergoods = $res['ordergoods'];
$this -> assign('page',$page);
$this->assign("data",$ordergoods);
}
$this -> display();
} | 1 |
a4e83f44a5273b6c356186504a02b51b | dc83fc09f03bba2c84bb2b31c07ac61e | [@property] authenticationRequired
A flag indicating if the server requires authentication credentials. | class OutboundSmtpEmailConfiguration extends OutboundEmailConfiguration
public function setAuthenticationRequirement($required = false) {
if (!is_bool($required)) {
throw new MailerException(
"Invalid Configuration: must be a boolean to determine authentication requirements",
... | 1 |
ae9bad7f1e36418b233cda4ccf3e2ee2 | 5ed66970a9b273abf1d002935913e106 | 函数:修正奖励队伍(按距离) | local weizhi = 0;
for i, v in pairs(info.pl) do
info.pl[i].zhuang = info.pl[i].we
if info.pl[i].usI == MjProxy:getInstance():getMyUserId() then
weizhi = tonumber(info.pl[i].we);
end
if info.pl[i].we == 1 then
info.pl[i].zhuang = true;
else
... | 0 |
beed10b51c683da1aea26c5dba92c5c3 | ea1d19d6e98b1c8e27555f10c0b2ec65 | Initialize look up table to zeroes | {
slmemset( (char *) hplookup, 0, sizeof( hplookup ) );
slmemset( (char *) hplookup_extended, 0, sizeof( hplookup_extended ) );
} | 1 |
42473e4d445772a9bed268d02f1d97b7 | bc382b9c98ca0267e29bd211e535513a | 根据不同的layout处理不同的数据 | public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {
if (getItemViewType(position) == BANNER) {
BannerViewHolder viewHolder = (BannerViewHolder) holder;
viewHolder.setData(data.getBanner());
} else if (getItemViewType(position) == HUIHUA) {
... | 1 |
2188354c2904fca1147a21964b20846f | 395363875e3c7a30220eb6b403aca96c | 判断面板是否被关闭 | function isCollapse(panelId){
return $("#"+panelId)[0].clientWidth <= 0;
} | 1 |
69e1a79ed8a60d5e8e43f6e6a4553c28 | 3a97a046a1a6447d894dc164389aaf86 | Explicitly remove meta prop related to bundling as it would not
be part of normal listing of properties and hence would not be deleted
as part of diff | function removeMetaData(iconSet: IconifyJSON) {
const props: (keyof IconifyMetaData)[] = [
'info',
'chars',
'categories',
'themes',
'prefixes',
'suffixes',
]
props.forEach(prop => {
delete iconSet[prop]
})
} | 1 |
d4c30ed7bad573297e8fe530df1805fc | 63e0164ec38c1cff2e949a7d360bc718 | 左扫到右,累计前缀和sum,若先前出现过前缀和(sum-k),说明中间部分子串和为sum-(sum-k)=k
每次遇到这种情况就累加已发现的所有具有该和值(sum-k)的子串个数即可 | public class Solution
public int subarraySum(int[] nums, int k) {
int res = 0, pre = 0;
HashMap<Integer, Integer> map = new HashMap<>();
map.put(0, 1);
for (int i = 0; i < nums.length; i++) {
pre += nums[i];
if (map.containsKey(pre - k)) {
res += m... | 1 |
99e7c644e40f96d9dffd33f562e03328 | 03031455bdb16a8ca26282e5e9e0fe8f | function to calculate next I/O coordinate with given last coordinate and dimensions | int offset = (this->K+1) - currSize;
C_j = offset + (currSize - 1) - Ctau_i;
C_i = offset + (currSize - 1) - Ctau_j;
} | 0 |
43f6e4d2542df180963aef1e6ac4f129 | 776550b43c9372ee416bc958f7458c7f | Determine if the code file needs to be patched before the first line.
The file should be patched if ``get_ipython`` is called before it is imported.
Otherwise it should be patched each time it is imported | def is_diff(diff_fn):
return not diff_fn.endswith("_code") | 0 |
2262ca8d9d5901681e421898fc1fb17d | 891edc880258888c9f8c08594820a642 | 准备素食汉堡,可口可乐套餐 | func createHotPot(hotPot *HotPot, factory Factory) {
hotPot.addSoup(factory.getSoup())
hotPot.addMainIngredient(factory.getMainIngredient())
hotPot.addVegetables(factory.getVegetables())
fmt.Println(hotPot)
} | 0 |
69452d2df68a40e1d9e3484e0e72e333 | 1ec9e45f4010e762ca4219ce952ebe24 | Funcion que reserva una entrada en la tabla de
de Inodos para dicho numero de inodo y volumen | int resizeInodo(uint64_t idxNodoI, size_t newSize){
EstructuraNodoI *nodoI=miSistemaDeFicheros.nodosI[idxNodoI];
char bloque[TAM_BLOQUE_BYTES];
int i, diff=newSize-nodoI->tamArchivo;
if(!diff)
return 0;
memset(bloque, 0, sizeof(char)*TAM_BLOQUE_BYTES);
if(diff>0){
if( nodoI->numBloques && nodoI->tamArchivo%TA... | 0 |
d7063653dc6ea759cd3ebd6785ec6360 | fed4b1f9a7ec95ab1f6623dc3c69be79 | Method simulates server work. | func Query(w http.ResponseWriter, r *http.Request) {
time.Sleep(time.Duration(rand.Intn(1000)) * time.Millisecond)
_, _ = io.WriteString(w, "some results")
} | 1 |
f995b4c1266ea3d540eaef3ad7d1b806 | f6aa5fb20c56c29697993afbd8425924 | Get auto pan option. | class SandwichMap extends UiComponent
get autoScale() {
return this._autoScale;
} | 0 |
5babde0e4f1fda1c61c111492e684204 | 87f5fe245cf0f4239f209cf9eba29f0e | 功能:条件阀值下拉框关闭触发事件 | function onDdlBlur() {
closeDdlMenu.call(this);
} | 1 |
94a216a3ed7a124c84ae8ac8ee8c02c6 | 15fd8a5ec2b47b8815506fc91e8b1f2a | Renders the personal info fields | $("#brand").html($( "body" ).data( "personData" ).brand);
$("#aboutme1").html($( "body" ).data( "personData" ).aboutme1);
$("#aboutme2").html($( "body" ).data( "personData" ).aboutme2);
$("#title1").html($( "body" ).data( "personData" ).title1);
$("#workhistory1").html($( "body" ).data( "personData" ).workhis... | 1 |
ba601b5aea7dee6ffd19cd549c56f2b5 | aabf9479ef5e816e2c67edb00f031da7 | Cadastra uma Sala nova no banco a partir dos dados passados
pelo form | nome = $("#campoNomeSala").val();
var dados = JSON.stringify({nome: nome});
$.ajax({
url: 'http://localhost:5000/cadastrar_sala',
type: 'POST',
dataType: 'json', contentType: 'application/json',
data: dados,
success: salaIncluida,
error: erroAoIncluir
})... | 1 |
1e96c11083985b8fa6168bfb625f0208 | 74c3ceef8d2ea99e78daa8d862aea9bc | 把多个脚本拼接成一个脚本,用;分割 | Script script = new Script();
script.addAll(inputScript);
script.addAll(outputScript);
return script;
} | 0 |
517e563d78df925508979149094a465c | f12a775ec172fcd8142b828599882ced | Dummy contract resolver. | class Copier(object):
def resolver(self):
return self._resolver | 0 |
50246dc9f29927e8de317d2833ccf3e0 | 4cc83f323dfbda87509d4f05abdbc397 | rekurzívna funkcia na generovanie množín | if stevilo in prastevila:
return [stevilo]
for prastev in prastevila:
if stevilo % prastev == 0:
return fakotriziraj(prastev) + fakotriziraj(stevilo//prastev)
return [stevilo] | 1 |
8619465b83118712fe7e9168502578e2 | 2d82aba227607594f837c1b15cd93100 | Get the MIME type's name (e.g. "application/json") | class DSwf extends DMediaFormat
public static function getMediaTypeName() {} | 0 |
c826f4009a847be4f90893653a08d0af | 2561950a70e4e62e34af6846c21c046a | Remove all update commands. | class VectorMagnetController(inst.Controller):
def clearUpdateCommands(self):
self._commands = [] | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.