Search Results

Search found 2492 results on 100 pages for 'dave maple'.

Page 61/100 | < Previous Page | 57 58 59 60 61 62 63 64 65 66 67 68  | Next Page >

  • Intermittent error thrown, "A required anti-forgery token was not supplied or was invalid."

    - by Dave K
    I'm occasionally getting this error during normal use, and I've not found a way to stop it without removing the attribute that requires the token, which I'd rather not do. I've gotten this bug during my own testing (but seemingly randomly) and I know from my logging that actual logged-in users are getting it as well. Does anyone know what would cause the antiforgerytoken system to break (other than a real attack), and how I could fix this without opening up a security hole in my forms? Thanks!

    Read the article

  • How to enable ajax when deriving from System.Web.UI.WebControls.WebControl on controls that are crea

    - by Dave
    I've built a class that derives from System.Web.UI.WebControl. It basically renders pagination links (same as what you see on top of GridView when enabled) for use above a repeater. I'm creating some anchor tags explicitly inside my nav control obviously, but they don't perform ajax postbacks. My understanding is that ajax requires POSTS to work right? Well, these would be GETs which I think is the problem. Is there a way to achieve what I'm trying to do? Thanks!

    Read the article

  • IoC from start to finish

    - by Dave
    I'm quite sure that IoC is the way to go for my application. There are a ton of articles and even questions here on SO that discuss the different containers. I've read several blogs today with partial examples. I am personally leaning towards starting with the CommonServiceLocator and Unity as two way to solve the same problem -- I just need a bunch of assemblies to get data from a database, which I assume is what needs to be injected everywhere. I've yet to find any sites that really take a problem from beginning to end, with concrete code examples. For example, I've yet to find one that discusses an IServiceLocator and how to actually register it (or do whatever is required to make it known). What are your favorite posts / articles / SO questions that can take a noob from start to finish with the implementation?

    Read the article

  • Automated Oracle Schema Migration Tool

    - by Dave Jarvis
    What are some tools (commercial or OSS) that provide a GUI-based mechanism for creating schema upgrade scripts? To be clear, here are the tool responsibilities: Obtain connection to recent schema version (called "source"). Obtain connection to previous schema version (called "target"). Compare all schema objects between source and target. Create a script to make the target schema equivalent to the source schema ("upgrade script"). Create a rollback script to revert the source schema, used if the upgrade script fails (at any point). Create individual files for schema objects. The software must: Use ALTER TABLE instead of DROP and CREATE for renamed columns. Work with Oracle 10g or greater. Create scripts that can be batch executed (via command-line). Trivial installation process. (Bonus) Create scripts that can be executed with SQL*Plus. Here are some examples (from StackOverflow, ServerFault, and Google searches): Change Manager Oracle SQL Developer Software that does not meet the criteria, or cannot be evaluated, includes: TOAD PL/SQL Developer - Invalid SQL*Plus statements. Does not produce ALTER statements. SQL Fairy - No installer. Complex installation process. Poorly documented. DBDiff - Crippled data set evaluation, poor customer support. OrbitDB - Crippled data set evaluation. SchemaCrawler - No easily identifiable download version for Oracle databases. SQL Compare - SQL Server, not Oracle. LiquiBase - Requires changing the development process. No installer. Manually edit config files. Does not recognize its own baseUrl parameter. The only acceptable crippling of the evaluation version is by time. Crippling by restricting the number of tables and views hides possible bugs that are only visible in the software during the attempt to migrate hundreds of tables and views.

    Read the article

  • Spring webflow 1.0 - Downloading a file

    - by Dave
    I am using spring webflow 1.0. I am uploading a csv file, parsing it, and displying results before proceeding. The user has an option to download a csv file that contains the records that did not pass validation. When I click the link in a JSP to download this file, webflow invokes a form Action. The form action writes out a file via getting the output stream off the response: HttpServletResponse response = ((ServletExternalContext) context.getExternalContext()).getResponse(); I do not want to leave the jsp I'm currently on. I just want to download the file. In other words, I do not want to transition to another state. I just want to serve the dynamically rendered file. Everything works (I don't leave the page, and I download the file), but I'm getting the following error in my console: _pEncydKfggPHJo8=org.springframework.webflow.engine.NoMatchingTransitionException: No transition was matched on the event(s) signaled by the [1] action(s) that executed in this action state 'downloadErrorReportAction' of flow 'myFlow'; transitions must be defined to handle action result outcomes -- possible flow configuration error? Note: the eventIds signaled were: 'array<String>[[null]]', while the supported set of transitional criteria for this action state is 'array<TransitionCriteria>[[empty]]' at org.springframework.webflow.engine.ActionState.doEnter(ActionState.java:187) at org.springframework.webflow.engine.State.enter(State.java:191) at org.springframework.webflow.engine.Transition.execute(Transition.java:212) at org.springframework.webflow.engine.TransitionableState.onEvent(TransitionableState.java:107) at org.springframework.webflow.engine.Flow.onEvent(Flow.java:534) Truncated. see log file for complete stacktrace Here is the relevant portion of my webflow config. <view-state id="showUploadResults" view="UploadResults3.0"> <render-actions> <action bean="UploadResultsAction" method="transitionToWebflow"/> <action bean="UploadResultsAction" method="setupData"/> </render-actions> <transition on="submit" to="proceed"/> <transition on="downloadErrorReport" to="downloadErrorReportAction"/> </view-state> <action-state id="downloadErrorReportAction"> <action bean="UploadResultsAction" method="downloadErrorReport" name="downloadErrorReport"/> </action-state>

    Read the article

  • Deploy Connectivity Platform Folder/Files

    - by Dave
    I'm using the Microsoft.SmartDevice.Connectivity features, but I do not know how to get the CoreCon Folder and files under "C:\Documents and Settings\All Users\Application Data\Microsoft\corecon\1.0\1033" deployed as part of an install project. The "new DatastoreManager(1033)" fails becouse users of my app do not have that folder and device xml files. Any Ideas of how to install or deploy those files? I assume I have those as part of an API I've installed, but can not pinpoint the source. Thanks

    Read the article

  • Flickr API automated login using Python library flickrapi

    - by Dave Aaron Smith
    I have a web application that I want to sync with Flickr. I don't want the users to have to log into Flickr so I plan to use a single login. I believe I'll need to do something like this: import flickrapi flickr = flickrapi.FlickrAPI(myKey, mySecret) (token, frob) = flickr.get_token_part_one(perms='write', my_auth_callback) flickr.get_token_part_two((token, frob,)) flickr.what_have_you(... I don't know what my_auth_callback should look like though. I suspect it will have to post my login information to flickr. Could I do the get_token_part_one step just once manually perhaps and then re-use it in get_token_part_two?

    Read the article

  • Conditional macro expansion

    - by Dave DeLong
    Heads up: This is a weird question. I've got some really useful macros that I like to use to simplify some logging. For example I can do Log(@"My message with arguments: %@, %@, %@", @"arg1", @"arg2", @"arg3"), and that will get expanded into a more complex method invocation that includes things like self, _cmd, __FILE__, __LINE__, etc, so that I can easily track where things are getting logged. This works great. Now I'd like to expand my macros to not only work with Objective-C methods, but general C functions. The problem is the self and _cmd portions that are in the macro expansion. These two parameters don't exist in C functions. Ideally, I'd like to be able to use this same set of macros within C functions, but I'm running into problems. When I use (for example) my Log() macro, I get compiler warnings about self and _cmd being undeclared (which makes total sense). My first thought was to do something like the following (in my macro): if (thisFunctionIsACFunction) { DoLogging(nil, nil, format, ##__VA_ARGS__); } else { DoLogging(self, _cmd, format, ##__VA_ARGS__); } This still produces compiler warnings, since the entire if() statement is substituted in place of the macro, resulting in errors with the self and _cmd keywords (even though they will never be executed during function execution). My next thought was to do something like this (in my macro): if (thisFunctionIsACFunction) { #define SELF nil #define CMD nil } else { #define SELF self #define CMD _cmd } DoLogging(SELF, CMD, format, ##__VA_ARGS__); That doesn't work, unfortunately. I get "error: '#' is not followed by a macro parameter" on my first #define. My other thought was to create a second set of macros, specifically for use in C functions. This reeks of a bad code smell, and I really don't want to do this. Is there some way I can use the same set of macros from within both Objective-C methods and C functions, and only reference self and _cmd if the macro is in an Objective-C method?

    Read the article

  • PHP Disabling ipv6

    - by Dave C
    Hello, It seems that I need to somehow disable IPv6 on my php pages, but I am not sure how to do this. I think I have to add --disable-ipv6 somewhere into my INI file... this doesnt look like proper syntax though. I am trying to solve the following bug: http://bugs.php.net/45519 Does anyone know where to put this?

    Read the article

  • PHP Image Link in FUnction 404's

    - by Dave C
    Hello, I have a valid link that goes to a picture located on my web server. It is a simple jpg image, I can copy and paste this link into my web browser and it loads fine. The issue comes in when I try to call a few php functions on the image... such as getimagesize or fopen... they both return 404 errors even though the image is there. Does anyone know that could be causing this? Thank you for your time.

    Read the article

  • main vs initialize in Ruby

    - by Dave
    Okay, so I've looked through a couple of my ruby books and done some googling to no avail. What is the difference between main and initialize in Ruby? I've seen code that uses class Blahblah def main some logic here end #more methods... end and then calls it using Blahblah.new. Isn't new reserved only for initialize? if not, then what's the difference between the two?

    Read the article

  • Optimize date query for large child tables: GiST or GIN?

    - by Dave Jarvis
    Problem 72 child tables, each having a year index and a station index, are defined as follows: CREATE TABLE climate.measurement_12_013 ( -- Inherited from table climate.measurement_12_013: id bigint NOT NULL DEFAULT nextval('climate.measurement_id_seq'::regclass), -- Inherited from table climate.measurement_12_013: station_id integer NOT NULL, -- Inherited from table climate.measurement_12_013: taken date NOT NULL, -- Inherited from table climate.measurement_12_013: amount numeric(8,2) NOT NULL, -- Inherited from table climate.measurement_12_013: category_id smallint NOT NULL, -- Inherited from table climate.measurement_12_013: flag character varying(1) NOT NULL DEFAULT ' '::character varying, CONSTRAINT measurement_12_013_category_id_check CHECK (category_id = 7), CONSTRAINT measurement_12_013_taken_check CHECK (date_part('month'::text, taken)::integer = 12) ) INHERITS (climate.measurement) CREATE INDEX measurement_12_013_s_idx ON climate.measurement_12_013 USING btree (station_id); CREATE INDEX measurement_12_013_y_idx ON climate.measurement_12_013 USING btree (date_part('year'::text, taken)); (Foreign key constraints to be added later.) The following query runs abysmally slow due to a full table scan: SELECT count(1) AS measurements, avg(m.amount) AS amount FROM climate.measurement m WHERE m.station_id IN ( SELECT s.id FROM climate.station s, climate.city c WHERE -- For one city ... -- c.id = 5182 AND -- Where stations are within an elevation range ... -- s.elevation BETWEEN 0 AND 3000 AND 6371.009 * SQRT( POW(RADIANS(c.latitude_decimal - s.latitude_decimal), 2) + (COS(RADIANS(c.latitude_decimal + s.latitude_decimal) / 2) * POW(RADIANS(c.longitude_decimal - s.longitude_decimal), 2)) ) <= 50 ) AND -- -- Begin extracting the data from the database. -- -- The data before 1900 is shaky; insufficient after 2009. -- extract( YEAR FROM m.taken ) BETWEEN 1900 AND 2009 AND -- Whittled down by category ... -- m.category_id = 1 AND m.taken BETWEEN -- Start date. (extract( YEAR FROM m.taken )||'-01-01')::date AND -- End date. Calculated by checking to see if the end date wraps -- into the next year. If it does, then add 1 to the current year. -- (cast(extract( YEAR FROM m.taken ) + greatest( -1 * sign( (extract( YEAR FROM m.taken )||'-12-31')::date - (extract( YEAR FROM m.taken )||'-01-01')::date ), 0 ) AS text)||'-12-31')::date GROUP BY extract( YEAR FROM m.taken ) The sluggishness comes from this part of the query: m.taken BETWEEN /* Start date. */ (extract( YEAR FROM m.taken )||'-01-01')::date AND /* End date. Calculated by checking to see if the end date wraps into the next year. If it does, then add 1 to the current year. */ (cast(extract( YEAR FROM m.taken ) + greatest( -1 * sign( (extract( YEAR FROM m.taken )||'-12-31')::date - (extract( YEAR FROM m.taken )||'-01-01')::date ), 0 ) AS text)||'-12-31')::date The HashAggregate from the plan shows a cost of 10006220141.11, which is, I suspect, on the astronomically huge side. There is a full table scan on the measurement table (itself having neither data nor indexes) being performed. The table aggregates 237 million rows from its child tables. Question What is the proper way to index the dates to avoid full table scans? Options I have considered: GIN GiST Rewrite the WHERE clause Separate year_taken, month_taken, and day_taken columns to the tables What are your thoughts? Thank you!

    Read the article

  • Obtaining YouTube video ID in a URL and inputting selected video ID into a URL

    - by Dave
    I've been having trouble in trying to figure this out. What I am trying to do is, obtain the ID of a video from YouTube, and input the 11 character ID into the css of a div of a specific id by using jquery. I know the URL for the thumbnail of any video, but I just need to be able to change the ID to display different video thumbnails. <script> $(document).ready(function() { function(data){ videoID = data.split('www.youtube.com/v/')[1].split('&amp')[0]; $("#304817679").append(videoID); }); $("#304817679").replaceWith("<div id=\"304817679\" style=\"background: url(http://img.youtube.com/vi/"+ $.function(data) +"/0.jpg) no-repeat middle; width: 15px; height: 150px;\"></div>"); }); }); </script> <div id="304817679"> <div style="display: none;"><object width="248" height="222"><param name="movie" value="http://www.youtube.com/v/vy90n2nNRKQ&amp;rel=0&amp;egm=0&amp;showinfo=0&amp;fs=1"></param><param name="wmode" value="transparent"></param><param name="allowFullScreen" value="true"></param><embed src="http://www.youtube.com/v/vy90n2nNRKQ&amp;rel=0&amp;egm=0&amp;showinfo=0&amp;fs=1" type="application/x-shockwave-flash" width="248" height="222" allowFullScreen="true" wmode="transparent"></embed></object></div> </div> Trying to explain this better, I want the 11 Character YouTube Video ID from the embedded code, and put it into the URL of the thumbnail (http://img.youtube.com/vi/"+ function(data) +"/0.jpg). Which, would then also replace the original div (div id="304817679"). Am I on the right track with my script? I'm entirely new to this, and I would appreciate some of the help that's offered here.

    Read the article

  • TypeError: unbound method make_request() must be called with XX instance, but how?

    - by Dave
    Running the code below I get E TypeError: unbound method make_request() must be called with A instance as first argument (got str instance instead) I dont want to set make_request method as static, I want to call it from an instance of an object. The example http://pytest.org/latest/fixture.html#fixture-function # content of ./test_smtpsimple.py import pytest @pytest.fixture def smtp(): import smtplib return smtplib.SMTP("merlinux.eu") def test_ehlo(smtp): response, msg = smtp.ehlo() assert response == 250 assert "merlinux" in msg assert 0 # for demo purposes My code """ """ import pytest class A(object): """ """ def __init__(self, name ): """ """ self._prop1 = [name] @property def prop1(self): return self._prop1 @prop1.setter def prop1(self, arguments): self._prop1 = arguments def make_request(self, sex): return 'result' def __call__(self): return self @pytest.fixture() def myfixture(): """ """ A('BigDave') return A def test_validateA(myfixture): result = myfixture.make_request('male') assert result =='result'

    Read the article

  • Optimal two variable linear regression SQL statement (censoring outliers)

    - by Dave Jarvis
    Problem Am looking to apply the y = mx + b equation (where m is SLOPE, b is INTERCEPT) to a data set, which is retrieved as shown in the SQL code. The values from the (MySQL) query are: SLOPE = 0.0276653965651912 INTERCEPT = -57.2338357550468 SQL Code SELECT ((sum(t.YEAR) * sum(t.AMOUNT)) - (count(1) * sum(t.YEAR * t.AMOUNT))) / (power(sum(t.YEAR), 2) - count(1) * sum(power(t.YEAR, 2))) as SLOPE, ((sum( t.YEAR ) * sum( t.YEAR * t.AMOUNT )) - (sum( t.AMOUNT ) * sum(power(t.YEAR, 2)))) / (power(sum(t.YEAR), 2) - count(1) * sum(power(t.YEAR, 2))) as INTERCEPT FROM (SELECT D.AMOUNT, Y.YEAR FROM CITY C, STATION S, YEAR_REF Y, MONTH_REF M, DAILY D WHERE -- For a specific city ... -- C.ID = 8590 AND -- Find all the stations within a 15 unit radius ... -- SQRT( POW( C.LATITUDE - S.LATITUDE, 2 ) + POW( C.LONGITUDE - S.LONGITUDE, 2 ) ) <15 AND -- Gather all known years for that station ... -- S.STATION_DISTRICT_ID = Y.STATION_DISTRICT_ID AND -- The data before 1900 is shaky; insufficient after 2009. -- Y.YEAR BETWEEN 1900 AND 2009 AND -- Filtered by all known months ... -- M.YEAR_REF_ID = Y.ID AND -- Whittled down by category ... -- M.CATEGORY_ID = '001' AND -- Into the valid daily climate data. -- M.ID = D.MONTH_REF_ID AND D.DAILY_FLAG_ID <> 'M' GROUP BY Y.YEAR ORDER BY Y.YEAR ) t Data The data is visualized here (with five outliers highlighted): Questions How do I return the y value against all rows without repeating the same query to collect and collate the data? That is, how do I "reuse" the list of t values? How would you change the query to eliminate outliers (at an 85% confidence interval)? The following results (to calculate the start and end points of the line) appear incorrect. Why are the results off by ~10 degrees (e.g., outliers skewing the data)? (1900 * 0.0276653965651912) + (-57.2338357550468) = -4.66958228 (2009 * 0.0276653965651912) + (-57.2338357550468) = -1.65405406 I would have expected the 1900 result to be around 10 (not -4.67) and the 2009 result to be around 11.50 (not -1.65). Thank you!

    Read the article

  • Java bytecode compiler benchmarks

    - by Dave Jarvis
    Q.1. What free compiler produces the fastest executable Java bytecode? Q.2. What free virtual machine executes Java bytecode the fastest (on 64-bit multi-core CPUs)? Q.3. What other (currently active) compiler projects are missing from this list: http://www.ibm.com/developerworks/java/jdk/ http://gcc.gnu.org/java/ http://openjdk.java.net/groups/compiler/ http://java.sun.com/javase/downloads/ http://download.eclipse.org/eclipse/downloads/ Q.4. What performance improvements can compilers do that JITs cannot (or do not)? Q.5. Where are some recent benchmarks, comparisons, or shoot-outs (for Q1 or Q2)? Thank you!

    Read the article

  • Memory leak, again!

    - by Dave
    A couple of weeks ago I was having trouble with memory leaks associated with a ContextMenuStrip. That problem was fixed. See that question here Now I'm having similar issues with ToolStrip controls. As in the previous problem, I'm creating a large number of UserControls and adding them to a FlowLayoutPanel. Each control creates a ToolStrip for itself in its constructor. When a control is removed from the FlowLayoutPanel (the only reference to the control), it seems memory for the ToolStrip is not being released. However when I comment out the code that creates the ToolStrip the memory leak doesn't happen. Is this the same sort of issue as the previous one - I need to set the ToolStrip to null? I don't see how that could be since this time the control is creating the strip itself, and all the button events etc are handled inside it. So shouldn't everything be GC'd when the control is no longer referenced? EDIT: As to the comments, the thing I don't understand is originally I was "making" my own toolstrip out of a panel and some labels. The labels were used as buttons. No memory leaks occurred this way. The only thing I've changed is using a proper ToolStrip with proper buttons in place of the panel, but all the event handlers are wired the same way. So why is it now leaking memory?

    Read the article

  • CORBA Naming Service returns incorrect location of a registered object

    - by dave-keiture
    Hi experts, I have a simple setup with several objects registered at orbd. Remote client initializes connection to the ORB and tries to resolve a reference to the Naming Serice (IDL:omg.org/CosNaming/NamingContextExt:1.0). So far it's all fine - ORB returns giop.iiop.host/giop.iiop.port pair. When reference to the Naming Service is resolved, client tries to resolve_str() one of the registered objects. This time, Naming Service returns completely different pair giop.iiop.host/giop.iiop.port for the object (not the host/port of a Naming Service) - I don't know anything about them. When client tries to call a method on a resolved object, it fails, as the host/port pair is not configured in the firewall. Could you please explain, why it's happening? Thanks in advance!

    Read the article

  • Master report and subreport communication

    - by Dave Jarvis
    How do you determine whether the content for the detail page being displayed is filled by a specific subreport? For example, consider two subreports on the same master report, using different detail bands: Detail 1 Detail 2 The header on the master report should show certain fields on pages where the subreport in the Detail 2 band is printed. A Return Value from the subreport in the Detail 2 band only seems to be set after the report has finished, even though the Reset type for the variable (in both the master and the subreport) is set to Page. (Setting it to Report also does not help.)

    Read the article

  • Identifying that a variable is a new-style class in Python?

    - by Dave Johansen
    I'm using Python 2.x and I'm wondering if there's a way to tell if a variable is a new-style class? I know that if it's an old-style class that I can do the following to find out. import types class oldclass: pass def test(): o = oldclass() if type(o) is types.InstanceType: print 'Is old-style' else: print 'Is NOT old-style' But I haven't been able to find anything that works for new-style classes. I found this question, but the proposed solutions don't seem to work as expected, because simple values as are identified as classes. import inspect def newclass(object): pass def test(): n = newclass() if inspect.isclass(n): print 'Is class' else: print 'Is NOT class' if inspect.isclass(type(n)): print 'Is class' else: print 'Is NOT class' if inspect.isclass(type(1)): print 'Is class' else: print 'Is NOT class' if isinstance(n, object): print 'Is class' else: print 'Is NOT class' if isinstance(1, object): print 'Is class' else: print 'Is NOT class' So is there anyway to do something like this? Or is everything in Python just a class and there's no way to get around that?

    Read the article

  • Is the Unicode prefix N still needed in SQL Compact Edition?

    - by Dave
    At least in previous versions of SQL Server, you had to prefix Unicode string constants with an "N" to make them be treated as Unicode. Thus, select foo from bar where fizz = N'buzz' (See "Server-Side Programming with Unicode" for SQL Server 2005 "from the horse's mouth" documentation.) We have an application that is using SQL Compact Edition and I am wondering if that is still necessary. From the testing I am doing, it appears to be unneeded. That is, the following SQL statements both behave identically in SQL CE, but the second one fails in SQL Server 2005: select foo from bar where foo=N'???' select foo from bar where foo='???' (I hope I'm not swearing in some language I don't know about...) I'm wondering if that is because all strings are treated as Unicode in SQL CE, or if perhaps the default code page is now Unicode-aware. If anyone has seen any official documentation, either yea or nay, I'd appreciate it. I know I could go the safe route and just add the "N"'s, but there's a lot of code that will need changed, and if I don't need to, I don't want to! Thanks for your help!

    Read the article

  • best tool for monitoring incoming/outgoing requests (PC/MAC)?

    - by dave L
    What are the best tools for monitoring incoming/outgoing requests from a PC or MAC? Any tool that works well on both? (my guess is N/A) I'm interested in capturing HTTP (possibly even TCPIP)-based requests and responses. Does Wireshark always come out on top or are there alternatives people feel are better? Thanks for any info.

    Read the article

< Previous Page | 57 58 59 60 61 62 63 64 65 66 67 68  | Next Page >