Search Results

Search found 4252 results on 171 pages for 'david 85'.

Page 111/171 | < Previous Page | 107 108 109 110 111 112 113 114 115 116 117 118  | Next Page >

  • How to manually set an authenticated user in Spring Security / SpringMVC

    - by David Parks
    After a new user submits a 'New account' form, I want to manually log that user in so they don't have to login on the subsequent page. The normal form login page going through the spring security interceptor works just fine. In the new-account-form controller I am creating a UsernamePasswordAuthenticationToken and setting it in the SecurityContext manually: SecurityContextHolder.getContext().setAuthentication(authentication); On that same page I later check that the user is logged in with: SecurityContextHolder.getContext().getAuthentication().getAuthorities(); This returns the authorities I set earlier in the authentication. All is well. But when this same code is called on the very next page I load, the authentication token is just UserAnonymous. I'm not clear why it did not keep the authentication I set on the previous request. Any thoughts? Could it have to do with session ID's not being set up correctly? Is there something that is possibly overwriting my authentication somehow? Perhaps I just need another step to save the authentication? Or is there something I need to do to declare the authentication across the whole session rather than a single request somehow? Just looking for some thoughts that might help me see what's happening here.

    Read the article

  • Classic ASP and MVC side-by-side, different projects?

    - by David Lively
    I've tried asking this in a few different ways, but let's give it another shot (as I've yet to receive an answer and this is driving me nuts!) I have a very large classic ASP 3.0 application (~350K lines) that I want to start migrating to ASP.NET MVC. I'd like to keep the old ASP files in a separate project from the MVC stuff. Ideas on how to debug these? Should I just dump the files in the same folder and create two different projects ( a WAP and an MVC app) that reference the relevant files and folders required by each? This should work, but does anyone have a better idea? I need the ability to migrate small parts of the application individually as this will probably take a year or two to complete.

    Read the article

  • Resque: Slow worker startup and Forking

    - by David John
    I'm currently moving my application from a Linode setup to EC2. Redis is currently installed on a remote instance with various worker instances interacting with the queue. Thats all going fantastic. My problem is with the amount of time it takes for a worker to be 'instantiated' and slow forking. Starting a worker will usually take between 30 seconds and a minute(from god.rb starting the worker rake task and the worker actively starting work on the queue). I could live with that, but I've not experienced such a wait time on my current Linode production box so I believe its one of my symptoms to a bigger problem. Next issue is that jobs that took a second or less in my previous environment now seem to take about 5 to 10 times longer.. I'm assuming this must be some sort of issue with my Ubuntu install on EC2? One notable difference is that I'm running REE 1.8.7-2010.01 in my new setup, and REE 1.8.6 on the old Linode boxes. Anyone else experienced these issues?

    Read the article

  • Entity Framework 4 - Handling very large (1000+ tables) data models?

    - by David Kreps
    We've got a database with over 1000+ tables and would like to consider using EF4 for our data access layer, but I'm concerned about the practical realities of using it for such a large data model. I've seen this question and read about the suggested solutions here and here. These may work, but appear to refer to the first version of the Entity Framework (and are more complex than I'd like). Does anyone know if these solutions have been improved upon in EF4? Or have other suggestions all together? Thanks.

    Read the article

  • my .jar file won't do anything.

    - by David
    I created a program that more or less holds an array of strings as an object and randomly prints one. so basicaly class Happy { string[] namestrings = new string[#] constructor() { fill with some strings} public static void main (String[]arg) { create instance of class do some junk with it method that prints it } method that prints it {} another method } when i compile and run it on the command line it works fine but when on the comand line i type in jar -cf Happy.jar Fun.class i get a .jar file called Happy and when i click on it i get an error message that reads "the java Jar file happy could not be launched read the consol for possible error messages" I have a mac i'm running lepord if that makes a diference. Whats going on?

    Read the article

  • Session-timeout configuration doesn't work?

    - by David
    In web.xml I have this <session-config> <session-timeout>2</session-timeout> </session-config> <listener> <listener-class>myapplication.SessionListener</listener-class> In the SessionListener.java I have public void sessionDestroyed (HttpSessionEvent event){ System.out.println("Visitor Removed!!"); } But it seems System.out.println("Visitor Removed!!") has never been executed. I am new to Tombat6 and JSp. Any suggestion please?

    Read the article

  • Get Windows Last Reboot Timestamp?

    - by David.Chu.ca
    I have a PC on remote connected by network, but it occasionally crashes or is restarted by remote users. After the restart, some services and applications have to be in running status. So I would like to find out the reboot as soon as possible. I think PS may be a good choice with some scripts so that I could make remote call to get the last reboot timestamp information. Is there any way to get a remote Windows XP last reboot timestamp by using PowerShell 2.0?

    Read the article

  • DataGridView: Scroll bar does not refreshed

    - by David.Chu.ca
    I am working (fixing bugs) on a project which was written in VS 2005. There is one DataGridView control on a form. When it is first time loaded, the control's data grid is populated with rows of data from a collection manually or in codes. Actually, there is method PopulateDataGrid() do the job. There is also another control on the form. When control is changed, the data grid will be cleared first and then rows are repopulated again through PopulateDataGrid(). The problem is that when the grid is refreshed, the vertical scroll bar does not get reset correctly. I thought it should be. Since the scroll bar is not reset, when I tried to click on grid and move down, I got exception: the max value of scroll bar was exceeded. All the settings for grid control are default values. For example, the ScrollBars is Both. The following is the only related place to set row auto size property: poDataGridView.AutoSizeRowsMode = DataGridViewAutoSizeRowsMode.DisplayedCellsExceptHeaders; I am not sure if there is any property I have to set in designer?

    Read the article

  • Find tag that contains certain text and add a class

    - by David Gard
    I have the following HTML, and I need to add a class to both <li> and <a> where the text 'Charts' exists (so not the second line, but rather the 4th and 5th). I cannot change the output of the HTML. <div class="wp-submenu-wrap"> <div class="wp-submenu-head">Charts</div> <ul> <li class="wp-first-item"> <a class="wp-first-item" tabindex="1" href="admin.php?page=charts">Charts</a> </li> <li> <a tabindex="1" href="admin.php?page=add-chart">Add Chart</a> </li> </ul> </div> I've tried doing this by locating the <a> tag that contains the text, but it is not working. Can somebody please point me in the correct direction? Thanks. Code that I've tried - $(document).ready(function(){ if(pagenow === 'admin_page_edit-chart') { var page = $('.wp-submenu-wrap a:contains["Charts"]'); page.addClass('current'); page.parent('li').addClass('current'); } });

    Read the article

  • Observer Design Pattern - multiple event types

    - by David
    I'm currently implementing the Observer design pattern and using it to handle adding items to the session, create error logs and write messages out to the user giving feedback on their actions (e.g. You've just logged out!). I began with a single method on the subject called addEvent() but as I added more Observers I found that the parameters required to detail all the information I needed for each listener began to grow. I now have 3 methods called addMessage(), addStorage() and addLog(). These add data into an events array that has a key related to the event type (e.g. log, message, storage) but I'm starting to feel that now the subject needs to know too much about the listeners that are attached. My alternative thought is to go back to addEvent() and pass an event type (e.g. USER_LOGOUT) along with the data associated and each Observer maintains it's own list of event handles it is looking for (possibly in a switch statement), but this feels cumbersome. Also, I'd need to check that sufficient data had also been passed along with the event type. What is the correct way of doing this? Please let me know if I can explain any parts of this further. I hope you can help and see the problem I'm battling with.

    Read the article

  • PostgreSQL: Why does this simple query not use the index?

    - by David
    I have a table t with a column c, which is an int and has a btree index on it. Why does the following query not utilize this index? explain select c from t group by c; The result I get is: HashAggregate (cost=1005817.55..1005817.71 rows=16 width=4) -> Seq Scan on t (cost=0.00..946059.84 rows=23903084 width=4) My understanding of indexes is limited, but I thought such queries were the purpose of indexes.

    Read the article

  • ActionScript/Flex: Augment MouseEvents with extra information

    - by David Wolever
    I've got a business class, Spam and the corresponding view class, SpamView. How can I augment MouseEvents coming out of SpamView so the MouseEvents which come out of it contain a reference to the instance of Spam which the SpamView is displaying? Here's how I'd like to use it: class ViewContainer { ... for each (spam in spams) { addChild(new SpamView(spam)); ... function handleMouseMove(event:MouseEvent) { if (event is SpamViewMouseEvent) trace("The mouse is being moved over spam:", spam) } } Thanks! Things I've considered which don't work: Adding event listeners to each SpamView: the book keeping (making sure that they are added/removed properly) is a pain. Using event.target: the event's target may be a child of the SpamView (which isn't very useful) Listening for a MouseEvent, creating a new SpamViewMouseEvent, copying all the fields over, then dispatching that: copying all the fields manually is also a pain.

    Read the article

  • I need to sort php jquery gallery script alphabetically

    - by David Cahill
    know nothing about php, but I have this script that reads a folder and displays a thumbnail gallery, problem is it dosent display alphabetically. Have searched the net and seen that sort does this but have no idea where to start any help would be much appreciated. heres the script $sitename = $row_wigsites['id']; $directory = 'sites/'.$sitename.'/pans'; $allowed_types=array('jpg','jpeg','gif','png'); $file_parts=array(); $ext=''; $title=''; $i=0; $dir_handle = @opendir($directory) or die("There is an error with your image directory!"); while ($file = readdir($dir_handle)) { if($file=='.' || $file == '..') continue; $file_parts = explode('.',$file); $ext = strtolower(array_pop($file_parts)); $title = implode('.',$file_parts); $title = htmlspecialchars($title); $nomargin=''; if(in_array($ext,$allowed_types)) { if(($i+1)%4==0) $nomargin='nomargin'; echo ' <div class="pic '.$nomargin.'" style="background:url('.$directory.'/'.$file.') no-repeat 50% 50%;"> <a href="'.$directory.'/'.$file.'" title="Panoramic Stills taken at '.$title.'°" rel="pan1" target="_blank">'.$title.'</a> </div>'; $i++; } } closedir($dir_handle);

    Read the article

  • How can I generate a FindBugs report that shows me the bugs removed between two revisions in the bug

    - by David Deschenes
    I am attempting to execute a combination of the FindBugs commands filterBugs and convertXmlToText, against a bug database that I created, to generate a report that shows me the all of the bugs removed between two revisions of the system that I am working on. Unfortunately, the resulting report does not show any bug details. It appears that the convertXmlToText throws away all bugs that are dead (aka inactive)... the exact set of bugs that I'd like to see. Below is what I see when I pass the results of the filterBugs command to the mineBugHistory command: build/findbugs/bin> ./filterBugs -before r39921 -absent r41558 -active:false ../../../mmfg/bugDB-2.xml | ./mineBugHistory seq version time classes NCSS added newCode fixed removed retained dead active 0 r39764 1271169398000 438 74069 0 64 0 0 0 0 64 1 r39921 1271186932000 441 74333 0 0 22 0 42 0 42 2 r40149 1271185876000 449 74636 0 0 3 0 39 22 39 3 r40344 1271180332000 452 74789 0 0 7 0 32 25 32 4 r40558 1271179612000 452 74806 0 0 1 0 31 32 31 5 r40793 1271178818000 464 75610 0 0 20 0 11 33 11 6 r41016 1271176154000 467 75712 0 0 4 0 7 53 7 7 r41303 1271175616000 481 76931 0 0 7 0 0 57 0 8 r41558 1271175026000 486 77793 0 0 0 0 0 64 0 What I'd like to see in the HTML report is the list of the 64 bugs that are shown as active in version r39764 (sequence # 0). Below is the command line that I am using to generate the HTML report: build/findbugs/bin> ./filterBugs -before r39921 -absent r41558 -active:false ../../../mmfg/bugDB-2.xml | ./convertXmlToText -html:fancy-hist.xsl > ../../../mmfg/bugDB-removed.html

    Read the article

  • Getting true video Height/Width from ASF videos

    - by David
    I am trying to convert an ASF video with FFMPEG using an interface called mediahandler. The issue is, the metadata on the ASF video appears to be corrupt. It states that the video is 640x240, and 4:3 aspect ratio. The aspect ratio is correct, but obviously the resolution is not. This causes the converter to incorrectly scale the video, because it uses the resolution to determine the original aspect ratio. I am able to get the aspect ratio metadata, but I'm not sure this solves the issue, because I would think that if the resolution could be incorrect, then so could the aspect ratio metadata. So, is there any way to get the actual height/width? It appears that players like VLC have no issue with this. How do I do such a thing w/ FFMPEG?

    Read the article

  • Explain this C++ operator definition

    - by David Johnstone
    I have the following operator defined in a C++ class called StringProxy: operator std::string&() { return m_string; } a) What is this and how does this work? I understand the idea of operator overloading, but they normally look like X operator+(double i). b) Given an instance of StringProxy, how can I use this operator to get the m_string?

    Read the article

  • Storing rich text documents

    - by David Veeneman
    This is a follow-up to another question I asked earlier today. I am creating a desktop app that stores rich text documents created in WPF (in a RichTextBox control). The app uses SQL Compact, and up until now, I had planned to store each document in a binary column in the database. I am rethinking that approach. Would it be better practice to store each rich text document in the file system, rather than saving it to the database? I figure I could put the documents in the same folder with the database, then store a relative path to each document in its database record, along with other information about the document (tags and so on). I'd like to know some pros and cons of that approach, along with ideas of what is generally considered best practice for this sort of thing. Thanks for your help.

    Read the article

  • Does/Will autofac's ASP.NET integration support PreInit or Init events?

    - by David Rubin
    I see from poking around in the 1.4.4 source that Autofac's ASP.NET integration (via Autofac.Integration.Web) peforms injection of properties on the Page as part of the HttpContext.PreRequestHandlerExecute event handling, but that the page's child controls don't get their properties injected until Page.PreLoad. What this means, though is that the injected properties of child controls are unavailable for use in the OnInit event handler. For example, this works fine: HelloWorld.aspx: <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="HelloWorld.aspx.cs" Inherits="HelloWorld" %> <html> <body> <asp:Label runat="server" id="lblMsg" OnInit="HandleInit"/> </body> </html> HelloWorld.aspx.cs: ... protected void HandleInit() { lblMsg.Text = _msgProvider.GetMessage(); } public IMsgProvider _msgProvider { private get; set; } // <-- Injected But changing the HelloWorld Page to a UserControl (.acsx) and putting the UserControl in another page doesn't work because _msgProvider isn't injected early enough. Is there a way to make Autofac inject properties of child controls earlier? Or is this something that can be addressed in a future build? Thanks!

    Read the article

  • How can I construct and parse a JSON string in Scala / Lift

    - by David Carlson
    I am using JsonResponse to send some JSON to the client. To test that I am sending the correct response it seemed natural to me to parse the resulting JSON and validate against a data structure rather than comparing substrings. But for some reason I am unable to parse the JSON I just constructed: def tryToParse = { val jsObj :JsObj = JsObj(("foo", "bar")); // 1) val jsObjStr :String = jsObj.toJsCmd // 2) jsObjStr is: "{'foo': 'bar'}" val result = JSON.parseFull(jsObjStr) // 3) result is: None // the problem seems to be caused by the quotes: val works = JSON.parseFull("{\"foo\" : \"bar\"}") // 4) result is: Some(Map(foo -> bar)) val doesntWork = JSON.parseFull("{'foo' : 'bar'}") // 5) result is: None } How do I programmatically construct a valid JSON message in Scala/Lift that can also be parsed again?

    Read the article

  • imagecopyresampled to resize and crop an image - not returning the expected result

    - by David
    imagecopyresized ( resource $dst_image , resource $src_image , int $dst_x , int $dst_y , int $src_x , int $src_y , int $dst_w , int $dst_h , int $src_w , int $src_h ) This is what I want to do: I have an image that's 600x1000px in size, and I want to create a thumb that's 100x100px after resizing that image to 300x500px, the x coordinate for the top left point of the thumb square should be at 100(src x) and 120(src y). According to what I understand from the manual, the command should be $dst_image = imagecreatetruecolor(100,100); $src_image = imagecreatefromjpeg('/home/sandbox/imagetoresize.jpg'); imagecopyresized ($dst_image, $src_image, 0, 0, 100, 120, **300 , 500 , 600 , 1000** ) It is cropping the image just fine, but it isn't resizing it correctly. I never got it to match what I see in my image editor (the GIMP). What am I doing wrong? I confirmed that all the numbers are correct, but it's always shifted up or down no matter what I do. Your help would really be appreciated!

    Read the article

< Previous Page | 107 108 109 110 111 112 113 114 115 116 117 118  | Next Page >