Search Results

Search found 3380 results on 136 pages for 'tim b james'.

Page 92/136 | < Previous Page | 88 89 90 91 92 93 94 95 96 97 98 99  | Next Page >

  • copy the item with the metadata that user just added to a folder called "NativeFiles". this folder i

    - by James
    I need to copy the item that user just added (for example. myresume.doc or financial.xls) with the metadata (doc lib obtains the columns from content type, ct obtains the columns from site colum) and copy the item with metadata in a folder called "NativeFile". Every doc library has this folder. I know itemadded can be used but then I heard itemadded fires before user have a chance to complete the metadata for the item they just added. What are my options? (new to sp, so some sample code would greatly help. or some good link similar to this issue) Sharepoint 2007, itemadded or itemadding or itemupdating or itemupdated....

    Read the article

  • Python+Windows+GStreamer = Impossible (for me)?

    - by james
    Hi :) essentially, my problem is, ater a long time searching, finding only this other question, i decided i was just going to ask my own... i am on windows 7 with python 2.6 and ossbuild GStreamer, but i am trying to get the python binding for it, and struggling. i have got gst-python from http://gstreamer.freedesktop.org/src/gst-python/ but as my eyes and research tell me, it does not work in the setup.py way, and the other question has a link to a site that he says has a binary avaiable, which no longer does, http://www.gstreamer-winbuild.ylatuya.es/doku.php?id=download and even the sdk is gone, and ossbuild dont seem to have anything useful either. so essentially, my question is, can anyone tell me a method, however convoluted, of getting my setup so if i write a script for (py)gst, with an import gst it will work? not the best of explanations... im tired k? xxx :)

    Read the article

  • How to implement a download for dynamic files in asp.net with masterpages

    - by Tim
    Hello, the title says it all. I have seen some similar questions on SO like this or this, but either i have overlooked something or my requirement is different, neither works. My situation is following: i have a Masterpage one of its contentpage is called MasterData.aspx MasterData has an asp.net ajax tabcontainer control with one usercontrol in every tabpanel these usercontrols(f.e. MD_Customer.ascx)hold the main content(like a normal page) they all have GridViews in it and i want to provide an Excel-Export-Button What i've tried is is to use an iframe like here. But the function that adds the iframe to the document gets never called and therefore i never see the save-as-dialog. Maybe this is caused by using a MasterPage. Does somebody has an idea on how to provide a button in an UpdatePanel that causes an async postback, so that i can generate a CSV dynamically in codebehind and write it to the response? Thank you in advance. aspx-markup: <asp:UpdatePanel ID="UpdGridInfo" runat="server" > <ContentTemplate> <asp:Label ID="LblInfo" Font-Underline="false" runat="server" CssClass="content" ></asp:Label>&nbsp;&nbsp; <asp:ImageButton ToolTip="export to Excel" style="vertical-align:bottom" ID="BtnExcelExport" ImageUrl="~/images/excel2007logo.png" runat="server" /> </ContentTemplate> </asp:UpdatePanel> and the BtnExportExcel codebehind handler(of course it cannot work to write the csv to the response of this page): Private Sub BtnExcelExport_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles BtnExcelExport.Click Dim csv As String = tableToCsv(DirectCast(Me.GridSource, DataTable)) Response.AddHeader("Content-disposition", "attachment; filename=RuleConfigurationFile.csv") Response.ContentType = "application/octet-stream" Response.Write(csv) Response.End() End Sub

    Read the article

  • How to have multiple instances of jQuery plugin on single page?

    - by James Skidmore
    I'm writing a simple jQuery plugin, but I'm having trouble being able to use multiple instances on a page. For instance, here is a sample plugin to illustrate my point: (function($) { $.fn.samplePlugin = function(options) { if (typeof foo != 'undefined') { alert('Already defined!'); } else { var foo = 'bar'; } }; })(jQuery); And then if I do this: $(document).ready(function(){ $('#myDiv').samplePlugin({}); // does nothing $('#myDiv2').samplePlugion({}); // alerts "Already defined!" }); This is obviously an over-simplified example to get across the point. So my question is, how do I have two separate instances of the plugin? I'd like to be able to use it across multiple instances on the same page. I'm guessing that part of the problem might be with defining the variables in a global scope. How can I define them unique to that instance of the plugin then? Thank you for your guidance!

    Read the article

  • What is the fastest way to validate that a field has no more than n words?

    - by James A. Rosen
    I have a Ruby-on-Rails model: class Candidate < ActiveRecord::Base validates_presence_of :application_essay validate :validate_length_of_application_essay protected def validate_length_of_application_essay return if application_essay.blank? # don't add a second error message if they didn't fill it out errors.add(:application_essay, :too_long), unless ... end end Without dropping into C, what is the fastest way to check that the application_essay contains no more than 500 words? You can assume that most essays will be at least 200 words, are unlikely to be more than 5000 words, and are in English (or the pseudo-English sometimes called "business-ese"). You can also classify anything you want as a "word" as long as your classification would be immediately obvious to a typical user. (NB: this is not the place to debate what a "typical user" is :) )

    Read the article

  • How to sort a list so that managers are always ahead of their subordinates (How do I do a topologica

    - by James Black
    I am working on a project using Groovy, and I would like to take an array of employees, so that no manager follows their subordinates in the array. The reason being that I need to add people to a database and I would prefer not to do it in two passes. So, I basically have: <employees> <employee> <employeeid>12</employeeid> <manager>3</manager> </employee> <employee> <employeeid>1</employeeid> <manager></manager> </employee> <employee> <employeeid>3</employeeid> <manager>1</manager> </employee> </employees> So, it should be sorted as such: employeeid = 1 employeeid = 3 employeeid = 12 The first person should have a null for managers. I am thinking about a binary tree representation, but I expect it will be very unbalanced, and I am not certain the best way to do this using Groovy properly. Is there a way to do this that isn't going to involve using nested loops?

    Read the article

  • Expanding Git SHA1 information into a checkin without archiving?

    - by Tim Lin
    Is there a way to include git commit hashes inside a file everytime I commit? I can only find out how to do this during archiving but I haven't been able to find out how to do this for every commit. I'm doing scientific programming with git as revision control, so this kind of functionality would be very helpful for reproducibility reasons (i.e., have the git hash automatically included in all result files and figures).

    Read the article

  • Does the order of columns in a query matter?

    - by James Simpson
    When selecting columns from a MySQL table, is performance affected by the order that you select the columns as compared to their order in the table (not considering indexes that may cover the columns)? For example, you have a table with rows uid, name, bday, and you have the following query. SELECT uid, name, bday FROM table Does MySQL see the following query any differently and thus cause any sort of performance hit? SELECT uid, bday, name FROM table

    Read the article

  • What is the proper way to use a Logger in a Serializable Java class?

    - by Tim Visher
    I have the following (doctored) class in a system I'm working on and Findbugs is generating a SE_BAD_FIELD warning and I'm trying to understand why it would say that before I fix it in the way that I thought I would. The reason I'm confused is because the description would seem to indicate that I had used no other non-serializable instance fields in the class but bar.model.Foo is also not serializable and used in the exact same way (as far as I can tell) but Findbugs generates no warning for it. import bar.model.Foo; import java.io.File; import java.io.Serializable; import java.util.List; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class Demo implements Serializable { private final Logger logger = LoggerFactory.getLogger(this.getClass()); private final File file; private final List<Foo> originalFoos; private Integer count; private int primitive = 0; public Demo() { for (Foo foo : originalFoos) { this.logger.debug(...); } } ... } My initial blush at a solution is to get a logger reference from the factory right as I use it: public DispositionFile() { Logger logger = LoggerFactory.getLogger(this.getClass()); for (Foo foo : originalFoos) { this.logger.debug(...); } } That doesn't seem particularly efficient, though. Thoughts?

    Read the article

  • What tricks do you use to get yourself "in the zone"?

    - by Tim Jarvis
    Once I am "in the zone" I am extremely productive and code just flows out of me, often I can get 2 or 3 days coding done in 1 day. But I find that often its hard to get to that place, I find myself procrastinating, getting distracted by other things (SO for example). Is this experience common? How do you force yourself into that state of mind? Is it simply something you can't force?

    Read the article

  • Sort a GridView Column related to other Table

    - by Tim
    Hello, i have a GridView bound to a DataView. Some columns in the DataView's table are foreignkeys to related tables(f.e. Customer). I want to enable sorting for these columns too, but all i can do is sorting the foreignkey(fiCustomer) and not the CustomerName. I have tried this without success(" Cannot find column ERP_Customer.CustomerName "): <asp:TemplateField HeaderText="Customer" SortExpression="ERP_Customer.CustomerName" > A tried also the DataViewManager, but i've a problem to detect the table to sort: Dim viewManager As New DataViewManager(Me.dsERP) viewManager.DataViewSettings(dsERP.ERP_Charge).RowFilter = filter viewManager.DataViewSettings(dsERP.ERP_Charge).Sort = sort 'sort is the GridView's SortExpression Me.GrdCharge.DataSource = viewManager.CreateDataView(dsERP.ERP_Charge) I have to apply the sort on a distinct table of the DataViewManager, but this table would differ on the related tables. I have bound the TemplateColumns in Codebehind in RowDataBound-Event f.e.: Dim LblCustomer As Label = DirectCast(e.Row.FindControl("LblCustomer"), Label) LblCustomer.Text = drCharge.ERP_CustomerRow.CustomerName 'drCharge inherits DataRow What is the recommended way to sort a GridView on columns related to another table?

    Read the article

  • How to initialize F# list when size is unknown, using while..do loop

    - by James Black
    I have a function that will parse the results of a DataReader, and I don't know how many items are returned, so I want to use a while..do loop to iterate over the reader, and the outcome should be a list of a certain type. (fun(reader) -> [ while reader.Read() do new CityType(Id=(reader.GetInt32 0), Name=(reader.GetString 1), StateName=(reader.GetString 2)) ]) This is what I tried, but the warning I get is: This expression should have type 'unit', but has type 'CityType'. Use 'ignore' to discard the result of the expression, or 'let' to bind the result to a name. So what is the best way to iterate over a DataReader and create a list?

    Read the article

  • How Do I Remove The First 4 Characters From A String If It Matches A Pattern In Ruby

    - by James
    I have the following string: "h3. My Title Goes Here" I basically want to remove the first 4 characters from the string so that I just get back: "My Title Goes Here". The thing is I am iterating over an array of strings and not all have the h3. part in front so I can't just ditch the first 4 characters blindly. I have checked the docs and the closest think I could find was chomp, but that only works for the end of a string. Right now I am doing this: "h3. My Title Goes Here".reverse.chomp(" .3h").reverse This gives me my desired output, but there has to be a better way right? I mean I don't want to reverse a string twice for no reason. I am new to programming so I might have missed something obvious, but I didn't see the opposite of chomp anywhere in the docs. Is there another method that will work? Thanks!

    Read the article

  • How Do I Add Value To All Previous Values In Array

    - by James
    Lets say I have the following array: my_array = [1, 5, 8, 11, -6] I need to iterate over this array and add the values prior to the current value together. An example will probably be easier to understand. I need to return an array that should look something like this: final_array = [1, 6, 14, 25, 19] I have tried doing something like this: my_array.collect {|value| value + previous_values } But obviously that doesn't work because I can't figure out how to get the previous values in the array. I am a programming noob so this might be easier than I am making it. I am pretty sure I need to use either collect or inject, but I can't seem to figure out how to do this. Any help would be appreciated.

    Read the article

  • Is it possible to set ContentType for a WCF WebGet method?

    - by James Cadd
    I'm working with a WCF restful/http method that returns a stream of image data. I want to make sure that the content type is marked as "image/png". The method is defined as: [ServiceContract] [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)] [ServiceBehavior(InstanceContextMode = InstanceContextMode.PerCall)] public class TileImageService { [WebGet(UriTemplate = "{id}")] public Stream GetTileImage(string id) { Bitmap bmp = new Bitmap(173, 173); Graphics g = Graphics.FromImage(bmp); g.Clear(Color.Blue); g.DrawString(DateTime.Now.ToLongTimeString(), new Font("Chiller", 20), Brushes.White, new PointF(10, 10)); g.Flush(); MemoryStream ms = new MemoryStream(); bmp.Save(ms, ImageFormat.Png); ms.Seek(0, SeekOrigin.Begin); return ms; } } In Firefox it looks like the content type is marked as application/octet stream. Is there a way to change the content type?

    Read the article

  • How do you unpack gems using jruby on rails 2.3?

    - by James Moore
    I'm trying to unpack all the system gems to end up with a standalone Rails directory including all the rails gems and all the system gems. I'm starting with a bare rails setup; just did a jruby -S rails and a 'generate jdbc'. I then add a config.gem 'jdbc-mysql' to environment.rb and do the jruby -S rake gems:unpack:dependencies. After unpacking, if I do a rake I get: no such file to load -- jdbc-mysql Is there something else you need to do to get the jdbc gem unpacked? I'm using jruby 1.4.0 (and moving to 1.5 is on my todo list) and rails 2.3.8.

    Read the article

  • Are there any OSGi web service / SOAP clients out there?

    - by James Carr
    I'm looking for any webservice client that can be run inside an OSGi container and connect to a simple web service using SOAP, doesn't sound so hard does it? Oh, and it has to work under Java 1.5, so the JRE jax-ws wont be present. The problem is I've tried a few solutions now, and although each solution works in standard Java using it from within OSGi doesn't. the springsource JAX-WS bundles seem to have dependency issues the CXF bundles get me as far as calling the service, but then can seem to find the stub methods in the proxy Is there anyone out there who has successfully created an OSGi webservice client?

    Read the article

  • How do you filter an NSMutable Array that contains core data?

    - by James
    I have an array that it is populated by core data as follows. NSMutableArray *mutableFetchResults = [CoreDataHelper getObjectsFromContext:@"Spot" :@"Name" :YES :managedObjectContext]; It looks like this in the console. (entity: Spot; id: 0x4b7e580 ; data: { CityToProvince = 0x4b7dbd0 ; Description = "Friend"; Email = "[email protected]"; Age = 21; Name = "Adam"; Phone = "+44175240"; }), How can i filter the array to remove anyone who is over a certain age? or use values in the array to make calculations? Please help i have been stuck for ages on this. Code would be gratefully appreciated.

    Read the article

  • Is there a way to automate MS Office applications without license?

    - by james-h-l
    I am currently writing an application that will perform automation in Excel. I have MS Office (2007) installed on my work computer and the application is working fine referencing the the Microsoft Excel 12.0 Object Lirary. The target machine has the Office installed but not registered. It is one of those preinstalled editions. Attempting to run the application on the target machine I get an error saying Office is not installed? I'm assuming then you have to have a registed Office to use the object libraries? Is there anyway around this as I do not have a Office license key lying around and its quite expensive?

    Read the article

  • Android Remote Video with Titanium

    - by Tim
    Greetings all! I'm trying to play a video that is hosted on our webserver on an android phone. I've already built this for iPhone and it works great. Droid, however is a different issue. Instead of getting video, I'm just getting a black screen, no error or anything. The code I am using is: activeContent = Titanium.Media.createVideoPlayer({ contentURL: content, backgroundColor:'#111', movieControlMode:Titanium.Media.VIDEO_CONTROL_DEFAULT }); win.add(activeContent); activeContent.play(); The video I'm downloading does play on the droid when not using Titanium, so I know its not a format issue. (its an .MP4 incase anyone is wondering.) I've used Titanium SDK's 1.5.1 and am on the continuous build of 1.6.0 from earlier today. using the 2.2 Droid SDK, and Titanium Developer 1.2.2 Does anyone have any thoughts on this? One of the big selling points for android is its ability to pull media from the net, and I'm honestly a little concerned about this shortcoming if its an issue with Titanium.

    Read the article

  • What are the arguments against the inclusion of server side scripting in JavaScript code blocks?

    - by James Wiseman
    I've been arguing for some time against embedding server-side tags in JavaScript code, but was put on the spot today by a developer who seemed unconvinced The code in question was a legacy ASP application, although this is largely unimportant as it could equally apply to ASP.NET or PHP (for example). The example in question revolved around the use of a constant that they had defined in ServerSide code. 'VB Const MY_CONST: MY_CONST = 1 If sMyVbVar = MY_CONST Then 'Do Something End If //JavaScript if (sMyJsVar === "<%= MY_CONST%>"){ //DoSomething } My standard arguments against this are: Script injection: The server-side tag could include code that can break the JavaScript code Unit testing. Harder to isolate units of code for testing Code Separation : We should keep web page technologies apart as much as possible. The reason for doing this was so that the developer did not have to define the constant in two places. They reasoned that as it was a value that they controlled, that it wasn't subject to script injection. This reduced my justification for (1) to "We're trying to keep the standards simple, and defining exception cases would confuse people" The unit testing and code separation arguments did not hold water either, as the page itself was a horrible amalgam of HTML, JavaScript, ASP.NET, CSS, XML....you name it, it was there. No code that was every going to be included in this page could possibly be unit tested. So I found myself feeling like a bit of a pedant insisting that the code was changed, given the circumstances. Are there any further arguments that might support my reasoning, or am I, in fact being a bit pedantic in this insistence?

    Read the article

< Previous Page | 88 89 90 91 92 93 94 95 96 97 98 99  | Next Page >