-
+1
- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
public static string GetTextFromExcel97To2003Format(string filePath)
{
FileStream fileStream = null;
POIFSFileSystem fileSystem = null;
ExcelExtractor excelExtractor = null;
try
{
using (fileStream = new FileStream(filePath, FileMode.Open))
{
fileSystem = new POIFSFileSystem(fileStream);
excelExtractor = new ExcelExtractor(fileSystem);
excelExtractor.IncludeBlankCells = false; // optional
excelExtractor.IncludeCellComments = false; // optional
excelExtractor.IncludeHeaderFooter = false; // optional
excelExtractor.IncludeSheetNames = false; // optional
return excelExtractor.Text;
}
}
catch
{
// handle the exception
}
finally
{
if (excelExtractor != null)
{
excelExtractor.Close();
excelExtractor = null;
}
fileSystem = null;
if (fileStream != null)
{
fileStream.Close();
fileStream.Dispose();
fileStream = null;
}
}
return string.Empty;
}
это пиздец, товарищи: https://www.kunal-chowdhury.com/2017/07/npoi-excel-97-2003
эта хуита, на серьезных щах задвигается как документация к либе: https://github.com/tonyqus/npoi/wiki/Getting-Started-with-NPOI
как, блять, так можно? юзинги? та пошли вы нахуй, я вам не доверяю. и вообще, присвоение нуля тоже хуйня. нельзя доверять никому. НИКОМУ!!
Я не навижу индусов. Это пиздец. Это уже не первый раз, я натыкаюсь на статейку, которую, вот так читаешь, и понимаешь, что какая-то откровенная поибота и с мыслью "наверное опять эти ебаные индусы" скролишь вниз? чтобы увидеть рожу или хотябы имя автора. и там, СУКА, ИНДУС!!! они говорят, будь толерантным, а я им говорю, пошли НА ХУЙ!!!
Lorip1971,
24 Декабря 2018
-
+2
- 1
- 2
- 3
- 4
- 5
- 6
- 7
luabind::object FlowerEventModel::RewardInfo(int index) const {
luabind::object result = luabind::newtable(Core::luaState);
if (index < 0 && index >= (int)_presents.size()) {
return result;
}
return result;
}
updart,
24 Декабря 2018
-
0
Под какой файкой нынче сидит доктор[]инхо[/s]?
ilya2184,
24 Декабря 2018
-
+3
- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
const arr = [['govno', 'shit'], ['kod', 'code']]
//we expect it to be {'govno': 'shit', 'kod' : 'code'}
//unsupported(yet)
Object.fromEntries = arr =>
Object.assign({}, ...Array.from(arr, ([k, v]) => ({[k]: v}) ));
const res1 = Object.fromEntries(arr)
const res2 = arr.reduce((res, [key, value]) => Object.defineProperty(res, key, {'value': value, 'enumerable': true}), {})
const res3 = {}
arr.forEach(([key, value]) => res3[key] = value)
А как превратить массив пар ключ-значение в ассоциативный на Вашем языке?
bootcamp_dropout,
23 Декабря 2018
-
+2
- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
#include <stdio.h>
typedef int return;
typedef char *break;
typedef return continue(return argc, break *argv);
continue main
{
break s = "Именно поэтому я за \"Си\"";
puts(s);
}
В моём любимом tcc работает
Morgoth,
22 Декабря 2018
-
−1
- 1
У меня из-за этого бессоница:
Стою я как-то на светофоре, жду когда загорится зелёный, и тут подходит ко мне девушка с сумкой и просит проводить её до какой-то там улицы. Я чуть не обосрался: со мной редко кто разговаривает, тем более девушки. Но я набрался смелости и сказал что не знаю где это, а она сказала что покажет. Я нихуя не понял, зачем тогда её провожать. "Ну ладно", сказал я. Мы дождались зелёного, она немного постояла зачем-то, потупила, потом взяла сумку и мы пошли, перешли дорогу, прошли буквально несколько метров, как она говорит: "ну ладно, дальше я сама дойду, а там меня встретят". Я опять ничего не понял, но сказал: "ну ладно". Какое-то время мы ещё шли рядом, нам было по-пути, потом она куда-то свернула.
Джва месяца я онализировал это проишествие и пришёл к выводу: ей походу надо было помочь сумку понести?
yet_another_one_shit,
21 Декабря 2018
-
+1
- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
if($form_action=="register") {
if($coo_coo=="tootoo") {
if($myusername) {
if($mypassword) {
if($mypassword==$myrepeat) {
$uLength = strlen($myusername);
$pLength = strlen($mypassword);
if($uLength >= 3 && $uLength <= 30) {
$return_error = "";
} else {
$return_error = "Username must be between 3 and 30 characters.";
}
if($pLength >= 3 && $pLength <= 30) {
$return_error = "";
} else {
$return_error = "Password must be between 3 and 30 characters.";
}
if($return_error == "") {
if($db_found) {
$mypassword = md5($mypassword);
$SQL = "SELECT * FROM users WHERE username='$myusername'";
$result = mysql_query($SQL);
$num_rows = mysql_num_rows($result);
if($num_rows==1) {
$return_error = "Username already taken.";
} else {
if(!mysql_query("INSERT INTO users (id,date,ip,username,password) VALUES ('','$date','$ip','$myusername','$mypassword')")){
$return_error = "System error.";
} else {
$return_error = "Logged in.";
$_SESSION['user_session'] = $myusername;
header ("Location: index.php");
}
}
}
}
} else {
$return_error = "Passwords did not match";
}
} else {
$return_error = "No password was entered.";
}
} else {
$return_error = "No username was entered.";
}
} else {
$return_error = "Registrations are disabled.";
}
}
"Сам кусок регистрации"
Ошибка начинается с первой строки...
MouseZver,
21 Декабря 2018
-
+2
- 1
- 2
- 3
- 4
СообщениеСМС = Перечисления.СостоянияСообщенияSMS.Исходящее;
Для каждого СообщениеСМС Из СообщениеSMS.Услуги Цикл
СообщениеСМС.СостояниеСообщения = Перечисления.СостоянияСообщенияSMS.Исходящее;
КонецЦикла;
1С:Медицина. Поликлинка
gk-5ccd112a,
21 Декабря 2018
-
+2
- 1
- 2
- 3
- 4
- 5
ТекЧас = Строка(Час(Дата2));
ТекЧас = Прав("00" + ТекЧас, 2);
ТекМин = Строка(Минута(Дата2));
ТекМин = Прав("00" + ТекМин, 2);
ТекВремя = ТекЧас + ":" + ТекМин;
Это способ получить время в формате "чч:мм" из даты и времени (переменная Дата2).
Заменяется этим:
ТекВремя = Формат(Дата2, "ДФ=hh:mm");
VladC,
21 Декабря 2018
-
+1
- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
- 73
- 74
- 75
- 76
- 77
- 78
- 79
- 80
- 81
- 82
- 83
- 84
- 85
- 86
- 87
- 88
- 89
- 90
- 91
- 92
- 93
- 94
- 95
- 96
;;; the toplevel operators of each equation in the system
;;; type : array[term]
(defmacro match-acz-state-methods (state__) `(svref ,state__ 0))
;;; functional terms
;;; type : array[term]
(defmacro match-acz-state-lhs-f (state__) `(svref ,state__ 1))
;;; variables on the LHS
;;; type : array[term]
(defmacro match-acz-state-lhs-v (state__) `(svref ,state__ 2))
;;; contants on the RHS
;;; type : array[term]
(defmacro match-acz-state-rhs-c (state__) `(svref ,state__ 3))
;;; functional terms on RHS
;;; type : array[term]
(defmacro match-acz-state-rhs-f (state__) `(svref ,state__ 4))
;;; notes repeated functional terms of LHS
;;; type : array[bool]
(defmacro match-acz-state-lhs-f-r (state__) `(svref ,state__ 5))
;;; notes repeated variables of LHS
;;; type : array[bool]
(defmacro match-acz-state-lhs-v-r (state__) `(svref ,state__ 6))
;;; notes repeated constants of RHS
;;; type : array[bool]
(defmacro match-acz-state-rhs-c-r (state__) `(svref ,state__ 7))
;;; notes repreated funcational terms of RHS
;;; type : array[bool]
(defmacro match-acz-state-rhs-f-r (state__) `(svref ,state__ 8))
;;; variables and funs acocunted for by RHS-c-sol
;;; type : fixnum
(defmacro match-acz-state-lhs-mask (state__) `(svref ,state__ 9))
;;; funs accounted for by RHS-c-sol
;;; type : fixnum
(defmacro match-acz-state-lhs-f-mask (state__) `(svref ,state__ 10))
;;; bit vector of all repeated (> 0) terms on LHS
(defmacro match-acz-state-lhs-r-mask (state__) `(svref ,state__ 11))
;;; solution matrix for constants
;;; type : array[fixnum]
(defmacro match-acz-state-rhs-c-sol (state__) `(svref ,state__ 12 ))
;;; max value of elements of RHS-C-sol
;;; type : fixnum
(defmacro match-acz-state-rhs-c-max (state__) `(svref ,state__ 13))
;;; solutions matrix; functional terms
;;; type : array[fixnum]
(defmacro match-acz-state-rhs-f-sol (state__) `(svref ,state__ 14))
;;; max value of elements of RHS-f-sol
;;; type : fixnum
(defmacro match-acz-state-rhs-f-max (state__) `(svref ,state__ 15))
;;; type : fixnum 11111 ... 1111
(defmacro match-acz-state-rhs-full-bits (state__) `(svref ,state__ 16))
;;; array of compatibility bitvectors; constants
;;; type : array[fixnum]
(defmacro match-acz-state-rhs-c-compat (state__) `(svref ,state__ 17))
;;; array of compatibility bitvectors; funcs
;;; type : array[fixnum]
(defmacro match-acz-state-rhs-f-compat (state__) `(svref ,state__ 18))
;;; number of constants on LHS after simplification
;;; type : fixnum
(defmacro match-acz-state-lhs-c-count (state__) `(svref ,state__ 19))
;;; number of functions on LHS after simplification
;;; type : fixnum
(defmacro match-acz-state-lhs-f-count (state__) `(svref ,state__ 20))
;;; number of variables on LHS after simplification
;;; type : fixnum
(defmacro match-acz-state-lhs-v-count (state__) `(svref ,state__ 21))
;;; number of constants on RHS after simplification
;;; type : fixnum
(defmacro match-acz-state-rhs-c-count (state__) `(svref ,state__ 22))
;;; number of functions on RHS after simplification
;;; type : fixnum
(defmacro match-acz-state-rhs-f-count (state__) `(svref ,state__ 23))
;;; t iff all solutions have been reported.
(defmacro match-acz-state-no-more (state__) `(svref ,state__ 24))
https://github.com/CafeOBJ/cafeobj/blob/master/chaos/e-match/match-acz.lisp
ГОМОИКОНЫ копипаст лиспе
CafeOBJ is a most advanced formal specification language which inherits many advanced features (e.g. flexible mix-fix syntax, powerful and clear typing system with ordered sorts, parameteric modules and views for instantiating the parameters, and module expressions, etc.) from OBJ (or more exactly OBJ3) algebraic specification language.
CafeOBJ is a language for writing formal (i.e. mathematical) specifications of models for wide varieties of software and systems, and verifying properties of them. CafeOBJ implements equational logic by rewriting and can be used as a powerful interactive theorem proving system. Specifiers can write proof scores also in CafeOBJ and doing proofs by executing the proof scores.
CafeOBJ has state-of-art rigorous logical semantics based on institutions. The CafeOBJ cube shows the structure of the various logics underlying the combination of the various paradigms implemented by the language. Proof scores in CafeOBJ are also based on institution based rigorous semantics, and can be constructed using a complete set of proof rules
j123123,
20 Декабря 2018