Search Results

Search found 11277 results on 452 pages for 'jeff certain'.

Page 102/452 | < Previous Page | 98 99 100 101 102 103 104 105 106 107 108 109  | Next Page >

  • Forced naming of parameters in python

    - by Mark Mayo
    In python you may have a function definition: def info(object, spacing=10, collapse=1) which could be called in any of the following ways: info(odbchelper) info(odbchelper, 12) info(odbchelper, collapse=0) info(spacing=15, object=odbchelper) thanks to python's allowing of any-order arguments, so long as they're named. The problem we're having is as some of our larger functions grow, people might be adding parameters between spacing and collapse, meaning that the wrong values may be going to parameters that aren't named. In addition sometimes it's not always clear as to what needs to go in. We're after a way to force people to name certain parameters - not just a coding standard, but ideally a flag or pydev plugin? so that in the above 4 examples, only the last would pass the check as all the parameters are named. Odds are we'll only turn it on for certain functions, but any suggestions as to how to implement this - or if it's even possible would be appreciated.

    Read the article

  • Changing all CSS styles with a property via Jquery

    - by Joe
    On a page I include some css eg: <style type='test/css'> .myBox{ color:#000000; border:#FFFFFF; padding:4px; } .myBox2{ color:#000000; border:#FFFFFF; padding:4px; } </style> I want to then change the "color" property set within both myBox and myBox2 in jquery, without knowing the actual name (myBox, myBox2) of the css style. In otherwords, I want to update ALL css styles on the page where color = certain value, and then also update border where = certain value. An example (not valid code) might be: $("all css [color:#000000]").html("#FF0000"); How could this be possible using jquery?

    Read the article

  • Creating TCP network errors for unit testing

    - by Robert S. Barnes
    I'd like to create various network errors during testing. I'm using the Berkely sockets API directly in C++ on Linux. I'm running a mock server in another thread from within Boost.Test which listens on localhost. For instance, I'd like to create a timeout during connect. So far I've tried not calling accept in my mock server and setting the backlog to 1, then making multiple connections, but all seem to successfully connect. I would think that if there wasn't room in the backlog queue I would at least get a connection refused error if not a timeout. I'd like to do this all programatically if possible, but I'd consider using something external like IPchains to intentionally drop certain packets to certain ports during testing, but I'd need to automate creating and removing rules so I could do it from within my Boost.Test unit tests. I suppose I could mock the various system calls involved, but I'd rather go through a real TCP stack if possible. Ideas?

    Read the article

  • Is this a problem typically solved with IOC?

    - by Dirk
    My current application allows users to define custom web forms through a set of admin screens. it's essentially an EAV type application. As such, I can't hard code HTML or ASP.NET markup to render a given page. Instead, the UI requests an instance of a Form object from the service layer, which in turn constructs one using a several RDMBS tables. Form contains the kind of classes you would expect to see in such a context: Form= IEnumerable<FormSections>=IEnumerable<FormFields> Here's what the service layer looks like: public class MyFormService: IFormService{ public Form OpenForm(int formId){ //construct and return a concrete implementation of Form } } Everything works splendidly (for a while). The UI is none the wiser about what sections/fields exist in a given form: It happily renders the Form object it receives into a functional ASP.NET page. A few weeks later, I get a new requirement from the business: When viewing a non-editable (i.e. read-only) versions of a form, certain field values should be merged together and other contrived/calculated fields should are added. No problem I say. Simply amend my service class so that its methods are more explicit: public class MyFormService: IFormService{ public Form OpenFormForEditing(int formId){ //construct and return a concrete implementation of Form } public Form OpenFormForViewing(int formId){ //construct and a concrete implementation of Form //apply additional transformations to the form } } Again everything works great and balance has been restored to the force. The UI continues to be agnostic as to what is in the Form, and our separation of concerns is achieved. Only a few short weeks later, however, the business puts out a new requirement: in certain scenarios, we should apply only some of the form transformations I referenced above. At this point, it feels like the "explicit method" approach has reached a dead end, unless I want to end up with an explosion of methods (OpenFormViewingScenario1, OpenFormViewingScenario2, etc). Instead, I introduce another level of indirection: public interface IFormViewCreator{ void CreateView(Form form); } public class MyFormService: IFormService{ public Form OpenFormForEditing(int formId){ //construct and return a concrete implementation of Form } public Form OpenFormForViewing(int formId, IFormViewCreator formViewCreator){ //construct a concrete implementation of Form //apply transformations to the dynamic field list return formViewCreator.CreateView(form); } } On the surface, this seems like acceptable approach and yet there is a certain smell. Namely, the UI, which had been living in ignorant bliss about the implementation details of OpenFormForViewing, must possess knowledge of and create an instance of IFormViewCreator. My questions are twofold: Is there a better way to achieve the composability I'm after? (perhaps by using an IoC container or a home rolled factory to create the concrete IFormViewCreator)? Did I fundamentally screw up the abstraction here?

    Read the article

  • URL losing port number in every page load

    - by MarceloRamires
    I'm currently taking care of a certain local website. The default port has been changed, and can no longer be not included in the URL due to technical reasons, so now i'm using a certain port in the end of the IP at the URL, for example 100.100.100.100/website.asp no longer works 100.100.100.100:10/website.asp with the port, works. Works, though I can't click in any link or anything and the port vanishes (new page doesn't load). Then I keep the same URL and just include the port at the end of the IP and it works again, until I click in another link inside of it. I have access to changing each link, but I guess that would not be the right approach. How should I procceed ?

    Read the article

  • C++ object in memory

    - by Neo_b
    Hello. Is there a standard in storing a C++ objects in memory? I wish to set a char* pointer to a certain address in memory, so that I can read certain objects' variables directly from the memory byte by byte. When I am using Dev C++, the variables are stored one by one right in the memory address of an object in the order that they were defined. Now, can it be different while using a different compiler (like the variables being in a different order, or somewhere else)? Thank you in advance. :-)

    Read the article

  • Move the position in JEditorPane

    - by Joe
    Hi, I've a JEditorPane inside a JDialog. I'm loading a web page when this JDialog is loading. This web page is larger then the JEditorPane size. So I want to display a certain position in the web page by default. For example, I've a 175x200 size jdialog and JEditorPane. I want to display the web page sontent around 150 pixels down. Is there any solutions for this? Or is there any other component which I can used to display web pages and can move to a certain position of the web page at loading time.

    Read the article

  • Relating categories with tags using SQL

    - by Pablo
    I want be able to find tags of items under the a certain category. Following is example of my database design: images +----------+-----+-------------+-----+ | image_id | ... | category_id | ... | +----------+-----+-------------+-----+ | 1 | ... | 11 | ... | +----------+-----+-------------+-----+ | 2 | ... | 12 | ... | +----------+-----+-------------+-----+ | 3 | ... | 11 | ... | +----------+-----+-------------+-----+ | 4 | ... | 11 | ... | +----------+-----+-------------+-----+ images_tags +----------+--------+ | image_id | tag_id | +----------+--------+ | 1 | 53 | +----------+--------+ | 3 | 54 | +----------+--------+ | 2 | 55 | +----------+--------+ | 1 | 56 | +----------+--------+ | 4 | 57 | +----------+--------+ tags and categories each have their own table relating the id to an actual name(text). So my question is how will i find out that images with category_id=11 have have the tag_id 53 54 55 56 57. In other words how to find the tags that images in certain category have?

    Read the article

  • javascript location.hash refreshing in IE

    - by aepheus
    I need to modify the hash, remove it after certain processing takes place so that if the user refreshes they do not cause the process to run again. This works fine in FF, but it seems that IE is reloading every time I try to change the hash. I think it is related to other things that are loading on the page, though I am not certain. I have an iframe that loads (related to the process) as well as some scripts that are still being fetched in the parent window. I can't seem to figure out a good way to change the hash after all the loading completes. And, at the same time am not even positive that it is related to the loading. Any ideas on how to solve this?

    Read the article

  • 2D Engine scrolling on OpenGL via hardware?

    - by drudru
    hi, I'm using OpenGL as the bottom end for a 2D tiling engine. When everything is 2D, it is simple to optimize certain issues. For example, scrolling. If I know a certain section of the screen needs to scroll off the bottom, then I can just blit over that portion. I'm evening moving more than 1 pixel at a time. Without explicit hardware support (think old nintendo hw), this requires a lot of pixel writes. An on chip bitblt would be the next best thing. Essentially, I'm looking at how I can optimize my GL calls to use VRAM texture renders as efficient hardware blits. Is it possible to have GL scroll the framebuffer, or should I just resign myself to double-buffering and re-rendering an entire scene for each frame? Thx

    Read the article

  • Building a user subscription application

    - by Tristan O'Neil
    Hello, I'm trying to come up with the best way to handle user subscription and management for our magazine website. What I want to happen is a user purchases a subscription and they are granted online access of a certain membership role for a certain amount of time depending on how many years they subscribed for. I would also like the system to be able to send out emails when a subscription is almost up. I've seen some third party projects to help accomplish this but I'd prefer to write this from scratch as I want total control over how it works. Any suggestions would be helpful. The main thing I can't figure out is how to have an expiring membership. You must keep track of when the user signed up and how long until they should expire.

    Read the article

  • CakePHP Permissions, works fine on local server, but fails after upload.

    - by Alz454
    I created a website with CakePHP, set up all of the permissions so guests could view certain parts, and members only in certain areas, all with an administration panel. Whenever I test this on my local testing server, it works perfectly, if I login I can view the content, if I logout, I can't. However, when I upload exactly the same files and upload and import the database, it fails to work, it just disallows all member access regardless of if you're logged in or not, this even applies to administrators. I'm not sure what's going on here, any help would be appreciated. If you need any more information, just ask. Regards, Alz454.

    Read the article

  • Do validations still fire in ASP.NET even if the controls are hidden?

    - by Josh
    I have a form that uses ASP.NET validations. I am using some inline C# in the aspx to show/hide certain controls depending on a user's role. I would use the Visible property, but there are so many of them, I just decided to do inline C# to show and hide (I know, not best practice, but bear with me for a second). I am having an issue where Page.IsValid is always set to False when I submit my form (when certain fields are being hidden). Will the validations still fire off even if the controls are not even rendered on the pag? Also, if this is not the case, is there an effective way of breaking down Page.IsValid to find out what is setting it to False? Thanks.

    Read the article

  • Iphone Orientation Change

    - by SG
    I am trying to implement orientation change functionality in my application.I have overrided -(void) didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation. In this method i change the frame size of the tableview(including the position of the cell items) which is present in the view. The tableview Details: Added to the view as [self.view addSubView:tableView] in the viewDidLoad method of the view controller; Cell item (row) has a textfield and a segmented control. There are 10 cells in the table view and in landscape mode only 2 cells are visible and in potrait mode 5 cells are visible. I have implemented scroller. Issue: Certain times on changing the orientation to potrait mode certain segmented controls in the cell are not rendered (Not shown at all). This happens when i am viewing the last couple of cells in the landscape mode and i change the orientation to potrait mode.

    Read the article

  • How do you deal with the more mundane parts of programming tasks?

    - by Uri
    My experience as a developer is that many projects or tickets are a mix of a short and focused very interesting task (e.g., designing some API or a platform to solve something) and a lot of repetitive and mundane tasks that cannot be automated (such as certain refactorings to use the API or platform, implementation of certain tests, some GUI handling, etc). I believe that this is the nature of our profession, unless we are high-level architects or managements and can delegate this work. The only item in my personal arsenal when dealing with these tasks is to devote some of my attention to radio or audiobooks (preferably not in English as I find it hard to concentrate on two "streams" of English at the same time). I maintain sufficient attention to carry the task and don't lose concentration as fast. I'm wondering how others cope with these and maintain concentration.

    Read the article

  • Place text based divs in relative locations within a circle

    - by NickG
    Direct question - How would I place certain objects or small text within a certain area. For example, how would I replace the following image with html/javascript. --- I don't have enough reps to post an image :/ but try this URL - http://i.imgur.com/a3eWL.jpg Big picture - I am trying to create a kml file for Google Earth that when the point is clicked, the balloon description window pops up and I can display my html formatted diagram showing where the satellites are at that instant. Google Earth and KML docs allow for pretty much any html formatting within it, so currently looking for a good way to do this. Disclaimer: It has been a few years since i have done any html or javascript editing, so general examples and insight is greatful. Thanks

    Read the article

  • Apache file caching

    - by danp
    How does apache handle caching of certain files, and is it possible to explicitly say that certain files should be aggressively cached more than others, through the standard config files for a given host or virtualhost? To put it in context, I keep a lot of site content in various XML files, and I'd like to be able to say that this file will be used a lot, and therefore cache it as much as possible..? Does apache do this kind of thing intelligently and on the fly..? Will it observe which files are more popular than others and try to match cache hits appropriately..? Lots of questions in one, but the basic idea should be clear enough. edit: to be clear, these are resource files which are loaded and interpreted by PHP - but php as a process is spawned inside apache.. right? Please help!

    Read the article

  • Document conversion and viewing, what are the cutting edge solutions?

    - by DigitalLawyer
    Goal: building a web application where a user can: Upload a document (doc, docx, pdf, additional office formats a +) View that document in a browser, preferably in html Download the document (in doc, pdf, additional open formats a +) Current solution: Ruby on Rails Application on Rackspace Users can upload doc and pdf files (AWS) Files can be downloaded in the format in which they were uploaded Thumbnail generation ([doc, pdf] - pdf - png) is done through AbiWord. Certain doc files do not convert well. Documents can be viewed in embedded Google docs viewer (https://docs.google.com/viewer). Certain doc files cannot be displayed. Little flexibility. Potential improvements: Document viewing in pdf through pdf.js Viewing in html (+ annotation) through Crocodoc I'd be glad to hear other users' experiences, and will add good recommendations to this list.

    Read the article

  • Making commercial Java software

    - by roddik
    Hi. I intend to make some software to be sold over internet. I've only created open-source before, so I have really no idea of how to protect it from being cracked and distributed as warez. Bearing in mind that I know like two programms that aren't either cracked or not really useful I decided that the only more or less reliable way may look like this: Connect to a server and provide licensing info and some sort of hardware summary info If everything is fine, the server returns some crucial missing parts of the program bound to that certain pc along with the usage limit of say 2 days That crucial stuff is not saved to hard drive, so it is downloaded every time the program starts, if the programm runs more than 2 days, data is downloaded again If the same info is used from different computers, suspend the customer account What do you think about this? It may seem a bit to restrictive, but I'd better make less sales at first then eventually see my precious killer app downloaded for free. Anyways, first I need some basic theory/tutorials/guides about how to ensure that user only uses a certain Java app if he has paid for it, so please suggest some. Thanks

    Read the article

  • absolute audio synchronization

    - by user1780526
    I would like to synchronize my computer with an external camcorder recording so that I can know exactly (to the millisecond) when certain recored events happen with respect to other sensors logged by the computer. One idea is to playback short sound pulses or chirps every second from the computer that get picked up by the microphone on the camcorder. But the accuracy of a simple cron job playing a sound clip is not precise enough. I was thinking of using something like gstreamer, but how does one get it to playback a clip at precisely a certain time according to the system clock?

    Read the article

  • jquery scroll to a px count from top and then set a div to be fixed from the top for the rest of the scroll

    - by estern
    I am looking to change a div's css when i scroll to a certain point down the page, a certain amount of pixels from the top of the page. On page load i would have a div positioned statically. Once I started to scroll down the page and i hit a point from the top (say 100px for demo purposes) i want to change that static div to become fixed like 20px from the top. Which would be done via the css() property of jquery. THis would allow it to stay at that fixed 20px all the way down the page. What jquery property can i use to know when i hit that 100px mark. I want this to also revert once someone gets back to the top so that the div is put back to where it was when the page loaded and not 20px from the top. Any ideas?

    Read the article

  • Conditional Counting in Mathematica

    - by 500
    Considering the following list : dalist = {{1, a, 1}, {2, s, 0}, {1, d, 0}, {2, f, 0}, {1, g, 1}} I would like to count the number of times a certain value in the first column takes a certain value in column 3. So in this example my desired output would be: {{1,1,2}, {1,0,1}, {2,1,0}, {2,0,2}} Where the latest sublist {2,0,2} being read as: When the value is 2 in the first column, a corresponding value (same row in matrices world) in column 3 of 0 is present twice. I hope this is not to confusing. I added the second Column to convey the fact that the columns are distant to each other. If possible, no reordering should happen. EDIT : {1,2,3,4,5} {1,0} are the exact values taken by the columns I am actually dealing with in my data. I know I am missing the correct description. Please edit if you can and know it. Thank you

    Read the article

< Previous Page | 98 99 100 101 102 103 104 105 106 107 108 109  | Next Page >