C#
- 6 ответов
- 0 вопросов
4
Вклад в тег
SELECT
(IF(PriceFlag=0,Price*cursDol,IF(PriceFlag=1,Price*cursUE,Price))) AS PriceRub
FROM Index
ORDER BY PriceRub
(Это происходит раз в 10 минут)
SET GLOBAL @cursDol=50
SET GLOBAL @cursUE=70
--Запрос
SELECT
(IF(PriceFlag=0,Price*@cursDol,IF(PriceFlag=1,Price*@cursUE,Price))) AS PriceRub
FROM Index
ORDER BY PriceRub
public string FastReplace(string s){
int len = s.Length;
char* newChars = stackalloc char[len];
char* currentChar = newChars;
fixed (char* p = s) {
var input = p;
do {
if(*input!='\n'){
*currentChar++ = *input;
}
} while (*(++input) != '\0');
}
return new string(newChars, 0, (int) (currentChar - newChars));}