Search Results

Search found 380 results on 16 pages for 'chad cook'.

Page 11/16 | < Previous Page | 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • How to store and compare time-zone sensitive times

    - by Chad Moran
    I have a data structure where an entity has times stored as an int (minutes into the day) for fast comparison. The entity also has a Foreign Key reference back to a TimeZone table which contains the .NET CLR ID Name and it's Standard Time/Daylight Time acronyms. Since this information is stored as time-zone insensitive - I was wondering how in LINQ to SQL I could convert this into a UTC DateTime for comparison against other times that will be in UTC. Just to be clear this conversion has to be done server-side so that I can execute filtering on the SQL Server and not the client. I am using .NET 3.5 SP1 and SQL Server 2008.

    Read the article

  • PHP: creating a smooth edged circle, image or font?

    - by Chad Whitaker
    I'm making a PHP image script that will create circles at a given radius. I used: <?php imagefilledellipse ( $image, $cx, $cy, $w, $h, $color ); ?> but hate the rough edges it produces. So I was thinking of making or using a circle font that I will output using: <?php imagettftext ( $image, $size, $angle, $x, $y, $color, 'fontfile.ttf', $text ); ?> So that the font will produce a circle that has a smooth edge. My problem is making the "font size" match the "radius size". Any ideas? Or maybe a PHP class that will produce a smooth edge on a circle would be great! Thank you.

    Read the article

  • Storage drives is causting system crash

    - by Chad
    I'm running Centos 5.4 with 750GB(ntfs) and 2TB drives for storage. Originally I installed the 750, everything seemed fine and then I installed the 2TB drive with NTFS already partitioned. I noticed when I would copy a lot of videos it would crash (no mouse or response from server) about 20min into it. After doing some troubleshooting I noticed the 750 would also crash when doing the same task so I decided that NTFS may be the problem. I unmounted the 2TB drive and tried to partition and format it using ext2 but when using parted it would crash at this point "writing inode tables". Looking at the dmesg logs I believe this is the error "mtrr: type mismatch for e0000000,10000000 old: write-back new: write-combining". Any idea as to what could be causing this?

    Read the article

  • GCC compiling a dll with __stdcall

    - by Chad
    When we compile a dll using __stdcall inside visual studio 2008 the compiled function names inside the dll are. FunctionName Though when we compile the same dll using GCC using wx-dev-cpp GCC appends the number of paramers the function has, so the name of the function using Dependency walker looks like. FunctionName@numberOfParameters or == FunctionName@8 How do you tell GCC compiler to remove @nn from exported symbols in the dll?

    Read the article

  • How can I convert a C# application that uses StandardInput and StandardOutput in .NET Compact Framew

    - by Chad
    I have an application that uses the Process class, StandardInput, and StandardOutput to communicate with an external executable. I am using this to pass strings back and forth, and it works well in my Windows application. On the mobile device, I do not see StandardInput or StandardOutput in the Process class. Is there an easy way to replicate this functionality on the Mobile?

    Read the article

  • Always-indexed MySQL indexing/searching replacements for InnoDB?

    - by Chad Johnson
    I am using InnoDB for a MySQL table, and obviously queries using LIKE and RLIKE/REGEXP can take a lot of time. I've tried Spinx, and it works great, except I have to re-index context at intervals. I can re-index every minute, but I am wondering if there is either 1) a setting in Sphinx to keep records always indexed or 2) other software besides Sphinx that will keep records always indexed. I want it where that immediately upon inserting or updating a record, the index is updated.

    Read the article

  • Function templates for arbitrary STL containers containing arbitrary types.

    - by Chad Brewbaker
    I have an arbitrary STL container C, which contains elements of an arbitrary type T. I want to create an std::vector that has a copy of all the elements. What is the cleanest way to do this? template <typename C> void myfunction(C container){ /*Derive the type T of elements within the container*/ std::vector<T> mystack; /* Iterate over container and push_back() the elements into mystack*/ }

    Read the article

  • set map in google maps with TimerTask

    - by Chad White
    I would like to change the Position of the map in google maps v2 But Ive done it in a TimerTask ... target, zoom, bearing and so on and it says "IllegalStateException - not on the main thread What should I do? Any help? class Task extends TimerTask { @Override public void run() { CameraPosition cameraPosition = new CameraPosition.Builder() .target(Zt) // Sets the center of the map to Mountain View .zoom(12) // Sets the zoom .bearing(180) // Sets the orientation of the camera to east .tilt(30) // Sets the tilt of the camera to 30 degrees .build(); // Creates a CameraPosition from the builder mMap.moveCamera(CameraUpdateFactory.newCameraPosition(cameraPosition)); } } Timer timer = new Timer(); timer.scheduleAtFixedRate(new Task(), 0, 20000);

    Read the article

  • What is a bleed-thru file in ClearCase?

    - by Chad Rhyner
    I was doing a checkout of a file in ClearCase, and I was unable to checkout this file from the frozen view because of this file which was a bleed-thru file. I thawed the view, and then I was able to check out the file, so I really do not have a problem at this time. I do have a question, though. What is a bleed-thru file in ClearCase? Any ideas? I have not heard this term before, and was interested, partly because it just sounds so cool!

    Read the article

  • Can you in any way interface Ruby Gems with PHP, Python, etc.?

    - by Chad Johnson
    Stupid question, and forgive me for asking, but someone is asking me, and I am not a super expert with Rails yet. Suppose I have some Rails gem I write. Now suppose a customer has some other framework, like Django or CakePHP, and I want to provide the functionality offered by my gem (eg. CRUD for automotive data) to them as a module in their framework. Could I somehow make it so they could interface my gem with Django or CakePHP? Obviously I could do something with some API magic--and I'll probably end up going that route. But I just want to know whether there is a way to directly interface with Gems from a non-Rails application.

    Read the article

  • Cache an FTP connection via session variables for use via AJAX?

    - by Chad Johnson
    I'm working on a Ruby web Application that uses the Net::FTP library. One part of it allows users to interact with an FTP site via AJAX. When the user does something, and AJAX call is made, and then Ruby reconnects to the FTP server, performs an action, and outputs information. Every time the AJAX call is made, Ruby has to reconnect to the FTP server, and that's slow. Is there a way I could cache this FTP connection? I've tried caching in the session hash, but "We're sorry, but something went wrong" is displayed, and a TCP dump is outputted in my logs whenever I attempt to store it in the session hash. I haven't tried memcache yet. Any suggestions?

    Read the article

  • Regular Expression - Capture and Replace Select Sequences

    - by Chad
    Take the following file... ABCD,1234,http://example.com/mpe.exthttp://example/xyz.ext EFGH,5678,http://example.com/wer.exthttp://example/ljn.ext Note that "ext" is a constant file extension throughout the file. I am looking for an expression to turn that file into something like this... ABCD,1234,http://example.com/mpe.ext ABCD,1234,http://example/xyz.ext EFGH,5678,http://example.com/wer.ext EFGH,5678,http://example/ljn.ext In a nutshell I need to capture everything up to the urls. Then I need to capture each URL and put them on their own line with the leading capture. I am working with sed to do this and I cannot figure out how to make it work correctly. Any ideas?

    Read the article

  • Uncaught ReferenceError: jQuery is not defined "jquery-ui.js:338"

    - by Chad Sellers
    My jquery script reference are : <script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript"></script> <script src="http://code.jquery.com/ui/1.9.1/jquery-ui.js" type="text/javascript"></script> I'm using Chrome Version 23.0.1271.64 m - And I'm getting an error on line 338 })( jQuery ); //-- line 338 is highlighted This is a 1st for me and looking for answers.

    Read the article

  • Redirect faster with Greasemonkey

    - by Chad
    I'm using Greasemonkey to redirect certain URLs to another but I would like to redirect before the URL to be redirect loads. Currently I'm using this simple script: //==UserScript== // @name Redirect Google // @description Redirect Google to Yahoo! // @include http://*.google.com/* //==/UserScript== window.location.replace("http://www.yahoo.com") In the above, google appears for a second and then redirected to google. I want to go yahoo immediately. Is it possible, and how?

    Read the article

  • Is there a way to specify a per-host deploy_to path with Capistrano?

    - by Chad Johnson
    I have searched and searched and asked a question already and have not received a clear answer. I have the following deploy script (snippet): set :application, "testapplication" set :repository, "ssh://domain.com//srv/hg/#{application}" set :scm, :mercurial set :deploy_to, "/srv/www/#{application}" role :web, "domain1.com", "domain2.com" role :app, "domain1.com", "domain2.com" role :db, "domain1.com", :primary => true, :norelease => true role :db, "domain2.com", :norelease => true As you see, I have set deploy_to to a specific path. And, I also have specified multiple web servers. However, each web server should have a different deployment path. I want to be able to run "cap deploy" and deploy to all hosts in one shot. I am NOT trying to deploy to staging and then to production. This is all production. My question is: how exactly do I specify a path per server? I have read the "Roles" documentation for Capistrano, and this is unclear. Can someone please post a deploy file example? I have read the documentation, and it is unclear how to do this. Does anyone know? Am I crazy? Am I thinking of this wrong or something? No answers anywhere online. Nowhere. Nothing. Please, someone help.

    Read the article

  • Transforming large Xml files

    - by Chad
    I was using this extension method to transform very large xml files with an xslt. Unfortunately, I get an OutOfMemoryException on the source.ToString() line. I realize there must be a better way, I'm just not sure what that would be? public static XElement Transform(this XElement source, string xslPath, XsltArgumentList arguments) { var doc = new XmlDocument(); doc.LoadXml(source.ToString()); var xsl = new XslCompiledTransform(); xsl.Load(xslPath); using (var swDocument = new StringWriter(System.Globalization.CultureInfo.InvariantCulture)) { using (var xtw = new XmlTextWriter(swDocument)) { xsl.Transform((doc.CreateNavigator()), arguments, xtw); xtw.Flush(); return XElement.Parse(swDocument.ToString()); } } } Thoughts? Solutions? Etc.

    Read the article

  • Is INT the correct datatype for ABS(CHECKSUM(NEWID()))?

    - by Chad Sellers
    I'm in the process of creating unique customers ID's that is an alternative Id for external use. In the process of adding a new column "cust_uid" with datatype INT for my unique ID's, When I do an INSERT into this new column: Insert Into Customers(cust_uid) Select ABS(CHECKSUM(NEWID())) I get a error: Could not create an acceptable cursor. OLE DB provider "SQLNCLI" for linked server "SHQ2IIS1" returned message "Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done. I've check all data types on both tables and the only things that has changed is the new column in both tables. The update is being done on one Big @$$ table...and for reasons above my pay grade, we would like to have new uid's that are different form the one's that we currently have "so users don't know how many accounts we actually have." Is INT the correct datatype for ABS(CHECKSUM(NEWID())) ?

    Read the article

  • Regex not being greedy enough

    - by Chad
    I've got the following regex that was working perfectly until a new situation arose ^.*[?&]U(?:RL)?=(?<URL>.*)$ Basically, it's used against URLs, to grab EVERYTHING after the U=, or URL= and return it in the URL match So, for the following http://localhost?a=b&u=http://otherhost?foo=bar URL = http://otherhost?foo=bar Unfortunately an odd case came up http://localhost?a=b&u=http://otherhost?foo=bar&url=http://someotherhost Ideally, I want URL to be "http://otherhost?foo=bar&url=http://someotherhost", instead, it is just "http://someotherhost"

    Read the article

  • How to control the "flow" of an ASP.NET MVC (3.0) web app that relies on Facebook membership, with Facebook C# SDK?

    - by Chad
    I want to totally remove the standard ASP.NET membership system and use Facebook only for my web app's membership. Note, this is not a Facebook canvas app question. Typically, in an ASP.NET app you have some key properties & methods to control the "flow" of an app. Notably: Request.IsAuthenticated, [Authorize] (in MVC apps), Membership.GetUser() and Roles.IsUserInRole(), among others. It looks like [FacebookAuthorize] is equivalent to [Authorize]. Also, there's some standard work I do across all controllers in my site. So I built a BaseController that overrides OnActionExecuting(FilterContext). Typically, I populate ViewData with the user's profile within this action. Would performance suffer if I made a call to fbApp.Get("me") in this action? I use the Facebook Javascript SDK to do registration, which is nice and easy. But that's all client-side, and I'm having a hard time wrapping my mind around when to use client-side facebook calls versus server-side. There will be a point when I need to grab the user's facebook uid and store it in a "profile" table along with a few other bits of data. That would probably be best handled on the return url from the registration plugin... correct? On a side note, what data is returned from fbApp.Get("me")?

    Read the article

  • Understanding Incrementing

    - by Chad
    For example this: var a = 123; var b = a++; now a contains 124 and b contains 123 I understand that b is taking the value of a and then a is being incremented. However, I don't understand why this is so. The principal reason for why the creators of JavaScript would want this. Is this really more useful than doing it the PHP way? What is the advantage to this other than confusing newbies?

    Read the article

  • Rails-like console for PHP?

    - by Chad Johnson
    Every so often, things work in my local PHP development environment, while in my test environment on my server, things do not. It's a nightmare to debug this. If I had a console like Rails provides, debugging would be much much simpler. Is there anything like the Rails console but for PHP? I should mention that I am using a home-brewn PHP application.

    Read the article

  • Cache an FTP connection for use via AJAX?

    - by Chad Johnson
    I'm working on a Ruby web Application that uses the Net::FTP library. One part of it allows users to interact with an FTP site via AJAX. When the user does something, and AJAX call is made, and then Ruby reconnects to the FTP server, performs an action, and outputs information. Every time the AJAX call is made, Ruby has to reconnect to the FTP server, and that's slow. Is there a way I could cache this FTP connection? I've tried caching in the session hash, but "We're sorry, but something went wrong" is displayed, and a TCP dump is outputted in my logs whenever I attempt to store it in the session hash. I haven't tried memcache yet. Any suggestions?

    Read the article

  • What is the standard or best way to deal with database branching with Mercurial or Git branches?

    - by Chad Johnson
    This has been a big question mark on my mind. I'm moving to Mercurial or Git very soon for my web software, and sometimes my branches require significant database changes which other branches should not see. This, I can't always share the same database for my branches. Is there some standard way of dealing with database changes for branching and cloning? What do you all do? I'm using MySQL.

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16  | Next Page >