Search Results

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

Page 126/748 | < Previous Page | 122 123 124 125 126 127 128 129 130 131 132 133  | Next Page >

  • Can I get information about the IIS7 virtual directory from Application_Start?

    - by Keith
    I have 3 IIS7 virtual directories which point to the same physical directory. Each one has a unique host headers bound to it and each one runs in its own app pool. Ultimately, 3 instances of the same ASP.NET application. In the Application_Start event handler of global.asax I would like to identify which instance of the application is running (to conditionally execute some code). Since the Request object is not available, I cannot interrogate the current URL so I would like to interrogate the binding information of the current virtual directory? Since the host header binding is unique for each site, it would allow me to identify which application instance is starting up. Does anyone know how to do this or have a better suggestion?

    Read the article

  • Perl : localtime with print

    - by kiruthika
    Hi all, I have used the following statements to get the current time. print "$query executed successfully at ",localtime; print "$query executed successfully at ",(localtime); print "$query executed successfully at ".(localtime); Output executed successfully at 355516731103960 executed successfully at 355516731103960 executed successfully at Wed Apr 7 16:55:35 2010 The first two statements are not printing the current time in a date format. Third statement only giving the correct output in a date format. My understanding is the first one is returning a value in scalar context,so it is returning numbers. Then in the second print I used localtime in list context only,why it's also giving number output.

    Read the article

  • MediaElement seems to disable lock screen when playing a video

    - by CrossProduct
    I am working on an application that plays a video using the MediaElement component. Now, I would like that if the user is idle, the lock screen appears, as configured by the user in the Settings of the device. If I don't play a video, the lock screen indeed appears. But, when a video is playing no lock screen appears. I cannot find any information on this. Currently I set the idle detection modes like this: PhoneApplicationService.Current.ApplicationIdleDetectionMode = IdleDetectionMode.Enabled; PhoneApplicationService.Current.UserIdleDetectionMode = IdleDetectionMode.Enabled; I am a bit lost now. The only solution I can think of is running a timer myself and stop the video playback after a certain time. (but there seems to be no API calls to receive the configured lock timeout.) Any suggestions are welcome, thanks.

    Read the article

  • Using ASP.NET Session for Lifetime Management (Unity)

    - by Sigray
    I am considering using Unity to manage the lifetime of a custom user class instance. I am planning on extending the LifetimeManager with a custom ASP.NET session manager. What I want to be able to do is store and retrieve the currently logged in user object from my custom classes, and have Unity get the instance of User from the session object in ASP.NET, or (when in a Win32 project) retrieve it statically or from the current thread. So far my best solution is to create a static instance of my Unity container on startup, and use the Resolve method to get my User object from each of my classes. However, this seems to create a dependency on the unity container in my other classes. What is the more "Unity" way of accomplishing this goal? I would like to be able to read/replace the current User instance from any class.

    Read the article

  • IsAuthenticated is false!

    - by Naor
    This is how I login ('user' holds the data of the user): HttpResponse Response = HttpContext.Current.Response; HttpRequest Request = HttpContext.Current.Request; FormsAuthenticationTicket ticket = new FormsAuthenticationTicket(1, user.UserId.ToString(), DateTime.Now, DateTime.Now.AddHours(12), false, UserResolver.Serialize(user)); HttpCookie cookie = new HttpCookie(FormsAuthentication.FormsCookieName, FormsAuthentication.Encrypt(ticket)); cookie.Path = FormsAuthentication.FormsCookiePath; Response.Cookies.Add(cookie); string redirectUrl = user.HomePage; Response.Redirect(redirectUrl); After this login I get IsAuthenticated == false. Why?? It worked for me before an hour but I don't know what is wrong now.

    Read the article

  • Auto-complete/suggestion popup menu in GtkTextView

    - by Tyler
    I'm trying to create a system that will allow me to respond to the current text and auto-complete/suggest what should come next. For example if the user starts to type "Batm" then the system would respond with a menu showing the full completed word "Batman". Think of an IDE like Eclipse or Visual Studio and you get the idea. I understand how to create a popup menu in Gtk+ but what I don't understand is the following: How do I grab the word that the user is currently typing from a GtkTextView (or SourceView) so that I can do a lookup and offer suggestions? How do I position the menu in such a way that it sits next to the current text item (like it would in an IDE)? If anyone could offer suggestions or even a link to a tutorial or example on how to do this correctly I would be forever grateful. As always thanks for you help! Programming language: C

    Read the article

  • Drupal - Selected Node Highlighting in Views

    - by fighella
    Drupal Question: Does anyone have a method of using Views and highlighting a selected/current node. So for example: I have a list of articles under a heading: 2009 Articles Dog Training Cat Cleaning Snake Wrangling The 3 articles are made from the view (ie: latest articles from 2009)... as the user makes new articles, they are automatically added into this view by title. I now need to find a way, that if a user clicks on say CAT CLEANING.... and the cat cleaning article appears, the CAT CLEANING in the view becomes bold (or some CSS indication it's the current article.) I know this is pretty easy with MENU's, But I don't want to force a user to add new articles into a menu. Thanks alot, JD

    Read the article

  • Why I get different date formats when I run my application through IIS and Visual Studio's web serve

    - by Puneet Dudeja
    I get the same culture i.e. "en-US" while running the website from both IIS and Visual Studio's web server. But I get a different date format as follows, when I run the following code: HttpContext.Current.Response.Write(System.Threading.Thread.CurrentThread.CurrentCulture.ToString()); HttpContext.Current.Response.Write(System.Threading.Thread.CurrentThread.CurrentCulture.DateTimeFormat.ShortDatePattern); On Visual Studio's web server: dd/MM/yyyy en-US On IIS: M/d/yyyy en-US Does "Regional and Language Options" in "Control Panel" play any role in this ? If I change the date format there in "Regional and Language Options", I see no effect in my application.

    Read the article

  • XNA .FBX Vertex Color Missing

    - by Alex
    When I vertex paint and export my models from Blender (or Maya) for use in my XNA 4.0 project, I somehow lose the vertex color channel for the model. I use no custom model object or content pipelines and my own shader throws me the error: The current vertex declaration does not include all the elements required by the current vertex shader. Color0 is missing. I tryed to reopen the model in other modeling tools and the vertex colors are there. What could cause the vertex color channel to not get loaded in XNA 4.0? Here's a temporary link to the FBX file(server refuses to send a fbx, so rename the .jpg file to .fbx after downloading) http://resources.gamestack.org/BananaBush.jpg

    Read the article

  • Is it good practice to put private API in the .m files and public API in .h files in Cocoa?

    - by Paperflyer
    Many of my classes in my current project have several properties and methods that are only ever called from within the class itself. Also, they might mess with the working of the class depending on the current state of the class. Currently, all these interfaces are defined in the main interface declaration in the .h files. Is it considered good practice to put the “private” methods and properties at the top of the .m files? This won't ever affect anything since I am very likely the only person ever to look at this source code, but of course it would be interesting to know for future projects.

    Read the article

  • SQL Server adding a record record manually to a view

    - by SelectDistinct
    I have a view which contains the data seen in the image below. The view is showing me how many working days are available in each month for the current financial year taking away any school/bank holidays. As the month of August has zero days available it has excluded this month from the view. As the total number of days available will always be zero for the month of August, then it seems acceptable to hardcode the SQL to always have 0 for August, and also an April-August record which will be the same as April-July. What would be the best way to add these 2 records, and where about in the code should it be placed see example of code layout: see link (answered question) for layout of code: SQL populate total working days per month minus bank holidays for current financial year

    Read the article

  • Android source referencing missing classes

    - by jqpubliq
    I cloned some of the trees from the Android Open Source Project to take a look at the code, but I can't build them because they reference classes which don't seem to exist. For instance, the music application here references android.media.MediaFile which according to the package summary does not exist, as well as things like ArrayListCursor which has an old javadoc around but is absent in current documentation. So is the open source project disjoint from the released SDK? Also, is there a way to build these open source packages with the current SDK? Thanks, -JQP

    Read the article

  • efficient way to detect if an image is empty

    - by Jos
    Hi, I need a very fast method to detect if an image is empty. Im my case then all pixels are white and transparant. The images are png's. My current method is to load them in a memory bitmap and check each pixel value, but this is way to slow. Is there a more efficient way? This is my current code: 'Lock the bitmap bits. Dim bmpData As System.Drawing.Imaging.BitmapData = bmp.LockBits(rectBmp, _ Drawing.Imaging.ImageLockMode.ReadOnly, bmp.PixelFormat) Try Dim x As Integer Dim y As Integer For y = 0 To bmpData.Height - 1 For x = 0 To bmpData.Width - 1 If System.Runtime.InteropServices.Marshal.ReadByte(bmpData.Scan0, (bmpData.Stride * y) + (4 * x) + 3) <> 0 Then Return True Exit For End If Next Next Finally bmp.UnlockBits(bmpData) End Try

    Read the article

  • Simple Emacs keybindings

    - by User1
    I have two operations that I do all the time in Emacs: Create a new buffer and paste the clipboard. [C-S-n] Close the current buffer. [C-S-w] Switch to the last viewed buffer [C-TAB] I feel like a keyboard acrobat when doing the first two operations. I think it would be worth trying some custom keybindings and macros. A few questions about this customization: How would I make a macro for #1? Are these good keybindings (i know this is a bit subjective, but they might be used by something popular that I don't use) Has anyone found a Ctrl-Tab macro that will act like Alt-Tab in Linux/Windows? Specifically, I want it have a stack of buffers according to the last viewed timestamp (most recent on top). I want to continue cycling through the stack until I let go of the ctrl key. When the ctrl key is released, I want the current buffer to get an updated position on the stack.

    Read the article

  • Convert VB6 Randomize to C#

    - by Thomas G. Mayfield
    I'm writing a C# frontend to a legacy database that uses VB6 Rnd() and Randomize() methods for user password encryption. The encryption function is very simplistic and really not all that secure, but it's what all current passwords are stored with. What I'd like to be able to do is authenticate legacy users from a C# application. I can write new encryption (or preferably hashing) code for VB6 so that all future users have a more secure password, and that can be duplicated in C#. But I don't want to require current users to have had their password reset before they can use the new frontend. Is there any way I can reimplement that algorithm in C# so that it produces identical results to the legacy VB6 code?

    Read the article

  • How to get my first programming job.

    - by itsbunnies
    What is the best way to go about getting your very first programming job? I am currently going to college but have a few years before I graduate. I want to get out of my current "factory" job and into a computer related field as soon as possible. I found quite a few positions that I qualify for, but believe my pathetic resume has hurt me. My resume has a "skills" section where I list everything I am familiar with, but my employment section contains my first job (Super Wash, best car wash around!) and my current job (Assembling stuff that makes up various fans and motors). How do I get a company to give me a chance?

    Read the article

  • How can I highlight the line of text that is closest to the mouse?

    - by Aaron Digulla
    I have a long text and I'd like to offer the user a reading help: The current line should be highlighted. To make it easier, I'll just use the Y coordinate of the mouse (this way, the mouse pointer isn't going to get in the way). I have a big DIV with the id content which fills the whole width and a small DIV with the class content for the text (see here for an example). I'm using jQuery 1.4. How can I highlight the line of text that is closest to the current mouse position?

    Read the article

  • Smart pagination algorithm

    - by silvertab
    I'm looking for an example algorithm of smart pagination. By smart, what I mean is that I only want to show, for example, 2 adjacent pages to the current page, so instead of ending up with a ridiculously long page list, I truncate it. Here's a quick example to make it clearer... this is what I have now: Pages: 1 2 3 4 [5] 6 7 8 9 10 11 This is what I want to end up with: Pages: ... 3 4 [5] 6 7 ... (In this example, I'm only showing 2 adjacent pages to the current page) I'm implementing it in PHP/Mysql, and the "basic" pagination (no trucating) is already coded, I'm just looking for an example to optimize it... It can be an example in any language, as long as it gives me an idea as to how to implement it...

    Read the article

  • WCF REST Does Not Contain All of the Relative File Path

    - by Brandon
    I have a RESTful WCF 3.5 endpoint as such: System.Security.User.svc This is supposed to represent the namespace of the User class and is desired behavior by our client. I have another endpoint I created for testing called: Echo.svc I am writing an overridden IHttpModule and in my module, I follow what almost everyone does by doing: string path = HttpContext.Current.Request.AppRelativeCurrentExecutionFilePath; If I make a call to: http://localhost/services/Echo/test My path variable has a value of '~/echo/test' However, when I make a call to: http://localhost/services/System.Security.User/test My path variable has a value of '~/system.security.user' In my 2nd situation, it is stripping off the '/test' on the end of any endpoint that contains multiple periods. This is undesired behavior and the only solution I have found to fixing this is some ugly string manipulation using the property which does contain the complete URL path: string rawPath = HttpContext.Current.Request.RawUrl; This returns '/services/system.security.user/test'. Does anyone know why my first situation does not return the rest of the URL path for endpoints that contain multiple periods in the name?

    Read the article

  • How can I access the value of a checkbox without a postback?

    - by Starwfanatic
    I have a radgrid controlling access to an application for users. There are two columns, a 'name' column and a checkbox 'access' column representing their current access permission. the checkboxes are populated from a database. I would like the to change the checkboxes to grant or deny access to the users I specify. Since there are alot of users I would like to make multiple changes and use a submit button to write the changes to the database. I do not want to postback with each checkbox change and wait for the page to "blink". My problem is that with the checkbox postback disabled, when I click submit, the value of the checkboxes are not registering the changes I make. I need a way to access the current client-side state of the checkbox or some workaround to accomplish this. Thanks in advance!

    Read the article

  • What preferred way to reconcile keyCode/charCode across browsers?

    - by Drew Turner
    Based on the properties of the keydown event I would like to ascertain what the current charCode are? Example. For the keydown event when the NumPad0, D0, and Colon key is pressed I would like to know what the associated charcode is. Currently I have a map that contains the charcode associated with that keyCode or use the current if charCode is not specified. keyCode = { Colon: 186, D0: 48, NumPad0: 96, }; charCodes = { 186: 59, 96: 48, }; shiftCharCodes = { 186: 58, 48: 41 }; Also in certain cases the keyCodes are different accross browsers? Example. The keydown event has different keyCode values across browsers. Colon Key (:/;) - keyCode is 59 on firefox - keyCode is 186 on IE/safari For more information http://www.quirksmode.org/js/keys.html

    Read the article

  • MySQL Many to Many with Unique keys and Update/Select if Exists otherwise Insert

    - by Jayrox
    In my goal to have a Many-to-Many relationship in my MySQL database I have arrived at another bridge to build. Current Tables: Users (id, name) Tags (id, name) User_Tags (user_id, tag_id) Here is the goal: I would like to have the ability to take a tag i.e: #fb and insert it into my Tags database which has a unique constraint on name and if the tag exists I would like to return it's id I would like to insert the tag.id and the current user's user.id into User_Tags. I do not have any unique constraints on the User_Tags table because I would like to be able to track the user's most commonly used tags and present them in a list ordered by frequency of use. I am currently developing this project in PHP using prepared statements. Additionally, performance is not currently an issue as my user count is still fairly small, but it is steadily growing and may be an issue in the future.

    Read the article

< Previous Page | 122 123 124 125 126 127 128 129 130 131 132 133  | Next Page >