В случае использования разных форматов в выводе информации для пользователя и в самой БД, могут возникать ситуации, когда с формированный запрос не соответствует формату.
Тогда необходимо использовать ключевое слово для преобразования формата в необходимый вид:
alter session set nls_date_format = 'YYYY-MM-DD';
SELECT * FROM CHANNEL_DETAILS
WHERE CALLSIGN IN('Audio','DTV')
AND ((CHANNEL_STATE='ACT') OR (CHANNEL_STATE='RDY') OR (CHANNEL_STATE='NEW'))
AND CH_START<=to_date('2015-12-30')
AND CH_END>=to_date('2015-12-04');
среда, 9 декабря 2015 г.
пятница, 4 декабря 2015 г.
Unix: Emptying the buffers cache
Practice:
echo 1 > /proc/sys/vm/drop_caches
Additional info:
If you ever want to empty it you can use this chain of commands.
echo 1 > /proc/sys/vm/drop_caches
Additional info:
If you ever want to empty it you can use this chain of commands.
# free && sync && echo 3 > /proc/sys/vm/drop_caches && free
total used free shared buffers cached
Mem: 1018916 980832 38084 0 46924 355764
-/+ buffers/cache: 578144 440772
Swap: 2064376 128 2064248
total used free shared buffers cached
Mem: 1018916 685008 333908 0 224 108252
-/+ buffers/cache: 576532 442384
Swap: 2064376 128 2064248
You can signal the Linux Kernel to drop various aspects of cached items by changing the numeric argument to the above command.- To free pagecache:
# echo 1 > /proc/sys/vm/drop_caches - To free dentries and inodes:
# echo 2 > /proc/sys/vm/drop_caches - To free pagecache, dentries and inodes:
# echo 3 > /proc/sys/vm/drop_caches
sudo then you'll need to change the syntax slightly to something like these:$ sudo sh -c 'echo 1 >/proc/sys/vm/drop_caches'
$ sudo sh -c 'echo 2 >/proc/sys/vm/drop_caches'
$ sudo sh -c 'echo 3 >/proc/sys/vm/drop_caches'
NOTE: There's a more esoteric version of the above command if you're into that:$ echo "echo 1 > /proc/sys/vm/drop_caches" | sudo sh
Why the change in syntax? The /bin/echo program is running as root, because of sudo,
but the shell that's redirecting echo's output to the root-only file is
still running as you. Your current shell does the redirection before sudo starts.Seeing what's in the buffers and cache
Take a look atlinux-ftools
if you'd like to analyze the contents of the buffers & cache.
Specifically if you'd like to see what files are currently being cached.fincore
With this tool you can see what files are being cached within a give directory.fincore [options] files...
--pages=false Do not print pages
--summarize When comparing multiple files, print a summary report
--only-cached Only print stats for files that are actually in cache.
For example, /var/lib/mysql/blogindex:root@xxxxxx:/var/lib/mysql/blogindex# fincore --pages=false --summarize --only-cached *
stats for CLUSTER_LOG_2010_05_21.MYI: file size=93840384 , total pages=22910 , cached pages=1 , cached size=4096, cached perc=0.004365
stats for CLUSTER_LOG_2010_05_22.MYI: file size=417792 , total pages=102 , cached pages=1 , cached size=4096, cached perc=0.980392
stats for CLUSTER_LOG_2010_05_23.MYI: file size=826368 , total pages=201 , cached pages=1 , cached size=4096, cached perc=0.497512
stats for CLUSTER_LOG_2010_05_24.MYI: file size=192512 , total pages=47 , cached pages=1 , cached size=4096, cached perc=2.127660
stats for CLUSTER_LOG_2010_06_03.MYI: file size=345088 , total pages=84 , cached pages=43 , cached size=176128, cached perc=51.190476
stats for CLUSTER_LOG_2010_06_04.MYD: file size=1478552 , total pages=360 , cached pages=97 , cached size=397312, cached perc=26.944444
stats for CLUSTER_LOG_2010_06_04.MYI: file size=205824 , total pages=50 , cached pages=29 , cached size=118784, cached perc=58.000000
stats for COMMENT_CONTENT_2010_06_03.MYI: file size=100051968 , total pages=24426 , cached pages=10253 , cached size=41996288, cached perc=41.975764
stats for COMMENT_CONTENT_2010_06_04.MYD: file size=716369644 , total pages=174894 , cached pages=79821 , cached size=326946816, cached perc=45.639645
stats for COMMENT_CONTENT_2010_06_04.MYI: file size=56832000 , total pages=13875 , cached pages=5365 , cached size=21975040, cached perc=38.666667
stats for FEED_CONTENT_2010_06_03.MYI: file size=1001518080 , total pages=244511 , cached pages=98975 , cached size=405401600, cached perc=40.478751
stats for FEED_CONTENT_2010_06_04.MYD: file size=9206385684 , total pages=2247652 , cached pages=1018661 , cached size=4172435456, cached perc=45.321117
stats for FEED_CONTENT_2010_06_04.MYI: file size=638005248 , total pages=155763 , cached pages=52912 , cached size=216727552, cached perc=33.969556
stats for FEED_CONTENT_2010_06_04.frm: file size=9840 , total pages=2 , cached pages=3 , cached size=12288, cached perc=150.000000
stats for PERMALINK_CONTENT_2010_06_03.MYI: file size=1035290624 , total pages=252756 , cached pages=108563 , cached size=444674048, cached perc=42.951700
stats for PERMALINK_CONTENT_2010_06_04.MYD: file size=55619712720 , total pages=13579031 , cached pages=6590322 , cached size=26993958912, cached perc=48.533080
stats for PERMALINK_CONTENT_2010_06_04.MYI: file size=659397632 , total pages=160985 , cached pages=54304 , cached size=222429184, cached perc=33.732335
stats for PERMALINK_CONTENT_2010_06_04.frm: file size=10156 , total pages=2 , cached pages=3 , cached size=12288, cached perc=150.000000
---
total cached size: 32847278080
With the above output you can see that there are several *.MYD, *.MYI, and *.frm files that are currently being cached.Swap
If you want to clear out your swap you can use the following commands.$ free
total used free shared buffers cached
Mem: 7987492 7298164 689328 0 30416 457936
-/+ buffers/cache: 6809812 1177680
Swap: 5963772 609452 5354320
Then use this command to disable swap:$ swapoff -a
You can confirm that it's now empty:$ free
total used free shared buffers cached
Mem: 7987492 7777912 209580 0 39332 489864
-/+ buffers/cache: 7248716 738776
Swap: 0 0 0
And to re-enable it:$ swapon -a
And now reconfirm with free:$ free
total used free shared buffers cached
Mem: 7987492 7785572 201920 0 41556 491508
-/+ buffers/cache: 7252508 734984
Swap: 5963772 0 5963772
http://unix.stackexchange.com/questions/87908/how-do-you-empty-the-buffers-and-cache-on-a-linux-system
среда, 11 ноября 2015 г.
Как изменить язык интерфейса в NetBeans 8.0 на английский?
Как изменить язык интерфейса в NetBeans 8.0 на английский?
Задача.
В NetBeans отображается русский интерфейс. Нужно переключить на английский.
Решение.
Открываем конфигурационный файл netbeans.conf для редактирования, который находится по адресу Х:\Program Files\NetBeans 8.0\etc для Windows или по адресу ./netbeans-8.0/etc/netbeans.conf для Linux.
Находим опцию netbeans_default_options и дописываем в конец до символа закрывающих кавычек:
-J-Duser.language=en -J-Duser.region=US
понедельник, 19 октября 2015 г.
Speed up Ubuntu in VirtualBox
Execute the following command to see if 3D acceleration is being used or not:
/usr/lib/nux/unity_support_test -pIt will probably say:
Unity 3D supported: noNow that’s bad news, because the graphical interface of Ubuntu makes your whole system slow and laggy. So first of all, make sure you have the VirtualBox Guest additions installed.
Once this is installed, we now install the vboxvideo driver:
sudo bash -c 'echo vboxvideo >> /etc/modules'Now, shutdown Ubuntu. Then, you open the settings of your virtual Ubuntu and you go to ‘Display‘. Now tick ‘Enable 3D Acceleration‘.
Start
your (formerly) slow Ubuntu and you should notice faster navigation,
opening of apps as well as an overall snappier experience!If you really want to speed things up even further, you can install the CompizConfig Settings Manager. To install and run it, open Terminal and execute this command:
sudo apt-get install compizconfig-settings-manager && ccsmGo to OpenGL and untick Framebuffer Object. Also, you might want to disable effects, such as fading windows, animations and window decoration.

Thomas
Thank you for your interest in my blog! On this miniblog, I write mostly short (technical) blog posts that might interest other people. Read more about me or feel free to contact me.четверг, 13 августа 2015 г.
Steps to Configure HermesJMS console to monitor Weblogic JMS resources
HermesJMS
is a open-source tool developed by Colin Crist. It is used to interact
with JMS providers making it easy to browse or search queues and topics,
copy messages and delete them. This tool has ability to work with many
JMS Providers like JBoss MQ, Active MQ, OpenJMS, Weblogic JMS, Tibco
JMS, WebSphere MQ, WebMethods etc...
This
post will demonstrate the detailed step-by-step "How to get HermesJMS
installed and configured for use with WebLogic JMS". There is
web-recording provided in HermesJMS Website to setup HermesJMS with
Weblogic. Please click here to go through the web-recording.
1. Download and save the HermesJMS installer jar in a commonly used location.
2.
Open a command prompt and navigate to your directory where the
installer jar is saved. Run "java -jar hermes-installer-1.13.jar" to
begin the installation.
3. In the Installation wizard
-- Click Next on Welcome Screen
-- Click Next on Information Screen
-- Accept the terms of License Agreement and click Next
-- Enter the appropriate Installation Path [for ex: C:\Program Files\HermesJMS]and click Next
-- Select the packs to be installed [Default is HermesJMS] and click Next
-- In Ready to Install, click Next
-- In Pack Installation progress, once Finished with installation click Next
-- In Setup Shortcuts screen, enter appropriate name for your Installation [Default is HermesJMS] and click Next
-- Click Done
4.
Please be sure to use the same JVM with HermesJMS as the WLS you want
to connect to. You can approach this by adding the PATH and JAVA_HOME
variable in <HERMES_HOME>/bin/hermes.bat or hermes.sh file at the
beginning of the file right after the REM comments.
For example: I am trying to connect to Weblogic 9.2 domain with JDK 1.5 so i set as below.
set PATH=C:\oracle\Java\jdk1.5.0_22\jre\bin
set JAVA_HOME=C:\oracle\Java\jdk1.5.0_22\jre
set JAVA_HOME=C:\oracle\Java\jdk1.5.0_22\jre
понедельник, 1 июня 2015 г.
Прейскурант
Ответ на вопрос 5$
Правильный ответ на вопрос 20$
То же, но в письменном виде 100$
Ответ на дурацкий вопрос 150$
Вежливый ответ на дурацкий вопрос 200$
Вежливый ответ на дурацкий вопрос с обдумыванием 250$
Правильный вежливый ответ на дурацкий вопрос с обдумыванием 500$
Вникание в проблему 10$/час
Вникание в проблему с указанием на недостатки 20$/час
Вникание в проблему с исправлением недостатков 50$/час
Сочувствие 35$
Искреннее сочувствие 70$
Вникание в проблему с искренним сочувствием – услуга не предоставляется в связи с отсутствием технической возможности*
Совет 15$
Правильный совет 30$
Выполнимый совет 60$
Правильный выполнимый совет 120$
Задумчивый взгляд – Бесплатно (по понедельникам рыночная стоимость 1 бутылки пива)
Молчание 1$/минута
Вежливое молчание 2$/минута
Виноватое молчание 5$/минута
Молчание с улыбкой 10$/минута
Молчание с задумчивым взглядом на дурацкий вопрос с обдумыванием 15$/минута
* это не ко мне, это к психоаналитикам
воскресенье, 26 апреля 2015 г.
Подписаться на:
Сообщения (Atom)
SEO: Эксперимент: как Яндекс и Google учитывают ключевые слова в URL
Эксперимент: как Яндекс и Google учитывают ключевые слова в URL Эксперимент: как Яндекс и Google учитывают ключевые слова в URL Дата пу...
-
SQL Developer: Method 1 Add the comment /*csv*/ to your SQL query and run the query as a script (using F5 or the 2nd execution button o...
-
iMacros: команды, скрипты, примеры оригинал тут Здравствуйте, уважаемые читатели блога LifeExample , хочу поз...
-
JMeter provides various options to handle email related scenarios in load testing activities. We already saw how we can send an email usin...