The Love of Russian to Russia is interesting and hard to understand:
in Russian culture is very common to swear the Country, but it's allowed only for Russians. If some foreigner would try to say some abusive words about Russia - the reaction could vary from a silent lose of confidence to this person to very emotional discussion or even a fight. That could be started even by someone who heard by a case ad even was not invited in the conversation.
This way gives a very weird image about the relationships between the Russians and Russia.
Maybe some examples could give more light for this...
Just by a case I remembered one deep and interesting point:
expressions "you are not Russian, aren't you?" or "you are like not Russian" are abusive.
These expressions mean that a person behaves in some stupid or totally weird and unacceptable way.
The strength of the expression is tuned by emotions of a person who says it and normally that means - by loudness.
Friday, May 11, 2012
Wednesday, June 23, 2010
win shell scripts: emulate user input
start.cmd
test.cmd
--------------------------------------------------
also
additional links:
http://ss64.com/nt/
http://www.aumha.org/a/batches.php
echo y| call test.cmd
pause
test.cmd
SET /p input=Input any key!
@echo ::::::::::::::::::
@echo :::::%input%::::::
@echo ::::::::::::::::::
pause
--------------------------------------------------
also
If the program reads input from STDIN (most likely), not specifically from the keyboard, it can be done just fine.
Ezbear, suppose you answer "Yes" to the prompt. This would run the program and automatically answer the prompt "Yes":
echo Yes|prog.exe [parameters]
The strings "prog.exe" and "[parameters]" are just examples of the program name and its parameters.
If there are multiple prompts, you can do it like this (let's say the answers are "Yes" to the first prompt and "Blue" to the second):
@echo off
echo Yes> %temp%
echo Blue>> %temp%
prog.exe [parameters] <%temp%
However, beware: you won't be able to type in anything else for an eventual third prompt from the program. If the information on the source file (%temp%.\$) is not enough for feeding the program so it completes its process, it will stuck waiting for further input and you won't be able to type it (it will crash, basically). So, you gotta put on the source file all the input that the program will need.
-- Leonardo Pignataro - Secret_Doom --
secret_doom@hotmail.com
www.batch.hpg.com.br
additional links:
http://ss64.com/nt/
http://www.aumha.org/a/batches.php
Friday, March 26, 2010
Thursday, February 18, 2010
get values from form in controller by auto-mapping
Given:
we expect data send from form, that is fully or partly described in requestListSearchCommand POJO Bean.
We expect that data will be auto-wired by spring and request (POST/GET) parameters values will be set to the bean fields
wrong:
Solution:
Spring does auto-mapping request parameters on parameters beans while bean is getting from model.
we expect data send from form, that is fully or partly described in requestListSearchCommand POJO Bean.
We expect that data will be auto-wired by spring and request (POST/GET) parameters values will be set to the bean fields
wrong:
@ModelAttribute("requestListSearchCommand")
public RequestListSearchCommand addSearchParameters(
@RequestParam(value = "requestListSearchCommand",required=false)
RequestListSearchCommand requestListSearchCommand) {
if (requestListSearchCommand != null) { // always FALSE
requestListSearchCommand = new RequestListSearchCommand();
}
requestListSearchCommand.setSameValue(service.getFromService(randomThing));
Solution:
@ModelAttribute("requestListSearchCommand")
public RequestListSearchCommand addSearchParameters(
@ModelAttribute(value = "requestListSearchCommand")
RequestListSearchCommand requestListSearchCommand) {
if (requestListSearchCommand != null) { // always TRUE
requestListSearchCommand.setSameValue(service.getFromService(randomThing));
}
Spring does auto-mapping request parameters on parameters beans while bean is getting from model.
Tuesday, February 16, 2010
freemarker macro complex param issue
GIVEN:
<#macro lalala xxx yyy="BYBYBY" >
title=${title}, order = ${currentSort}
#macro>
NEED:
<@lalala "ssssssssss" ((requestListSearchParam.order)!"") />
RESULT:
Expected method. "ssssssssss" evaluated instead to freemarker.template.SimpleScalar on <.....> The problematic instruction: - ==> macro lalala [on line <.........................>
FIX:
<#-- COMMA (,) ADDED -->
<@lalala "ssssssssss", ((requestListSearchParam.order)!"") />
<#macro lalala xxx yyy="BYBYBY" >
title=${title}, order = ${currentSort}
#macro>
NEED:
<@lalala "ssssssssss" ((requestListSearchParam.order)!"") />
RESULT:
Expected method. "ssssssssss" evaluated instead to freemarker.template.SimpleScalar on <.....> The problematic instruction: - ==> macro lalala [on line <.........................>
FIX:
<#-- COMMA (,) ADDED -->
<@lalala "ssssssssss", ((requestListSearchParam.order)!"") />
Friday, February 5, 2010
testng fixtures in test class
* it runs before whole Test class started to process (fail!)
@BeforeTest
protected void setUp() throws Exception {
* it runs before every test method in Test class (ok)
@BeforeMethod
protected void setUp() throws Exception {
@BeforeTest
protected void setUp() throws Exception {
* it runs before every test method in Test class (ok)
@BeforeMethod
protected void setUp() throws Exception {
Subscribe to:
Posts (Atom)