Search Results

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

Page 290/452 | < Previous Page | 286 287 288 289 290 291 292 293 294 295 296 297  | Next Page >

  • Strategy in storing ad-hoc numbers/constants?

    - by Jiho Han
    I have a need to store a number of ad-hoc figures and constants for calculation. These numbers change periodically but they are different type of values. One might be a balance, a money amount, another might be an interest rate, and yet another might be a ratio of some kind. These numbers are then used in a calculation that involve other more structured figures. I'm not certain what the best way to store these in a relational DB is - that's the choice of storage for the app. One way, I've done before, is to create a very generic table that stores the values as text. I might store the data type along with it but the consumer knows what type it is so, in situations I didn't even need to store the data type. This kind of works fine but I am not very fond of the solution. Should I break down each of the numbers into specific categories and create tables that way? For example, create Rates table, and Balances table, etc.?

    Read the article

  • Eunit Expected Exception

    - by dagda1
    Hi, Is there a way in Eunit to test whether an exception has been thrown under certain cicumstances? Say I have a function sum like this: sum(N, M) when N > M -> throw({"start is bigger than end", N, M}); sum(N, M) when N =:= M -> N; sum(N, M) when N =< M -> N + sum(N + 1, M). Can I test that if N is bigger than M then an exception is thrown? Cheers Paul

    Read the article

  • Best practice for partial updates in a RESTful service

    - by magiconair
    I am writing a RESTful service for a customer management system and I am trying to find the best practice for updating records partially. For example, I want the caller to be able to read the full record with a GET request. But for updating it only certain operations on the record are allowed, like change the status from ENABLED to DISABLED. (I have more complex scenarios than this) I don't want the caller to submit the entire record with just the updated field for security reasons (it also feels like overkill). Is there a recommended way of constructing the URIs? Do I use GET, POST, PUT or is there no agreed way of doing these kind of things? When reading the REST books RPC style calls seem to be frowned upon. Thanks Frank

    Read the article

  • Cache whole result set or based on user ?

    - by eugeneK
    In my web application i have statistics which shown for each user separately ie. posts made , posts made today , articles started by and so on... Each user has his own special statistics. What is more flexible and "right" to work with one huge DataTable in Cache with whole data from all users and then loop thought DataTable to find certain user data or to cache each user ie. cacheObj + userID... User can filter his own results by dates and types which is why i need flexible and reliable solution thanks...

    Read the article

  • Trouble getting height of OverlayItem Drawable

    - by Bloudermilk
    Hey- I'm having some trouble getting a hold of the drawable a certain OverlayItem is using so I can calculate the height of it and properly offset the note that shows onTap. Here is my code to try to get that drawable: Drawable marker = item.getMarker(android.R.attr.state_focused); if (marker != null) int markerHeight = marker.getIntrinsicHeight(); marker ends up null. I'm using a drawable XML file with a selector for the different states of the OverlayItem's drawable. In it I'm specifying a drawable for the null state, state_focused, and state_pressed. Thanks for any help! -Nick

    Read the article

  • GIS: line_locate_point() in Python

    - by miracle2k
    I'm pretty much a beginner when it comes to GIS, but I think I understand the basics - it doesn't seem to hard. But: All these acronyms and different libraries, GEOS, GDAL, PROJ, PCL, Shaply, OpenGEO, OGR, OGC, OWS and what not, each seemingly depending on any number of others, is slightly overwhelming me. Here's what I would like to do: Given a number of points and a linestring, I want to determine the location on the line closest to a certain point. In other words, what PostGIS's line_locate_point() does: http://postgis.refractions.net/documentation/manual-1.3/ch06.html#line%5Flocate%5Fpoint Except I want do use plain Python. Which library or libraries should I have a look at generally for doing these kinds of spatial calculations in Python, and is there one that specifically supports a line_locate_point() equivalent?

    Read the article

  • Server -> Desktop Push API

    - by Rich Anderson
    Hi I am looking for solution which can push automatically a certain event (let's say RSS message) realtime to a desktop user. A toolbar app or a desktop (growl like) will be super for this push. I have looked at few options but cannot find much info on these kind of apps. I have looked at conduit - it sucks as there is lot of other fancy options which I am not interested in offering to users. Please let me know. Thanks.

    Read the article

  • jms message not moving of the queue in websphere

    - by user271858
    I have a message driven bean that throws exception under certain conditions. When it throws an exception the message is not processed and put back on the queue. From what I understand with MQ and WAS (Websphere Application Server) the message should be marked as bad after x number of tries and removed from the queue. This is not happening and the message remains on the queue marked as bad. What part of the configuration in MQ and/or WAS have I missed to set correct? (The issue with the MDB throwing exceptions is NOT the point here) Thanks.

    Read the article

  • MSSQL 2000 Stored Procedure to Split Shift Times

    - by JClaspill
    I am being asked to alter a system to include the ability to have pay differentials based on hours worked. The old method included a stored procedure (MSSQL2000 db) that did the basics, but simply knows the start and end of every shift. So, this is the information I start with: EMPLOYEE | TYPE | HOURS | INSTAMP | OUTSTAMP Dave | Hourly | 8.643055 | 2011-01-08 07:57:35.557 | 2011-01-08 16:36:10.120 And I need to turn that into something like: EMPLOYEE | TYPE | HOURS | INSTAMP | OUTSTAMP Dave | Hourly | 4.00 | 2011-01-08 08:00:00.000 | 2011-01-08 12:00:00.000 Dave | ShiftDiff1 | 4.50 | 2011-01-08 12:00:00.000 | 2011-01-08 16:30:00.000 The ShiftDiff's range from hours to certain days, to a combo of both. Should I try to make the SQL2000 SP do this or pass the info back to my ASP.NET(C#) app and let it handle it, then send back?

    Read the article

  • Applying css media=print not working with MasterPages after pagebreaks

    - by Claudia
    Hi, I´m using a css media=print file in a Page that is using a MasterPage. I put some pagebreaks like this in certain parts of the html code: <h1 style="page-break-before: always; height: 0px; line-height: 0px;"> This works perfectly in the first page, meaning that the styles are applied correctly, but after the pagebreaks, the css is not working any more. Looking somewhere, the advice was to delete the masterpage, and yeah, it worked, but it is not the best thing to do, ´cause I have to remember changing this page if the masterpage changes. Anyone knows another way to solve this problem using MasterPages?

    Read the article

  • How to deploy and configure many copies of an application to multiple domains on the same server

    - by Oren
    We are about to begin work on an application that will eventually be deployed many times on one server. I am hoping to build a nice interface so that one of my coworkers can easily create new deployments of this application. The idea is to create a wizard with a series of options that will configure basic properties of each particular copy of the app such as color scheme, domain name, etc. Each copy of the application may be further tweaked independently down the line. I would like to know what is the best way to manage the automatic creation of users, the updating of domain name info and the deploying of copies of an application, with the ability to maintain certain discrepancies between each of these copies (such as installed plugins, different CSS) as we update the application in the future. What I'm asking is extremely similar to the way StackExchange 1.0 functioned, where a user could configure several options and a customized version of the StackExchange would soon be up and running. How is this accomplished?

    Read the article

  • Dojo slider: update value dynamically

    - by xApple
    I am building an application where the user browses certain objects by scrolling and zooming. To change the zoom level I have successfully implemented a "dijit.form.HorizontalSlider" object. Every time the user changes the position of the silder, I can catch the "onChange" call and do something with that. However, the user can also zoom-in by double clicking inside the view zone, at which point the slider should change position automatically to reflect the new zoom level. My question is the following: what function or method should I call in my javascript to update the position of a dojo silder ? Here is the code that creates the silder object: var zoomSlider = new dijit.form.HorizontalSlider({ name: "zoom_slider", id: "zoom_slider", value: 0, minimum: 0, maximum: 19, discreteValues: 20, intermediateChanges: false, style: "width: 160px;", onChange: function(value) { brwsr.view.zoomTo(value); } }, "zoom_slider"); navbox_silder.appendChild(zoomSlider.domNode);

    Read the article

  • Cross-platform configuration, options, settings, preferences, defaults

    - by hippietrail
    I'm interested in peoples' views on how best to store preferences and default settings in cross-platform applications. I primarily work in Perl on *nix and Windows but I'm also interested in the bigger picture. In the *nix world "dotfiles" (and directories) are very common with system-wide or application default settings generally residing in one path and user-specific settings in the home directory. Such files and dirs begin with a dot "." and are hidden by default from directory listings. Windows has the registry which also has paths for defaults and per-user overrides. Certain cross-platforms do it their own way, Firefox uses JavaScript preference files. Should a cross-platform app use one system across platforms or say dotfiles on *nix and registry on Windows? Does your favourite programming language have a library or module for accessing them in a standard way? Is there an emerging best practice or does everybody roll their own?

    Read the article

  • when is java faster than c++ (or when is JIT faster then precompiled)?

    - by kostja
    I have heard that under certain circumstances, Java programs or rather parts of java programs are able to be executed faster than the "same" code in C++ (or other precompiled code) due to JIT optimizations. This is due to the compiler being able to determine the scope of some variables, avoid some conditionals and pull similar tricks at runtime. Could you give an (or better - some) example, where this applies? And maybe outline the exact conditions under which the compiler is able to optimize the bytecode beyond what is possible with precompiled code? NOTE : This question is not about comparing Java to C++. Its about the possibilities of JIT compiling. Please no flaming. I am also not aware of any duplicates. Please point them out if you are.

    Read the article

  • How to 'hide' spurious "declared but never used" warnings?

    - by Roddy
    I'm using the C++Builder compiler which has a minor bug that certain static const items from system header files can cause spurious "xyzzy is declared but never used" warnings. I'm trying to get my code 100% warning free, so want a way of masking these particular warnings (note - but not by simply turning off the warning!) Also, I can't modify the header files. I need a way of 'faking' the use of the items, preferably without even knowing their type. As an example, adding this function to my .cpp modules fixes warnings for these four items, but it seems a bit 'ad-hoc'. Is there a better and preferably self-documenting way of doing this? static int fakeUse() { return OneHour + OneMinute + OneSecond + OneMillisecond; }

    Read the article

  • A resource for installation or setup folder hierarchy of various applications

    - by Luay
    Is there a web site (or something else) that has information on folders and their hierarchy where various programs and applications are installed? Please let me explain. I am writing an application that (part of what it does) references certain files installed by other application. To be able to determine the file paths for these folders I have to download and install each application seperatly on my development pc, search for the file I want, and then write its path in my application. This method is very time consuming and, frankly, boring, as it requires downloading and installing each application (some of them in excess of 600MB) and then locating the required file just to be able to "know" its path. So, I was wondering if there is something that could speed things up. like, for example, a website that would have such information. I tried each of the applications own website for information but no dice. Any help from you will be much appreciated. Many thanks

    Read the article

  • require_owner code to limit controller actions not recognizing current user as owner

    - by bgadoci
    I am trying to restrict access to certain actions using a before_filter which seems easy enough. Somehow the ApplicationController is not recognizing that the current_user is the owner of the user edit action. When I take the filter off the controller correctly routes the current_user to their edit view information. Here is the code. Link to call edit action from user controller (views/questions/index.html.erb): <%= link_to "Edit Profile", edit_user_path(:current) %> ApplicationController (I am only posting the code that I think is affecting this but can post the whole thing if needed). class ApplicationController < ActionController::Base def require_owner obj = instance_variable_get("@#{controller_name.singularize.camelize.underscore}") # LineItem becomes @line_item return true if current_user_is_owner?(obj) render_error_message("You must be the #{controller_name.singularize.camelize} owner to access this page", root_url) return false end end and the before_filter class UsersController < ApplicationController before_filter :require_owner, :only => [:edit, :update, :destroy] #... end I simply get the rendering of the error message from the ApplicationController#require_owner action.

    Read the article

  • TSQL, select values from large many-to-many relationship

    - by eugeneK
    I have two tables Publishers and Campaigns, both have similar many-to-many relationships with Countries,Regions,Languages and Categories. more info Publisher2Categories has publisherID and categoryID which are foreign keys to publisherID in Publishers and categoryID in Categories which are identity columns. On other side i have Campaigns2Categories with campaignID and categoryID columns which are foreign keys to campaignID in Campaigns and categoryID in Categories which again are identities. Same goes for Regions, Languages and Countries relationships I pass to query certain publisherID and want to get campaignIDs of Campaigns that have at least one equal to Publisher value from regions, countries, language or categories thanks

    Read the article

  • Handling Data Hierarchies in code

    - by Miau
    Hi there So, say I have a string to parse with a given format that maps to a tree like data structure. The string is kinda similar to a folder path, and the structure is similar to a file structure, except its got some rules so for something@cat1@otherSomething you would get /something/cat1/otherSomething for something@cat2@otherSomething you would get /something/cat2/otherSomething other examples /OtherThing/cat1/otherSomething/Blah /OtherThing/cat4/otherSomething Where something, cat1, otherSomethign, etc are some sort of instances of ICategory There are certain rules that control what subcategories are valid and which subcategories are not acceptable, at the moment I m considering a heavy Object hierachy, but I know this is not a flexible solution, I d prefer the categories to be a bit more general but again, since there are rules about what can go next I m not sure how to do this. An example of a rule can be: OtherThing can only have subcategories cat1 and cat4 ( anything else is invalid) An option would be to use some sort of convention based aproach to instantiate a particular class given a subsection of the string(like cat4) but it seems a bit too complex, I m all ears Thanks

    Read the article

  • Why wouldn't `new int[x]{}` be valid???

    - by dboarman-FissureStudios
    In MonoDevelop I have the following code which compiles: int[] row = new int[indices.Count]{}; However, at run-time, I get: Matrix.cs(53,53): Error CS0150: A constant value is expected (CS0150) (testMatrix) I know what this error means and forces me to then resize the array: int[] row = new int[indices.Count]{}; Array.Resize(ref row, rowWidth); Is this something I just have to deal with because I am using MonoDevelop on Linux? I was certain that under .Net 3.5 I was able to initialize an array with a variable containing the width of the array. Can anyone confirm that this is isolated? If so, I can report the bug to bugzilla.

    Read the article

  • Vim Editor is very smart?

    - by Narek
    I am programming in C++ or Java. So I want to use Vim editor, because it is very flexible. I have heard that I can configure the Vim editor to be able to go from object to the definition from function to the definition from class name to the definition Do we have any professional Vim-er that could tell me how exactly to configure Vim for that? Thanks in advance. P.S. In case readers will consider this question is not connected with programming, I would say that this is improving speed of programming. So it is a help to the programmer. So please don't close this question. EDIT: Also I would like to know how vim works with code completion and can vim hint the list of methods that are available for the certain object? If yes, then I would like to know how to configure these options too?

    Read the article

  • Restrict access to a specific URL, running on IIS7 / ASP.NET

    - by frankadelic
    I am deploying a public ASP.NET website on an IIS7 web farm. The application runs on 3 web servers and is behind a firewall. We want to create a single page on the website that is accessible only to internal users. It is primarily used for diagnostics, trigger cache expiry, etc. /admin/somepage.aspx What is the best way to control access to this page? We need to: Prevent all external (public) users from accessing the URL. Permit specific internal users to access the page, only from certain IPs or networks. Should this access control be done at the (a) network level, (b) application level, etc.?

    Read the article

  • Java M4A atom tagging free space issue

    - by Brett
    Hey, I've been trying to be able to read and write iTunes style M4A atoms and while I've successfully done the reading part, I've come to a bit of a halt in regards to the free space atoms. I figured that I should be able edit and shift the padding around to accommodate writing an atom with more data than it originally had. I've been stuck on this for about a day now, and I've been trying to figure out how to determine the closest free space atom with enough size to accommodate the new data. so far I have: private freeAtom acquireFreeSpaceAtom( long position ) { long atomStart = Long.MAX_VALUE; freeAtom atom = null; for( freeAtom a : freeSpace ) { if( Math.abs( position - atomStart ) > Math.abs( position - a.getAtomStart() ) ) atomStart = ( atom = a ).getAtomStart(); } return atom; } That code only takes into account the closest free space atom and completely disregards the fact that it should be greater than or equal to a certain size, but I can't quite figure out how I should check for both closeness and size efficiently.

    Read the article

  • Create slide-in notifications à la Outlook in Windows with .NET

    - by Draak
    I am using .NET and am creating a desktop app/service that will display notifications in the corner of my Desktop when certain events are triggered. I don't want to use a regular Message Box b/c that would be too intrusive. The notifications would slide into view and then fade out after a few seconds. I am thinking of something that will act very much like the Outlook alerts that one gets when a new message arrives. The question is: Should I use WPF for this? I've never done anything with WPF but will happily try it if that's best means to the end. Is there a way to accomplish this with regular .NET libraries?

    Read the article

  • What do you do before starting on a project?

    - by hahuang65
    I'm still a pretty new project, and I haven't really worked on any large projects yet. However a few projects for school has shown me something I have never really thought of before. Pre-Project planning. One project we ran into a huge problem at the very last minute, and the other project was not divided up between partners very evenly, such that all the work was actually done at the end. So my question to everyone here is: How do you plan out the project beforehand? Please try to cover the following: Design (draw out UI by hand, UMLs, etc.) Division of Labor Timeline (especially how you estimate how much time is needed for certain things) and anything else you can think of. Thanks for all the help!

    Read the article

< Previous Page | 286 287 288 289 290 291 292 293 294 295 296 297  | Next Page >