Search Results

Search found 18677 results on 748 pages for 'current'.

Page 50/748 | < Previous Page | 46 47 48 49 50 51 52 53 54 55 56 57  | Next Page >

  • Test if current page is inside a shadowbox? (so i can close the shadowbox and reopen that page in t

    - by Max Williams
    Hi all I have a couple of pages in my site which open in a shadowbox window rather than the main window. My problem is that if the user session expires, then the user clicks on one of the links that open in a shadowbox, they are redirected to the login page INSIDE THE SHADOWBOX, which i don't want. I've been trying to think of the best way to handle this - one way i thought of, which seems a bit clumsy tbh, was on the login page to test if we're in a shadowbox, and if we are then close it and redirect the parent window to the login page. a) does this seem like a sensible plan? I added the following to my login page, which works: $(document).ready(function(){ if(window.parent.location != window.location){ window.parent.location.href = window.location; } } but i have to wait for the shadowbox to finish loading the page and then redirect. So it's working but like i say a bit clumsy. Is there a nicer way? grateful for any advice - max

    Read the article

  • How to exit current activity to homescreen (without using "Home" button)?

    - by steff
    Hi everyone, I am sure this will have been answered but I proved unable to find it. So please excuse my redundancy. What I am trying to do is emulating the "Home" button which takes one back to Android's homescreen. So here is what causes me problems: I have 3 launcher activities. The first one (which is connected to the homescreen icon) is just a (password protected) configuration activity. It will not be used by the user (just admin) One of the other 2 (both accessed via an app widget) is a questionnaire app. I'm allowing to jump back between questions via the Back button or a GUI back button as well. When the questionnaire is finished I sum up the answers given and provide a "Finish" button which should take the user back to the home screen. For the questionnaire app I use a single activity (called ItemActivity) which calls itself (is that recursion as well when using intents?) to jump from one question to another: Questionnaire.serializeToXML(); Intent i = new Intent().setClass(c, ItemActivity.class); if(Questionnaire.instance.getCurrentItemNo() == Questionnaire.instance.getAmountOfItems()) { Questionnaire.instance.setCompleted(true); } else Questionnaire.instance.nextItem(); startActivity(i); The final screen shows something like "Thank you for participating" as well as the formerly described button which should take one back to the homescreen. But I don't really get how to exit the Activity properly. I've e.g. used this.finish(); but this strangely brings up the "Thank you" screen again. So how can I just exit by jumping back to the homescreen?? Sorry for the inconvinience. Regards, Steff

    Read the article

  • Redirecting via .htaccess to .php with arguments in current folder.

    - by Jengerer
    Hey, I'm trying to redirect something like foo/bar to ?foo=bar, so I can do www.mydomain.com/hey/foo/bar to www.mydomain.com/hey/?foo=bar, but I can't seem to get the syntax right. I tried the following: RewriteEngine on RewriteRule ^foo/(.*)$ ?foo=bar [NC] But this doesn't work. How would I accomplish this? I tried adding a forward slash behind the question mark, but that makes it link to the root directory. Thanks, Jengerer

    Read the article

  • CPU/GPU Monitering. (Tempature, current speed, etc) in C#

    - by Tommy
    Im looking for a way to moniter system statistics, here are my main points of interest: CPU Tempature CPU speed, (Cycles per second) CPU Load (Idle percent) GPU Tempature Some other points of interest: Memory useage Network Load (Traffic Up/Down) My ultimate goal is to write an application that can be used for easily running in the backround, and allow setting many events fr certain actions, for instance When processer temp gets to 56C -> Do _Blank_ etc. So this leaves me two main points. Is there a framework already out there for this sort of thing? If No to #1, How can i go about doing this?

    Read the article

  • How can I convert seconds to minutes in jQuery while updating an element with the current time?

    - by pghtech
    So I see a number of ways to display allot of seconds in a (static) hr/min/sec. However, I am trying to produce a visual count down timer: $('#someelement').html(minCounter + ' minutes ' + ((secCounter == 0) ? '' : (secCounter + ' seconds'))); My counter is reduced inside a SetInterval that triggers ever 1 second: //....... var counter = redirectTimer; jQuery('#WarningDialogMsg').html(minCounter + ' minutes ' + ((secCounter == 0) ? '' : (secCounter + ' seconds'))); //........ SetInternval( function() { counter -= 1; secCounter = Math.floor(counter % 60); minCounter = Math.floor(counter / 60); //....... $('#someelement').html(minCounter + ' minutes ' + ((secCounter == 0) ? '' : (secCounter + ' seconds'))); }, 1000) It is a two minute counter but I don't want to display 120 seconds. I want to display 1 : 59 (and counting down). I have managed to get it to work using the above, but my main question is: is there a more elegant way to accomplish the above? (note: I am redirecting once "counter == 0").

    Read the article

  • Reversing a circular deque without a sentinel

    - by SDLFunTimes
    Hey Stackoverflow I'm working on my homework and I'm trying to reverse a circular-linked deque without a sentinel. Here are my data structures: struct DLink { TYPE value; struct DLink * next; struct DLink * prev; }; struct cirListDeque { int size; struct DLink *back; }; Here's my approach to reversing the deque: void reverseCirListDeque(struct cirListDeque* q) { struct DLink* current; struct DLink* temp; temp = q->back->next; q->back->next = q->back->prev; q->back->prev = temp; current = q->back->next; while(current != q->back->next) { temp = current->next; current->next = current->prev; current->prev = temp; current = current->next; } } However when I run it and put values 1, 2 and 3 on it (TYPE is just a alias for int in this case) and reverse it I get 2, 3, null. Does anyone have any ideas as to what I may be doing wrong? Thanks in advance.

    Read the article

  • How to display the properties of the current selected component in a JPanel using the Netbeans Platf

    - by Burmudar
    I am currently building a small visual designer using the Netbeans Platform. All my components that can be placed on the JPanel show correctly in the Palette Window. What I am struggling to do at the moment, is to let the property window show the properties of the component that was either just dragged and dropped or showing the currently selected component in the JPanel in the Properties window. Any help would be greatly appreciated.

    Read the article

  • How do I get a reference to the current project in an Eclipse plugin?

    - by Martin Doms
    I'm creating an editor for Eclipse. Right now the editor fires up with the user creates a new file with the appropriate extension. My question is, how can I get a reference to the project in which the file resides? For example, say I have a workspace with 2 projects, P1 and P2. I right click P2 and create a new file, can I get a reference to P2 from this somehow? Ultimately I need to reference the AST or Java Model of the project but even a String identifying the project would work.

    Read the article

  • How get current month short name with jquery ui datepicker instead full month name?

    - by Yosef
    My code that give long month name instead short name: var monthShortName=$.datepicker.formatDate('MM d, yy', new Date(),{ monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun','Jul','Aug','Sep','Okt','Nov','Dec'] }); alert(monthShortNam); // "March" and not like i want "Mar" Thanks (I use JQuery 1.7.1 + jQuery UI 1.8.2) Edit - Eliasson Solution('M' and not 'MM'): $.datepicker.formatDate('M d, yy', new Date());

    Read the article

  • Where do current (not HTML5) browsers stand on clipboard support for non-text data?

    - by John
    I don't really know where the line is between the browser itself and HTML/JS here. But let's say I want to write a web-app where I can copy a chunk of data from MSPaint (select, CTRL+c) and paste it into a web-page in some way... ultimately the point is the data goes to the server without me having to save it as a file first. Where are the problems here - browsers or client-side technologies? For instance if JS can't do it, could Flex/Silverlight? Advice on future technology welcome, but doesn't really answer the question - where are we right now with IE/FF/Chrome and JS/Flex/SL?

    Read the article

  • How can I access variables outside of current scope in javascript?

    - by sekmet64
    I'm writing some application in javascript and cannot figure it out how to access the variables declared in my function, inside this jquery parse. Inside I can access global variables, but I don't really want to create global vars for these values. Basically I want to extract file names from an xml document in the simulationFiles variable. I check if the node attribute is equal with the simName and extract the two strings inside the xml elements, that part I think it's working. How can I extract those xml elements and append them to local variables? function CsvReader(simName) { this.initFileName = "somepath"; this.eventsFileName = "somepath"; $(simulationFiles).find('simulation').each(function() { if ($(this).attr("name") == simName) { initFileName += $(this).find("init").text(); eventsFileName += $(this).find("events").text(); } }); }

    Read the article

  • How to Stop Current Playing Song When using one thread with JLayer?

    - by mcnemesis
    I recently used a solution to the one-thread-at-a-time problem whe using Jlayer to play mp3 songs in Java. But this solution by Kaleb Brasee didn't hint at how you could stop the player, i.e how could one then call player.close()? Kaleb's code was: Executor executor = Executors.newSingleThreadExecutor(); executor.execute(new Runnable() { public void run() { /* do something */ } }); and this is the code I put in run() if(player != null) player.close(); try{ player = new Player(new FileInputStream(musicD.getPath())); player.play(); }catch(Exception e){} The problem is that much as this solves the problem of keeping the gui active while the music plays (in only one other thread -- what i'd wanted), I can't start playing another song :-( What could I do?

    Read the article

  • How to call constructor of the current class and parent class at the same time?

    - by Siegfried
    public class A{ public A(int a, int b) {...} } public class B : A{ List a; List b; public B(){...} //constructor1 public B(int a, int b) : base(a,b){...} //constructor2 } My question is I need to initialize both list a and b in class B. If I put them in the constructor1, how can I call constructor1 in constructor2? I don't want to rewrite the initialization statements in constructor2 again. Thanks!

    Read the article

  • Get just the hour of day from DateTime using either 12 or 24 hour format as defined by the current c

    - by InvisibleBacon
    .Net has the built in ToShortDateString() function for DateTime that uses the CultureInfo.CurrentCulture.DateTimeFormat.ShortTimePattern format. It returns something like this for en-US: "5:00 pm". For a 24 hour culture such as de-DE it would return "17:00". What I want is a way to just return just the hour (So "5 pm" and "17" in the cases above) that works with every culture. What's the best/cleanest way to do this? Thanks!

    Read the article

  • What is the current standard for authenticating Http requests (REST, Xml over Http)?

    - by CodeToGlory
    The standard should solve the following Authentication challenges like- Replay attacks Man in the Middle Plaintext attacks Dictionary attacks Brute force attacks Spoofing by counterfeit servers I have already looked at Amazon Web Services and that is one possibility. More importantly there seems to be two most common approaches: Use apiKey which is encoded in a similar fashion like AWS but is a post parameter to a request Use Http AuthenticationHeader and use a similar signature like AWS. Signature is typically obtained by signing a date stamp with an encrypted shared secret. This signature is therefore passed either as an apiKey or in the Http AuthenticationHeader. I would like to know weigh both the options from the community, who may have used one or more and would also like to explore other options that I am not considering. I would also use HTTPS to secure my services.

    Read the article

< Previous Page | 46 47 48 49 50 51 52 53 54 55 56 57  | Next Page >