Can you change the HTML class of a navigation link with ruby

Is it possible to change the class="active" selector on an HTML element using embedded Ruby? This would be for the nav menu for the application. I was unable to find any question related to this. If this has already been answered please point me

JSF redirects to another page

I have three XHTML pages; index.xhtml page_1.xhtml page_2.xhtml In the index.xhtml page, I have a commandButton which sends the user to page_1.xhtml. All this is done in the navigation rule in faces-config.xml. How would I redirect the user to page_2

Skip the page in the wp7 navigation stack

Let's say I have a code protected override void OnNavigatedTo(NavigationEventArgs e) { var userInfo = SettingsManager.Read<User>(SettingsManager.UserInfoSetting); if (e.NavigationMode == NavigationMode.Back && userInfo == null) { _mainViewMo

How do I know if a UIView is in front (visible)?

I need to detect which view is in front (currently visible). How can I do this? Here is a what I would like to do: if ( ! <<methodToTellIfViewAIsInFront>>) { [viewA prepareToDisplay]; [window bringSubviewToFront: viewA]; } UIView's don't neces

Dockerfile fails to build

Till few days back the Dockerfile was working fine and when i tried to build it again today it is giving following error in the terminal. I tried with multiple docker base images but still giving the same error. Can any one help me with this? I dont

Insert the dynamic stored procedure into the table

I am writing a stored procedure (SQL Server) which receives string argument which represents a name of other stored procedure. This string also contains all the stored parameter so in order to run it I just need to write EXEC @vSpCommand. Now comes m

Merge merge function in Python

I am having trouble with some code in Python: def sort(number_list): if len(number_list <= 1): return number_list front_list = [] back_list = [] counter = 0 half = len(number_list)//2 for x in number_list: if counter < half: front_list.append(x) cou

How can I analyze JSON in an html table using PHP?

I have to get a table in my website. And have to get the data for this table from "" I've tried a lot of thing but nothing works.... <!DOCTYPE html> <html> &

Merge multiple nodes of multiple XML files using JAVA

I have some xml files in an arrayList, for example A.xml B.xml and I want to merge some of the nodes while the rest to remain as are using java. I'm new at using so I don't know how to do. A xml: <?xml version="1.0" encoding="UTF-8"

ZendX_JQuery or Zend_Dojo?

In Zend_Framework there is ZendX_JQuery and Zend_Dojo. I don't know which one is better and which one is easier to use if I have not much knowledge of JQuery or Dojo? I can spend time learning JQuery or Dojo, but I don't know which one is better choi

How do I perform an ABC analysis in R?

I'm looking to use R to run an ABC analysis also known as Pareto analysis. The ABC analysis is a business term used to define an categorization technique often used in materials management. There are no fixed threshold for each class, different propo

SQL Command c # does not get good results

I'm running the following query cmd = new SqlCommand("SELECT * FROM addresses WHERE identifier NOT IN(@notIn)", _connector.getMsConnection()); When I view the value notIn and copy this query I get an empty result on my database (which I'm expect

Multi-threaded benchmark in Java

I am doing a science fair project in which I am testing how much additional processing cores increase computing speed. This is the multi-core benchmark I have programmed so far, but there are problems. The "thread#.join();" lines all throw error

Java Networking - Client and server

I'm quite new to Java and have just started Networking so I apologize in advance for any stupid questions. I have a basic game in which a player (or bot) can move around a map until it finds items and exits, but using networking I'd like to be able f

Java int problem being initialized

I have been working on a project and i saw some references on web and they initialized : int val= 0x000; output 0 int val1= 0x001; output 1 How exactly java is converting this? ThanksIt's an hexadecimal (base 16 instead of base 10). Hexadecimals star

WPF ListView with Text Box in Column Header, Tab Problem

I got a ListView in WPF with a GridView as view. I wanted to add textboxes to the column headings as filter mechanism. But when I set the cursor to the first column heading it does not tab to the next column heading textbox. Instead it goes to the ne

subtract the table from the table in Lua

I am trying to subtract table from table in Lua, so the return table will be the subtraction of t1 from t2. This seems to be working but is there a more efficient way of doing so ? function array_sub(t1, t2) -- Substract Arrays from Array -- Usage: n

Bootstrap CSS space between buttons in navbar

How can I make space between buttons in navbar? I usually do that with  but it doesn't work now. Here's an JSfiddle of how it looks: may try margin-left here is the code .btn{ margin-left:10px; } here is the example:: FI

Generate a range of dates using SQL

I have a SQL query that takes a date parameter (if I were to throw it into a function) and I need to run it on every day of the last year. How to generate a list of the last 365 days, so I can use straight-up SQL to do this? Obviously generating a li

How to use CakePHP's new Blowfish / Bcrypt for passwords

Let's assume I am a total newbie to CakePHP. Let's further assume I have written my User authentication exactly as it was written in this tutorial (Except for the mistake in it that made me waste more than an hour trying to figure out). The Migration