Search Results

Search found 3158 results on 127 pages for 'mr alex'.

Page 31/127 | < Previous Page | 27 28 29 30 31 32 33 34 35 36 37 38  | Next Page >

  • Spring Custom Filter Problem?

    - by mr.lost
    greetings all,iam using spring security 3 and i want to perform some logic(saving some data in the session) when the user is visiting the site and he's remembered so i extended the GenericFilterBean class and performed the logic in the doFilter method then complete the filter chain by calling the chain.doFilter method,and then inserted that filter after the remember me filter in the security.xml file? but there's a problem is the filter is executed on each page even if the user is remembered or not is there's something wrong with the filter implementation or the position of the filter? and i have a simple question,is the filter chain by default is executed on each page? and when making a custom filter should i add it to the web.xml too? the filter class: package projects.internal; import java.io.IOException; import javax.servlet.FilterChain; import javax.servlet.ServletException; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.core.Authentication; import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.web.filter.GenericFilterBean; import projects.ProjectManager; public class rememberMeFilter extends GenericFilterBean { private ProjectManager projectManager; @Autowired public rememberMeFilter(ProjectManager projectManager) { this.projectManager = projectManager; } @Override public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) throws IOException, ServletException { System.out.println("In The Filter"); Authentication auth = (Authentication) SecurityContextHolder .getContext().getAuthentication(); HttpServletResponse response = ((HttpServletResponse) res); HttpServletRequest request = ((HttpServletRequest) req); // if the user is not remembered,do nothing if (auth == null) { chain.doFilter(request, response); } else { // the user is remembered save some data in the session System.out.println("User Is Remembered"); chain.doFilter(request, response); } } } the security.xml file: <beans:beans xmlns="http://www.springframework.org/schema/security" xmlns:beans="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.0.xsd"> <global-method-security pre-post-annotations="enabled"> </global-method-security> <http use-expressions="true" > <remember-me data-source-ref="dataSource"/> <intercept-url pattern="/" access="permitAll" /> <intercept-url pattern="/images/**" filters="none" /> <intercept-url pattern="/scripts/**" filters="none" /> <intercept-url pattern="/styles/**" filters="none" /> <intercept-url pattern="/p/login" filters="none" /> <intercept-url pattern="/p/register" filters="none" /> <intercept-url pattern="/p/forgot_password" filters="none" /> <intercept-url pattern="/p/**" access="isAuthenticated()" /> <custom-filter after="REMEMBER_ME_FILTER" ref="rememberMeFilter" /> <form-login login-processing-url="/j_spring_security_check" login-page="/p/login" authentication-failure-url="/p/login?login_error=1" default-target-url="/p/dashboard" authentication-success-handler-ref="myAuthenticationHandler" always-use-default-target="false" /> <logout/> </http> <beans:bean id="myAuthenticationHandler" class="projects.internal.myAuthenticationHandler" /> <beans:bean id="rememberMeFilter" class="projects.internal.rememberMeFilter" > </beans:bean> <authentication-manager alias="authenticationManager"> <authentication-provider> <password-encoder hash="md5" /> <jdbc-user-service data-source-ref="dataSource" /> </authentication-provider> </authentication-manager> </beans:beans> any help?

    Read the article

  • Jquery Modal Dialog disables form elements

    - by Mr W
    Hi, When I set my jQuery dialog to model=true, it disables my form elements inside the dialog and I cannot use them, only the buttons. I have seen examples where the contents of the dialog is declared in the dialog initiation script and then injected. but that is just to bulky for me, I want to be able to create my markup inside the DIV which I turn into a dialog. Anyone got a solution for me?

    Read the article

  • Overlay 2d weapon sprite over character sprite ?

    - by Mr.Gando
    Hello, I'm working on a game where my character needs to be able to have different weapons. For that I think that somehow overlaying the weapon over the moving sprite would be the correct choice, but I'm not sure about how could I do this. Assuming my Character spritesheet looks like this: And my preliminar weapon spritesheet ( haven't decided on a fixed square size for the weapon yet ), looks like this: How would you make the overlay to set the weapon correctly over the character hand for each of his frames? I know that one way would be just to have a weapon frame the same size as my character sprites, and overlay those too, but I think that if the game has way too much weapons (say 15 different kinds of one hand weaps) this could get pretty insane ( having one weapon sprite sheet the same size as the character sprite sheet for each type of weapon ) Do you guys have any advice on how to implement this? (supporting overlaying the weapon sprites over the character sprites) Thanks!

    Read the article

  • Finding out whether a DirectInput device supports XInput (with mingw/gcc)

    - by Mr. Wonko
    I'm working on an input system, wrapping DirectInput and XInput. Currently XInput devices are enumerated twice, once as XInput and once as DirectInput (since they support both). How can I find out if a given DirectInput device also supports XInput? There is this MSDN page on the topic, but it requires wbemidl.h and wmsstd.h which aren't available in mingw/gcc (and for some reason I want to avoid msvc - probably by habit). I don't think blacklisting device names/guids is a good solution, but is there a better one? Thanks.

    Read the article

  • problem with pathForResource

    - by mr.octobor
    HI all I have problem with NSString *filePaht = [[NSBundle mainBundle] pathForResource:(NSString *)name ofType:(NSString *)ext]; if I used NSString *filePaht = [[NSBundle mainBundle] pathForResource:@"soundName" ofType:@"aiff"]; it's OK but when I used NSString *fileName = [[file.list objectAtIndex:index] objectForKey:@"soundName"]; NSString *filePaht = [[NSBundle mainBundle] pathForResource:fileName ofType:@"aiff"]; It's not work have any idea !? Thanks

    Read the article

  • What is the right approach to checksumming UDP packets

    - by mr.b
    I'm building UDP server application in C#. I've come across a packet checksum problem. As you probably know, each packet should carry some simple way of telling receiver if packet data is intact. Now, UDP already has 2-byte checksum as part of header, which is optional, at least in IPv4 world. Alternative method is to have custom checksum as part of data section in each packet, and to verify it on receiver. My question boils down to: is it better to rely on (optional) checksum in UDP packet header, or to make a custom checksum implementation as part of packet data section? Perhaps the right answer depends on circumstances (as usual), so one circumstance here is that, even though code is written and developed in .NET on Windows, it might have to run under platform-independent Mono.NET, so eventual solution should be compatible with other platforms. I believe that custom checksum algorithm would be easily portable, but I'm not so sure about the first one. Any thoughts? Also, shouts about packet checksumming in general are welcome.

    Read the article

  • Core Data and many Entity

    - by mr.octobor
    I'm newbie and I must save "Ranking" and "Level" of user. I create file Ranking.xcdatamodel for save "Ranking" with entity name Ranking (property is Rank, Name) I can save and show it. but when I create entity Level (property is CurrentLevel) my program is crash and show this message Unresolved error Error Domain=NSCocoaErrorDomain Code=134100 UserInfo=0x60044b0 "Operation could not be completed. (Cocoa error 134100.)", { metadata = { NSPersistenceFrameworkVersion = 248; NSStoreModelVersionHashes = { Users = ; }; NSStoreModelVersionHashesVersion = 3; NSStoreModelVersionIdentifiers = ( ); NSStoreType = SQLite; NSStoreUUID = "41225AD0-B508-4AA7-A5E2-15D6990FF5E7"; "_NSAutoVacuumLevel" = 2; }; reason = "The model used to open the store is incompatible with the one used to create the store"; } I don't know how to save "Level" please suggest me.

    Read the article

  • Overriding MIME Type in PHP

    - by Mr Carl
    My site is requesting a remote image which is being transferred with the wrong MIME type. I was wondering how might I override it in PHP to tell it that it's an image? I can't use header('Content-Type') because the image is being used in a HTML document. http://manga.justcarl.co.uk/N/Naruto/494/1 - one of the pages attempting to request an image... the image looks broken because it's trying to output it as html

    Read the article

  • Chipmunk Physics or Box2D for C++ 2D GameEngine ?

    - by Mr.Gando
    Hello, I'm developing what it's turning into a "cross-platform" 2D Game Engine, my initial platform target is iPhone OS, but could move on to Android or even some console like the PSP, or Nintendo DS, I want to keep my options open. My engine is developed in C++, and have been reading a lot about Box2D and Chipmunk but still I can't decide which one to use as my Physics Middleware. Chipmunk appears to have been made to be embedded easily, and Box2D seems to be widely used. Chipmunk is C , and Box2D is C++, but I've heard the API's of Box2D are much worse than chipmunk's API's. For now I will be using the engine shape creation and collision detection features for irregular polygons (not concave). I value: 1) Good API's 2) Easy to integrate. 3) Portability. And of course if you notice anything else, I would love to hear it. Which one do you think that would fit my needs better ?

    Read the article

  • NPGSQL seems to have a rather large bug?

    - by Mr Shoubs
    Hello, this is a weird one, when I run the following code all rows are returned from the db. Imagaine what would happen if this was an update or delete. Dim cmd As New NpgsqlCommand cmd.Connection = conn cmd.CommandText = "select * FROM ac_profiles WHERE profileid = @profileId" cmd.Parameters.Add("@profile", 58) Dim dt As DataTable = DataAccess2.DataAccess.sqlQueryDb(cmd) DataGridView1.DataSource = dt My question is why is this happening?

    Read the article

  • How to read direct3d texture pixels

    - by Mr Bell
    So I have a x8r8g8b8 formatted IDirect3DSurface9 that contains the contents of the back buffer. When I call LockRect on it I get access to a struct containing pBits, a pointer to the pixels I assume, and and integer Pitch (which I am very unclear about its purpose). How to read the individual pixels? Visual Studio 2008 C++

    Read the article

  • IBAction UIButton and EXC_BAD_ACCESS

    - by mr.octobor
    in .h file I write -(IBAction)openShuffleForm; and .m -(IBAction)openShuffleForm{ NSLog(@"XXXXXXX"); } and connect with even touch up inside but when I run my program it error show this message -[UITouchData openShuffleForm]: unrecognized selector sent to instance 0x391cc20 ** what happen I don't know why !?

    Read the article

  • Creating Service with Bluetooth activation in Android

    - by Mr. Kakakuwa Bird
    Hi I want to create a service in Android which will initially ask user if they want to start Bluetooth and set the Bluetooth discovery. My question is 1) Can I launch in the service following activities? if (!mBluetoothAdapter.isEnabled()) { Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE); startActivityForResult(enableBtIntent, 0); } // Set Phone Discoverable for 300 seconds. Intent discoverableIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_DISCOVERABLE); discoverableIntent.putExtra(BluetoothAdapter.EXTRA_DISCOVERABLE_DURATION, 600); startActivity(discoverableIntent); 2) I want to set discoverabilty of the phone on for lifetime of application. Is it possible? 3) I want to access empty space available on SD card. How should i do it? Thanks in advance.

    Read the article

  • Can iFrame Scrollbars be skinned in webkit?

    - by Mr. Bamboo
    It's pretty well known by now that you can style scrollbars using the webkit specific CSS tags (::-webkit-scrollbar-button:start:decrement, ::-webkit-scrollbar-button:end:increment, etc. ). However, I've noticed that I cannot style the scrollbars attached to iFrames. Question: Is there a way to access and style the scrollbars on the iFrame using webkit? (Yes, I've actually got a particular scenario where I'd like to be able to do this.) Thanks much in advance for any help!

    Read the article

  • Why are there so many Database Management Systems?

    - by mr.bio
    Why are there so many Database management systems? I am not an DB expert and I've never thought about using another Database other than mySQL. Programming languages offer different paradigms, so it makes sense to choose a specific language for your purpose. Question What are the factors in choosing a specific Database management system ?

    Read the article

  • IIS6 Metabase Compatiblity not installing correctly for Vista IIS7

    - by Mr Snuffle
    I've been bashing my head against this one for a few days, and haven't had any luck with it. I'm unable to get my VS2010 ASP.NET project to deploy to IIS. I receive the error "Unable to create the virtual directory. To access local IIS Web sites, you must install the following IIS Components IIS 6 Metabase and IIS 6 Configuration Compatibility ASP.NET In addition, you must run Visual Studio in the context of an Administrator Account" I've most certainly installed the metabase option, but it still shows up. I'm also not sure why it's telling me to install ASP.NET. Google is being entirely unhelpful, I was wondering if anyone here has any suggestions. I'm running Vista Ultimate 64Bit

    Read the article

  • Where is the mistake ?

    - by mr.bio
    Hi ... i am implementing a simple linked list in c++. I have a mistake and i don't see it :( #include <stdexcept> #include <iostream> struct Node { Node(Node *next, int value): next(next), value(value) { } Node *next; int value; }; class List { Node *first; // Erstes Element , 0 falls die Liste leer ist int len; // Laenge der liste Node *nthNode(int index); // Hilfsfunktion : O( index ) public: // Default - Konstruktor ( Laenge 0): O (1) List():first(0),len(0){ } // Copy - Konstruktor : O(other.len) List(const List & other){ }; // Zuweisungs - Operator O(len +other.len) List &operator=(const List &other) { clear(); if(!other.len) return *this; Node *it = first = new Node(0,other.first->value); for (Node *n = other.first->next; n; n = n->next) { it = it->next = new Node(0, n->value); } len = other.len; return *this; } // Destruktor ( gibt den Speicher von allen Nodes frei ): O( len ) ~List(){ }; // Haengt der Liste ein Element hinten an: O( len ) void push_back(int value){ }; // Fuegt am Anfang der Liste ein Element ein : O (1) void push_front(int value){ Node* front = new Node(0,value); if(first){ first = front; front->next = 0; }else{ front->next = first; first = front; } len++; }; // gibt eine Referenz auf das index -te Element zurueck : O( index ) int &at(int index){ int count = 0 ; int ret ; Node *it = first; for (Node *n = first->next; n; n = n->next) { if(count==index) ret = n->value; count++; } return ret ; }; // Entfernt alle Elemente : O(len) void clear(){ }; // Zeigt alle Elemente an: hier : O( len * len ) void show() { std::cout << " List [" << len << " ]:{ "; for (int i = 0; i < len; ++i) { std::cout << at(i) << (i == len - 1 ? '}' : ','); } std::cout << std::endl; } }; /* * */ int main() { List l; // l. push_back(1); // l. push_back(2); l. push_front(7); l. push_front(8); l. push_front(9); l.show(); // List(l). show(); } it works ... but the output is : List [3 ]:{ 0,134520896,9484585}

    Read the article

  • Open PDF file on fly from Java application

    - by Mr CooL
    Is there any way to have a code where it can be used to open PDF file in Java application but do not side to any platform. I mean using batch file in Windows could do that. Can it be any other way to have platform independent code to open PDF on fly.

    Read the article

< Previous Page | 27 28 29 30 31 32 33 34 35 36 37 38  | Next Page >