Daily Archives

Articles indexed Monday January 10 2011

Page 11/36 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • Recommended way to make animation in Android

    - by Alin
    I've searched around the web to learn more about animating a character in Android but didn't fully understood it. I ask here maybe you could give me some advices or hints on how to make it in the best possible way. Scenario Imagine 5 drawn characters (let's say 5 human heads). I need to animate them. By animation I mean make eyes blink, smile, laugh etc. Right now I am working on making bitmap resources on each animation. For example for the blink animation, basically I have 3 images, one with eyes open, one with eyes half closed, one with eyes closed. I need to animate the character to use all these 3 images. This is all the animation I need, nothing more fancier. Any suggestions from where to start ?

    Read the article

  • Hide ul when lost focus in JQuery..

    - by Ramesh Vel
    Hi, I am trying to hide the sub menu items(ul) when it lost focus.. my structure looks something like this <div id="ActionDiv" style="border-color: #0099d4; width: 120px; height: 100%"> <ul> <li><a href="#"><span id="ActionHeader">Action &nbsp; <em> <img src="images/zonebar-downarrow.png" alt="dropdown" /> </em></span></a> <ul> <li><a href="javascript:TriggerAction(1)">Send Email</a></li> <li><a href="javascript:TriggerAction(1)">Invite to chat</a></li> <li><a href="javascript:TriggerAction(1)">Consider For Opp</a></li> </ul> </li> </ul> </div> In JQuery i have used focusout event to handle the lost focus. $("#ActionDiv>ul>li>ul").focusout(function() { $("#ActionDiv>ul>li>ul").hide(); }); But the above code is not working. can anyone recommend a way to handle the lost focus event in the ul. Cheers

    Read the article

  • ActionScript / AIR - One Button Limit (Exclusive Touch) For Mobile Devices?

    - by TheDarkIn1978
    two years ago, when i was developing an application for the iPhone, i used the following built-in system method on all of my buttons: [button setExclusiveTouch:YES]; essentially, if you had many buttons on screen, this method insured that the application wouldn't be permitted do crazy things when several button events firing at the same time as any new button press would cancel all others. problematic: ButtonA and ButtonB are available. each button has a mouse up event which fire a specific animated (tweened) reorganization/layout of the UI. if both button's events are fired at the same time, their events will likely conflict, causing a strange new layout, perhaps a runtime error. solution: application buttons cancel any current pending mouse up events when said button enters mouse down. private function mouseDownEventHandler(evt:MouseEvent):void { //if other buttons are currently in a mouse down state ready to fire //a mouse up event, cancel them all here. } of course it's simple to manually handle this if there are only a few buttons on stage, but managing buttons becomes more and more complicated / bug-prone if there are several / many buttons available. is there a convenience method available in AIR specifically for this functionality?

    Read the article

  • how to mount partitions from USB drives in Windows using Delphi?

    - by user569556
    Hi. I'm a Delphi programmer. I want to mount all partitions from USB drives in Windows (XP). The OS is doing this automatically but there are situations when such a program is useful. I know how to find if a drive is on USB or not. My code so far is: type STORAGE_QUERY_TYPE = (PropertyStandardQuery = 0, PropertyExistsQuery, PropertyMaskQuery, PropertyQueryMaxDefined); TStorageQueryType = STORAGE_QUERY_TYPE; STORAGE_PROPERTY_ID = (StorageDeviceProperty = 0, StorageAdapterProperty); TStoragePropertyID = STORAGE_PROPERTY_ID; STORAGE_PROPERTY_QUERY = packed record PropertyId: STORAGE_PROPERTY_ID; QueryType: STORAGE_QUERY_TYPE; AdditionalParameters: array[0..9] of AnsiChar; end; TStoragePropertyQuery = STORAGE_PROPERTY_QUERY; STORAGE_BUS_TYPE = (BusTypeUnknown = 0, BusTypeScsi, BusTypeAtapi, BusTypeAta, BusType1394, BusTypeSsa, BusTypeFibre, BusTypeUsb, BusTypeRAID, BusTypeiScsi, BusTypeSas, BusTypeSata, BusTypeMaxReserved = $7F); TStorageBusType = STORAGE_BUS_TYPE; STORAGE_DEVICE_DESCRIPTOR = packed record Version: DWORD; Size: DWORD; DeviceType: Byte; DeviceTypeModifier: Byte; RemovableMedia: Boolean; CommandQueueing: Boolean; VendorIdOffset: DWORD; ProductIdOffset: DWORD; ProductRevisionOffset: DWORD; SerialNumberOffset: DWORD; BusType: STORAGE_BUS_TYPE; RawPropertiesLength: DWORD; RawDeviceProperties: array[0..0] of AnsiChar; end; TStorageDeviceDescriptor = STORAGE_DEVICE_DESCRIPTOR; const IOCTL_STORAGE_QUERY_PROPERTY = $002D1400; var i: Integer; H: THandle; USBDrives: array of Byte; Query: TStoragePropertyQuery; dwBytesReturned: DWORD; Buffer: array[0..1023] of Byte; sdd: TStorageDeviceDescriptor absolute Buffer; begin SetLength(UsbDrives, 0); SetErrorMode(SEM_FAILCRITICALERRORS); for i := 0 to 99 do begin H := CreateFile(PChar('\\.\PhysicalDrive' + IntToStr(i)), 0, FILE_SHARE_READ or FILE_SHARE_WRITE, nil, OPEN_EXISTING, 0, 0); if H <> INVALID_HANDLE_VALUE then begin try dwBytesReturned := 0; FillChar(Query, SizeOf(Query), 0); FillChar(Buffer, SizeOf(Buffer), 0); sdd.Size := SizeOf(Buffer); Query.PropertyId := StorageDeviceProperty; Query.QueryType := PropertyStandardQuery; if DeviceIoControl(H, IOCTL_STORAGE_QUERY_PROPERTY, @Query, SizeOf(Query), @Buffer, SizeOf(Buffer), dwBytesReturned, nil) then if sdd.BusType = BusTypeUsb then begin SetLength(USBDrives, Length(USBDrives) + 1); UsbDrives[High(USBDrives)] := Byte(i); end; finally CloseHandle(H); end; end; end; for i := 0 to High(USBDrives) do begin // end; end. But I don't know how to access partitions on each drive and mounts them. Can you please help me? I searched before I asked and I couldn't find a working code. But if I did not properly then I'm sorry and please show me that topic. Best regards, John

    Read the article

  • Implicit declaration when using a function before it is defined in C, why can't the compiler figure this out?

    - by rolls
    As the title says, I know what causes this error but I want to know why the compiler gives it in this circumstance. Eg : main.c void test(){ test1(); } void test1(){ ... } Would give an implicit declaration warning as the compiler would reach the call to test1() before it has read its declaration, I can see the obvious problems with this (not knowing return type etc), but why can't the compiler do a simple pass to get all function declarations, then compile the code removing these errors? It just seems so simple to do and I don't believe I've seen similar warnings in other languages. Does anyone know if there is a specific purpose for this warning in this situation that I am overlooking?

    Read the article

  • when to use StringBuilder in java

    - by kostja
    It is supposed to be generally preferable to use a StringBuilder for String concatenation in Java. Is it always the case? What i mean is : Is the overhead of creating a StringBuilder object, calling the append() method and finally toString() smaller then concatenating existing Strings with + for 2 Strings already or is it only advisable for more Strings? If there is such a threshold, what does it depend on (the String length i suppose, but in which way)? And finally - would you trade the readability and conciseness of the + concatenation for the performance of the StringBuilder in smaller cases like 2, 3, 4 Strings?

    Read the article

  • Slide decks of Windows Phone 7 talk @ MoMo

    - by subodhnpushpak
    Hi, I presented a talk on Windows Phone 7 @ MoMo and got awesome response, even though WP7 is quite new still. I also demoed 2 applications on both emulator and the actual device. It enjoy the look on audience faces when they see the app actually work on actual device. I see a great opportunity on WP7 and everyone I met agrees on the fact the WP7 has a very bright future ahead. The Ecosystem which WP7 has (developing/ debugging tools, emulator, almost flat learning curve,  office/sharepoint integration a lively forum, marketplace) makes it a major player in mobile, already. Here is the slide – deck. Here are the details of the event. http://momodelhi11.eventbrite.com/#m_1_100 And here are few snap shots of the event. Windows Phone 7 Demo VIEW SLIDE SHOW DOWNLOAD ALL    Do provide your comments.

    Read the article

  • 500 Error when using custom account for application pool in IIS 7

    - by Brownie
    I have a very simple site with only static files in IIS 7 on Windows Server 2008 SP2. When I try to access any static file I get a 500 error. If I rename an html file to have an aspx extension it works fine. The site also works fine when using the built in identity for the application pool. The problem occurs when I switch to using a custom account for the application pool. I have tried using both local and domain accounts to run the application pool under. I have given full control to these accounts on the website directory and files. Turning on tracing reveals this error message: ModuleName: IIS Web Core Notification: 2 HttpStatus: 500 HttpReason: Internal Server Error HttpSubStatus: 0 ErrorCode: 2147943746 ConfigExceptionInfo Notification: AUTHENTICATE_REQUEST ErrorCode: Either a required impersonation level was not provided, or the provided impersonation level is invalid. (0x80070542) I have not had any luck with googling the error code.

    Read the article

  • How to access internet from 2 laptops with data card plugged-in in one of the machine?

    - by learnerforever
    Hi, I have 2 laptops - one running Windows XP and other running Vista. Both have wifi card.I have one Reliance broadband data card. I want to be able to access internet on both the machines simultaneously using this one data card. Please help. I think, there would be many many ways to do it. I do have some linksys router but any simple quick way without any extra hardware? like we could set up p2p or WLAN between these 2 machines, because both have wifi card so we shouldn't compulsorily need any extra hardware(?) I am fine with connecting data card to either of the machines. Thanks,

    Read the article

  • enable PHP on windows Apache server

    - by Don
    Hi, I need to run a PHP app on a windows apache server. I've installed Apache, unzipped the app into the htdocs folder, but when I type this URL into the browser http://localhost:8080/pixelpost/admin/install.php I get the content of the PHP file, rather than the output it should generate. What are the steps for enabling PHP support in Apache on windows? I guess I need to install mod_php, and possibly do some other stuff, but my Apache and PHP knowledge is minimal, so idiot-proof instructions would be much appreciated. Thanks, Don

    Read the article

  • Set up a root server using Ubuntu and Virtualization

    - by Daniel Völkerts
    Hello, I'd like to setup a fresh root server and install a linux based virtualization on it. My thoughts are on: Intel VTs Hardware Ubuntu 9.10 KVM based virt. The access to the root server will only be SSH for Administration. Has anybody done this before, what was your glues discovered in the daily use? My requirements are: very secure, so the root server only has ssh to the dom-0 and minimalistic ports for the guest (e.g. http/s). good monitoring of host/guest (my idea is to using zabbix for it) easy and fast administration (how are the command line tools working for you? cryptiv? high learning curve?) I'm pleased to learn from your suggestions. Regards, Daniel Völkerts

    Read the article

  • How a router decides destination of packet?

    - by user58859
    I have basic networking question. Scenario : Two pc's are communicating on a wan. Both the pc's ate behind routers or modems. My question : Both the pc's have public IP of each other. That public IP is most of the time is either of the router or of the modem. There can be more then one pc's behind those routers and modems. Then how the pc's are communicating. I can understand the packets can reach upto those routers or modems. But what after that. In the packet , destination IP is public IP. Then how the router or modem decides where to send the packet? Can anybody explain me this please. Thanks in advance.

    Read the article

  • Rsync like windows backup tool

    - by Halfgaar
    Hi, I need to backup some windows machines and have been unable to find the proper tool. What I need is a tool that does efficient copying of changed files to a windows network location, like Rsync does. In turn, the server will then back that up using rdiff-backup, a tool which does very clever incremental backups. Right now I'm using windows' 7 included backup feature, but I really don't get that. It's too much off-topic, but it doesn't suffice (seems buggy as well). I looked into Amanda, but as soon as it wanted to install MySQL, I aborted. I also tried Deltacopy, but unfortunately, I don't remember what the problem with that was... Any advice for an rsync like tool that just does daily syncs to a network location?

    Read the article

  • No colors when running native windows shell application from mintty

    - by Pete
    Hi. I have installed cygwin (i'm not very experienced with it), and try to run a native windows shell application from it, (msbuild.exe which is the build tool for the .NET framework, to be exact). When I run the application from the normal cygwin bash shell, the output of the application appear as it should with the text colors that I would normally see in the windows command line. But when I execute the program from a mintty terminal, there is no coloring of the output, all text is in the default foreground color. I'm puzzled, because I would have expected the color coding to be the standard ANSI color code escape characters... Can this be fixed?

    Read the article

  • Graphics card initialisation problems when booting - requires a "double" boot

    - by DMA57361
    Problem Outline When booting from cold (and my machine is disconnected from main power when off, but leaving it connected doesn't help) the graphics card (single PCI-e card GeForce 460) will not initialise on the first boot, leaving me with the motherboards on-board graphics (which kick in automatically if no PCI-e card is found). However, if I restart the computer - normally I do this by powering it off just after the numlock lights up on the keyboard (ie, just after POST/BIOS and before Windows takes over), wait for the system to whirr down, and power up again - the graphics card will work correctly. Once double-booted in this matter the system seems to work correctly - with no noticeable problems. This is reproducible every time I try to boot - it has been working like this for about a month now. Background Information Sept 2010 - I suffered a hardware malfunction (crashes in Windows and graphics corruption on BIOS screens). By way of spare hardware I determined that replacing the PSU removed the issue, so I replaced the PSU with a brand new one of slightly higher power (460W replaced with 500W). Oct 2010 - The problem resurfaced. I purchased a new graphics card (GeForce 460), which removed the problem. The new graphics card immediately started having the boot initialisation problems mentioned. I presumed there was a motherboard fault all along, but because the system worked once booted, and I was temporarily out of spare money, I left the system alone and continued to use it. Early/Mid Dec 2010 - In the space of 5 days I recieved 3 instances of hard drive corruption (seemlingly fixed by chkdsk and sfc in each case...). Since I was already under the impression the motherboard was faulty, I purchased a new one ASAP, this also required new RAM (as I dropped from 4 slots to 2 and didn't want to drop mem quantity). Past 3-4 weeks - With a brand new PSU, Graphics Card, Motherboard and RAM I'm suffering the problem outlined above. So, what could be causing this and how do I can resolve it? Additional Notes Once double-booted the system seems to work entirely correctly. The graphics card problem has occured on two entirely different motherboards. I do not have the opportunity to test the graphics card in a different computer (I've only the old motherboard, which is dubious, or a really old desktop that still has an AGP port). Under load (ie, modern games for long enough for temperatures to plateau) the system remains stable and performs as expected. The software that came with the new motherboard and SpeenFan both report all voltages and temperatures are within nominal bounds, when idle and when under load. I've looking over the BIOS settings for my motherboard multiple times and can find nothing that helps. This system is configured to run with everything at standard levels - no overclocking. I've tried booting the system with only the mobo and graphics card connected (thinking maybe my new PSU was too weak for the new gfx card, even though it meets the quoted PSU requirements for the card) but the same problem persists (and really if the PSU was weak I'd have problems with the system under load). When the gfx card does not initialise the fan on its cooling unit is running, possibly slower than otherwise - but this measurement is by eye and so unreliable.

    Read the article

  • Songbird too damn slow, at least on my mac

    - by Cawas
    I've read on few places that Songbird is no good with more than some thousands of library items because it starts getting quite slow. Well, in my case (which is a clean install) I've imported 17k items (which I know is not that much) and instead of becoming just too slow it frequently gets to not responding for several minutes until getting back to its senses again. That's for whichever random operation such as deleting 1 item from library. I've also read on few more places that gives very little hope on fixing this issue, but I wonder... Is there any way to tweak it and make it work as fast as expected? Am I missing something or is this just a complete and utterly useless piece of software for libraries with more than 10 thousand thingies?

    Read the article

  • How to access internet from 2 laptops with data card plugged-in in one of the machine?

    - by learnerforever
    Hi, I have 2 laptops - one running Windows XP and other running Vista. Both have wifi card.I have one Reliance broadband data card. I want to be able to access internet on both the machines simultaneously using this one data card. Please help. I think, there would be many many ways to do it. I do have some linksys router but any simple quick way without any extra hardware? like we could set up p2p or WLAN between these 2 machines, because both have wifi card so we shouldn't compulsorily need any extra hardware(?) I am fine with connecting data card to either of the machines. Thanks,

    Read the article

  • The Best of CES (Consumer Electronics Show) in 2011

    - by Justin Garrison
    This year, How-To Geek’s own Justin was on-site at the Consumer Electronics Show in Las Vegas, where every gadget manufacturer shows off their latest creations, and he was able to sit down and get hands-on with most of them. Here’s the best of the bunch. Make sure to also check out our list of the Worst of CES 2011, where we covered the gadgets that just didn’t make the cut Latest Features How-To Geek ETC HTG Projects: How to Create Your Own Custom Papercraft Toy How to Combine Rescue Disks to Create the Ultimate Windows Repair Disk What is Camera Raw, and Why Would a Professional Prefer it to JPG? The How-To Geek Guide to Audio Editing: The Basics How To Boot 10 Different Live CDs From 1 USB Flash Drive The 20 Best How-To Geek Linux Articles of 2010 Arctic Theme for Windows 7 Gives Your Desktop an Icy Touch Install LibreOffice via PPA and Receive Auto-Updates in Ubuntu Creative Portraits Peek Inside the Guts of Modern Electronics Scenic Winter Lane Wallpaper to Create a Relaxing Mood Access Your Web Apps Directly Using the Context Menu in Chrome The Deep – Awesome Use of Metal Objects as Deep Sea Creatures [Video]

    Read the article

  • The Worst of CES (Consumer Electronics Show) in 2011

    - by Justin Garrison
    This year, How-To Geek’s own Justin was on-site at the Consumer Electronics Show in Las Vegas, where every gadget manufacturer shows off their latest creations, and he was able to sit down and get hands-on with most of them. Here’s the ones that just didn’t make the cut. Make sure you also read our Best of CES 2011 post, where we cover the greatest gadgets that we found. Keep reading to take a look at the best of the worst products, that might have initially appeared good but showed their true colors after we spent some time with them Latest Features How-To Geek ETC HTG Projects: How to Create Your Own Custom Papercraft Toy How to Combine Rescue Disks to Create the Ultimate Windows Repair Disk What is Camera Raw, and Why Would a Professional Prefer it to JPG? The How-To Geek Guide to Audio Editing: The Basics How To Boot 10 Different Live CDs From 1 USB Flash Drive The 20 Best How-To Geek Linux Articles of 2010 Arctic Theme for Windows 7 Gives Your Desktop an Icy Touch Install LibreOffice via PPA and Receive Auto-Updates in Ubuntu Creative Portraits Peek Inside the Guts of Modern Electronics Scenic Winter Lane Wallpaper to Create a Relaxing Mood Access Your Web Apps Directly Using the Context Menu in Chrome The Deep – Awesome Use of Metal Objects as Deep Sea Creatures [Video]

    Read the article

  • swfupload session problem destroy session

    - by saquib
    Hello Friends, I have a problem with swfupload. I am passing session_id() like this /upload-file.php?s=189477fcfa1ec7f630e70a09e1e84cae but its not maintaining session and destroying my current session (logging me out) here is code in file upload. <?php if(isset($_GET['s'])) { session_id($_GET['s']); session_start(); require_once 'admin/class/user.php'; $u = new User(); //Check for user logged in if($u->islogged() == FALSE) { header("location: index.php"); exit(); code continue ..... } because am not logged in server redirect me to the index.php this is swfupload debugger window output SWF DEBUG: ----- END SWF DEBUG OUTPUT ---- SWF DEBUG: SWF DEBUG: Event: fileDialogStart : Browsing files. Multi Select. Allowed file types: *.jpg SWF DEBUG: Select Handler: Received the files selected from the dialog. Processing the file list... SWF DEBUG: Event: fileQueued : File ID: SWFUpload_0_0 SWF DEBUG: Event: fileDialogComplete : Finished processing selected files. Files selected: 1. Files Queued: 1 SWF DEBUG: StartUpload: First file in queue SWF DEBUG: Event: uploadStart : File ID: SWFUpload_0_0 SWF DEBUG: ReturnUploadStart(): File accepted by startUpload event and readied for upload. Starting upload to /upload-file.php?s='189477fcfa1ec7f630e70a09e1e84cae' for File ID: SWFUpload_0_0 SWF DEBUG: Event: uploadProgress (OPEN): File ID: SWFUpload_0_0 SWF DEBUG: Event: uploadProgress: File ID: SWFUpload_0_0. Bytes: 317793. Total: 317793 SWF DEBUG: Event: uploadError: HTTP ERROR : File ID: SWFUpload_0_0. HTTP Status: 302. SWF DEBUG: Event: uploadComplete : Upload cycle complete. SWF DEBUG: StartUpload: First file in queue SWF DEBUG: StartUpload(): No files found in the queue.

    Read the article

  • wpf working state

    - by taras.roshko
    Hi, I have a grid in my application. After user selects some files in ofdialog application processes some calculations. While app is making calculations it looks like it is not responding. How to display some picture and make main window in black&white while calculating? Maybe make some dp in MainWindow a la "IsBusy" and bind a popup with picture to it? How you implement this logic in yours apps?

    Read the article

  • Error using `loess.smooth` but not `loess` or `lowess`

    - by Sandy
    I need to smooth some simulated data, but occasionally run into problems when the simulated ordinates to be smoothed are mostly the same value. Here is a small reproducible example of the simplest case. > x <- 0:50 > y <- rep(0,51) > loess.smooth(x,y) Error in simpleLoess(y, x, w, span, degree, FALSE, FALSE, normalize = FALSE, : NA/NaN/Inf in foreign function call (arg 1) loess(y~x), lowess(x,y), and their analogue in MATLAB produce the expected results without error on this example. I am using loess.smooth here because I need the estimates evaluated at a set number of points. According to the documentation, I believe loess.smooth and loess are using the same estimation functions, but the former is an "auxiliary function" to handle the evaluation points. The error seems to come from a C function: > traceback() 3: .C(R_loess_raw, as.double(pseudovalues), as.double(x), as.double(weights), as.double(weights), as.integer(D), as.integer(N), as.double(span), as.integer(degree), as.integer(nonparametric), as.integer(order.drop.sqr), as.integer(sum.drop.sqr), as.double(span * cell), as.character(surf.stat), temp = double(N), parameter = integer(7), a = integer(max.kd), xi = double(max.kd), vert = double(2 * D), vval = double((D + 1) * max.kd), diagonal = double(N), trL = double(1), delta1 = double(1), delta2 = double(1), as.integer(0L)) 2: simpleLoess(y, x, w, span, degree, FALSE, FALSE, normalize = FALSE, "none", "interpolate", control$cell, iterations, control$trace.hat) 1: loess.smooth(x, y) loess also calls simpleLoess, but with what appears to be different arguments. Of course, if you vary enough of the y values to be nonzero, loess.smooth runs without error, but I need the program to run in even the most extreme case. Hopefully, someone can help me with one and/or all of the following: Understand why only loess.smooth, and not the other functions, produces this error and find a solution for this problem. Find a work-around using loess but still evaluating the estimate at a specified number of points that can differ from the vector x. For example, I might want to use only x <- seq(0,50,10) in the smoothing, but evaluate the estimate at x <- 0:50. As far as I know, using predict with a new data frame will not properly handle this situation, but please let me know if I am missing something there. Handle the error in a way that doesn't stop the program from moving onto the next simulated data set. Thanks in advance for any help on this problem.

    Read the article

  • Jquery .Animate Width Problem.

    - by smoop
    Thanks in advance for any-help with this, I'll try and explain it well. I have a container of 1000px width and 220px height, in this I will have three columns 220px in height but with different widths (77px, 200px and 300px). When you click one div it will open to a fixed size (the same for each, say 400px) and the others which are not clicked will shrink back to their original sizes (77px, 200px and 300px). Like an accordian with different widths.. My jquery is getting there but not quite, I know how to create an Event on click, I know from there I need to shrink everything but the one I clicked back to their orignal size. I finish but making the one clicked expand to the size it needs to be. jsfiddle here! $(document).ready(function(){ // Your code here $('.section').click(function() { $('.section').not(this).animate({width:"77px"},400); //alert('clicked!'); $(this).animate({width:"400px"},400); }); }); <div id="pictureNavContainer"> <div class="section pictureSectionOne" id="1"></div> <div class="section pictureSectionTwo" id="2"></div> <div class="section pictureSectionThree" id="3"></div> </div> <style> #pictureNavContainer{background-color:#262626; width:1000px; height:220px; overflow:hidden;} .pictureSectionOne{float:left; background:yellow; height:220px; width:77px;} .pictureSectionTwo{float:left; background:red; height:220px; width:177px;} .pictureSectionThree{float:left; background:blue; height:220px; width:400px;} </style> I figured a kind of solution: <script> $(document).ready(function(){ // Your code here $('.section').click(function() { $('#1').animate({width:"50px"},400); $('#2').animate({width:"100px"},400); $('#3').animate({width:"200px"},400); //alert('clicked!'); $(this).animate({width:"400px"},400); }); }); </script> But the code isnt very good.. but it works This: $(function(){ var $sections = $('.section'); var orgWidth = []; var animate = function() { var $this = $(this); $sections.not($this).each(function(){ var $section = $(this), org = orgWidth[$section.index()]; $section.animate({ width: org }, 400); }); $this.animate({ width: 400 }, 400); }; $sections.each(function(){ var $this = $(this); orgWidth.push($this.width()); $this.click(animate); }); });

    Read the article

  • Help me to split string with Regular Expression

    - by Lu Lu
    Hello, I have a string: CriteriaCondition={FieldName={*EPS}*$MinValue=(-201)$MaxValue=(304)$TradingPeriod=(-1)} Help me to get the first word which ends with the first word "={" & get the next following word which ends with "}". The result must be: Word1 = "CriteriaCondition" Word2 = "FieldName={EPS}$MinValue=(-201)$MaxValue=(304)$TradingPeriod=(-1)" And with the string "FieldName=(EPS)$MinValue=(-201)$MaxValue=(304)$TradingPeriod=(-1)", help me to split to pairs: FieldName EPS MinValue -201 MaxValue 304 TradingPeriod -1 Thanks.

    Read the article

  • what is the correct way to force existing activities to reload using the new local

    - by pengwang
    have a settings dialog/activity where I allow the user to change the locale. Within that activity i call Resources res = ctx.getResources(); // Change locale settings on the device DisplayMetrics dm = res.getDisplayMetrics(); android.content.res.Configuration conf = res.getConfiguration(); conf.locale = new Locale(language_code.toLowerCase(), coutry_code.toUpperCase()); res.updateConfiguration(conf, dm); and call onChanged() for my settings ListView... everything changes perfectly. Very nice. Then I hit the back button to go back to the previous activity thinking everything should be switched; nope. Everything is still in the previous locale. So I added the above code in the onResume() of the activity thinking that would do it; nope. Also, when I click the menu button of this activity again (not first time) I do not get called in onCreateOptionsMenu() it just displays the previous menu. My question is what is the correct way to force existing activities to reload using the new local?

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >