Thursday, 3 October 2013

Select selectOneMenu from the two selectOneMenu by using another selectOneMenu

Select selectOneMenu from the two selectOneMenu by using another
selectOneMenu

I am beginner for primefaces. I want to select selectOneMenu from the two
selectOneMenu by using another selectOneMenu. I think javascript can be
used for this, but I have no clear idea how to do. Please give code
example for this. Thank you all.

Wednesday, 2 October 2013

get_file_contents('php:input') always returns null

get_file_contents('php:input') always returns null

I'm building a PHP RESTful API, following this tutorial. The following
function, which should return the data sent with the request when the
'put' method is used, returns null every time:
file_get_contents('php:input').
I've even downloaded and tested the full code example in the tutorial and
it still returns null.
I'm using cURL and the following command in order to test the 'put' method:
curl -i -X PUT -d '{"address":"Sunset Boulevard"}'
http://localhost/clients/ryan.
I've wasted days on this and still haven't gotten it to read the json
data. What am I doing wrong?

How can we listen for errors that do not trigger window.onerror?

How can we listen for errors that do not trigger window.onerror?

https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers.onerror
states:
Note that some/many error events do not trigger window.onerror, you have
to listen for them specifically.
Could you please provide some examples of errors that do not trigger
window.onerror? I know SyntaxError is one of them.
Could you please provide a small code example to show how we can listen
for such errors? Can we listen for SyntaxError too?

Changing SQL Agent Job Schedule time programmaticaly doesn't work

Changing SQL Agent Job Schedule time programmaticaly doesn't work

I have an SQL Agent Job, that is supposed to be fired everyday at provided
time. If I change the schedule time manualy from Management Studio, it
works fine, but i need to change the time using stored procedure as below:
update s set
s.active_start_time = @time
from msdb..sysjobs j
left join msdb..sysjobschedules js on j.job_id = js.job_id
left join msdb..sysschedules s on js.schedule_id = s.schedule_id
where j.name = 'MyJobName'
Where I can provide start time in a requested format, and gues what? After
running such procedure, when I check scheduled time in Management Studio,
it's updated correctly, BUT obviously Job is ignores that.
I even run on a strange guess, that this Job keeps somewhere the old
schedule time that was set manually, and run using that one - if I for
example manually set time to 10:45 AM, and then quickly change time using
procedure to 10:55 AM, even if schedule time inside Management Studio
looks to be updated, Job still will run at 10:45...
Any thoughts what can be wrong?

Tuesday, 1 October 2013

Is it possible to assign a variable in a while loop?

Is it possible to assign a variable in a while loop?

I'm looking for a way to use scanner in a for loop, without advancing twice.
String desc = "";
while (!scanner.next().equals("END")) {
desc = desc + scanner.next();
}
As you can see, when scanner.next() is called in the while loop's
condition and inside of the while loop itself. I want it to advance the
scanner only once. Is there any way to do that?

Action Listeners in Java

Action Listeners in Java

I have a class that uses Japplet. The form has 2 input fields and a
button. It also has a TextPanel to display the information entered by the
user. The problem that I am having is displaying that info entered on the
text area using an Action Listener. I dont know what i am missing.
public class CreatePanel extends JPanel
{
JTextField accountID = new JTextField();
JTextField amount = new JTextField();
button1 = new JButton("Create an Account");
add(textPanel);
}
} //end of actionPerformed method
} //end of ButtonListener class
} //end of CreatePanel class

Risks of using non-private IP addresses internally=?iso-8859-1?Q?=3F_=96_networkengineering.stackexchange.com?=

Risks of using non-private IP addresses internally? –
networkengineering.stackexchange.com

My company has received a large industrial machine with many networked
devices on it. Unfortunately the engineer in charge has used a public IP
address range on the machine. I'm in Europe. The chosen …