Search Results

Search found 949 results on 38 pages for 'shadow of soul'.

Page 16/38 | < Previous Page | 12 13 14 15 16 17 18 19 20 21 22 23  | Next Page >

  • How to get the height of an image and apply that height to a div? [migrated]

    - by Mick79
    I am building a mobile web app and I'm using jquerytools slider on it. i want te slider to show (in proper ratio) across all mobile devices so width of the images is 100% and height is auto in css. However as all the elements are floated and jquerytools slider requires the position be set to absolute, the containing div (#header) doesn't stretch to fit the content. I am trying to use jquery to get the height of the height of the img and apply that height to the header.... however I am having no luck. CSS: #header{ width:100%; position:relative; z-index: 20; /* box-shadow: 0 0 10px white; */ overflow: auto; } .scrollable { position:relative; overflow:hidden; width: 100%; height: 100%; /* box-shadow: 0 0 20px purple; */ /* height:198px; */ z-index: 20; overflow: auto; } .scrollable .items { /* this cannot be too large */ width:1000%; position:absolute; clear:both; /* box-shadow: 0 0 30px green; */ } .items div { float:left; width:10%; height:100%; } /* single scrollable item */ .scrollable img { /* float:left; */ width:100%; height: auto; /* height:198px; */ } /* active item */ .scrollable .active { border:2px solid #000; position:relative; cursor:default; } HTML <div id=header><!-- root element for scrollable --> <div class="scrollable" id="scrollable"> <!-- root element for the items --> <div class="items"> <div> <img src="img/img2.jpg" /> </div> <div> <img src="img/img1.jpg" /> </div> <div> <img src="img/img3.jpg" /> </div> <div> <img src="img/img4.jpg" /> </div> <div> <img src="img/img6.jpg" /> </div> </div><!-- items --> </div><!-- scrollable --> </div><!-- header -->

    Read the article

  • Multiple markers in Googe Maps API v3 that link to different pages when clicked

    - by Dave
    I have a map with multiple markers, which I populate via an array. Each marker is clickable and should take the user to a different url per marker. The problem is that all the markers, while displaying the correct title, all use the url of the last entry in the array. Here is my code: var myOptions = { zoom: 9, center: new google.maps.LatLng(40.81940575,-73.95647955), mapTypeId: google.maps.MapTypeId.TERRAIN } var map = new google.maps.Map(document.getElementById("bigmap"), myOptions); setMarkers(map, properties); var properties = [ ['106 Ft Washington Avenue',40.8388485,-73.9436015,'Mjg4'], ['213 Bennett Avenue',40.8574384,-73.9333426,'Mjkz'], ['50 Overlook Terrace',40.8543752,-73.9362542,'Mjky'], ['850 West 176 Street',40.8476012,-73.9417571,'OTM='], ['915 West End Avenue',40.8007478,-73.9692155,'Mjkx']]; function setMarkers(map, buildings) { var image = new google.maps.MarkerImage('map_marker.png', new google.maps.Size(19,32), new google.maps.Point(0,0), new google.maps.Point(10,32)); var shadow = new google.maps.MarkerImage('map_marker_shadow.png', new google.maps.Size(28,32), new google.maps.Point(0,0), new google.maps.Point(10,32)); var bounds = new google.maps.LatLngBounds; for (var i in buildings) { var myLatLng = new google.maps.LatLng(buildings[i][1], buildings[i][2]); bounds.extend(myLatLng); var marker = new google.maps.Marker({ position: myLatLng, map: map, shadow: shadow, icon: image, title: buildings[i][0] }); google.maps.event.addListener(marker, 'click', function() { window.location = ('detail?b=' + buildings[i][3]); }); } map.fitBounds(bounds); } Using this code, clicking any marker take the user to 'detail?b=Mjkx' What am I doing wrong?

    Read the article

  • How can I put multiple markers on Google maps with Javascript API v3?

    - by Doe
    Hi, I'd like to know how to put multiple markers for Google Maps using Javascript API v3. I tried the solution posted here: http://stackoverflow.com/questions/1621991/multiple-markers-in-googe-maps-api-v3-that-link-to-different-pages-when-clicked but it does not work for me for some reason. var directionDisplay; function initialize() { var myOptions = { zoom: 9, center: new google.maps.LatLng(40.81940575,-73.95647955), mapTypeId: google.maps.MapTypeId.TERRAIN } var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); setMarkers(map, properties); var properties = [ ['106 Ft Washington Avenue',40.8388485,-73.9436015,'Mjg4'], ]; function setMarkers(map, buildings) { var image = new google.maps.MarkerImage('map_marker.png', new google.maps.Size(19,32), new google.maps.Point(0,0), new google.maps.Point(10,32)); var shadow = new google.maps.MarkerImage('map_marker_shadow.png', new google.maps.Size(28,32), new google.maps.Point(0,0), new google.maps.Point(10,32)); var bounds = new google.maps.LatLngBounds; for (var i in buildings) { var myLatLng = new google.maps.LatLng(buildings[i][1], buildings[i][2]); bounds.extend(myLatLng); var marker = new google.maps.Marker({ position: myLatLng, map: map, shadow: shadow, icon: image, title: buildings[i][0] }); google.maps.event.addListener(marker, 'click', function() { window.location = ('detail?b=' + buildings[i][3]); }); } map.fitBounds(bounds); } } </script> Could anyone kindly explain why this doesn't work for me?

    Read the article

  • Google Map API v3 — set bounds and center

    - by Michael Bradley
    Hi, I've recently switched to Google Maps API V3. I'm working of a simple example which plots markers from an array, however I do not know how to center and zoom automatically with respect to the markers. I've searched the net high and low, including Google's own documentation, but have not found a clear answer. I know I could simply take an average of the co-ordinates, but how would I set the zoom accordingly? Could somebody please point me in the right direction? Perhaps you know of a good tutorial. Many thanks in advance, Michael function initialize() { var myOptions = { zoom: 10, center: new google.maps.LatLng(-33.9, 151.2), mapTypeId: google.maps.MapTypeId.ROADMAP } var map = new google.maps.Map(document.getElementById("map_canvas"),myOptions); setMarkers(map, beaches); } var beaches = [ ['Bondi Beach', -33.890542, 151.274856, 4], ['Coogee Beach', -33.423036, 151.259052, 5], ['Cronulla Beach', -34.028249, 121.157507, 3], ['Manly Beach', -33.80010128657071, 151.28747820854187, 2], ['Maroubra Beach', -33.450198, 151.259302, 1] ]; function setMarkers(map, locations) { var image = new google.maps.MarkerImage('images/beachflag.png', new google.maps.Size(20, 32), new google.maps.Point(0,0), new google.maps.Point(0, 32)); var shadow = new google.maps.MarkerImage('images/beachflag_shadow.png', new google.maps.Size(37, 32), new google.maps.Point(0,0), new google.maps.Point(0, 32)); var lat = map.getCenter().lat(); var lng = map.getCenter().lng(); var shape = { coord: [1, 1, 1, 20, 18, 20, 18 , 1], type: 'poly' }; for (var i = 0; i < locations.length; i++) { var beach = locations[i]; var myLatLng = new google.maps.LatLng(beach[1], beach[2]); var marker = new google.maps.Marker({ position: myLatLng, map: map, shadow: shadow, icon: image, shape: shape, title: beach[0], zIndex: beach[3] }); } }

    Read the article

  • CSS3 Gradients and border-radius leading to extraneous background in webkit

    - by iamfriendly
    Hello all, After my 1st question with relation to CSS3 gradients in which I was recreating an 'inner glow' I've now got to the point where I'm not so happy with the way in which webkit renders the effect. Basically, if you give an element a background colour and apply a border radius to it, webkit lets the background colour "bleed" out to fill the surrounding box (making it look a bit awful) To reproduce the undesirable effect, try something like the following section#featured footer p a { color: rgb(255,255,255); text-shadow: 1px 1px 1px rgba(0,0,0,0.6); text-decoration: none; padding: 5px 10px; border-radius: 15px; -moz-border-radius: 15px; -webkit-border-radius: 15px; background: rgb(98,99,100); -moz-box-shadow: inset 0 0 8px rgba(0,0,0, 0.25); -webkit-box-shadow: inset 0 0 8px rgba(0,0,0, 0.25); } You can see an example of this here: http://iamfriendly.clients.friendlygp.com/ Apparently this appears to be a Windows-only problem, so for those on a Mac, here's a screenshot: (Check the 'carry on reading' button) You'll notice that in Safari/Chrome (the latest available public downloads as well as the latest nightlies as far as I can tell), you get a rather ugly background colour bleed. However, in Firefox, you should be able to see what I'm after. If you're in Internet Explorer, woe betide you. Does anyone know of a technique which will allow me to produce the 'correct' effect? Is there a CSS Property which I've missed that tells webkit to only have the background within the border-radius'd part of the containing box. I could potentially use an image, but I'm really trying to avoid it. Naturally, as we're dealing with CSS3 and the landscape is continually changing, I might just have to 'lump' it and revert to an image. However, if anyone can suggest an alternative I would be very much appreciative!

    Read the article

  • Facebook Application Parse Error CSS

    - by madphp
    Hi, Im getting some parse erros when loading in my facebook app through the canvas. Its in an iframe. Can anyone tell me where I can start to look for documentation regarding this? Errors whilst loading page from application Parse errors: CSS Error (line 40 char 36): Error in parsing value for property.: 'font' Declaration dropped. CSS Error (line 183 char 18): Expected declaration. Skipped to next declaration. CSS Error (line 272 char 65): Unknown property.: '-webkit-border-radius' Declaration dropped. CSS Error (line 272 char 110): Unknown property.: 'border-radius' Declaration dropped. CSS Error (line 272 char 135): Unknown property.: '-webkit-box-shadow' Declaration dropped. CSS Error (line 272 char 181): Unknown property.: '-moz-box-shadow' Declaration dropped. CSS Error (line 272 char 221): Unknown property.: 'box-shadow' Declaration dropped. CSS Error (line 317 char 23): Unknown property.: '-webkit-border-radius' Declaration dropped. CSS Error (line 319 char 15): Unknown property.: 'border-radius' Declaration dropped. Thanks --Mark

    Read the article

  • div content margin pushing container

    - by jef2904
    Hi, Im running into an issue that's really baffleing me. I have a container that I want to apply a background to an postion it in the top right of the browser screen. The div inside has a top margin of 4em and this is pushing the container div here is the CSS #container { background: transparent url("../images/house-bg.png") top right no-repeat scroll; } #wrapper { background: #FFF; width: 960px; height: 600px; margin: 4em auto 0; border: 10px solid #C3CF21; -moz-border-radius: 20px; -webkit-border-radius: 20px; border-radius: 20px; -moz-box-shadow: 0 0 25px #444; -webkit-box-shadow: 0 0 25px #444; box-shadow: 0 0 25px #444; } and heres the HTML <div id="container"> <div id="wrapper"> <div id="header"> </div> <div id="main"> </div> </div> <div id="footer"> &copy; Copyright <?php echo date("Y");?> Company, Inc. </div> </div> I want the margin of the wrapper to be inside the container div instead of outside. I've tried multiple display properties and position properties to no avail. The only thing that fixes it is inserting an "&nbsp;" before the start of the #wrapper but theres got to be a CSS fix to this. Thanks in Advanced, Jorge

    Read the article

  • Jqplot - How to have vertical lines and make xaxis go up in plotted values?

    - by Beginner
    I have plotted a line graph using jqplot. What i would like is vertical lines and to start from 3 and go up in the plotted values along the bottom. so 3, 6, 9, 12 , 15, 29, 36 Also a dash marker along the left. This is what i have at the moment: $(document).ready(function(){ $.jqplot('chart2', [[[3, @(Model.LearnerWeek[0])], [6, @(Model.LearnerWeek[1])], [9, @(Model.LearnerWeek[2])], [12, @(Model.LearnerWeek[3])], [15, @(Model.LearnerWeek[4])], [29, @(Model.LearnerWeek[5])], [36, @(Model.LearnerWeek[6])]], [[3, @(Model.ManagerWeek[0])], [6, @(Model.ManagerWeek[1])], [9, @(Model.ManagerWeek[2])], [12, @(Model.ManagerWeek[3])], [15, @(Model.ManagerWeek[4])], [29, @(Model.ManagerWeek[5])], [36, @(Model.ManagerWeek[6])]]], { axes: { yaxis: { tickOptions: { show: false}, min: 0, max: 100, label: 'Participation Rate', labelRenderer: $.jqplot.CanvasAxisLabelRenderer }, xaxis: { min: 3, max: 36, label: 'Week', tickOptions: { formatString: '%d' } } }, seriesDefaults: { showMarker: false , rendererOptions: { diameter: undefined, // diameter of pie, auto computed by default. padding: 10, // padding between pie and neighboring legend or plot margin. fill: true, // render solid (filled) slices. shadowOffset: 2, // offset of the shadow from the chart. shadowDepth: 15, // Number of strokes to make when drawing shadow. Each stroke // offset by shadowOffset from the last. shadowAlpha: 1 // Opacity of the shadow } }, seriesColors: ['#3591cf', '#ef4058', '#73C774', '#C7754C', '#17BDB8'] }); }); I have played around with render options and xasis but cant seem to work it out

    Read the article

  • CALayer Border is appearing above subview (Z-order related, I think)

    - by kurisukun
    I have searched but could not find the reason for this behavior. I have a UIButton whose image I am setting. Here is how the button should appear. Note that this is just a photoshop of the intended button design: Essentially, it is a square custom UIButton with a white border and a little surrounding shadow. In the upper right corner, there is a "X" mark, that will be added programmatically as a subview. Here is the screenshot of the button within the actual app. At this point, I have only added a shadow and the X mark as a subview: How, when I try to add the white border, here is what it looks like: It seems that the white border is appearing above the X mark sublayer. I don't know why. Here is the code that I am using: // selectedPhotoButton is the UIButton with UIImage set earlier // At this point, I am adding in the shadow [selectedPhotoButton layer] setShadowColor:[[UIColor lightGrayColor] CGColor]]; [[selectedPhotoButton layer] setShadowOffset: CGSizeMake(1.0f, 1.0f)]; [[selectedPhotoButton layer] setShadowRadius:0.5f]; [[selectedPhotoButton layer] setShadowOpacity:1.0f]; // Now add the white border [[selectedPhotoButton layer] setBorderColor:[[UIColor whiteColor] CGColor]]; [[selectedPhotoButton layer] setBorderWidth:2.0]; // Now add the X mark subview UIImage *deleteImage = [UIImage imageNamed:@"nocheck_photo.png"]; UIImageView *deleteMark = [[UIImageView alloc] initWithFrame:CGRectMake(53, -5, 27, 27)]; deleteMark.contentMode = UIViewContentModeScaleAspectFit; [deleteMark setImage:deleteImage]; [selectedPhotoButton addSubview:deleteMark]; [deleteMark release]; I don't understand why the border is appearing above the deleteMark subview. Is there any way to get the intended effect? Thank you!

    Read the article

  • How can you use Windows Backup with a TrueCrypt encrypted backup destination?

    - by Burly
    Background There are numerous backup solutions out there for Windows and they come in many different forms. From a file copy and/or syncing tool like SyncBackSE to whole hard drive backup utilities based on Volume Shadow Copy like Acronis TrueImage or Norton Ghost to block level copy tools like dd. Each of these solutions offers different pros and cons versus the "Windows Backup and Restore Center" feature built-in to Windows Vista and Windows 7. I am not interested in discussing alternative backup solutions here however, as that has already been covered by numerous other questions. Contraints There are two "types" of backup supported by the "Windows Backup and Restore Center"(WBRC): - File backup (which Windows calls "Back Up Files") - Full System Backup (which Windows calls "Complete PC Backup) I am interested in a solution which supports either and/or both types of backup with WBRC. Questions How can you use a TrueCrypt encrypted mount point as the destination for the built-in "Windows Backup and Restore Center" feature in Windows Vista and 7? See-Also Volume Shadow Copy based backup that works with TrueCrypt References Backup and Restore Center Windows Vista - Backup and Restore Center Windows 7 - Backup and Restore Center

    Read the article

  • Scene Graph for Deferred Rendering Engine

    - by Roy T.
    As a learning exercise I've written a deferred rendering engine. Now I'd like to add a scene graph to this engine but I'm a bit puzzled how to do this. On a normal (forward rendering engine) I would just add all items (All implementing IDrawable and IUpdateAble) to my scene graph, than travel the scene-graph breadth first and call Draw() everywhere. However in a deferred rendering engine I have to separate draw calls. First I have to draw the geometry, then the shadow casters and then the lights (all to different render targets), before I combine them all. So in this case I can't just travel over the scene graph and just call draw. The way I see it I either have to travel over the entire scene graph 3 times, checking what kind of object it is that has to be drawn, or I have to create 3 separate scene graphs that are somehow connected to each other. Both of these seem poor solutions, I'd like to handle scene objects more transparent. One other solution I've thought of was traveling trough the scene graph as normal and adding items to 3 separate lists, separating geometry, shadow casters and lights, and then iterating these lists to draw the correct stuff, is this better, and is it wise to repopulate 3 lists every frame?

    Read the article

  • /var/log/secure user activity. also, httpd can not start without two users

    - by user52869
    hello, i found some strange informations in /var/log/secure file: Feb 10 02:02:04 server2364 usermod[30750]: unlock user `username1' password Feb 10 02:02:04 server2364 usermod[30811]: lock user `username2' password Feb 10 02:05:16 server2364 usermod[30992]: unlock user `username2' password Feb 10 02:05:18 server2364 usermod[31114]: unlock user `username1' password username1 and username2 are two usernames on system, that have no ability to login. for every night in 02:02h results like that are in /var/log/secure file. one more thing: files /etc/shadow, and /etc/shadow have timestamps 02:05h. what can be cause for it? next thing, if i remove those two accounts (username1 and username2), i can not start web server. can you help me with some ideas, am i hacked?

    Read the article

  • VSS error 12293 after system disk clone (Win2003)

    - by carlpett
    Hi! After cloning a windows 2003 installation from a single drive onto two mirrored drives using Acronis Disk Director, VSS no longer works, filing events 12293 and 7001 when trying to use backup tools, and additionally giving error 0x8004230f when accessing the Shadow copy tab of disk properties. I've google-researched this quite throughly, and found a suggested fix[1]: replacing the MBR signature of the disk. This would cause windows to invalidate old shadow copy information, which supposedly would make it all work again. However, I am a bit nervous over this... Is there a possiblity of messing this up somehow, because of the mbr originating from a single disk install, and now residing on a raid mirror? Has anyone here had this problem and solved it? This method or another? [1] http://kb.backupassist.com/articles.php?aid=2971 (under header Resolution 2)

    Read the article

  • Backing up Hyper-V VMs using "wbadmin" failing on Windows Server 2012

    - by Ederson
    I'm trying to backup a single VM using "wbdamin". I'm using this command-line: wbadmin start backup -backupTarget:d: -hyperv:VM_Machine_Name -quiet But the backup have no success. Looking at my Events, I get the following information: Source: SSP Event ID: 16387 Level: Error "Writer Microsoft Hyper-V VSS Writer experienced some error during snapshot creation. More info: ." ============================= Source: Backup Event ID: 521 Level: Error "The backup operation that started at '?2014?-?06?-?11T15:38:44.459000000Z' has failed because the Volume Shadow Copy Service operation to create a shadow copy of the volumes being backed up failed with following error code '0x8100010C'. Please review the event details for a solution, and then rerun the backup operation once the issue is resolved." ============================= Source: VSS No Event Errors. I didn't find any info about "0x8100010C" error code through the web and I'm stuck. Anyone know how to fix this?

    Read the article

  • XNA Masking Mayhem

    - by TropicalFlesh
    I'd like to start by mentioning that I'm just an amateur programmer of the past 2 years with no formal training and know very little about maximizing the potential of graphics hardware. I can write shaders and manipulate a multi-layered drawing environment, but I've basically stuck to minimalist pixel shaders. I'm working on putting dynamic point light shadows in my 2d sidescroller, and have had it working to a reasonable degree. Just chucking it in without working on serious optimizations outside of basic culling, I can get 50 lights or so onscreen at once and still hover around 100 fps. The only issue is that I'm on a very high end machine and would like to target the game at as many platforms I can, low and high end. The way I'm doing shadows involves a lot of masking before I can finally draw the light to my light layer. Basically, my technique to achieveing such shadows is as follows. See pics in this album http://imgur.com/a/m2fWw#0 The dark gray represents the background tiles, the light gray represents the foreground tiles, and the yellow represents the shadow-emitting foreground tile. I'll draw the light using a radial gradient and a color of choice I'll then exclude light from the mask by drawing some geometry extending through the tile from my point light. I actually don't mask the light yet at this point, but I'm just illustrating the technique in this image Finally, I'll re-include the foreground layer in my mask, as I only want shadows to collect on the background layer and finally multiply the light with it's mask to the light layer My question is simple - How can I go about reducing the amount of render target switches I need to do to achieve the following: a. Draw mask to exclude shadows from the foreground to it's own target once per frame b. For each light that emits shadows, -Begin light mask as full white -Render shadow geometry as transparent with an opaque blendmode to eliminate shadowed areas from the mask -Render foreground mask back over the light mask to reintroduce light to the foreground c. Multiply light texture with it's individual mask to the main light layer.

    Read the article

  • enabling a user (created with adduser command) for lightdm graphical login

    - by Basile Starynkevitch
    I just installed Ubuntu 12.04 AMD64 on a new (empty) hard disk (because the previous crashed) Since I am quite familiar with Debian, I created two accounts with the adduser command. Since I am also having an NFSv3 file system, I explictly gave user ids when creating them (for simplicity, I keep the same user id on the home server, running Debian; the user names contain digits; I'm not using LDAP), e.g. # grep bethy /etc/passwd bethy46:x:501:501:Bethy XXX,,,06123456:/home/bethy:/bin/bash # grep bethy /etc/group bethy64:x:501: # grep bethy /etc/shadow bethy46:$6$vQ-wmuchmorethings-2o/:15479:0:99999:7:: Of course /home/bethy exists The actual user name is slightly different, and I am not showing the real entries (for obvious privacy reasons) However, these users don't appear at graphical login prompt (lightdm). And they exist in the system, they have entries in /etc/passwd & /etc/shadow and I (partly) restored their /home I've got no specific user config under /etc/lightdm ; file /etc/lightdm/users.conf mentions # NOTE: If you have AccountsService installed on your system, then LightDM # will use this instead and these settings will be ignored but I have no idea of how to deal with AccountsService thru the command line As you probably guessed, I really dislike doing administrative tasks thru a graphical interface; I much prefer the command line What did I do wrong? How can a user entry not appear in lightdm graphical login? (I need to have my wife's user entry apparent for graphical login). I am not asking how to hide a user, but how to show it in lightdm graphical prompt work-around As I have been told in comments by Nirmik and by Enzotib, lightdm probably don't show any users of uid less than 1024. So I changed all the uid to be more than 8200 (including on the Debian NFS server) and this made all the users visible at the graphical prompt. It is a pain that such a threshold is not really documented.

    Read the article

  • HLSL - Creating Shadows in 2D

    - by richard
    The way that I create shadows is by the following technique: http://www.catalinzima.com/2010/07/my-technique-for-the-shader-based-dynamic-2d-shadows/ But I have questions to HLSL. The way that I currently do it is, I have a black and white image, where Black means 'object', and white means 'nothing'. I then distort the image like in the tutorial. I do this with a pixel shader, but instead of rendering to the screen, I render to a texture, back to my application. I then take this, and create the shadows, and then send it back to the graphics card to undo the distortion, after the shadow has been added - this comes back and I have a stencil of shadow. I can put this ontop of the original image and send them back to the graphics card, which then puts them on the screen. To me this is alot of back and forth. Is there a way i can avoid this? The problem that I am having is that I need to basically go through all positions in the texture 3 times, and use the new new texture every time instead of the orginal one. I tried to read up on Passes, but i don't think that i am heading in the right direction there. Help?

    Read the article

  • Command-line access for Apple Time Machine?

    - by Stefan Lasiewski
    We use Apple's Time Machine to back up our workstations at the office. If I want to restore a file, I need to open up the Time Machine GUI and browse files there. The GUI is ugly eye-candy and gets in my way. Is there a way to browse the Time Machine archive using the Mac's command-line? I'm used to Netapps and other storage appliances. I use backintime for my Ubuntu workstation. To restore a file with one of those systems, you can restore a file with a simple command like: cp .snapshot/daily.0/filename.txt . or cp /backup/backintime/20100611-000002/backup/etc/shadow /etc/shadow Is there an equivalent for Apple's Time Machine?

    Read the article

  • Is there any CSS selector to reach an element outside of the current container?

    - by acidrums4
    (And excuse me for my bad english, for starters...) Sorry if this is a noob question, but I really don't know if the following is possible. I'm doing a html5 portfolio. I'm following a tuto from codrops to visually filter works with only css3 (http://tympanus.net/codrops/2012/01/09/filter-functionality-with-css3/). There, user can select which category want to see with some <input type="radio">'s. But those selectors are under the same container (a <section>) and give visibility for the elements via CSS using a general sibling combinator (~). So in that example, the CSS code goes like this: .ff-container input.ff-selector-type-all:checked ~ label.ff-label-type-all, .ff-container input.ff-selector-type-1:checked ~ label.ff-label-type-1, .ff-container input.ff-selector-type-2:checked ~ label.ff-label-type-2, .ff-container input.ff-selector-type-3:checked ~ label.ff-label-type-3{ background: linear-gradient(top, #646d93 0%,#7c87ad 100%); color: #424d71; text-shadow: 0px 1px 1px rgba(255,255,255,0.3); box-shadow: 0px 0px 0px 1px #40496e, 0 1px 2px rgba(0,0,0,0.1) inset; } The thing is I want to put those <input type="radio">'s on the <head> section of my portfolio, but obviously the ~ selector won't work there. So my question is that is there any selector, hack or something that can do that? Something like .ff-container input.ff-selector-type-all:checked $ header > label.ff-label-type-all { awesomeness:100%; } I really don't want to use Javascript/Jquery for that... Thank you so much in advance!

    Read the article

  • How to adjust a single side of rectangular selection made with Marquee Tool?

    - by Alex
    I am struggling to make a selection made of different layers. For example, a button with text and shadow (each in its own layer). I would like to copy it to a image file but it is really hard to select the shadow with a pixel precision. I do not know how to perform such task properly so I use Marquee Tool. However, it is hard to get all 4 sides right from the first attempt. What's worse, I could not find a method to adjust a single side of a selection made by Marquee Tool. Anyone may help what I am doing wrong?

    Read the article

  • What is meant by "no password set" for root account (and otthers)?

    - by MMA
    Several years back, we were more accustomed to changing to the root account using the su command. First, we switched to the root account, and then executed those root commands. Now we are more accustomed to using the sudo command. But we know that the root account is there. We can readily find the home directory of user root. $ ls -ld /root/ drwx------ 18 root root 4096 Oct 22 17:21 /root/ Now my point is, it is stated that "the root password in Ubuntu is left unset". Please see the answers to this question. Most of the answers have something to this effect in the first paragraph. One or two answers further state that "the account is left disabled". Now my (primary) questions are, What is meant by an unset password? Is it blank? Is it null? Or something else more cryptic? How does the account becomes enabled once I set password for it? (sudo password root) In order get a better understanding, I checked the /etc/shadow file. Since I have already set a password for the root account, I can no longer see what is there (encrypted password). So, I created another account and left it disabled. The corresponding entry in the /etc/shadow file is, testpassword:!:16020:0:99999:7::: Now perhaps my above queries need to be changed to, what does an ! in password field mean? Other encrypted passwords are those very long cryptic strings. How come this encrypted form is only one character long? And does an account become disabled if I put an ! in the (encrypted) password field?

    Read the article

  • Objective-J Cappuccino want a list of buttons on main menu, when I click the panel refreshes with UI

    - by Setori
    Dear all, I am new to objective-j/c and cappuccino not really sure how this all fits together. The code below is taken from http://github.com/jfahrenkrug/CappuccinoLocations1 What I need to do is: I need a landing main menu which is a CPView called ie MainView with five or so buttons, when you click on the LocationButton on MainView is replaces MainView by with LocationView, which displays the contents of jfahrenkrug's work. A similar effect will happen with each other button. What is the correct Objective-c/j way of handling this approach? @import <Foundation/CPObject.j> @import "src/Location/LocationView.j" @implementation AppController : CPObject { LocationView locationView; } - (void)applicationDidFinishLaunching:(CPNotification)aNotification { var theWindow = [[CPWindow alloc] initWithContentRect:CGRectMakeZero() styleMask:CPBorderlessBridgeWindowMask], mainContentView = [theWindow locationView], bounds = [locationView bounds]; [mainContentView setBackgroundColor:[CPColor colorWithRed:212.0 /255.0 green:221.0/ 255.0 blue:230.0/255.0 alpha:1.0]]; locationView = [[LocationView alloc] initWithFrame:CGRectMake(0,0,920.0,590.0)]; [locationView setCenter:[mainContentView center]]; [locationView setBackgroundColor:[CPColor whiteColor]] [locationView setAutoresizingMask:CPViewMinXMargin | CPViewMaxXMargin | CPViewMinYMargin | CPViewMaxYMargin]; var shadow = [[CPShadowView alloc] initWithFrame:CGRectMakeZero()]; [shadow setFrameForContentFrame:[locationView frame]]; [shadow setAutoresizingMask:CPViewMinXMargin | CPViewMaxXMargin | CPViewMinYMargin | CPViewMaxYMargin]; [mainContentView addSubview:shadow]; [mainContentView addSubview:locationView]; [theWindow orderFront:self]; } Now we have the locationView.j @import "LocationsController.j" @import "LocationListView.j" @import "MapController.j" @import "LocationsToolbar.j" @import "LocationDetailView.j" @import "LocationDetailController.j" @implementation LocationView : CPView { LocationsController locationsController; LocationListView locationListView; MapController mapController; MKMapView mapView; CPTextField coordinatesLabel; LocationsToolbar locationsToolbar; LocationDetailView locationDetailView; LocationDetailController locationDetailController; CPTextField searchField; // id delegate @accessors; } - (id)initWithFrame:(CGRect)aFrame { self = [super initWithFrame:aFrame]; if(self){ locationsController = [[LocationsController alloc] init]; [locationsController loadExampleLocations]; locationListView = [[LocationListView alloc] initWithFrame:CGRectMake(0.0,0.0,226.0,400.0)]; [locationListView setContent:[locationsController locations]]; [locationListView setDelegate:locationsController]; [locationsController setLocationListView:locationListView]; var locationScrollView = [[CPScrollView alloc] initWithFrame:CGRectMake(10.0,65.0,243.0,400.0)]; [locationScrollView setDocumentView:locationListView]; [locationScrollView setAutohidesScrollers:YES]; [[locationScrollView self] setBackgroundColor:[CPColor whiteColor]]; [self addSubview:locationScrollView]; mapController = [[MapController alloc] init]; mapView = [[MKMapView alloc] initWithFrame:CGRectMake(510,65,400,400) apiKey:'' ]; [mapView setDelegate:self]; mapController.mapView = mapView; [self addSubview:mapView]; coordinatesLabel = [[CPTextField alloc] initWithFrame:CGRectMake(510,465,200,35)]; [coordinatesLabel setTextColor:[CPColor colorWithHexString:@"009900"]]; [coordinatesLabel setFont:[CPFont systemFontOfSize:14.0]]; [coordinatesLabel setEditable:NO]; [coordinatesLabel setStringValue:@"-/-"]; [mapController setCoordinatesLabel:coordinatesLabel]; [self addSubview:coordinatesLabel]; locationsToolbar = [[LocationsToolbar alloc] initWithFrame:CGRectMake(10.0,467.0,226.0,25.0)]; [locationsToolbar setDelegate:locationsController]; [self addSubview:locationsToolbar]; locationDetailController = [[LocationDetailController alloc] init]; locationDetailController.mapController = mapController; locationsController.locationDetailController = locationDetailController; [mapController setDelegate:locationDetailController]; locationDetailView = [[LocationDetailView alloc] initWithFrame:CGRectMake(510,490,400,90)]; [locationDetailView setDelegate:locationDetailController]; [locationDetailController setLocationDetailView:locationDetailView]; [self addSubview:locationDetailView]; searchField = [CPTextField roundedTextFieldWithStringValue:@"" placeholder:@"Location" width:200.0]; [searchField setFrameOrigin:CGPointMake(510.0,35.0)]; [searchField setDelegate:self]; [self addSubview:searchField]; var searchButton = [[CPButton alloc] initWithFrame:CGRectMake(710.0,37.0,60.0,24.0)]; [searchButton setTitle:"Search"]; [searchButton setTarget:self]; [searchButton setAction:@selector(searchLocation)]; [self addSubview:searchButton]; } return self; }

    Read the article

  • adding onTap method on path direction between 2 point

    - by idham
    I have a problem in my Android application I have a path direction on my application and I want to add an onTap method for the path, so if I touch that path my application will display information with alert dialog. This my activity code: hasilrute hr = new hasilrute(); for (int k = 0;k < hr.r2.size(); k++){ String angkot = hr.r2.get(i).angkot; Cursor c = db.getLatLong(hasilrute.a); Cursor cc = db.getLatLong(hasilrute.b); String x = (c.getString(3)+","+c.getString(2)); String xx = (cc.getString(3)+","+cc.getString(2)); String pairs[] = getDirectionData(x, xx); String[] lnglat = pairs[0].split(","); GeoPoint point = new GeoPoint((int) (Double.parseDouble(lnglat[1]) *1E6),(int)(Double.parseDouble(lnglat[0]) * 1E6)); GeoPoint gp1; GeoPoint gp2 = point; for (int j = 1;j < pairs.length; j++){ lnglat = pairs[j].split(","); gp1 = gp2; gp2 = new GeoPoint((int) (Double.parseDouble(lnglat[1]) *1E6),(int) (Double.parseDouble(lnglat[0]) * 1E6)); mapView.getOverlays().add(new jalur(gp1, gp2,angkot)); } } and it's my jalur.java code public class jalur extends Overlay { private GeoPoint gp1; private GeoPoint gp2; private String angkot; private Context mContext; public jalur(GeoPoint gp1, GeoPoint gp2, String angkot){ this.gp1 = gp1; this.gp2 = gp2; this.angkot = angkot; } @Override public boolean draw(Canvas canvas, MapView mapView, boolean shadow, long when){ Projection projection = mapView.getProjection(); if (shadow == false){ if (angkot.equals("Cimahi-Leuwipanjang")){ Paint paint = new Paint(); paint.setAntiAlias(true); Point point = new Point(); projection.toPixels(gp1,point); Point point2 = new Point(); projection.toPixels(gp2, point2); paint.setColor(Color.rgb(118,171,127)); paint.setStrokeWidth(2); canvas.drawLine((float) point.x, (float) point.y, (float) point2.x, (float) point2.y, paint); }if (angkot.equals("Cimahi-Cangkorah")){ Paint paint = new Paint(); paint.setAntiAlias(true); Point point = new Point(); projection.toPixels(gp1,point); Point point2 = new Point(); projection.toPixels(gp2, point2); paint.setColor(Color.rgb(67,204,255)); paint.setStrokeWidth(2); canvas.drawLine((float) point.x, (float) point.y, (float) point2.x, (float) point2.y, paint); }if (angkot.equals("Cimindi-Cipatik")){ Paint paint = new Paint(); paint.setAntiAlias(true); Point point = new Point(); projection.toPixels(gp1,point); Point point2 = new Point(); projection.toPixels(gp2, point2); paint.setColor(Color.rgb(42,82,0)); paint.setStrokeWidth(2); canvas.drawLine((float) point.x, (float) point.y, (float) point2.x, (float) point2.y, paint); }if (angkot.equals("Jalan Kaki")){ Paint paint = new Paint(); paint.setAntiAlias(true); Point point = new Point(); projection.toPixels(gp1,point); Point point2 = new Point(); projection.toPixels(gp2, point2); paint.setColor(Color.rgb(0,0,0)); paint.setStrokeWidth(2); canvas.drawLine((float) point.x, (float) point.y, (float) point2.x, (float) point2.y, paint); }if (angkot.equals("Cimahi-Padalarang")){ Paint paint = new Paint(); paint.setAntiAlias(true); Point point = new Point(); projection.toPixels(gp1,point); Point point2 = new Point(); projection.toPixels(gp2, point2); paint.setColor(Color.rgb(229,66,66)); paint.setStrokeWidth(2); canvas.drawLine((float) point.x, (float) point.y, (float) point2.x, (float) point2.y, paint); } if (angkot.equals("Pasantren-Sarijadi")){ Paint paint = new Paint(); paint.setAntiAlias(true); Point point = new Point(); projection.toPixels(gp1,point); Point point2 = new Point(); projection.toPixels(gp2, point2); paint.setColor(Color.rgb(4,39,255)); paint.setStrokeWidth(2); canvas.drawLine((float) point.x, (float) point.y, (float) point2.x, (float) point2.y, paint); }if (angkot.equals("Cimahi-Parongpong")){ Paint paint = new Paint(); paint.setAntiAlias(true); Point point = new Point(); projection.toPixels(gp1,point); Point point2 = new Point(); projection.toPixels(gp2, point2); paint.setColor(Color.rgb(141,0,200)); paint.setStrokeWidth(2); canvas.drawLine((float) point.x, (float) point.y, (float) point2.x, (float) point2.y, paint); }if (angkot.equals("Cimahi-Cibeber")){ Paint paint = new Paint(); paint.setAntiAlias(true); Point point = new Point(); projection.toPixels(gp1,point); Point point2 = new Point(); projection.toPixels(gp2, point2); paint.setColor(Color.rgb(255,246,0)); paint.setStrokeWidth(2); canvas.drawLine((float) point.x, (float) point.y, (float) point2.x, (float) point2.y, paint); }if (angkot.equals("Cimahi-Cimindi")){ Paint paint = new Paint(); paint.setAntiAlias(true); Point point = new Point(); projection.toPixels(gp1,point); Point point2 = new Point(); projection.toPixels(gp2, point2); paint.setColor(Color.rgb(220,145,251)); paint.setStrokeWidth(2); canvas.drawLine((float) point.x, (float) point.y, (float) point2.x, (float) point2.y, paint); }if (angkot.equals("Cimahi-Contong")){ Paint paint = new Paint(); paint.setAntiAlias(true); Point point = new Point(); projection.toPixels(gp1,point); Point point2 = new Point(); projection.toPixels(gp2, point2); paint.setColor(Color.rgb(242,138,138)); paint.setStrokeWidth(2); canvas.drawLine((float) point.x, (float) point.y, (float) point2.x, (float) point2.y, paint); }if (angkot.equals("Cimahi-Soreang")){ Paint paint = new Paint(); paint.setAntiAlias(true); Point point = new Point(); projection.toPixels(gp1,point); Point point2 = new Point(); projection.toPixels(gp2, point2); paint.setColor(Color.rgb(0,255,78)); paint.setStrokeWidth(2); canvas.drawLine((float) point.x, (float) point.y, (float) point2.x, (float) point2.y, paint); }if (angkot.equals("Cimahi-Batujajar")){ Paint paint = new Paint(); paint.setAntiAlias(true); Point point = new Point(); projection.toPixels(gp1,point); Point point2 = new Point(); projection.toPixels(gp2, point2); paint.setColor(Color.rgb(137,217,51)); paint.setStrokeWidth(2); canvas.drawLine((float) point.x, (float) point.y, (float) point2.x, (float) point2.y, paint); } } return super.draw(canvas, mapView, shadow, when); } @Override public void draw(Canvas canvas, MapView mapView, boolean shadow){ super.draw(canvas, mapView, shadow); } } thanks for your attention :)

    Read the article

  • Detecting HTML5/CSS3 Features using Modernizr

    - by dwahlin
    HTML5, CSS3, and related technologies such as canvas and web sockets bring a lot of useful new features to the table that can take Web applications to the next level. These new technologies allow applications to be built using only HTML, CSS, and JavaScript allowing them to be viewed on a variety of form factors including tablets and phones. Although HTML5 features offer a lot of promise, it’s not realistic to develop applications using the latest technologies without worrying about supporting older browsers in the process. If history has taught us anything it’s that old browsers stick around for years and years which means developers have to deal with backward compatibility issues. This is especially true when deploying applications to the Internet that target the general public. This begs the question, “How do you move forward with HTML5 and CSS3 technologies while gracefully handling unsupported features in older browsers?” Although you can write code by hand to detect different HTML5 and CSS3 features, it’s not always straightforward. For example, to check for canvas support you need to write code similar to the following:   <script> window.onload = function () { if (canvasSupported()) { alert('canvas supported'); } }; function canvasSupported() { var canvas = document.createElement('canvas'); return (canvas.getContext && canvas.getContext('2d')); } </script> If you want to check for local storage support the following check can be made. It’s more involved than it should be due to a bug in older versions of Firefox. <script> window.onload = function () { if (localStorageSupported()) { alert('local storage supported'); } }; function localStorageSupported() { try { return ('localStorage' in window && window['localStorage'] != null); } catch(e) {} return false; } </script> Looking through the previous examples you can see that there’s more than meets the eye when it comes to checking browsers for HTML5 and CSS3 features. It takes a lot of work to test every possible scenario and every version of a given browser. Fortunately, you don’t have to resort to writing custom code to test what HTML5/CSS3 features a given browser supports. By using a script library called Modernizr you can add checks for different HTML5/CSS3 features into your pages with a minimal amount of code on your part. Let’s take a look at some of the key features Modernizr offers.   Getting Started with Modernizr The first time I heard the name “Modernizr” I thought it “modernized” older browsers by added missing functionality. In reality, Modernizr doesn’t actually handle adding missing features or “modernizing” older browsers. The Modernizr website states, “The name Modernizr actually stems from the goal of modernizing our development practices (and ourselves)”. Because it relies on feature detection rather than browser sniffing (a common technique used in the past – that never worked that great), Modernizr definitely provides a more modern way to test features that a browser supports and can even handle loading additional scripts called shims or polyfills that fill in holes that older browsers may have. It’s a great tool to have in your arsenal if you’re a web developer. Modernizr is available at http://modernizr.com. Two different types of scripts are available including a development script and custom production script. To generate a production script, the site provides a custom script generation tool rather than providing a single script that has everything under the sun for HTML5/CSS3 feature detection. Using the script generation tool you can pick the specific test functionality that you need and ignore everything that you don’t need. That way the script is kept as small as possible. An example of the custom script download screen is shown next. Notice that specific CSS3, HTML5, and related feature tests can be selected. Once you’ve downloaded your custom script you can add it into your web page using the standard <script> element and you’re ready to start using Modernizr. <script src="Scripts/Modernizr.js" type="text/javascript"></script>   Modernizr and the HTML Element Once you’ve add a script reference to Modernizr in a page it’ll go to work for you immediately. In fact, by adding the script several different CSS classes will be added to the page’s <html> element at runtime. These classes define what features the browser supports and what features it doesn’t support. Features that aren’t supported get a class name of “no-FeatureName”, for example “no-flexbox”. Features that are supported get a CSS class name based on the feature such as “canvas” or “websockets”. An example of classes added when running a page in Chrome is shown next:   <html class=" js flexbox canvas canvastext webgl no-touch geolocation postmessage websqldatabase indexeddb hashchange history draganddrop websockets rgba hsla multiplebgs backgroundsize borderimage borderradius boxshadow textshadow opacity cssanimations csscolumns cssgradients cssreflections csstransforms csstransforms3d csstransitions fontface generatedcontent video audio localstorage sessionstorage webworkers applicationcache svg inlinesvg smil svgclippaths"> Here’s an example of what the <html> element looks like at runtime with Internet Explorer 9:   <html class=" js no-flexbox canvas canvastext no-webgl no-touch geolocation postmessage no-websqldatabase no-indexeddb hashchange no-history draganddrop no-websockets rgba hsla multiplebgs backgroundsize no-borderimage borderradius boxshadow no-textshadow opacity no-cssanimations no-csscolumns no-cssgradients no-cssreflections csstransforms no-csstransforms3d no-csstransitions fontface generatedcontent video audio localstorage sessionstorage no-webworkers no-applicationcache svg inlinesvg smil svgclippaths">   When using Modernizr it’s a common practice to define an <html> element in your page with a no-js class added as shown next:   <html class="no-js">   You’ll see starter projects such as HTML5 Boilerplate (http://html5boilerplate.com) or Initializr (http://initializr.com) follow this approach (see my previous post for more information on HTML5 Boilerplate). By adding the no-js class it’s easy to tell if a browser has JavaScript enabled or not. If JavaScript is disabled then no-js will stay on the <html> element. If JavaScript is enabled, no-js will be removed by Modernizr and a js class will be added along with other classes that define supported/unsupported features. Working with HTML5 and CSS3 Features You can use the CSS classes added to the <html> element directly in your CSS files to determine what style properties to use based upon the features supported by a given browser. For example, the following CSS can be used to render a box shadow for browsers that support that feature and a simple border for browsers that don’t support the feature: .boxshadow #MyContainer { border: none; -webkit-box-shadow: #666 1px 1px 1px; -moz-box-shadow: #666 1px 1px 1px; } .no-boxshadow #MyContainer { border: 2px solid black; }   If a browser supports box-shadows the boxshadow CSS class will be added to the <html> element by Modernizr. It can then be associated with a given element. This example associates the boxshadow class with a div with an id of MyContainer. If the browser doesn’t support box shadows then the no-boxshadow class will be added to the <html> element and it can be used to render a standard border around the div. This provides a great way to leverage new CSS3 features in supported browsers while providing a graceful fallback for older browsers. In addition to using the CSS classes that Modernizr provides on the <html> element, you also use a global Modernizr object that’s created. This object exposes different properties that can be used to detect the availability of specific HTML5 or CSS3 features. For example, the following code can be used to detect canvas and local storage support. You can see that the code is much simpler than the code shown at the beginning of this post. It also has the added benefit of being tested by a large community of web developers around the world running a variety of browsers.   $(document).ready(function () { if (Modernizr.canvas) { //Add canvas code } if (Modernizr.localstorage) { //Add local storage code } }); The global Modernizr object can also be used to test for the presence of CSS3 features. The following code shows how to test support for border-radius and CSS transforms:   $(document).ready(function () { if (Modernizr.borderradius) { $('#MyDiv').addClass('borderRadiusStyle'); } if (Modernizr.csstransforms) { $('#MyDiv').addClass('transformsStyle'); } });   Several other CSS3 feature tests can be performed such as support for opacity, rgba, text-shadow, CSS animations, CSS transitions, multiple backgrounds, and more. A complete list of supported HTML5 and CSS3 tests that Modernizr supports can be found at http://www.modernizr.com/docs.   Loading Scripts using Modernizr In cases where a browser doesn’t support a specific feature you can either provide a graceful fallback or load a shim/polyfill script to fill in missing functionality where appropriate (more information about shims/polyfills can be found at https://github.com/Modernizr/Modernizr/wiki/HTML5-Cross-Browser-Polyfills). Modernizr has a built-in script loader that can be used to test for a feature and then load a script if the feature isn’t available. The script loader is built-into Modernizr and is also available as a standalone yepnope script (http://yepnopejs.com). It’s extremely easy to get started using the script loader and it can really simplify the process of loading scripts based on the availability of a particular browser feature. To load scripts dynamically you can use Modernizr’s load() function which accepts properties defining the feature to test (test property), the script to load if the test succeeds (yep property), the script to load if the test fails (nope property), and a script to load regardless of if the test succeeds or fails (both property). An example of using load() with these properties is show next: Modernizr.load({ test: Modernizr.canvas, yep: 'html5CanvasAvailable.js’, nope: 'excanvas.js’, both: 'myCustomScript.js' }); In this example Modernizr is used to not only load scripts but also to test for the presence of the canvas feature. If the target browser supports the HTML5 canvas then the html5CanvasAvailable.js script will be loaded along with the myCustomScript.js script (use of the yep property in this example is a bit contrived – it was added simply to demonstrate how the property can be used in the load() function). Otherwise, a polyfill script named excanvas.js will be loaded to add missing canvas functionality for Internet Explorer versions prior to 9. Once excanvas.js is loaded the myCustomScript.js script will be loaded. Because Modernizr handles loading scripts, you can also use it in creative ways. For example, you can use it to load local scripts when a 3rd party Content Delivery Network (CDN) such as one provided by Google or Microsoft is unavailable for whatever reason. The Modernizr documentation provides the following example that demonstrates the process for providing a local fallback for jQuery when a CDN is down:   Modernizr.load([ { load: '//ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.js', complete: function () { if (!window.jQuery) { Modernizr.load('js/libs/jquery-1.6.4.min.js'); } } }, { // This will wait for the fallback to load and // execute if it needs to. load: 'needs-jQuery.js' } ]); This code attempts to load jQuery from the Google CDN first. Once the script is downloaded (or if it fails) the function associated with complete will be called. The function checks to make sure that the jQuery object is available and if it’s not Modernizr is used to load a local jQuery script. After all of that occurs a script named needs-jQuery.js will be loaded. Conclusion If you’re building applications that use some of the latest and greatest features available in HTML5 and CSS3 then Modernizr is an essential tool. By using it you can reduce the amount of custom code required to test for browser features and provide graceful fallbacks or even load shim/polyfill scripts for older browsers to help fill in missing functionality. 

    Read the article

< Previous Page | 12 13 14 15 16 17 18 19 20 21 22 23  | Next Page >