Daily Archives

Articles indexed Saturday May 8 2010

Page 7/78 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • Trouble creating calendar in Google API via Coldfusion

    - by KingErroneous
    I am trying to create a caledar using the Google API, and it just returns the list of calendars in my account, just like I sent a GET request. Here is my code: <cfxml variable="locals.xml"> <cfoutput> <entry xmlns="http://www.w3.org/2005/Atom" xmlns:gd="http://schemas.google.com/g/2005" xmlns:gCal="http://schemas.google.com/gCal/2005"> <title type="text">#arguments.argTitle#</title> <summary type="text">#arguments.argSummary#</summary> <cfif len(arguments.argTimezone)><gCal:timezone value="#arguments.argTimezone#"></gCal:timezone></cfif> <gCal:hidden value="false"></gCal:hidden> <gCal:accesslevel value="owner" /> <gCal:color value="#arguments.argColor#"></gCal:color> <gd:where rel='' label='' valueString='Oakland'></gd:where> </entry> </cfoutput> </cfxml> <cfhttp url="#variables.baseURL#/default/owncalendars/full" method="post" redirect="false" multiparttype="related" charset="utf-8"> <cfhttpparam type="header" name="Authorization" value="GoogleLogin auth=#getAuth(variables.serviceName)#"> <cfhttpparam type="header" name="Content-Type" value="application/atom+xml"> <cfhttpparam type="header" name="GData-Version" value="2"> <cfhttpparam type="body" value="#trim(locals.xml)#"> </cfhttp> Any help would be appreciated.

    Read the article

  • Dynamic query runs directly but not through variable, what could be the reason?

    - by waheed
    Here is my scenario, I'm creating a dynamic query using a select statement which uses functions to generate the query. I am storing it into a variable and running it using exec. i.e. declare @dsql nvarchar(max) set @dsql = '' select @dsql = @dsql + dbo.getDynmicQuery(column1, column2) from Table1 exec(@dsql) Now it produces the many errors in this scenario, like 'Incorrect syntax near ','' and 'Case expressions may only be nested to level 10.' But if i take the text from @dsql and assign it a variable manually like: declare @dsql nvarchar(max) set @dsql = '' set @dsql = N'<Dynamic query text>' exec(@dsql) it runs and generates the result, what could be the reason for that ?? Thanks..

    Read the article

  • Wrap several elements for accordion in jquery

    - by daveredfern
    Hello, I currently have the following html:- <h3 /> <p /> <p /> <ul /> <ol /> <h3 /> <p /> <p /> <ul /> <ol /> <h3 /> <p /> <p /> <ul /> <ol /> I'd like to create an accordion but for this I need the following:- <h3 /> <div> <p /> <p /> <ul /> <ol /> </div> <h3 /> <div> <p /> <p /> <ul /> <ol /> </div> I have tried the following:- $('.page2 .articleText p, .page2 .articleText ul').after('<div class="accordion">'); $('.page2 .articleText h4:not(:first)').before('</div>'); But this doesnt work. ANy help is much appreciated. Thanks!

    Read the article

  • Equality Comparison with Multiple Instances/IEqualityComparer problems in LINQ

    - by Stacey
    This is similar to my last question; but from a different angle. http://stackoverflow.com/questions/2792393/see-if-item-exists-once-in-enumerable-linq Given the following set of items, and lists containing them... Item 1 Item 2 Item 3 Item 4 Item 5 class Item { string Name { get; set; } } List<Item> available = new List<Item>() { Item 1 Item 1 Item 2 Item 3 Item 5 } List<Item> selected = new List<Item>() { Item 1 Item 2 Item 3 } I need to make a third List that has everything from "available", except what is in "selected". However 'Item 1' is in 'available' twice, but only in 'selected' once. Since they are instances of the same item, I am having trouble figuring out the appropriate logic to accomodate this. The final array should look like... List<Item> selectable = new List<Item>() { Item 1 Item5 }

    Read the article

  • Google Docs viewer in IE

    - by Skoder
    Hey all, I've searched high and low for a solution, but can't find one. I'm using Google Docs Viewer to view PDF files. It's a great tool, but I can't seem to get it working in Internet Explorer (7 or 8). All my images come up as a 'missing' icon. If I view the file externally, it seems to load fine and it will start working (I'm assuming because the images are being cached). The document is being displayed in an iframe and works in all other browsers. Has anyone come across a solution to get it to work in IE? If not, is there an alternative that can display PPT and PDF files? Thanks

    Read the article

  • How can I simply change the Timezone Offset with Zend_Date?

    - by Nicky Hajal
    I'm using Zend_Date to manage dates/times in a scheduling app. The only way I'm able to determine the user's Timezone is via Javascript which only gives a Timezone Offset. Zend_Date only seems to take Timezones in the 'America/New_York' format. Is there a way to get the users timezone in this format or set the Timezone Offset with Zend_Date? Thanks!

    Read the article

  • saving excel files to file paths or directories with special characters

    - by benhc911
    I am unable to get excel 2010 beta to save to a directory which contains square brackets. I have to save elsewhere and copy in. Is there any workaround? Was this a problem with older versions? I realize that I could manually change the directory names, but I didn't want to forgo a long standing organization scheme for the sake of one program if possible to avoid the problem.

    Read the article

  • HttpURLConnection: Is it necessary to call connect()?

    - by stormin986
    Many examples I've seen don't explicitly call connect(). Instead they just use getInputStream() or getResponseCode(). I'm assuming all of these HttpURLConnection methods that require a connection just call connect() themselves? Are there any cases where connect() must be explicitly called for an HttpURLConnection?

    Read the article

  • library for simple GUI appications

    - by arthurprs
    I tried to use WTL, but i couldn't get it to work on VS2008 Express, there is any other option? I would like to test if any, before recur to the plain API :/ need to be small and have no external dependencies Thanks in advance!

    Read the article

  • Rails 3 server won't start in cucumber environment

    - by James
    Hi I'm trying to start my rails 3 app in the same environment that cucumber uses because this is necessary for a particular test. When I try to start the server via rails server -e cucumber I get this error: /home/james/rails-projs/fact/config/environments/cucumber.rb:7: undefined local variable or method `config' for main:Object (NameError) from /home/james/.bundle/ruby/1.8/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/activesupport/lib/active_support/dependencies.rb:209:in `require' from /home/james/.bundle/ruby/1.8/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/activesupport/lib/active_support/dependencies.rb:209:in `require' from /home/james/.bundle/ruby/1.8/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/activesupport/lib/active_support/dependencies.rb:195:in `load_dependency' from /home/james/.bundle/ruby/1.8/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/activesupport/lib/active_support/dependencies.rb:523:in `new_constants_in' from /home/james/.bundle/ruby/1.8/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/activesupport/lib/active_support/dependencies.rb:195:in `load_dependency' from /home/james/.bundle/ruby/1.8/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/activesupport/lib/active_support/dependencies.rb:209:in `require' from /home/james/.bundle/ruby/1.8/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/railties/lib/rails/application/bootstrap.rb:10 from /home/james/.bundle/ruby/1.8/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/railties/lib/rails/initializable.rb:25:in `instance_exec' from /home/james/.bundle/ruby/1.8/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/railties/lib/rails/initializable.rb:25:in `run' from /home/james/.bundle/ruby/1.8/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/railties/lib/rails/initializable.rb:55:in `run_initializers' from /home/james/.bundle/ruby/1.8/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/railties/lib/rails/initializable.rb:54:in `each' from /home/james/.bundle/ruby/1.8/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/railties/lib/rails/initializable.rb:54:in `run_initializers' from /home/james/.bundle/ruby/1.8/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/railties/lib/rails/application.rb:109:in `initialize!' from /home/james/.bundle/ruby/1.8/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/railties/lib/rails/application.rb:81:in `send' from /home/james/.bundle/ruby/1.8/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/railties/lib/rails/application.rb:81:in `method_missing' from /home/james/rails-projs/beta/config/environment.rb:6 from /home/james/.bundle/ruby/1.8/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/activesupport/lib/active_support/dependencies.rb:209:in `require' from /home/james/.bundle/ruby/1.8/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/activesupport/lib/active_support/dependencies.rb:209:in `require' from /home/james/.bundle/ruby/1.8/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/activesupport/lib/active_support/dependencies.rb:195:in `load_dependency' from /home/james/.bundle/ruby/1.8/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/activesupport/lib/active_support/dependencies.rb:523:in `new_constants_in' from /home/james/.bundle/ruby/1.8/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/activesupport/lib/active_support/dependencies.rb:195:in `load_dependency' from /home/james/.bundle/ruby/1.8/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/activesupport/lib/active_support/dependencies.rb:209:in `require' from config.ru:3 from /usr/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/builder.rb:46:in `instance_eval' from /usr/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/builder.rb:46:in `initialize' from config.ru:1:in `new' from config.ru:1 I'd appreciate any help.

    Read the article

  • Visual C# 2008 Express connection to SQL Server 2008 Express problem

    - by Phil
    Hi guys, I have a problem with Visual C# 2008 express (SP1) connecting to SQL Server 2008 express. The "Add Connection" window (wherever initiated) doesn't list existing sql server and no option for sql server except a compact edition. Note that, I've got the VWD 2008 express (SP1) on the same machine which shows the window regularly (with SQL server listed) and SQL Server Management studio works fine with the server as well. I've seen other similar posts, did take some advices: reinstalled the VC#, services run ok, etc... but with no success with VC# so far. Again, on the same machine the VWD shows the dialog with sql server option regularly, but VC# shows only 3 options in "Change data source" dialog (1. Microsoft Access Database File (OLE DB) 2. Microsoft SQL Server Compact 3.5, 3. Microsoft SQL Server Database File) Any idea? Thanks in advice, Phil

    Read the article

  • Google Maps API V3: How to jump to a specific marker from outside the map?

    - by Tom
    I have a map with two markers on it. The initial view of the map only shows one marker, and I want to provide a link next to the map that will move the map to the 2nd marker when clicked. Here's a demo of what I want, using v2 of the API: http://arts.brighton.ac.uk/contact-university-of-brighton-faculty-of-arts (note the links below the map) Here's what I have so far: <script type="text/javascript"> function initialize() { var latlng = new google.maps.LatLng(50.823817, -0.135634); var myOptions = { zoom: 13, center: latlng, mapTypeId: google.maps.MapTypeId.ROADMAP, mapTypeControlOptions: { style: google.maps.MapTypeControlStyle.DROPDOWN_MENU } , scaleControl: false }; var map = new google.maps.Map(document.getElementById("map"), myOptions); // 1st marker var marker1 = new google.maps.Marker({ position: new google.maps.LatLng(50.823817, -0.135634), map: map, title: 'my title' }); var infowindow = new google.maps.InfoWindow({ content: 'my window content' }); google.maps.event.addListener(marker1, 'click', function() { infowindow.open(map, marker1); }); // 2nd marker var marker2 = new google.maps.Marker({ position: new google.maps.LatLng(51.5262405, -0.074549), map: map, title: 'my 2nd title'}); var infowindow2 = new google.maps.InfoWindow({ content: 'content for my 2nd window' }); google.maps.event.addListener(marker2, 'click', function() { infowindow2.open(map, marker2); }); } </script> So what I'd like to add is a link to marker2, to move the map some 50-odd miles up, e.g. <a href="#marker2">Second location</a>. How would I do this?

    Read the article

  • Draw Rectangle with XNA

    - by mazzzzz
    Hey guys, I was working on game, and wanted to highlight a spot on the screen when something happens, I created a class to do this for me, and found a bit of code to draw the rectangle static private Texture2D CreateRectangle(int width, int height, Color colori) { Texture2D rectangleTexture = new Texture2D(game.GraphicsDevice, width, height, 1, TextureUsage.None, SurfaceFormat.Color);// create the rectangle texture, ,but it will have no color! lets fix that Color[] color = new Color[width * height];//set the color to the amount of pixels in the textures for (int i = 0; i < color.Length; i++)//loop through all the colors setting them to whatever values we want { color[i] = colori; } rectangleTexture.SetData(color);//set the color data on the texture return rectangleTexture;//return the texture } Problem is that the code above is called every update, (60 times a second), and it was not written with optimization in mind, I have no clue how else to write a code to do this though. It needs to be extremely fast (the code above freezes the game, which has only skeleton code right now).. Any suggestions. Note: Any new code would be great (WireFrame/Fill are both fine). I would like to be able to specify color. Something to point in the right direction would be great, Thanks, Max

    Read the article

  • are there java based auto-updating tools other than WebStart & Eclipse P2?

    - by DaddyB
    Hi, I am working on a java based application and we are looking to ease our deployment of updates. Up until now, we've always simply sent out new install packs & had the sysadmin's on our customer sites roll out the upgrades - painful for a large number of users. what I'd like to do is something similar to java webstart (or eclipse p2) - when the application starts, it checks for updates in a specified location and then downloads the updates prior to starting. But here's my problem - I want more control over what's done outside of the scope of plugins & jar files. For example: I'd like to be able to upate my JVM (we ship a modified version with additional security features). I need to install DLL's - possibly local to the jar files, sometimes to windows Occasiontally run MSI's to install windows components (e.g. printer drivers). I need to modify config files & the registry. I have found a few applications that support this (such as AppLifeUpdate at http://www.kineticjump.com/) but they tend to be .NET focused and it seems a bit perverse to introduce a .NET dependancy on a java application ;) I know I could write my own here, but if there is already a 3rd party library out there that supports this kind of facility, then it would make my life a lot easier. So, has anyone else had a similar problem & knows of some products I could look at? Thanks, Brian.

    Read the article

  • R plot- SGAM plot counts vs. time - how do I get dates on the x-axis?

    - by Nate
    I'd like to plot this vs. time, with the actual dates (years actually, 1997,1998...2010). The dates are in a raw format, ala SAS, days since 1960 (hence as.date conversion). If I convert the dates using as.date to variable x, and do the GAM plot, I get an error. It works fine with the raw day numbers. But I want the plot to display the years (data are not equally spaced). structure(list(site = c(928L, 928L, 928L, 928L, 928L, 928L, 928L, 928L, 928L, 928L, 928L, 928L, 928L, 928L, 928L, 928L, 928L, 928L, 928L, 928L, 928L, 928L, 928L, 928L, 928L, 928L), date = c(13493L, 13534L, 13566L, 13611L, 13723L, 13752L, 13804L, 13837L, 13927L, 14028L, 14082L, 14122L, 14150L, 14182L, 14199L, 16198L, 16279L, 16607L, 16945L, 17545L, 17650L, 17743L, 17868L, 17941L, 18017L, 18092L), y = c(7L, 7L, 17L, 18L, 17L, 17L, 10L, 3L, 17L, 24L, 11L, 5L, 5L, 3L, 5L, 14L, 2L, 9L, 9L, 4L, 7L, 6L, 1L, 0L, 5L, 0L)), .Names = c("site", "date", "y"), class = "data.frame", row.names = c(NA, -26L)) sgam1 <- gam(sites$y ~ s(sites$date)) sgam <- predict(sgam1, se=TRUE) plot(sites$date,sites$y,xaxt="n", xlab='Time', ylab='Counts') x<-as.Date(sites$date, origin="1960-01-01") axis(1, at=1:26,labels=x) lines(sites$date,sgam$fit, lty = 1) lines(sites$date,sgam$fit + 1.96* sgam$se, lty = 2) lines(sites$date,sgam$fit - 1.96* sgam$se, lty = 2) ggplot2 has a solution (it doesn't mind the as.date thing) but it gives me other problems...

    Read the article

  • using STI and ActiveRecordBase<> with full FindAll

    - by oillio
    Is it possible to use generic support with single table inheritance, and still be able to FindAll of the base class? As a bonus question, will I be able to use ActiveRecordLinqBase< as well? I do love those queries. More detail: Say I have the following classes defined: public interface ICompany { int ID { get; set; } string Name { get; set; } } [ActiveRecord("companies", DiscriminatorColumn="type", DiscriminatorType="String", DiscriminatorValue="NA")] public abstract class Company<T> : ActiveRecordBase<T>, ICompany { [PrimaryKey] private int Id { get; set; } [Property] public String Name { get; set; } } [ActiveRecord(DiscriminatorValue="firm")] public class Firm : Company<Firm> { [Property] public string Description { get; set; } } [ActiveRecord(DiscriminatorValue="client")] public class Client : Company<Client> { [Property] public int ChargeRate { get; set; } } This works fine for most cases. I can do things like: var x = Client.FindAll(); But sometimes I want all of the companies. If I was not using generics I could do: var x = (Company[]) FindAll(Company); Client a = (Client)x[0]; Firm b = (Firm)x[1]; Is there a way to write a FindAll that returns an array of ICompany's that can then be typecast into their respective types? Something like: var x = (ICompany[]) FindAll(Company<ICompany>); Client a = (Client)x[0]; Or maybe I am going about implementing the generic support all wrong?

    Read the article

  • Getting $_POST variable from table

    - by Sakamoto Kazuma
    I'm trying to build a sort of resource allocation form. I'd like to be able to print a table from a database, and then allow users to click on each cell that they would like to reserve. Also, being able to drag and select multiple cells. Then send all of this via $_POST to another php script. Problem is, I have no idea where to start. Any suggestions?

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >