Search Results

Search found 1010 results on 41 pages for 'kevin babcock'.

Page 18/41 | < Previous Page | 14 15 16 17 18 19 20 21 22 23 24 25  | Next Page >

  • Tiff Analyzer

    - by Kevin
    I am writing a program to convert some data, mainly a bunch of Tiff images. Some of the Tiffs seems to have a minor problem with them. They show up fine in some viewers (Irfanview, client's old system) but not in others (Client's new system, Window's picture and fax viewer). I have manually looked at the binary data and all the tags seem ok. Can anyone recommend an app that can analyze it and tell me what, if anything, is wrong with it? Also, for clarity sake, I'm only converting the data about the images which is stored seperately in a database and copying the images, I'm not editting the images myself, so I'm pretty sure I'm not messing them up. UDPATE: For anyone interested, here are the tags from a good and bad file: BAD Tag Type Length Value 256 Image Width SHORT 1 1652 257 Image Length SHORT 1 704 258 Bits Per Sample SHORT 1 1 259 Compression SHORT 1 4 262 Photometric SHORT 1 0 266 Fill Order SHORT 1 1 273 Strip Offsets LONG 1 210 (d2 Hex) 274 Orientation SHORT 1 3 277 Samples Per Pixel SHORT 1 1 278 Rows Per Strip SHORT 1 450 279 Strip Byte Counts LONG 1 7264 (1c60 Hex) 282 X Resolution RATIONAL 1 <194 200 / 1 = 200.000 283 Y Resolution RATIONAL 1 <202 200 / 1 = 200.000 284 Planar Configuration SHORT 1 1 296 Resolution Unit SHORT 1 2 Good Tag Type Length Value 254 New Subfile Type LONG 1 0 (0 Hex) 256 Image Width SHORT 1 1193 257 Image Length SHORT 1 788 258 Bits Per Sample SHORT 1 1 259 Compression SHORT 1 4 262 Photometric SHORT 1 0 266 Fill Order SHORT 1 1 270 Image Description ASCII 45 256 273 Strip Offsets LONG 1 1118 (45e Hex) 274 Orientation SHORT 1 1 277 Samples Per Pixel SHORT 1 1 278 Rows Per Strip LONG 1 788 (314 Hex) 279 Strip Byte Counts LONG 1 496 (1f0 Hex) 280 Min Sample Value SHORT 1 0 281 Max Sample Value SHORT 1 1 282 X Resolution RATIONAL 1 <301 200 / 1 = 200.000 283 Y Resolution RATIONAL 1 <309 200 / 1 = 200.000 284 Planar Configuration SHORT 1 1 293 Group 4 Options LONG 1 0 (0 Hex) 296 Resolution Unit SHORT 1 2

    Read the article

  • ANTLR: using stringTemplate

    - by Kevin Won
    (I'm a Noob with Antlr)... I'm having difficulties getting my grammar with StringTemplates. Basically I'm trying to write a little DSL. I can get my grammar the way I want (it parses correctly), but I can't get the generation of the target code to work with templates. So here's a snippet of my grammar: grammar Pfig; options { output=template; language=CSharp2; } conf : globalName ; globalName : 'GlobalName:' ID -> localConf(name ={$ID.text}) ; I simplified it quite a bit just to get the essence across. Basically, when the lex/parse comes across `GlobalName: Foo' I want it to spit out text based on the StringTemplate called 'localConf'. Super straightforward. So now, let's fire up the parser in a test app and have it process an input file. // C# processing a file with the lex/parser. // the 'app.pfig' file just has one line that reads 'GlobalName: Bla' using (FileStream fs = File.OpenRead("c:\\app.pfig")) { PfigParser parser = new PfigParser(new CommonTokenStream( new PfigLexer(new ANTLRInputStream(fs)))); using (TextReader tr = File.OpenText("./Pfig.stg")) { parser.TemplateLib = new StringTemplateGroup(tr); } var parseResult = parser.conf(); string code = parseResult.Template.ToString(); // Fail: template is null } I can step through the parser code and see that it correctly identifies my text and applies the stringTemplate correctly. The problem is that since this 'globalName' rule is a subrule of 'conf' it doesn't get executed directly--the method just finds it and returns. But the calling 'Conf' method does not keep the return value from the subrule--it goes to thin air. This means that my resultant template on the last line is null. If I get rid of the 'conf' rule in my grammar and call 'globalName' directly, it will work (since it's the only rule on the stack). But I obviously want more than one rule. I've generated the parser in Java and it does the same thing: // antlr generated parser code public PfigParser.conf_return conf() // throws RecognitionException [1] { PfigParser.conf_return retval = new PfigParser.conf_return(); try { { PushFollow(FOLLOW_globalName_in_conf30); globalName(); // <- it calls globalName() but doesn't keep the return. state.followingStackPointer--; } retval.Stop = input.LT(-1); } // snip It's simple to see I don't get some basic concept with how the Template approach is supposed to work with Antlr. I'm quite sure this is my problem but I'm a loggerheads to know what I'm doing wrong... the examples I've seen don't really show real-world template emission of code.

    Read the article

  • WCF how to pass token for authentication?

    - by Kevin
    I have a WCF service which would like to support basicHttpBinding and webHttpBinding. When the client successfully login, server will generate a token for client to pass to server on all the request make later. Question is how the client can pass the token to server? I don't want to add an extra parameter on every web method to hold the token.

    Read the article

  • Restore VisualSVN server from client copy.

    - by Kevin
    I am running VisualSVN on a windows VM box. The VM crashed and corrupted the image. After restoring an older image (2007) we discovered that our data backup is not functioning properly. Hence I have a bunch of projects (~20) siting on my laptop (client side) and I want to push them back into the VisualSVN Server, which is now empty. I know this can be done by simply adding the project files manually, but this is going to take along time because I don't want to include every file (i.e. complied files). Any suggestions would be greatly appreciated.

    Read the article

  • How do I use jquery validate remote validation on a field that depends on another field in the form?

    - by Kevin J
    I have a form in which I am using remote validation to check if an email address already exists in the database. However, the catch is that on this form, the user can select between several different "groups", and each group has its own distinct set of email addresses (thus the same email can exist once in each group). The group selection is a dropdown on the form, and the email address is an input field with remote validation. I have a couple issues. First, I have set up my remote rule like this: remote: { url: 'remote_script.php', data: { group_id: $('select.group_id').val() } } However, this seems to statically set the group_id parameter to whatever the first value in the select is. Meaning, if I change the select, then trigger the remote validation again, the group_id parameter does not change First, how can I make this parameter dynamic, depending on the value of a select in the form? Secondly, how do I manually trigger the remote validation on the email address field? When the group_id select is changed, I want to re-trigger the remote validation on the email address field (without changing the value of the field). I tried using $(selector).validate().element('.email_addr') But this appears to only trigger the standard validation (required, email), and not the remote call.

    Read the article

  • Jquery get selected checkboxes

    - by kevin
    Hi id like to get the list of selected checkboxes ina page, actually what I really need is th get the text of the element next to the checkbox which is a html element the code is below and its not working the html is as follows <script type="text/javascript"> $(document).ready(function () { $('#target').click(function () { alert("in"); var checkValues = []; $('input[name=checkboxlist]:checked').each(function() { alert($(this)val()); checkValues.push($(this)val()); }); }); }); </script> HTML: <ul id="7b1fe2bd-1b26-4185-8cd9-aec10e652a70"> <li>Structured Products<input type="checkbox" name="checkboxlist"</li> <li>Global FID <ul> <li>PowerPoint Presentations<input type="checkbox" name="checkboxlist"</li> <li>Global Deck <ul> <li>Test1<input type="checkbox" name="checkboxlist"</li> <li>Test2<input type="checkbox" name="checkboxlist"</li> <li>Test3<input type="checkbox" name="checkboxlist"</li> </ul> <input type="checkbox" name="checkboxlist"</li> <li>Credit Default Swaps Position <ul> <li>Test4<input type="checkbox" name="checkboxlist"</li> <li>Test5<input type="checkbox" name="checkboxlist"</li> </ul> <input type="checkbox" name="checkboxlist"</li> <li>Thought Leadership<input type="checkbox" name="checkboxlist"</li> <li>Fixed Income Perspectives<input type="checkbox" name="checkboxlist"</li> <li>Public Policy Information and Regulatory<input type="checkbox" name="checkboxlist"</li> <li>Regional FID<input type="checkbox" name="checkboxlist"</li> </ul> <input type="checkbox" name="checkboxlist"</li> <li>Global Rates<input type="checkbox" name="checkboxlist"</li> <li>Global Credit Products<input type="checkbox" name="checkboxlist"</li> <li>FX<input type="checkbox" name="checkboxlist"</li> <li>Emerging Markets<input type="checkbox" name="checkboxlist"</li> <li>Commodities<input type="checkbox" name="checkboxlist"</li> <li>testcat<input type="checkbox" name="checkboxlist"</li> <li>testcat<input type="checkbox" name="checkboxlist"</li> </ul>

    Read the article

  • ASP.NET MVC 2 validation using DTOs instead of domain entities

    - by Kevin Pang
    I'm struggling to mesh two best practices together: Using DataAnnotations + ModelBinding for validation in ASP.NET MVC 2 Using DTOs instead of domain entities when passing data via the ViewModel If I want to pass over DTOs instead of domain entities, then leveraging DataAnnotations + ModelBinding for validation would require me to specify validation attributes on my DTO classes. This results in a lot of duplicated work since multiple DTOs may hold overlapping fields with the same validation restrictions. This means that any time I change a validation rule in my domain, I have to go find all DTOs that correspond with that value and update their validation attributes.

    Read the article

  • XML Schema to restrict one field based on another

    - by Kevin Albrecht
    I have the following schema, which I use to ensure that a person's PhoneNumber and PhoneNumberType (Home, Work, etc.) is not longer than 10 characters. However, I want to improve this schema so that PhoneNumberType is not required if a PhoneNumber is not provided, but is required if the PhoneNumber is provided. Is there a way to do this in XML Schema 1.0? <?xml version="1.0" encoding="UTF-8"?> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <xs:element name="PhoneNumber"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:minLength value="0"/> <xs:maxLength value="10"/> </xs:restriction> </xs:simpleType> </xs:element> <xs:element name="PhoneNumberType"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:minLength value="0"/> <xs:maxLength value="10"/> </xs:restriction> </xs:simpleType> </xs:element> </xsd:schema>

    Read the article

  • Tridion Installation

    - by Kevin Brydon
    I am currently upgrading an installation of Tridion from 5.3 to 2011 starting almost from scratch (aside from migrating the database), brand new virtual servers. I just want to ask for some advice on my current server setup... a sanity check. All servers are running Windows Server 2008. The pages on our website are all classic ASP. Database SQL Server cluster. The 5.3 database has been migrated using the DatabaseManager. This is pretty standard and works well (in test anyway). Content Manager A single server to run the Content Manager and the Publisher. There are around 10 people using it at any one time so not under a particularly heavy load. Content Data Store Filesystem located somewhere on the network. One directory for live and one for staging. Content Delivery Two servers (cd1 and cd2) each with the the following server roles installed. cd1 writes to a filesystem content data store for the live website, cd2 writes to the content data store for the staging website. Presentation Two public facing web servers (web1 and web2) serving both the live and staging websites. The web servers read directly from the content data store as its a filesystem. Each of the web servers have the Content Delivery Server installed so that I can use dynamic linking (and other features?). I've so far set up everything but the web servers. Any thoughts? edit Thanks to Ram S who linked me to a decent walkthrough, upvoted. I suppose I should have posed some questions as I didn't really ask a question. I guess I'm a little confused over the content deliver aspect. I have the Content Delivery split in two separate parts. cd1 and cd2 do the work of shifting information from the Content Manager to the Staging/Live web directories. web1 and web2 should do the work of serving the web pages to the outside world and will interact with the content data store (file system). Is this a correct setup? I need some parts of the Content Delivery on my web servers right? Theoretically I could get rid of the cd1 and cd2 servers and use web1 and web2 to do the deployment right? But I suspect this will put the web servers under unnecessary strain should there ever be a big publish. I've been reading the 2011 Installation Manual, Content Delivery section, and I'm finding it quite hard to get my head around!

    Read the article

  • Create symbolic link to files on an FTP server

    - by Kevin Burke
    I do a lot of work with files hosted on an FTP server. Currently to edit a file on the server I have to open the server in Cyberduck, navigate with the mouse to the folder I want and then click "Edit," which opens a temporary file. Anyway, editing files on the server would be way easier if I could use the terminal to navigate through the file directory and edit files. Is there a way to create a symbolic link in my home directory to an FTP server? edit: I'm on a Mac

    Read the article

  • .NET 4.0 Dynamic object used statically?

    - by Kevin Won
    I've gotten quite sick of XML configuration files in .NET and want to replace them with a format that is more sane. Therefore, I'm writing a config file parser for C# applications that will take a custom config file format, parse it, and create a Python source string that I can then execute in C# and use as a static object (yes that's right--I want a static (not the static type dyanamic) object in the end). Here's an example of what my config file looks like: // my custom config file format GlobalName: ExampleApp Properties { ExternalServiceTimeout: "120" } Python { // this allows for straight python code to be added to handle custom config def MyCustomPython: return "cool" } Using ANTLR I've created a Lexer/Parser that will convert this format to a Python script. So assume I have that all right and can take the .config above and run my Lexer/Parser on it to get a Python script out the back (this has the added benefit of giving me a validation tool for my config). By running the resultant script in C# // simplified example of getting the dynamic python object in C# // (not how I really do it) ScriptRuntime py = Python.CreateRuntime(); dynamic conf = py.UseFile("conftest.py"); dynamic t = conf.GetConfTest("test"); I can get a dynamic object that has my configuration settings. I can now get my config file settings in C# by invoking a dynamic method on that object: //C# calling a method on the dynamic python object var timeout = t.GetProperty("ExternalServiceTimeout"); //the config also allows for straight Python scripting (via the Python block) var special = t.MyCustonPython(); of course, I have no type safety here and no intellisense support. I have a dynamic representation of my config file, but I want a static one. I know what my Python object's type is--it is actually newing up in instance of a C# class. But since it's happening in python, it's type is not the C# type, but dynamic instead. What I want to do is then cast the object back to the C# type that I know the object is: // doesn't work--can't cast a dynamic to a static type (nulls out) IConfigSettings staticTypeConfig = t as IConfigSettings Is there any way to figure out how to cast the object to the static type? I'm rather doubtful that there is... so doubtful that I took another approach of which I'm not entirely sure about. I'm wondering if someone has a better way... So here's my current tactic: since I know the type of the python object, I am creating a C# wrapper class: public class ConfigSettings : IConfigSettings that takes in a dynamic object in the ctor: public ConfigSettings(dynamic settings) { this.DynamicProxy = settings; } public dynamic DynamicProxy { get; private set; } Now I have a reference to the Python dynamic object of which I know the type. So I can then just put wrappers around the Python methods that I know are there: // wrapper access to the underlying dynamic object // this makes my dynamic object appear 'static' public string GetSetting(string key) { return this.DynamicProxy.GetProperty(key).ToString(); } Now the dynamic object is accessed through this static proxy and thus can obviously be passed around in the static C# world via interface, etc: // dependency inject the dynamic object around IBusinessLogic logic = new BusinessLogic(IConfigSettings config); This solution has the benefits of all the static typing stuff we know and love while at the same time giving me the option of 'bailing out' to dynamic too: // the DynamicProxy property give direct access to the dynamic object var result = config.DynamicProxy.MyCustomPython(); but, man, this seems rather convoluted way of getting to an object that is a static type in the first place! Since the whole dynamic/static interaction world is new to me, I'm really questioning if my solution is optimal or if I'm missing something (i.e. some way of casting that dynamic object to a known static type) about how to bridge the chasm between these two universes.

    Read the article

  • Trying to grab just absolute links from a webpage using BeautifulSoup

    - by Kevin
    I am reading the contents of a webpage using BeautifulSoup. What I want is to just grab the <a href> that start with http://. I know in beautifulsoup you can search by the attributes. I guess I am just having a syntax issue. I would imagine it would go something like. page = urllib2.urlopen("http://www.linkpages.com") soup = BeautifulSoup(page) for link in soup.findAll('a'): if link['href'].startswith('http://'): print links But that returns: Traceback (most recent call last): File "<stdin>", line 2, in <module> File "C:\Python26\lib\BeautifulSoup.py", line 598, in __getitem__ return self._getAttrMap()[key] KeyError: 'href' Any ideas? Thanks in advance. EDIT This isn't for any site in particular. The script gets the url from the user. So internal link targets would be an issue, that's also why I only want the <'a'> from the pages. If I turn it towards www.reddit.com, it parses the beginning links and it gets to this: <a href="http://www.reddit.com/top/">top</a> <a href="http://www.reddit.com/saved/">saved</a> Traceback (most recent call last): File "<stdin>", line 2, in <module> File "C:\Python26\lib\BeautifulSoup.py", line 598, in __getitem__ return self._getAttrMap()[key] KeyError: 'href'

    Read the article

  • Mercurial error: abort no username supplied

    - by Kevin Won
    Problem on WindowsXP (likely will happen on all Win installs), first time using Mercurial. I found the answer in an inobvious place so I'm asking/answering the question myself so others don't have to search like I did. First time using Mercurial on machine. Add new repoz: c:\bla\>hg add no problem. Next, commit: c:\bla\hg commit error: abort: no username supplied (see "hg help config")

    Read the article

  • No-Model Formtastic Form

    - by Kevin Sylvestre
    I am looking to reproduce the following with Formtastic: <% form_tag '/search', :method => 'get' do %> <%= text_field_tag :q, params[:q] %> <% end %> So far I have: <% semantic_form_for :search, :html => { :method => :get } do |form| %> <% form.inputs do %> <%= form.input :q %> <% end %> <% end %> However, this requires access to the parameter hash using: params[:search][:q] Instead of my required: params[:q] I'd like to use Formtastic for all forms in the application I am working on, and so far I have only had problems with this one. Any ideas?

    Read the article

  • XBAPs and MouseWheel events

    - by Kevin Montrose
    I've got an XBAP hosted in FireFox, which works great. However, I cannot detect MouseWheel events ever! I'm guessing that FireFox is consuming them and not passing them down to the hosted app. Any ideas on how to work around this?

    Read the article

  • Correct handling of OnMouseWheel events in Ext-GWT

    - by Kevin Loney
    I'm trying to figure out which property of BoxComponentEvent will tell me if the generated OnMouseWheel event was a scroll-up or scroll-down event. I have output the values of all the properties BoxComponentEvent exposes; and all of them (with the exception of the coordinates at which the event took place) stay the same regardless. Google and the Ext-GWT docs have been pretty useless for providing a concrete example. public class MyPanel extends ContentPanel { // ... public MyPanel() { addListener(Events.OnMouseWheel, new Listener<BoxComponentEvent>() { public void handleEvent(BoxComponentEvent be) { // What happens here to distinguish scroll-up and scroll-down? } }); } protected void afterRender() { super.afterRender(); el().addEventsSunk(Events.OnMouseWheel.getEventCode()); } // ... }

    Read the article

  • ASP MVC Ajax Controller pattern?

    - by Kevin Won
    My MVC app tends to have a lot of ajax calls (via JQuery.get()). It's sort of bugging me that my controller is littered with many tiny methods that get called via ajax. It seems to me to be sort of breaking the MVC pattern a bit--the controller is now being more of a data access component then a URI router. I refactored so that I have my 'true' controller for a page just performing standard routing responses (returing ActionResponse objects). So a call to /home/ will obviously kick up the HomeController class that will respond in the canonical controller fashion by returning a plain-jane View. I then moved my ajax stuff into a new controller class whose name I'm prefacing with 'Ajax'. So, for example, my page might have three different sections of functionality (say shopping cart or user account). I have an ajax controller for each of these (AjaxCartController, AjaxAccountController). There is really nothing different about moving the ajax call stuff into its own class--it's just to keep things cleaner. on client side obviously the JQuery would then use this new controller thusly: //jquery pseudocode call to specific controller that just handles ajax calls $.get('AjaxAccount/Details'.... (1) is there a better pattern in MVC for responding to ajax calls? (2) It seems to me that the MVC model is a bit leaky when it comes to ajax--it's not really 'controlling' stuff. It just happens to be the best and least painful way of handling ajax calls (or am I ignorant)? In other words, the 'Controller' abstraction doesn't seem to play nice with Ajax (at least from a patterns perspective). Is there something I'm missing?

    Read the article

  • Microsoft SQL Server 2005 Inserting into tables from child procedure which returned multiple tables

    - by Kevin
    I've got a child procedure which returns more than table. child: PROCEDURE KevinGetTwoTables AS BEGIN SELECT 'ABC' Alpha, '123' Numeric SELECT 'BBB' Alpha, '123' Numeric1, '555' Numeric2 END example: PROCEDURE KevinTesting AS BEGIN DECLARE @Table1 TABLE ( Alpha varchar(50), Numeric1 int ) DECLARE @Table2 TABLE ( Alpha varchar(50), Numeric1 int, Numeric2 int ) --INSERT INTO @Table1 EXEC KevinGetTwoTables END

    Read the article

  • Modal View Controller Undesirably Hides Tab Bar

    - by Kevin Sylvestre
    I am working on an application that requires user authentication to access a profile. The profile section is located solely under one tab (and all others tabs do not require authentication). I currently present a authentication view controller modally (and then dismiss on success) when the user selects the profile tab. However, this approach prevents the user from deciding not to register / login (that is, all tabs are hidden once the authentication screen is presented modally). I don't want the user to be able to dismiss the modal view controller, but rather have it modal only for the profile tab. Is this possible? Can I have tabs visible while having a modal view controller? What is the best approach here. Thanks.

    Read the article

  • How is Entity Framework 4's POCO support compared to NHibernate?

    - by Kevin Pang
    Just wondering if anyone has had any experience using Entity Framework 4's POCO support and how it stands up compared to NHibernate. If they're the same, I'd be very interested in making Entity Framework 4 my ORM of choice if only because it would: Support both data first AND object first development Have a robust LINQ provider Be easier to pitch to clients (since it's developed by Microsoft) Come baked into the .NET framework rather than requiring 8 dlls to get up and running In other words, are there any major shortcomings to EF4? Does it support all of the basic functionality NHibernate supports (lazy-loading, eager-loading, 1st level caching, etc.) or is it still rough around the edges? Is the syntax for setting up the mappings as easy as NHibernate and/or Fluent NHibernate? Edit: Please don't bring up the vote of no confidence. That was ages ago and dealt with some serious shortcomings of EF1 that really don't seem to apply anymore to EF4.

    Read the article

  • How do I call window.openDatabase from a webView hosted in an android application?

    - by Kevin
    I created a native Android app that basically hosts a webView control. That webView is then used to load a page that calls window.openDatabase from JavaScript. I can successfully confirm that the API exists by verifying window.openDatabase. Calling this method returns a null when called in a hosted webView control. Calling the same method in the Android Browser returns an instance of the database. Does anyone know the permessions in the manifest or settings on the webView control that need to be set to access the database? Is this even possible in a native app.

    Read the article

< Previous Page | 14 15 16 17 18 19 20 21 22 23 24 25  | Next Page >