Search Results

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

Page 22/188 | < Previous Page | 18 19 20 21 22 23 24 25 26 27 28 29  | Next Page >

  • Better Alternative to Case Statement

    - by Kyle Rozendo
    Hi All, I currently have a switch statement that runs around 300 odd lines. I know this is not as giant as it can get, but I'm sure there's a better way to handle this. The switch statement takes an Enum that is used to determine certain properties that pertain to logging. Right now the problem sets in that it is very easy to leave out an enumeration value and that it will not be given a value as it is not in the switch statement. Is there an option one can use to ensure that every enumeration is used and given a custom set of values it needs to do its job? Thanks, Kyle

    Read the article

  • Alternative to udev functionality on OSX

    - by S1syphus
    I'm trying to create a custom file/check in check out script for external hardrives, however part of the script is from a Linux machine, which I have tested works fine, but uses udevinfo, OS X doesn't have udev, so is there anything that offers the same functionality? #!/bin/bash declare -a EXTERNAL_DISKS declare -a INTERNAL_DISKS for disk in /dev/[sh]d[a-z]; do eval `udevinfo -q env -n $disk` [ "$ID_BUS" = "usb" ] && EXTERNAL_DISKS=( ${EXTERNAL_DISKS[@]} $disk ) [ "$ID_BUS" = "scsi" ] && INTERNAL_DISKS=( ${INTERNAL_DISKS[@]} $disk ) done echo "Internal disks: ${INTERNAL_DISKS[@]}" echo "External disks: ${EXTERNAL_DISKS[@]}" Anybody know any alternatives? Or a way this could be accomplished on OSX using bash?

    Read the article

  • Alternative to array_shift function

    - by SoLoGHoST
    Ok, I need keys to be preserved within this array and I just want to shift the 1st element from this array. Actually I know that the first key of this array will always be 1 when I do this: // Sort it by 1st group and 1st layout. ksort($disabled_sections); foreach($disabled_sections as &$grouplayout) ksort($grouplayout); Basically I'd rather not have to ksort it in order to grab this array where the key = 1. And, honestly, I'm not a big fan of array_shift, it just takes to long IMO. Is there another way. Perhaps a way to extract the entire array where $disabled_sections[1] is found without having to do a foreach and sorting it, and array_shift. I just wanna add $disabled[1] to a different array and remove it from this array altogether. While keeping both arrays keys structured the way they are. Technically, it would even be fine to do this: $array = array(); $array = $disabled_sections[1]; But it needs to remove it from $disabled_sections. Can I use something like this approach... $array = array(); $array = $disabled_sections[1]; $disabled_sections -= $disabled_sections[1]; Is something like the above even possible?? Thanks.

    Read the article

  • ASP. Net MVC and RegisterClientScriptBlock alternative

    - by Noel
    I currently have a web form aspx page that calls RegisterClientScriptBlock. This sends down message text that I use for client side validation e.g. <script type="text/javascript"> //<![CDATA[ var c_errorMessages = { RequiredField : "* Mandatory field" }; //]]> </script> The values are generated on the server side based on culture and resource files. I believe you cannot use RegisterClientScriptBlock with MVC. Any ideas on how I can achieve this with MVC?

    Read the article

  • Open source alternative to WebEx WebOffice?

    - by Dieseltime
    I have a client who has been using WebOffice (from WebEx) for a variety of tasks within their small organization. The problem is that they only really need a small subset of the features WebOffice provides (Contact list, Database, and Document Storage). They've asked me to develop a website focused on these three features with the rationalization that this should be more cost-effective, since they currently aren't using many of the features of WebOffice they pay for. What are some open-source alternatives that I could implement for them? Sharepoint sounds like it would be too bloated and Google Apps may not be as collaborative as they would like.

    Read the article

  • Open Source Alternative to ASP.NET membership

    - by Tony Lenzi
    I'm currently supporting a Python web app with increasingly complicated user/role/permission management requirements. Currently, we are rolling our own user, groups, permissions, etc. code and supporting database. I'd like to find something like ASP.NET membership that can help manage user authentication and authorization, rather than risk security issues in continuing to create an increasingly complicated custom solution. Are there any similar projects out there worth taking a look at?

    Read the article

  • Alternative to jQuery's .toggle() method that supports eventData?

    - by Bungle
    The jQuery documentation for the .toggle() method states: The .toggle() method is provided for convenience. It is relatively straightforward to implement the same behavior by hand, and this can be necessary if the assumptions built into .toggle() prove limiting. The assumptions built into .toggle have proven limiting for my current task, but the documentation doesn't elaborate on how to implement the same behavior. I need to pass eventData to the handler functions provided to toggle(), but it appears that only .bind() will support this, not .toggle(). My first inclination is to use a flag global to a single handler function to store the click state. In other words, rather than: $('a').toggle(function() { alert('odd number of clicks'); }, function() { alert('even number of clicks'); }); do this: var clicks = true; $('a').click(function() { if (clicks) { alert('odd number of clicks'); clicks = false; } else { alert('even number of clicks'); clicks = true; } }); I haven't tested the latter, but I suspect it would work. Is this the best way to do something like this, or is there a better way that I'm missing? Thanks!

    Read the article

  • Flash is not working in Chrome (Crossover Linux is installed)

    - by Jim Ford
    I have google Chrome 8.0.552.237 on Ubuntu 10.10 64-bit and flash is not working, I have tried a variety of methods to install flash, including Firefox flash-aid and the flash-installer package and nothing is working for me. I have even uninstalled and reinstalled chrome to no avail. I get "missing plugin" message where flash plugin should be in a website. What am I missing? I have a variety of plugins returned by jgbelacqua's command: /usr/lib/chromium-browser/plugins/flashplugin-alternative.so /usr/lib/firefox/plugins/flashplugin-alternative.so /usr/lib/flashplugin-installer/libflashplayer.so /usr/lib/iceape/plugins/flashplugin-alternative.so /usr/lib/iceweasel/plugins/flashplugin-alternative.so /usr/lib/midbrowser/plugins/flashplugin-alternative.so /usr/lib/mozilla/plugins/flashplugin-alternative.so /usr/lib/xulrunner/plugins/flashplugin-alternative.so /usr/lib/xulrunner-addons/plugins/flashplugin-alternative.so /usr/share/ubufox/plugins/libflashplayer.so /var/cache/flashplugin-installer/libflashplayer.so I'm not sure which is necessary and which not. I should note tho that my Chromium does have flash and it does work... just not chrome or firefox.

    Read the article

  • using jquery as an alternative to css nth child

    - by JCHASE11
    Hi. I am using the following css to create list items with a chckerboard background ( every other list item has a grey background, which shift every row to create a checkerboard pattern: li:nth-child(8n+2), li:nth-child(8n+4), li:nth-child(8n+5), li:nth-child(8n+7) { background-color:grey; } Is there way I can do this using jquery that is more supportive than css3? Thanks

    Read the article

  • Alternative Python standard library reference

    - by Ender
    I love Python; I absolutely despise its official documentation. Tutorials do not count as library references, but that appears to be what they're attempting. What I really want is the ability to find a class in the standard library and view documentation for all of its properties and methods. Actionscript, MSDN, and Java all do this just fine (although each with their odd quirks). Where is this for python? For example, I wanted to sort a list. mylist.sort(). Awesome. But what if I wanted it sorted in descending order? Official documentation is not - much - help. Or what if I wanted to specify a key function? That's also supported: mylist.sort(key=lamba item: item.customVar)- but documented...where? I understand that Python's approach to OOP may not be equivalent to Java et. al. Maybe list isn't actually a class - maybe it's just a function that returns an iterable when the tachyon beams are set to glorious and the unboxed hyper enumeration is quantized, but...I don't care. I just want to know how to sort lists. (Apologies for the angst - too much caffeine today)

    Read the article

  • Good alternative to Eregi() in PHP

    - by Click Upvote
    I often find myself doing quick checks like this: if (! eregi('.php',$fileName)) $filename.='.php'; But sadly eregi() is going to be deprecated in PHP 6, which means all of my code that uses it will be rendered useless :(. Is there another function that behaves exactly the same way as eregi()? I don't know anything about reg exps and don't want to learn, so preg_match() etc won't work for me.

    Read the article

  • Alternative to DITA Open Toolkit

    - by Adam
    I'm working on a web app that will need to process DITA documents from persistent storage (likely a JCR). The DITA Open Toolkit is the only DITA implementation I'm aware of, but it requires all of your documents to exist on the filesystem. Ideally, I'd like something that works like the DITA OT, but allows you to provide a resolver (much like an XSLT URIResolver) to pull referenced content from other sources. If people have other ideas, such as using a virtual filesystem to trick the DITA OT into working, I'd love to hear those too. Thanks!

    Read the article

  • css3 rotate alternative

    - by JCHASE11
    I am using the CSS3 rule, "rotate" to rotate a div containing text. You can see the page here: http://vitaminjdesign.com/v2/socialmedia.html. I am looking for cross browser support for rotating the div; however, this CS3 rule won't work on IE. Is there a jquery option or another javascript solution that will yield the same result, with cross browser compatibility?

    Read the article

  • Customer Feedback Alternative to UserVoice?

    - by Ben Griswold
    We are currently hosting an ASP.NET MVC application and we wish to incorporate a turn-key customer feedback system. UserVoice will absolutely meet our needs, but we'd like to consider alternatives before moving forward. GetSatification appears to provide a similiar model. Are there any other service which we should consider as well?

    Read the article

  • Simple alternative to GNU Readline library not GPL

    - by Bo Jensen
    I love the GNU readline library, but since it is under a GPL license, I can not use it for commercial software. Do you know alternatives ? I only need the commandline history and auto completion (of customer keywords and files) features. I found this link : http://github.com/antirez/linenoise which seem to be a good starting point, but does not have auto completion. Any suggestions, surely this must be a common task for people building interactive shell commands.

    Read the article

  • setInterval alternative

    - by spyder
    Hi folks, In my app I am polling the webserver for messages every second and displaying them in the frontend. I use setInterval to achieve this. However as long as the user stays on that page the client keeps polling the server with requests even if there is no data. The server does give an indication when no more messages are being generated by setting a variable. I thought of using this variable to clearInterval and stop the timer but that didn't work. What else can I use in this situation? I am using jquery and django. Here is my code: jquery: var refresh = setInterval( function () { var toLoad = '/myMonitor'+' #content'; $('#content').load(toLoad).show(); }, 1000); // refresh every 1000 milliseconds }); html: div id=content is here I can access the django variable for completion in html with each refresh. How can I set clearInterval if at all ? Note: stack overflow does not let me put is &gt &lt so html is incomplete Thanks

    Read the article

  • phpDocumentor alternative consuming less memory

    - by Michal Cihar
    Okay, I'm fed up with phpDocumentator. It consumes way much more memory and time than I'm willing to give it. Does there exist some really compatible program to generate documentation for PHP code? I've tried PHPDoctor, which looks nice, but it has some missing features. I've also tried PhpDocGen, but it just bails out with some Perl errors, which I'm too lazy to study. Doxygen also does not seem to play well with our sources. PS: The documentation would be for phpMyAdmin, a little bit outdated documentation is here.

    Read the article

  • Customising Flex Datagrid or alternative solutions

    - by Martin
    I'm currently building an application that is presenting tabular (fetched from a webservice) data and have squirted it into a datagrid - seemed the most obvious way to present it on screen. I've now come across a few limitations in the datagrid and wonder how I might move forward. As a relative newcomer to flex development I'm a little lost. A few things I am wanting to do. The data is logically split into groups and I would like to be able to have subheadings in the grid whenever I move to a new group. I would like to be able to highligh individual cells based on their content relative to other values in the row - ie highlight the cell with the highest value in the row. Is this possible with the standard datagrid? I'm actually using the try-before-you-buy version of flex builder at the moment but I have ordered Flex Builder 3 Pro - which is on its way to me. I understand there is an 'advanced datagrid' control in this version - perhaps that will support some of what I wish to do? Alternatively - is there another way of building custom tabular data?

    Read the article

  • alternative to JQuery form.submit() to do ajax post

    - by BluntTool
    Hello, I have a mvc2 application with a view like this <% using (Ajax.BeginForm("UserApprove", new { id = Model.id }, new AjaxOptions() { UpdateTargetId = "statusLights", OnSuccess = "HideButtons" }, new { id = "UserApprove" })) {%> <input type="button" value="Approve" onclick="$('#dialogApprove').dialog('open')" /> <div id="dialogApprove" title="Confirm"> <p> Are you sure you want to approve this request? </p> </div> <% } %> FYI, the controller returns a partial view back. I used to not have the jquery dialog and just simple a <input type="Submit" value="Approve" /> that used to work fine I added the jquery dialog and I have something like this to initialize the dialog. $("#dialogApprove").dialog({ autoOpen: false, draggable: true, resizable: false, buttons: { "Cancel": function() { $(this).dialog("close") }, "Approve": function() { $("#UserApprove").submit(); $(this).dialog("close"); } } }); The $("#UserApprove").submit(); does not seem to be doing an ajax post. It comes back with just the text from the partial view returned in a new page. I dont want to use the jquery form plugin which has .ajaxSubmit(). Is there any other way to force an ajax post from the jquery dialog "approve" button?

    Read the article

< Previous Page | 18 19 20 21 22 23 24 25 26 27 28 29  | Next Page >