Different header style for a specific view
My current Rails project requires the home page to have a header that's
different from the rest of the page's views. The only difference is the
style applied to it (bigger logo, bigger search bar...). I have a solution
that works, but it feels a little "dirty" and I'd like to know if there's
a more elegant way of styling specific pages.
So far, I'm doing this on the application's layout:
body class="#{controller_name} #{action_name}"
So I can do this on mi css:
#headerWrapper {
font-size: 1.5em;
...
}
...
.catalog.index {
#headerWrapper {
font-size: 2em;
...
}
}
But whenever I make a change to the base style here, the index page's
layout may be affected and I'm forced to "undo" whatever change I've made
(i.e. if I change the font size, I have to adapt it accordingly on the
.catalog.index part).
Any thoughts on the most elegant way of handling this issue will be much
appreciated.
Thanks.
Bolen
Thursday, 3 October 2013
Wednesday, 2 October 2013
While loop doesn't work well in java
While loop doesn't work well in java
I'm a newbie in java from c# background. In c# when i want to make sure
the user cannot does null data in the Console Application i make a loop
like
static void Main(string[] args)
{
Console.WriteLine("Enter your name : ");
string name = Console.ReadLine();
while (name == "")
{
Console.WriteLine("Enter your name : ");
name = Console.ReadLine();
}
}
Now I want to implement the same in java. I am using
public static void main(String[] args) {
// TODO code application logic here
System.out.println("Enter your name : ");
String pname;
Scanner scan=new Scanner(System.in);
pname=scan.next();
while ("".equals(pname))
{
System.out.println("Enter your name : ");
pname=scan.next();
}
}
But when a null value is entered, the output doesn't show the Enter your
name again it only moves one line waiting for a value to be entered.
What am i doing wrong?
I'm a newbie in java from c# background. In c# when i want to make sure
the user cannot does null data in the Console Application i make a loop
like
static void Main(string[] args)
{
Console.WriteLine("Enter your name : ");
string name = Console.ReadLine();
while (name == "")
{
Console.WriteLine("Enter your name : ");
name = Console.ReadLine();
}
}
Now I want to implement the same in java. I am using
public static void main(String[] args) {
// TODO code application logic here
System.out.println("Enter your name : ");
String pname;
Scanner scan=new Scanner(System.in);
pname=scan.next();
while ("".equals(pname))
{
System.out.println("Enter your name : ");
pname=scan.next();
}
}
But when a null value is entered, the output doesn't show the Enter your
name again it only moves one line waiting for a value to be entered.
What am i doing wrong?
How i change the color of the text in a actionbarsherlock?
How i change the color of the text in a actionbarsherlock?
I want to know how to change the color of the title and subititle of the
tab in a actionbarscherlock. now the color's text is white i want to
change this. thank's to all.
I want to know how to change the color of the title and subititle of the
tab in a actionbarscherlock. now the color's text is white i want to
change this. thank's to all.
Tuesday, 1 October 2013
Echo all PHP commands on HTML (along with the output)
Echo all PHP commands on HTML (along with the output)
Is there a way to print/echo all the PHP command that were executed on the
HTML along with whatever output (as usual) they were supposed to print?
Eg. echo 'a' prints 'echo 'a'' and 'a' both.
Is there a way to print/echo all the PHP command that were executed on the
HTML along with whatever output (as usual) they were supposed to print?
Eg. echo 'a' prints 'echo 'a'' and 'a' both.
Rails soft and hard delete actions
Rails soft and hard delete actions
If I have a model that supports soft deletes (for standard users) and
hard-deletes (for admins) what's the best best routing approach?
Does it make sense to handle both request under the same delete action in
the controller with logic in the method or does it make sense to have to
different routes?
Is a soft delete technically considered a delete action?
I know this is overcomplicating it but any advice would be appreciated.
If I have a model that supports soft deletes (for standard users) and
hard-deletes (for admins) what's the best best routing approach?
Does it make sense to handle both request under the same delete action in
the controller with logic in the method or does it make sense to have to
different routes?
Is a soft delete technically considered a delete action?
I know this is overcomplicating it but any advice would be appreciated.
If I install Centos 6.4 minimal, an I still download everything I need later?
If I install Centos 6.4 minimal, an I still download everything I need later?
I'm repurposing and old server, so I need 32bit Centos. 6.4 is current. If
I get the minimal, can I yum to get anything else I need? Am I limited if
I don't get the full DVD download?
I want to use it for, httpd, svn or git, python, php, maybe other
languages, nfs, smb. Very small group using it. Thanks.
I'm repurposing and old server, so I need 32bit Centos. 6.4 is current. If
I get the minimal, can I yum to get anything else I need? Am I limited if
I don't get the full DVD download?
I want to use it for, httpd, svn or git, python, php, maybe other
languages, nfs, smb. Very small group using it. Thanks.
Which files will be available to me after WUBI install
Which files will be available to me after WUBI install
I am planning to install Ubuntu via WUBI on my PC. I have two hard drives.
On the hard drive with my C: partition, I have two partitions - C and E.
My question in - if i install Ubuntu via WUBI, would the E: partition
files be accessible by me
I am planning to install Ubuntu via WUBI on my PC. I have two hard drives.
On the hard drive with my C: partition, I have two partitions - C and E.
My question in - if i install Ubuntu via WUBI, would the E: partition
files be accessible by me
Subscribe to:
Comments (Atom)