Search Results

Search found 16885 results on 676 pages for 'custom headers'.

Page 148/676 | < Previous Page | 144 145 146 147 148 149 150 151 152 153 154 155  | Next Page >

  • Mocking my custom dependencies with Spring

    - by Brabster
    Is is possible to declare mocks using some mocking framework for my own classes declaratively with Spring? I know there are some standard mocks available in Spring, but I'd like to be able to mock out my own classes declaratively too. Just to check I'm not going about this the wrong way: the idea is to have a pair of JUnit test and Spring config for each integration test I want to do, mocking everything except the specific integration aspect I'm testing (say I had a dependency on two different data services, test one at a time) and minimising the amount of repeated Java code specifying the mocks.

    Read the article

  • ThreadPoolExecutor fixed thread pool with custom behaviour

    - by Simone Margaritelli
    i'm new to this topic ... i'm using a ThreadPoolExecutor created with Executors.newFixedThreadPool( 10 ) and after the pool is full i'm starting to get a RejectedExecutionException . Is there a way to "force" the executor to put the new task in a "wait" status instead of rejecting it and starting it when the pool is freed ? Thanks Issue regarding this https://github.com/evilsocket/dsploit/issues/159 Line of code involved https://github.com/evilsocket/dsploit/blob/master/src/it/evilsocket/dsploit/net/NetworkDiscovery.java#L150

    Read the article

  • Custom HTML in a day with FullCalendar?

    - by drewjoh
    Is there a way to add, specifically, form elements for every day that are distinguishable per day? Below is an example. I know FullCalendar is built to handle "Events", so from what I can tell in the docs, it's not really possible. But I'm not a Javascript guru either, so would anyone else know of a solution? I'm hoping to not have to reinvent the wheel.

    Read the article

  • Accessing custom user profile fields in CCK

    - by Nick Lowman
    I'm probably going about this the wrong way but... I’ve added a field to the User Profile called profile_real_name which is required by the user. Is there a way to access the details in CCK? For example in CCK when creating a new field I can access the user’s username with the ‘User reference’ Field type and setting the ‘Widget type’ to ‘Autocomplete text field’. Can I do the same with my real name field? Many thanks

    Read the article

  • Custom authorize using MVC

    - by Karsten
    Im working a bit with MVC. I need to know something about roles when using the same controller for several users getting and showing pictures. I need to show pictures, but sometimes these pictures should only be shown for those who created them. So now when using the Authorize attribute and if picture and username match thrue my databse I could ofcause use this to make a match. I could ofcause make a match method in the controller. [Authorize] controllGetPicture(Picture ID){ getSomepicture.. return picture } DB relations Relations [User] <- [Pictures] ID FK_UserID Im thinking about just getting the User ID and compare with the Picture FK_UserId at the picture but I think it could be smarter. How?

    Read the article

  • Custom android preference type loses focus when typing

    - by Brian
    I created a simple preference class that shows an AutoCompleteTextView control and it displays properly but when i focus on the AutoCompleteTextView and start typing it brings up the keyboard but then immediately loses focus on the control. Any idea why this loses focus? Here's what i did to create the view. the inflated layout is just a basic linear layout with a title textview in it. I could change it to a dialog preference instead I guess but it'd be smoother if it could be part of the base view. @Override protected View onCreateView(ViewGroup parent) { LayoutInflater inflater = (LayoutInflater) getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE); LinearLayout layout = (LinearLayout) inflater.inflate(R.layout.base_preference, null); if (mHint != null) { TextView hintView = (TextView) layout.findViewById(R.id.PreferenceHintTextView); hintView.setText(mHint); } TextView titleView = (TextView) layout.findViewById(R.id.PreferenceTitleTextView); titleView.setText(getTitle()); AutoCompleteTextView inputView = new AutoCompleteTextView(getContext()); inputView.setGravity(Gravity.FILL_HORIZONTAL); ArrayAdapter<CharSequence> adapter = new ArrayAdapter<CharSequence>(getContext(), R.layout.auto_complete_text_list_item, getEntries()); inputView.setAdapter(adapter); inputView.setThreshold(1); inputView.setOnItemSelectedListener(this); layout.addView(inputView); return layout; }

    Read the article

  • Remove buttons from a custom menu in Visual Studio 2008

    - by Shaihi
    I recently installed Platform builder 7 by Microsoft. It is a plugin for VS2008. The plugin adds the following menu: I want to remove several items from this menu and I would also like to add some button from it to a toolbar. The problem is that when I do customize I only get "advanced command placeholder" shortcut for the whole bunch. Like this: How do I access the internals of these commands menu?

    Read the article

  • Custom link on embedded youtube video

    - by 0plus1
    I'm looking to direct the user on the channell webpage instead of the video url that I'm embedding. I've read the api and I didn't see any way to achieve this. I tried enclosing the embedded video in a and I added this code: $('#youtube').click(function() { document.write('http://www.youtube.com/user/trasportareoggi'); return false; }); And surprise it won't work. How, if it's even possible I can do this?

    Read the article

  • Custom iterator for dictionary?

    - by aaginor
    Hi folks, in my C#-Application, I have a Dictionary object. When iterating over the object using foreach, I naturally get each element of the dictionary. But I want only certain elements to be iterated, depending on the value of a property of MyValue. class MyValue { public bool AmIIncludedInTheIteration { get; set; } ... } Whenever AmIIncludedInTheIteration is false, the item shall not be returned by foreach. I understand that I need to implement my own iterator and override the Dictionary-Iterator somewhere. Can anyone here give me a short HowTo? Thanks in advance, Frank

    Read the article

  • Map Reduce job on Amazon: argument for custom jar

    - by zero51
    Hi all, This is one of my first try with Map Reduce on AWS in its Management Console. Hi have uploaded on AWS S3 my runnable jar developed on Hadoop 0.18, and it works on my local machine. As described on documentation, I have passed the S3 paths for input and output as argument of the jar: all right, but the problem is the third argument that is another path (as string) to a file that I need to load while the job is in execution. That file resides on S3 bucket too, but it seems that my jar doesn't recognize the path and I got a FileNotFound Exception while it tries to load it. That is strange because this is a path exactly like the other two... Anyone have any idea? Thank you Luca

    Read the article

  • Rails 3, Devise and custom controller action

    - by Johnny Klassy
    routes.rb match 'agencies/stub' => 'agencies#stub', :via => :get resources :agencies Here's the rake routes dump agencies_stub GET /agencies/stub(.:format) {:controller=>"agencies", :action=>"stub"} agencies GET /agencies(.:format) {:action=>"index", :controller=>"agencies"} POST /agencies(.:format) {:action=>"create", :controller=>"agencies"} new_agency GET /agencies/new(.:format) {:action=>"new", :controller=>"agencies"} edit_agency GET /agencies/:id/edit(.:format) {:action=>"edit", :controller=>"agencies"} agency GET /agencies/:id(.:format) {:action=>"show", :controller=>"agencies"} PUT /agencies/:id(.:format) {:action=>"update", :controller=>"agencies"} DELETE /agencies/:id(.:format) {:action=>"destroy", :controller=>"agencies"} Devise is setup to have all agenciesroutes only accessible as admin. The call I'm testing with is http://xyz:12345@localhost:3000/agencies/stub but it doesn't authenticate properly, ie, it doesn't recognize it as admin and throws me back to the Devise login page. The creds are a valid admin account. I'm baffled and have no idea why this is happening. Any insights will be much appreciated.

    Read the article

  • Help with Custom Workflow that checks db

    - by zSysop
    I need to write a workflow that monitors the status of a sql server column/field and does work to some other tables once the column has changed to "Close". (It could wait for days or hours) My application is written in c# .net 3.5. I've done some really simple "hello world" type of apps with windows workflow foundation 3.5 but have not yet grasped how to do go about implementing something like this. Any help with code or articles on this would be extremely useful. Thanks in advance.

    Read the article

  • Drupal - Search box not working - custom theme template

    - by vr3690
    Hello, I am using a customised version of search-theme-from.tpl When I use the search box, I do get transferred to the search page. But the search does not actually take place. The search box on the search results page does work though. This is my search-them-form.tpl.php file (demo : <input type="text" name="search_theme_form_keys" id="edit-search-theme-form-keys" value="Search" title="Enter the terms you wish to search for" class="logininput" height="24px" onblur="restoreSearch(this)" onfocus="clearInput(this)" /> <input type="submit" name="op" id="edit-submit" value="" class="form-submit" style="display: none;" /> <input type="hidden" name="form_token" id="edit-search-theme-form-form-token" value="<?php print drupal_get_token('search_theme_form'); ?>" /> <input type="hidden" name="form_id" id="edit-search-theme-form" value="search_theme_form" /> There is also a javascript file involved. I guess it's use is pretty clear from the code: function trim(str) { return str.replace(/^\s+|\s+$/g, ''); } function clearInput(e) { e.value=""; // clear default text when clicked e.className="longininput_onfocus"; //change class } function restoreSearch(e) { if (trim(e.value) == '') { { e.value="Search"; // reset default text onBlur e.className="logininput"; //reset class } } } What can be the problem and how can I fix it?

    Read the article

  • .NET Web Serivce hydrate custom class

    - by row1
    I am consuming an external C# Web Service method which returns a simple calculation result object like this: [Serializable] public class CalculationResult { public string Name { get; set; } public string Unit { get; set; } public decimal? Value { get; set; } } When I add a Web Reference to this service in my ASP .NET project Visual Studio is kind enough to generate a matching class so I can easily consume and work with it. I am using Castle Windsor and I may want to plug in other method of getting a calculation result object, so I want a common class CalculationResult (or ICalculationResult) in my solution which all my objects can work with, this will always match the object returned from the external Web Service 1:1. Is there anyway I can tell my Web Service client to hydrate a particular class instead of its generated one? I would rather not do it manually: foreach(var fromService in calcuationResultsFromService) { ICalculationResult calculationResult = new CalculationResult() { Name = fromService.Name }; yield return calculationResult; } Edit: I am happy to use a Service Reference type instead of the older Web Reference.

    Read the article

  • Custom HorizontalFieldManager menu not showing

    - by BLeB
    I have created a class that extends HorizontalFieldManager so that I can display a label and an image on the same line with the label to the left and the image to the right. I want the user to be able to interact with the hfm as if it were a single field. I have everything working (focus, click action, etc) except the menu. When I press the menu button makeMenu and makeContextMenu are not called. How do I make it so that the correct menu shows when the menu button is clicked and focus is on the hfm? Am I going about this the wrong way?

    Read the article

  • How to test custom handler500?

    - by Gr1N
    I write my handler for server errors and define it at root urls.py: handler500 = 'myhandler' And I want to write unittest for testing how it works. For testing I write view with error and define it in test URLs configuration, when I make request to this view in browser I see my handler and receive status code 500, but when I launch test that make request to this view I see stack trace and my test failed. Have you some ideas for testing handler500 by unittests?

    Read the article

  • problem in custom error message on zend_element

    - by user1400
    hello all i created a text element like following code $test = $this->createElement('text', 'test'); $test->setLabel('test:'); $test->addValidator(new Zend_Validate_Int()); $test->addErrorMessages(array('isEmpty'=>'u should enter a number','%value% is not integer')); $shomare->setRequired(true); $this->addElement($test); when i set empty or non integer number to textbox , it show both its own error message , if its empty errormessage="u should enter a number" and when it is not a valid integer it shows '%value% is not integer' thanks

    Read the article

  • pagecontrol indicator custom image instead of Default

    - by iphonecool
    How i change the color of pagination dots of UIPageControl? In this link the sample code is given.But it shows 3 errors for me... 1'st ERROR: Line:CGRect currentBounds = self.bounds; Error:requst for member 'bounds' in something not a structure or union Method:-(void)drawRect: 2nd Err: same error with same line in touchesBegan method. 3rd Err:@protocol PageControlDelegate @optional (void)pageControlPageDidChange:(PageControl *)pageControl; @end Error:Expected ')' before 'PageControl' .These are the three errors occurs for me...Please help me out to solve this.. I want to change the pagecontrol indicator(dot) color... Thanks & Regards, Renuga

    Read the article

  • iPhone SDK - Display more information about a selected CustomCell (custom UITableViewCell)

    - by Pittor
    If got a CustomCell loaded using: NSArray *nibObjects = [[NSBundle mainBundle] loadNibNamed:@"CustomCell" owner:nil options:nil]; I have no problems with the tableview but when I select a row I want display more information on that row(like facebook app)... using the typical "show more". At the beginning the row show "title" and "description". When I select that row i want to show "title", "description" and a webview... and, of course, make the row bigger to accommodate that objects. Maybe changing this CustomCell by another bigger CustomCell? I have no idea where to start. Thanks. Sorry for my english :S

    Read the article

  • WSAT Security tab error for Custom Role provider

    - by shesb
    I have created custome Membership Role and Profile provider using INGRES db. Now I can see my IngresMembership and IngresRole provider in the Provider tab(Select a different provider for each feature (advanced) ) of WSAT but when I clik on security tab I get this error: "There is a problem with your selected data store. This can be caused by an invalid server name or credentials, or by insufficient permission. It can also be caused by the role manager feature not being enabled. Click the button below to be redirected to a page where you can choose a new data store. The following message may help in diagnosing the problem: Object reference not set to an instance of an object." What am I missing? Do I need to add code for all override methods for Role provider? I have just written code for the Initialize and GetRolesForUser functions. Thanks

    Read the article

  • How to save a custom cookie

    - by xRobot
    Is there a way to save a cookie that is available on other site ? For instance I have my django project on http://www.example.com and I want that django saves a cookies for a site written in PHP on http://site.Idontknow.com . Is this possible ?

    Read the article

  • jquery custom drag and drop

    - by samlochner
    I am trying to create functionality similar to drag and drop. I need to create my own as there will be some significant differences to the drag and drop in the jquery UI. I would like to have mousemove being called repeatedly at all times, and mousedown called every time the mouse is pressed. So I have the following code: $(document).bind('mousemove',function(e){ $("#coords").text("e.pageX: " + e.pageX + ", e.pageY: " + e.pageY); }); $(document).bind('mousedown',function(e){ }); ('coords' is the id of a div) As I move the mouse, coordinates are reported correctly in 'coords'. If I depress a mouse button and then move the mouse, coordinates are still reported correctly. But if I depress a mouse button on an image and then move the mouse, coordinates are reported correctly for a few sets, and then they seize up! Why is this happening and how can I fix it? Thanks, Sam

    Read the article

< Previous Page | 144 145 146 147 148 149 150 151 152 153 154 155  | Next Page >