Search Results

Search found 4677 results on 188 pages for 'alternative'.

Page 104/188 | < Previous Page | 100 101 102 103 104 105 106 107 108 109 110 111  | Next Page >

  • how to disable a jqgrid select list (dropdown) on the edit form

    - by MikeD
    This is strange and any alternative method to what I want to accomplish is welcome. My app uses the jqgrid 3.5.3 and I need to disable a select list on my edit form. When I do so using the code displayed below it breaks the edit form - meaning I can not cancel or submit it. Thanks. This code is in the edit options array of the navGrid method. The the dropdown is the 'serv_descr' field. The others are text boxes and don't pose a problem. The form does come up and the field is disabled - its just broken. beforeShowForm: function(eparams) { document.getElementById('equip_id').disabled = true; document.getElementById('service_dt').disabled = true; document.getElementById('serv_descr').disabled = true; document.getElementById('calc_next_svc').checked = 'true'; }

    Read the article

  • Debugging error "The Type 'xx' is defined in an assembly that is not referenced"

    - by Abel
    The full error is as follows: The type 'System.Windows.Forms.Control' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. and it points at the very first statement (an Debug.Assert line) in the very first class in a library project that doesn't need System.Windows.Forms (or so I thought). I know how to solve it: add the mentioned reference. But how do I find out what library is causing this error, or better, what part of the code triggers using the WinForms library? Normally, you can add libraries that reference others, but you only need to add references to these others when they're actually used. EDIT: Alternative solution This or similar problems can also be resolved using the Binding Log Viewer Fuslogvw.exe from Microsoft's Framework Tools. It shows all attempts and successes of assemblies your application binds to.

    Read the article

  • QListView/QListWidget with custom items

    - by Daniel
    I'm writing my first Qt application with PyQt and am having some trouble creating a custom list view. I'd like the list to contain arbitrary widgets (one custom widget in particular). How would I go about this? It seems that the alternative would be to create a table or grid view wrapped in a scrollbar. However, I'd like to be able to take advantage of the model/view approach as well as the nesting (tree-view) support the built-ins handle. EDIT: To clarify, this widget is interactive (contains buttons), so the solution requires more than painting a widget.

    Read the article

  • jQuery UI sortable scroll helper element offset Firefox issue

    - by James
    I have a problem with a jQuery UI 1.7.2 sortable list in Firefox 3.6, IE7-8 work fine. When I'm scrolled down a bit, the helper element seems to have an offset of the same height that I'm scrolled down from the mouse pointer which makes it impossible to see which item you originally started dragging. How do I fix this or work around the issue? If there is no fix what is a really good alternative drag-able plugin? Here are my initialization parameters for the sortable. $("#sortable").sortable( {placeholder: 'ui-state-highlight' } ); $("#sortable").disableSelection();

    Read the article

  • Using Data Annotations on POCO's with MVC for Remote Validation

    - by Click Ahead
    Hi All, I am developing an ASP.NET MVC app and I've been looking into using Data Annotations on my POCO's which are defined in my Service Layer. As long as I have a reference to System.ComponentModel & System.ComponentModel.DataAnnotations this is no problem and what I like about this is that it allows me to reuse my Service Layer in a Win Forms app. I'm now looking to do some Remote Validation using Data Annotations and have taken a look at this article: http://msdn.microsoft.com/en-us/library/ff398048(VS.100).aspx However, to use the Data Annotations in this context I need to reference System.Web.MVC, System.Web and System.Web.Routing. This introduces a dependency on the Web DLL's, which limits me somewhat. Can anyone recommend a good clean way to implement Remote Data Validation using Data Annotations that isn't coupled with ASP.NET MVC or maybe suggest a better alternative. Thanks for the help !

    Read the article

  • C#: Accessing a Dictionary.Keys Key through a numeric index

    - by Michael Stum
    I'm using a Dictionary<string, int> where the int is a count of the key. Now, I need to access the last-inserted Key inside the Dictionary, but i do not know the name of it. The obvious attempt: int LastCount = mydict[mydict.keys[mydict.keys.Count]]; does not work, because Dictionary.Keys does not implement a []-indexer. I just wonder if there is any similar class? I thought about using a Stack, but that only stores a string. I could now create my own struct and then use a Stack<MyStruct>, but I wonder if there is another alternative, essentially a Dictionary that implements an []-indexer on the Keys?

    Read the article

  • [PHP] Singleton class and using inheritance

    - by Saif Bechan
    I have am working on a web application that makes use of helper classes. These classes hold functions to various operation such as form handling. Sometimes I need these classes at more than one spot in my application, The way I do it now is to make a new Object. I can't pass the variable, this will be too much work. I was wondering of using singleton classes for this. This way I am sure only one instance is running at a time. My question however is when I use this pattern, should I make a singleton class for all the objects, this would b a lot of code replication. Could I instead make a super class of superHelper, which is a singleton class, and then let every helper extend it. Would this sort of set up work, or is there another alternative? And if it works, does someone have any suggestions on how to code such a superHelper class. Thank you guys

    Read the article

  • moq SetupSet is obsolete. In place of what?

    - by jkohlhepp
    Let's say I want to use moq to create a callback on a setter to store the set property in my own field for later use. (Contrived example - but it gets to the point of the question.) I could do something like this: myMock.SetupSet(x => x.MyProperty).Callback(value => myLocalVariable = value); And that works just fine. However, SetupSet is obsolete according to Intellisense. But it doesn't say what should be used as an alternative. I know that moq provides SetupProperty which will autowire the property with a backing field. But that is not what I'm looking for. I want to capture the set value into my own variable. How should I do this using non-obsolete methods?

    Read the article

  • jqGrid: how to change cell padding

    - by Maurice
    Hi, I'm using jqGrid3.6.5 on google hosted jQueryUI1.8.2 and jQuery1.4.2 I want to change the cell padding of a jqGrid. For testing purposes I want to set it to 10px all around each cell. The only option I've come across while googling is the following: add padding with CSS. eg. #grid-id td{ padding:10px; } set cellLayout option to 21 (paddingleft + paddingright + borderleft) When I have no set width on any of the columns in my colModel, this works like expected. Though when I resize one of the headers, or set a column width in the colModel, headers and cells aren't aligned anymore. Anyone know how to fix this or know an alternative way to alter cell padding?

    Read the article

  • Open source embedded filesystem (or single file virtual filesystem, or structured storage) library f

    - by Ioan
    I'm not sure what the "general" name of something like this might be. I'm looking for a library that gives me a file format to store different types of binary data in an expanding single file. open source, non-GPL (LGPL ok) C interface the file format is a single file multiple files within using a POSIX-like file API (or multiple "blobs" within using some other API) file/structure editing is done in-place reliable first, performant second Examples include: the virtual drives of a virtual machine whefs HDF CDF NetCDF Problems with the above: whefs doesn't appear to be very mature, but best describes what I'm after HDF, CDF, NetCDF are usable (also very reliable and fast), but they're rather complicated and I'm not entirely convinced of their support for opaque binary "blobs" Edit: Forgot to mention, one other relevant question: http://stackoverflow.com/questions/1361560/simple-virtual-filesystem-in-c-c Another similar question: http://stackoverflow.com/questions/374417/is-there-an-open-source-alternative-to-windows-compound-files Edit: Added condition of in-place editing.

    Read the article

  • [hibernate - jpa ] good practices and bad practices

    - by blow
    Hi all, i have some questions about interaction with hibernate. openSession or getCurrentSession (without jta, thread insted)? How mix session operations with swing gui? Is good have something like this in a javabean class? public void actionPerformed(ActionEvent event) { // session code } Can i add methods to my entities that contains hql queries or is a bad practice? For example: // This method is in an entity MyOtherEntity.java class public int getDuration(){ Session session=HibernateUtil.getSessionFactory().getCurrentSession(); session.beginTransaction(); int sum=(Integer)session.createQuery("select sum(e.duration) as duration from MyEntity as e where e.myOtherEntity.id=:id group by e.name"). .setLong("id", getId()); .uniqueResult(); return sum; } In alternative how can i do this in a better and elegant way? Thanks.

    Read the article

  • Android: How to receive process signals in an activity to kill child process ?

    - by user355993
    My application calls Runtime.exec() to launch an executable in a separate process at start up time. I would like this child process to get killed when the parent activity exits. Now I can use onDestroy() to handle regular cases, but not "Force quit", shutdowns from DDMS, or kill from the console since those don't run onDestroy(). The addShutdownHandler() does not seem to be invoked in these cases either. Is there any other hook or signal handler that informs my activity that it's about to get terminated ? As an alternative is there a way to have the system automatically kill the child process when the parent dies ?

    Read the article

  • List<T>.RemoveAll Doesn't Exist in Silverlight?

    - by ashes999
    I'm working on a Silverlight 2/3 application. I would like to use List.RemoveAll (or maybe it's IList.RemoveAll?) and specify a predicate so that I can remove a bunch of elements from a list in one sweep. It seems like this function doesn't exist in Silverlight, though. Am I missing something here? Is there an alternative approach that's equally easy? Right now, I'm manually iterating over my elements in a foreach and keeping a second list (because you can't delete while iterating), and it's quite ... cumbersome.

    Read the article

  • Create Excel (.XLS and .XLSX) file from C#

    - by mistrmark
    What is the best tool for creating an Excel Spreadsheet with C#. Ideally, I would like open source so I don't have to add any third party dependencies to my code, and I would like to avoid using Excel directly to create the file (using OLE Automation.) The .CSV file solution is easy, and is the current way I am handling this, but I but I would like to control the output formats. EDIT: I am still looking at these to see the best alternative for my solution. Interop will work, but it requires Excel to be on the machine you are using. Also the OLEDB method is intriguing, but may not yield much more than what I can achieve with CSV files. I will look more into the 2003 xml format, but that also puts a Excel 2003 requirement on the file. I am currently looking at a port of the PEAR (PHP library) Excel Writer that will allow some pretty good XLS data and formatting and it is in the Excel_97 compatible format that all modern versions of Excel support. The PEAR Excel Writer is here: PEAR - Excel Writer

    Read the article

  • Is there a fully-functional dropdown replacement for HTML SELECT that works in IE?

    - by Ken Paul
    We determined in a previous question that many features of HTML SELECTs are not supported in IE. Is there an alternative widget that you would recommend from your experience that meets the following requirements? Respects the contentEditable property (does not allow selection changes if true) Respects the disabled property of individual OPTIONs (shows them "grayed out" or with strike-through font, and makes them un-selectable) Supports Option Groups (OPTGROUP elements) Supports style options such as border and margin in the SELECT and all sub-elements Supports dynamic add and delete of OPTION and OPTGROUP elements Supports the above in IE version 6 and above EDIT: As noted by @Joel Coehoorn, items 3 and 5 above are currently supported in IE. They are included here to make sure they are not overlooked in a replacement widget.

    Read the article

  • faking a filesystem / virtual filesystem

    - by attwad
    I have a web service to which users upload python scripts that are run on a server. Those scripts process files that are on the server and I want them to be able to see only a certain hierarchy of the server's filesystem (best: a temporary folder on which I copy the files I want processed and the scripts). The server will ultimately be a linux based one but if a solution is also possible on Windows it would be nice to know how. What I though of is creating a user with restricted access to folders of the FS - ultimately only the folder containing the scripts and files - and launch the python interpreter using this user. Can someone give me a better alternative? as relying only on this makes me feel insecure, I would like a real sandboxing or virtual FS feature where I could run safely untrusted code.

    Read the article

  • How to properly clean up Excel interop objects in C#

    - by HAdes
    I'm using the Excel interop in C# (ApplicationClass) and have placed the following code in my finally clause: while (System.Runtime.InteropServices.Marshal.ReleaseComObject(excelSheet) != 0) { } excelSheet = null; GC.Collect(); GC.WaitForPendingFinalizers(); Although, this kind of works the Excel.exe process is still in the background even after I close Excel. It is only released once my application is manually closed. Anyone realize what I am doing wrong, or has an alternative to ensure interop objects are properly disposed of. Thanks.

    Read the article

  • Using chilkat to extract RAR files with progress bar?

    - by Dodi300
    Hello. Does anyone know how to show the progress of archives extracting, when using chilkat? I already have a progress bar called "progressBar1" on my form. At the moment the whole program freezes when extraction is started. Maybe have another thread? I'm using this code: Chilkat.Rar rar = new Chilkat.Rar(); bool success; success = rar.Open("abc123.rar"); if (success != true) { MessageBox.Show(rar.LastErrorText); return; } success = rar.Unrar("c:/temp/unrarDest/"); if (success != true) { MessageBox.Show(rar.LastErrorText); } else { MessageBox.Show("Success."); } If anyone has any alternative ways to extract .rar files, it would be great to know. Thanks.

    Read the article

  • .NET How can i set field value on value type using reflection

    - by soccerazy
    .NET I want to clone a value type's fields. How can i set a field value on a value type using reflection (or something else dynamically)? This works for reference types but not for value types. I understand why but I don't know an alternative. shared function clone(of t)(original as t) as t dim cloned as t 'if class then execute parameterless constructor if getType(t).isClass then cloned = reflector.construct(of t)() dim public_fields = original.getType.getFields() for each field in public_fields dim original_value = field.getValue(original) 'this won't work for value type, but it does work for reference type ??? field.setValue(cloned, original_value) next return cloned end function

    Read the article

  • Multiple skins in ASP.NET MVC using StringTemplate

    - by Jamie
    I am considering the StringTemplate view engine for my ASP.NET MVC application. This application will be built with one skin, but I then expect many more, often very similar skins to be developed for it. This is primiarly the reason for my choice of StringTemplate as the view engine, as there will be zero logic in the views. In my head, I envisaged having each skin in a directory under the 'Views' directory in the folder structure, then maintaining a data structure which maps hostnames to skin directories. An obvious disadvantage of this approach is that I will have to explicitly specify my view files - an alternative might be to hack the implementation of the View() method to change the /views/controller/action standard path and insert an extra layer. Is anyone aware of any examples of implementations along these lines using ASP.NET MVC and StringTemplate at present? Can anyone forsee any potential problems with my approach? Thanks in advance.

    Read the article

  • Changelog file: YAML vs JSON vs CSV

    - by Aziz Light
    Hello everybody. I am creating a simple Changelog lib in CodeIgniter that will basically log a message everytime someone adds, deletes, changes or publish a blog post. I will log messages in files by batches of 300. So every 301st message will go in a new file. At first I wanted to write the logs to simple .log files but then I got the idea to actually style the thing and I had to seperate each "attribute" of each message (ie: the user, the message, the type of the log, etc.). So .log files are out of the question since extracting the info would be a pain. What is the most appropriate format for such a task? I already ruled out MySQL and XML because they are too heavy (especially considering that the log files won't exceed (about) 300 lines). I suggested YAML vs JSON vs CSV in the title, but is there yet a better alternative?

    Read the article

  • Online Perforce Repositories

    - by Oliver Hume
    Is anyone aware of of anybody offering hosted perforce servers? It doesn't have to be free - but preferably not too expensive! My understanding of Perforce is that it's free to use for personal projects, which mine is. Currently I have a perforce server setup on the same machine as the code is on which doesn't offer much security in case of computer failure. If not, can anyone recommend one of the alternative solutions that is similar to Perforce? I have experience of SVN but cannot say I enjoy the experience.

    Read the article

  • Article search engine in php

    - by Jason
    Hello, I am using sphinx as a search engine on my website its working perfect and I have no complain with it. The only thing it lacks is, it does not allow me to search articles whose query length is more than 15 words. I know in reality people don't use more than 3-4 words i want to use it for finding duplicate contents. I was wondering if there is any alternative solution to sphinx. I want to cope with duplicate contents. My main articles table is in innodb but I am also caching articles into MyISAM table as well for full text searching but when I search an article it takes ages to perform one search. Its not the query problem, i think mysql lacks the fulltext searching facility. Thanks Jason

    Read the article

  • document.write issue

    - by Dhana
    I inherited a piece of code that uses document.write to insert a certain div when the code is encountered. Unfortunately, this code is causing issues in IE where the code fails. Is there a way around this to insert a div on the page without it? I can't make a big change since this code is currently used by many clients(it's like google adsense kind of thing). Is there an alternative to document.write - I don't have a way to capture a div on the page since it's something plugged in by anyone.

    Read the article

  • How to execute "eval" without writing "eval" in JavaScript

    - by Infinity
    Here's the deal, we have a big JS library that we want to compress, but YUI compressor doesn't fully compress the code if it finds an "eval" statement, out of fear that it will break something else. That's great and all, but we know exactly what is getting eval'd, so we don't want it to get conservative because there's an eval statement in MooTools JSON.decode So basically the question is, is there any alternative (maybe creative) way of writing a expression that returns the eval function? I tried a few, but no dice: window['eval'](stuff); window['e'+'val'](stuff); // stuff runs in the global scope, we need local scope this['eval'](stuff); // this.eval is not a function (new Function( "with(this) { return " + '(' + stuff + ')' + "}"))() // global scope again Any ideas? Thx

    Read the article

< Previous Page | 100 101 102 103 104 105 106 107 108 109 110 111  | Next Page >