Search Results

Search found 369 results on 15 pages for 'nadav bg'.

Page 3/15 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Is there a way to check if a div has the same class as an ancestor in jQuery?

    - by T.R.
    I'm looking to dynamically highlight a tab, if it represents the current page. I have: <style> #tabs li{bg-color: white;} body.Page1 #tabs .Page1, body.Page2 #tabs .Page2, body.Page3 #tabs .Page3{bg-color: orange;} </style> <body class="Page1 ADifferentClass"> <ul id="tabs"> <li class="Page1 SomeClass"> <li class="Page2 SomeOtherClass"> <li class="Page3 AnotherClass"> </ul> </body> As you can see, there needs to be CSS for each tab, so adding another page involves modifying both the HTML and the CSS. Is there a simple (DRY) way to check if two divs have the same class already built into jQuery? I ultimately went with this: <script> $(document).ready(function(){ var classRE = /Page\d+/i; var pageType = $('body').attr('className').match(classRE); $('li.'+pageType).addClass('Highlight'); }); </script> <style> #tabs li{bg-color: white;} #tabs li.Highlight{bg-color: orange;} </style>

    Read the article

  • Read all sub directories within a certain folder to display a random image.

    - by Andy
    I have this code i have been using....but i need a conditional where it will read all the sub directories of /bg to select an image as opposed to a specific folder if they were on a subpage. Heres my code so far which works perfectly for all subpages to display specific images: //This would tell us its on the homepage if it helps: $this->level() == 0 //This is the code so far $path = '/home/sites/mydomain.co.uk/public_html/public/images/bg/'.$this->slug; $homepagefile = URL_PUBLIC.'public/images/bg/'.$this->slug.'/main.jpg'; $bgimagearray = array(); $iterator = new DirectoryIterator($path); foreach ($iterator as $fileinfo) { if ($fileinfo->isFile() && !preg_match('\.jpg$/', $fileinfo->getFilename())) { $bgimagearray[] = "'" . $fileinfo->getFilename() . "'"; } } $bgimage = array_rand($bgimagearray); ?> <div id="bg"> <div> <table cellspacing="0" cellpadding="0"> <tr> <td><img src="<?php echo $file.trim($bgimagearray[$bgimage], "'"); ?>" alt=""/></td> </tr> </table> </div> </div> Any help would be appreciated, im sure its not rocket science but ive tried a few ways and cant get my head around it. Thanks in advance.

    Read the article

  • How to make a Shell Script create a copy and terminate itself?

    - by ricedragon
    So far I used trap " call function" 2 fucntion { ./test.sh exit } but it never reaches the exit line and a whole bunch of process piles up any one got any idea? I tried & (bg) but i need to be able to keep doing it , the bg only allows me to do it once The point of it is when i type ctrl C it should terminate the original test.sh but it should also call itself before terminating hence create a new process.

    Read the article

  • Container fix width. Center div dynamic width. want left right divs to fill out remaining width equally

    - by james
    Have Three columns..Combine width of all three is fixed.. 2nd ( center ) column will have dynamic content.. I need left and right column to fill out remaining space ( container width - center column dynamic width )equally. Example: http://jsfiddle.net/htKje/ <div class="container"> <div class="bg"></div> <div>Lorem Ipsum</div> <div class="bg"></div> </div> CSS : .container { width:500px; } .bg {backgrould:#CCC; }

    Read the article

  • SASS color array

    - by Eric Holmes
    I am trying to write a loop that will cycle through colors and condense the amount of code in my scss file. Here is a simple example of what I have: $color1: blue; $color2: red; $color3: white; $color4: black; .color1-bg { background-color: $color1; } .color2-bg { background-color: $color2; } .color1-border { border-color: $color1; } .color2-border { border-color: $color2; } And so on. I am looking for a way to make the equivalent of a foreach loop, and cycle through an 'array' of colours by index. Something like this: @each $color in $color1, $color2, $color3, $color4 { .{$color}-bg { background-color: $color; .{$color}-border { border-color: $color; } I know the syntax is wrong, but that is my thinking process. Thanks for the help!

    Read the article

  • Django template CSS/IMG is "off" in the URL

    - by erimar77
    I have /path/to/my/theme/static/css/frontend.css which is called by base.html <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/frontend.css" media="all" /> In which I've got a background for the header: #header-wrapper min-width: 960px; height: 150px; background: transparent url(img/header-bg.png) repeat-x center bottom; } The file is /path/to/my/theme/static/img I've run manage.py collectstatic to gather the files and almost everything looks correct except the link generated looks like: http://example.com/static/css/img/header-bg.png In which the image does not show, because the correct URL is: http://example.com/static/img/header-bg.png Where am I going wrong??

    Read the article

  • removing image tag from memory

    - by Chapsterj
    I have seen some code to check if a background image on a div is loaded. What they are doing is adding a img tag to memory but storing it in a variable and using that to see if the image is loaded with the load event. My question is does the $img tag stay in memory and how would I be able to remove that tag when the load event has been called. var $div = $('div'), bg = $div.css('background-image'); if (bg) { var src = bg.replace(/(^url\()|(\)$|[\"\'])/g, ''), $img = $('<img>').attr('src', src).on('load', function() { // do something, maybe: $div.fadeIn(); }); } }); I got this code above from this post

    Read the article

  • Is it possible to debug GWT client code on a REMOTE server using IntelliJ 9 Community Edition?

    - by Nadav
    I'm trying to move our Google Web Toolkit (GWT) development from Eclipse to IntelliJ 9 Community edition. So far I've been able to run and debug client/server code successfully via the GWT Maven plugin and its embedded Jetty container. However, I'm having trouble debugging client code when it is already running on a remote machine (and hence there's no need for the embedded Jetty container). Has anyone been successful at achieving this? Any help would be appreciated!

    Read the article

  • Deleteing an image in run time

    - by Nadav Stern
    hey, i am trying to delete an image with the method: (the file path is correct by 100%) if(File.Exists(filePath)) File.Delete(filePath); and i am getting the following exception : An unhandled exception of type 'System.IO.IOException' occurred in mscorlib.dll Additional information: The process cannot access the file 'C:\visual_programming\yad2\yad2\bin\Debug\images\1.jpg' because it is being used by another process. thanks in advance for your help

    Read the article

  • jumping lines in a file using c

    - by Nadav Stern
    hello i am trying to sort a textual file using c programming language, in order to sort the file i am using a unique key, i need to be able to jump from line to line in order to sort the file , the problem is that i do not know if there is a command in c which let me jump from the first line to lets say the 20 line for example the only solution which i know for it is to use each time fscanf with a loop but this solution is not very effective thanks in advance for your time.

    Read the article

  • What would you use for deployment scripts in Java?

    - by Nadav
    Hi, I'm working on a Java web project that uses Maven to build its artifacts. At the end of the Maven build we have a few jar and war files that we need to deploy onto our development/testing environment. Right now we're using a pretty hefty Ant script that performs several tasks (on both Windows/Linux machines) Starts/Stops services Copies/deletes files Builds some stuff and then executes it Etc Ant does the job well - but the script is quickly getting very large, and to be honest, it feels inadequate for the task at hand. Are there other alternatives? I've heard of gant, but I'm not sure that's the right way to go. Thanks for helping!

    Read the article

  • Scale DIV with tiles

    - by user15350
    I am trying to create a repeating background. I have a main DIV with a grid of small 16x16 DIVs. I am trying to scale the main DIV in CSS; when the small DIVs simply have a red background color everything works great, but when there is a background image in the small DIVs then borders become visible between the tiles. This image explains the problem: http://cl.ly/FpNW/o Check the HTML in these examples: With BG-COLOR: http://jsfiddle.net/pTLXw/ With BG-IMG: http://jsfiddle.net/vkpuY/ Does anyone know what is causing this problem and how to fix it? If it is not possible to fix while using DIV, is there another way to do this? Thanks you so much!

    Read the article

  • Struts 2- problem with s:action tag

    - by Raghave
    Here is a small test application that does following things ask user to enter his name and submit - (index.jsp) as a result of index.jsp is the welcome.jsp page that asks user to select his/her blood group index.jsp <%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%> <%@ taglib prefix="s" uri="/struts-tags" %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> </head> <body> <form action="MyName"> <s:textfield name="UserName" label="Enter Your Name"/> <s:submit/> </form><br> </body> </html> struts.xml <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.1//EN" "http://struts.apache.org/dtds/struts-2.1.dtd"> <struts> <package name="module1" namespace="" extends="struts-default"> <action name="MyName" class="module1.User"> <result>/Welcome.jsp</result> </action> <action name="Blood_Group" class="module1.SelectBloodGroup" method="bloodGroupList"/> </package> </struts> SelectBloodGroup.java package module1; import java.util.ArrayList; import com.opensymphony.xwork2.ActionSupport; public class SelectBloodGroup extends ActionSupport{ private ArrayList<BloodGroup> bglist; public String bloodGroupList(){ bglist = new ArrayList<BloodGroup>(); bglist.add(new BloodGroup("1","A+")); bglist.add(new BloodGroup("2","B+")); bglist.add(new BloodGroup("3","AB+")); bglist.add(new BloodGroup("4","O+")); bglist.add(new BloodGroup("5","A-")); bglist.add(new BloodGroup("6","B-")); bglist.add(new BloodGroup("7","AB-")); bglist.add(new BloodGroup("8","O-")); return "SUCCESS"; } public ArrayList<BloodGroup> getBglist(){ return bglist; } } class BloodGroup{ private String id; private String bg; BloodGroup(String id,String bg){ this.id=id; this.bg=bg; } } welcome.jsp <%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%> <%@ taglib prefix="s" uri="/struts-tags" %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> </head> <body> <s:action name="Blood_Group" executeResult="false"/> //***************here is the problem*************** <s:select list="bglist" listKey="id" listValue="bg"/> //*********************************************** </body> </html> Struts is unable to identify bglist as a collection or Array or List or iterator. WHAT SHOULD I ASSIGN TO list ATTRIBUTE IN THE s:select TAG IN THE FILE welcome.jsp What is wrong with the code please tell me in detail. If you could send me the correted version. WHY IS THE s:action Tag not working ? This is the error i am getting Apr 13, 2010 1:49:19 PM org.apache.catalina.core.ApplicationDispatcher invoke SEVERE: Servlet.service() for servlet jsp threw exception tag 'select', field 'list': The requested list key 'bglist' could not be resolved as a collection/array/map/enumeration/iterator type. Example: people or people.{name} - [unknown location]

    Read the article

  • Hidden UIView Orientation Change / Layout problems

    - by gargantaun
    The Problem: I have two View Controllers loaded into a root View Controller. Both sub view layouts respond to orientation changes. I switch between the two views using [UIView transformationFromView:...]. Both sub views work fine on their own, but if... Views are swapped Orientation Changes Views are swapped again the View that was previously hidden has serious layout problems. The more I repeat these steps the worse the problem gets. Implementation Details I have three viewsControllers. MyAppViewController A_ViewController B_ViewController A & B ViewControllers have a background image each, and a UIWebView and an AQGridView respectively. To give you an example of how i'm setting it all up, here's the loadView method for A_ViewController... - (void)loadView { [super loadView]; // background image // Should fill the screen and resize on orientation changes UIImageView *bg = [[UIImageView alloc] initWithFrame:self.view.bounds]; bg.contentMode = UIViewContentModeCenter; bg.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth; bg.image = [UIImage imageNamed:@"fuzzyhalo.png"]; [self.view addSubview:bg]; // frame for webView // Should have a margin of 34 on all sides and resize on orientation changes CGRect webFrame = self.view.bounds; webFrame.origin.x = 34; webFrame.origin.y = 34; webFrame.size.width = webFrame.size.width - 68; webFrame.size.height = webFrame.size.height - 68; projectView = [[UIWebView alloc] initWithFrame:webFrame]; projectView.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth; [self.view addSubview:projectView]; } For the sake of brevity, the AQGridView in B_ViewController is set up pretty much the same way. Now both these views work fine on their own. However, I use both of them in the AppViewController like this... - (void)loadView { [super loadView]; self.view.autoresizesSubviews = YES; [self setWantsFullScreenLayout:YES]; webView = [[WebProjectViewController alloc] init]; [self.view addSubview:webView.view]; mainMenu = [[GridViewController alloc] init]; [self.view addSubview:mainMenu.view]; activeView = mainMenu; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(switchViews:) name:SWAPVIEWS object:nil]; } and I switch betweem the two views using my own switchView method like this - (void) switchViews:(NSNotification*)aNotification; { NSString *type = [aNotification object]; if ([type isEqualToString:MAINMENU]){ [UIView transitionFromView:activeView.view toView:mainMenu.view duration:0.75 options:UIViewAnimationOptionTransitionFlipFromRight completion:nil]; activeView = mainMenu; } if ([type isEqualToString:WEBVIEW]) { [UIView transitionFromView:activeView.view toView:webView.view duration:0.75 options:UIViewAnimationOptionTransitionFlipFromLeft completion:nil]; activeView = webView; } // These don't seem to do anything //[mainMenu.view setNeedsLayout]; //[webView.view setNeedsLayout]; } I'm fumbling my way through this, and I suspect a lot of what i've done is implemented incorrectly so please feel free to point out anything that should be done differently, I need the input. But my primary concern is to understand what's causing the layout problems. Here's two images which illustrate the nature of the layout issues... UPDATE: I just noticed that when the orientation is landscape, the transition flips vertically, when I would expect it to be horizontal. I don't know wether that's a clue as to what might be going wrong. Switch to the other view... change orientation.... switch back....

    Read the article

  • How to deal with job that stop and cannot continue unless made foreground?

    - by Vi
    Recent example: mountlo (using UML): vi@vi-notebook:~/b$ mountlo -m 16 -d /dev/uba1 /home/vi/mnt/usb -t vfat -o iocharset=utf8,allow_other& [1] 32561 vi@vi-notebook:~/b$ Checking that ptrace can change system call numbers...OK Checking syscall emulation patch for ptrace...OK Checking advanced syscall emulation patch for ptrace...OK Checking PROT_EXEC mmap in /tmp...OK Checking for the skas3 patch in the host: - /proc/mm...not found - PTRACE_FAULTINFO...not found - PTRACE_LDT...not found UML running in SKAS0 mode [1]+ Stopped mountlo -m 16 -d /dev/uba1 /home/vi/mnt/usb -t vfat -o iocharset=utf8,allow_other vi@vi-notebook:~/b$ bg [1]+ mountlo -m 16 -d /dev/uba1 /home/vi/mnt/usb -t vfat -o iocharset=utf8,allow_other & [1]+ Stopped mountlo -m 16 -d /dev/uba1 /home/vi/mnt/usb -t vfat -o iocharset=utf8,allow_other vi@vi-notebook:~/b$ bg [1]+ mountlo -m 16 -d /dev/uba1 /home/vi/mnt/usb -t vfat -o iocharset=utf8,allow_other & [1]+ Stopped mountlo -m 16 -d /dev/uba1 /home/vi/mnt/usb -t vfat -o iocharset=utf8,allow_other vi@vi-notebook:~/b$ bg [1]+ mountlo -m 16 -d /dev/uba1 /home/vi/mnt/usb -t vfat -o iocharset=utf8,allow_other & [1]+ Stopped mountlo -m 16 -d /dev/uba1 /home/vi/mnt/usb -t vfat -o iocharset=utf8,allow_other vi@vi-notebook:~/b$ fg mountlo -m 16 -d /dev/uba1 /home/vi/mnt/usb -t vfat -o iocharset=utf8,allow_other Linux version 2.6.15 (miko@dorka) (gcc version 3.3.5 (Debian 1:3.3.5-13)) #1 Mon Feb 27 13:27:52 CET 2006 (normal output) ... vi@vi-notebook:~/b$ socat - exec:'mountlo -m 16 -d /dev/uba1 /home/vi/mnt/usb -t vfat -o iocharset=utf8\,allow_other',pty,ctty fusermount: waitpid: No child processes vi@vi-notebook:~/b$ Also happens with Gimp (when it does run it's plug-ins). Parts of Gimp started by `gimp q.jpg&' freeze and cannot continue unless "killall -CONT" or made foreground. Is it a bug? How to reliably start things in a background?

    Read the article

  • CSS width fills out in IE8 Compatibility mode, works as it should in normal mode

    - by Colin
    I am trying to create a border around an image on the page, and the border works fine in IE8 Normal mode, but fills to 100% of the outer div in IE8 compatibility mode, my css is the following: .page-layout .page-header .page-image { float:left; vertical-align:top; width:170px; } .page-layout .page-header .page-image div, .page-layout .page-header .page-image img { float:left; } .page-image-imgtop { background-image:url('/Style Library/images/pagecontent-image-top-bg.png'); background-repeat:repeat-x; height:6px; float:left; clear:both; width:100%; } .page-image-imgleft { background-image:url('/Style Library/images/pagecontent-image-bg-left.png'); background-repeat:repeat-y; float:left; text-align:right; clear:both; } .page-image-imgright { margin-left:7px; padding-right:8px; background-image:url('/Style Library/images/pagecontent-image-bg-right.png'); background-repeat:repeat-y; background-position:top right; float:left; clear:both; } .page-image-imgbottom { background-image:url('/Style Library/images/pagecontent-image-bottom-bg.png'); background-repeat:repeat-x; height:6px; float:left; clear:both; width:100%; } And the following HTML: <div class="page-image"> <div class="page-image-imgleft"> <div class="page-image-imgtop"> <img src="/Style Library/images/pagecontent-image-top-left.png" style="float:left;" /> <img src="/Style Library/images/pagecontent-image-top-right.png" style="float:right" /> </div> <div class="page-image-imgright"> <img src="MAINIMAGE.jpg" style="border-width:0px;text-align:top;" /> </div> <div class="page-image-imgbottom"> <img src="/Style Library/images/pagecontent-image-bottom-left.png" style="float:left;" /> <img src="/Style Library/images/pagecontent-image-bottom-right.png" style="float:right" /> </div> </div> </div>

    Read the article

  • Creating a variable list Pashua, OS X & Bash.

    - by S1syphus
    First of all, for those that don't know pashua is a tool for creating native Aqua dialog windows. An example of what a window config looks like is # pashua_run() # Define what the dialog should be like # Take a look at Pashua's Readme file for more info on the syntax conf=" # Set transparency: 0 is transparent, 1 is opaque *.transparency=0.95 # Set window title *.title = Introducing Pashua # Introductory text tb.type = text tb.default = "HELLO WORLD" tb.height = 276 tb.width = 310 tb.x = 340 tb.y = 44 if [ -e "$icon" ] then # Display Pashua's icon conf="$conf img.type = image img.x = 530 img.y = 255 img.path = $icon" fi if [ -e "$bgimg" ] then # Display background image conf="$conf bg.type = image bg.x = 30 bg.y = 2 bg.path = $bgimg" fi pashua_run "$conf" echo " tb = $tb" The problem is, Pashua can't really get output from stdout, but it can get arguments. Following on from what Dennis Williamson posted here. What ideally it should do is generate an output file based on information from a text file, To executed in pashua_run ore add the pashua_run around the window argument: count=1 while read -r i do echo "AB${count}.type = openbrowser" echo "AB${count}.label = Choose a master playlist file" echo "AB${count}.width=310" echo "AB${count}.tooltip = Blabla filesystem browser" echo "some text with a line from the file: $i" (( count++ )) done < TEST.txt >> long.txt SO the output is AB1.type = openbrowser AB1.label = Choose a master playlist file AB1.width=310 AB1.tooltip = Blabla filesystem browser some text with a line from the file: foo AB2.type = openbrowser AB2.label = Choose a master playlist file AB2.width=310 AB2.tooltip = Blabla filesystem browser some text with a line from the file: bar AB3.type = openbrowser AB3.label = Choose a master playlist file AB3.width=310 AB3.tooltip = Blabla filesystem browser some text with a line from the file: dev AB4.type = openbrowser AB4.label = Choose a master playlist file AB4.width=310 AB4.tooltip = Blabla filesystem random So if there is a clever way to get the output of that and place it into pashua run would be cool, on the fly: I.E load te contents of TEST.txt and generate the place it into pashua_run, I've tried using cat and opening the file... but because it's in Pashua_run it doesn't work, is there a smart way to break out then back in? Or the second way which I was thinking, was create get the output then append it into the middle text file containing the pashua runtime, then execute it, maybe slightly hacky, but I would imagine it will do the job. Any ideas? ++ I know I probably could make my life a lot easier, by doing this in actionscript and cocoa, although at present don't have time for such a learning curve, although I do plan to get round to it.

    Read the article

  • Sort by values from hash table - Ruby

    - by Adnan
    Hello, I have the following hash of countries; COUNTRIES = { 'Albania' => 'AL', 'Austria' => 'AT', 'Belgium' => 'BE', 'Bulgaria' => 'BG', ..... } Now when I output the hash the values are not ordered alphabetically AL, AT, BE, BG ....but rather in a nonsense order (at least for me) How can I output the hash having the values ordered alphabetically?

    Read the article

  • In Ant, copy all files from a tree of folders into a single folder?

    - by Sam Washburn
    Is it possible to use Ant to copy all the files (not folders) from a hierarchy of folders into one destination folder? For instance, I have a tree like this: res |-images | |-fg.png | +-bg.png +-sounds +-music.mp3 And I would like a result like this: data |-fg.png |-bg.png +-music.mp3 The way things are named, filename conflicts are not an issue. Is this possible to do with Ant?

    Read the article

  • Export symbol as png

    - by Etiennebr
    I'd like to export plotting symbols form R as a png graphic. But I haven't found a perfect way yet. Using png("symbol.png",width=20, height=20, bg="transparent") par(mar=c(0,0,0,0)) plot.new() symbols(1, 1, circles=0.3, bg=2, inches=FALSE, lwd=2, bty="n") dev.off() creates a little border around the symbol (I'd like it to be transparent) and the symbol isn't filling the whole space. Is there a more specific way of doing this ?

    Read the article

  • BlackBerry-how to change Manager background image?

    - by Galaxy
    I am trying to create a tool bar with background color different from the screen background, i am using the following code getMainManager().add(mToolbarManager = new HorizontalFieldManager()); mToolbarManager.add(mBtn = new BitmapButtonField(mBmpNor, mBmpFoc, mBmpAct)); Background bg = BackgroundFactory.createSolidBackground(Color.BLACK); mToolbarManager.setBackground(bg); mToolbarManager.add(mBtn = new BitmapButtonField(mBmpNor, mBmpFoc, mBmpAct)); but it doesn't effect the background of toolbarmanager, while setting the background of mainmanger works fine

    Read the article

  • Stopping some sounds from dynamic classes, and exlude some others.

    - by Hwang
    The sound I wanted to stop or play are separates into background music and button sound effect. I know you could use SoundMixer.stopAll() to stop all sound, and some how exclude the bg music, IF everything is written in the same class. But what if the sounds are called from others dynamic classes? How could I target them and exclude the bg Music?

    Read the article

  • Changing image domain / path in css for production?

    - by Neil
    Currently, for things like background images, our css files have no domain specified. This works both in our development and production environments. background-image: url(/images/bg.png); For performance reasons (cookie-less domain), we'd like to switch this: background-image: url(http://staticimagedomain.com/images/bg.png); Ideally, we don't hard code those, so our development environments can still pull locally. Any thoughts on how to best achieve this?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >