Search Results

Search found 26214 results on 1049 pages for 'farm solution'.

Page 81/1049 | < Previous Page | 77 78 79 80 81 82 83 84 85 86 87 88  | Next Page >

  • SonicWALL NetExtender - Client Install?

    - by JArmani
    We are about to push out a new VPN solution for our organization. One of the beautiful things we saw in SonicWALL's SSL-VPN was the thin, browser-based solution of NetExtender. Does anybody have experience with this? My specific concern is that, at least in Windows 7 during testing, it prompts for admin credentials to install the ActiveX NetExtender plugin, which is standard for installing anything in a Windows domain environment. But doesn't this mean I actually have to go in and install the client on all domain laptops that will be using the VPN in the field? They wouldn't actually be able to simply visit the site and run the client, as advertised? By the way, we're using the SonicWALL NSA 3500 device. We do have ManageEngine's Desktop Central, which can push out software installations, but it usually has to be in the form of a .MSI package. Is there any solution to this, besides hitting up all my organization's computers?

    Read the article

  • Directory "Bookmarking" in Linux

    - by Jason R. Mick
    Aside from aliasing and links, is there an easy way in Linux to tag commonly used directories and to navigate to a commonly used directory from the terminal. To be clear the disadvantages I see with alternative approaches, and why I want a bookmark/favorites like system: alias Cons: Too specific (every new favorite requires a new alias...although you could in theory make an alias that echo append your dir as a new alias, which would be sort of clever). Can't nest favorites in folders (can't think of a simple solution to this outside of heavy config scripting). links Cons: Clutter directory make ls a headache. pushd/popd Cons: Non-permanent (without shell config file scripting), can't nest favorites in directories, etc. Granted I have multiple ideas for making my own non-standard solution, but before I have at it I wanted to get some perspective on what's out there and if there is nothing, what is a recommended approach. Does anyone know of such a favorites/bookmark-like terminal solution?

    Read the article

  • How to import Exchange calendars in Google Calendar (No Desktop Outlook)

    - by Tonny Madsen
    I would like to import my calendar from my company Exchange 2010 server as a new calendar in my private Google account. The primary use is to easy my planning when at home with my laptop. I already have access to both the Google and Exchange calendars on my Android phone, but the size of the screen makes it rather difficult to plan anything serious. Note that I run OSX on my laptop I would prefer a Internet based solution to any software on my own laptop. I do not want an Outlook add-in I do not want to include the work related events in my main calendar I do not want a mobile solution I can pay for the solution

    Read the article

  • Best way to "stream" music / video to my HDTV from my pc?

    - by loj
    My requirement is simple: I have a laptop and a desktop at home that I often use for various media (music, videos etc.) and I want to know what the best (quickest, most seamless, best quality etc) solution for sending this media to my HDTV (and connected sound system). An example would be I'm listening to some music from youtube on my laptop in my living room and want to quickly send it to my tv (which has a sound system) so that I don't have to listen to it through my laptop. I mainly use linux (but a windows dependent solution would be ok too if its the best option). I would greatly appreciate any suggestions. Oh and a wireless solution would be best.

    Read the article

  • Using foldr to append two lists together (Haskell)

    - by Luke Murphy
    I have been given the following question as part of a college assignment. Due to the module being very short, we are using only a subset of Haskell, without any of the syntactic sugar or idiomatic shortcuts....I must write: append xs ys : The list formed by joining the lists xs and ys, in that order append (5:8:3:[]) (4:7:[]) => 5:8:3:4:7:[] I understand the concept of how foldr works, but I am only starting off in Functional programming. I managed to write the following working solution (hidden for the benefit of others in my class...) : However, I just can't for the life of me, explain what the hell is going on!? I wrote it by just fiddling around in the interpreter, for example, the following line : foldr (\x -> \y -> x:y) [] (2:3:4:[]) which returned [2:3:4] , which led me to try, foldr (\x -> \y -> x:y) (2:3:4:[]) (5:6:7:[]) which returned [5,6,7,2,3,4] so I worked it out from there. I came to the correct solution through guess work and a bit of luck... I am working from the following definition of foldr: foldr = \f -> \s -> \xs -> if null xs then s else f (head xs) (foldr f s (tail xs) ) Can someone baby step me through my correct solution? I can't seem to get it....I already have scoured the web, and also read a bunch of SE threads, such as How foldr works

    Read the article

  • Suggestions for hosted file sharing services

    - by Jon
    Before I pose my question, I will give some insight as per my scenario: I work for a small business (cost is an important factor) Our bandwidth is limited and would not support an in-house FTP server We need to share files (mostly pdf, inDesign, Illustrator documents) to our clients, and as we expand, we are finding that our current locally-hosted FTP solution is too slow and is becoming a detriment to our sales team. What we need is a remotely hosted solution to share files with our clients, specifically with the following features: Greater than 100gb of secure storage The Ability to distribute unique log in credentials to clients, granting access to a personalized directory or folder, while limiting access to other files on the server. A relatively simple web-based UI for clients with limited computer knowledge We have considered a dedicated remote server, and web-based services (box.net, yousendit.com, onehub.com, filesanywhere.com) but I am unsure as per the direction we should be taking - have I left another solution out? What would you suggest? Thanks in advance.

    Read the article

  • VPN PPTPD with MPPE Support for Debian or Ubuntu

    - by user78395
    Having an unencrypted vpn connection from a windows client to linux is pretty easy by using pptpd. When I was looking for an solution for encrypted (per MPPE) connection, I found a lot of information about patching the kernel etc. - so it definitly works after some work. But all these information is pretty old (2005-2006). Is it the same solution nowadays? I am not asking for a complete instruction (only if it's short) - I am more asking for a link to the right solution.

    Read the article

  • Seek first to understand, then to be understood

    - by BuckWoody
    One of the most important (and most difficult) lessons for a technical professional to learn is to not jump to the solution. Perhaps you’ve done this, or had it happen to you. As the person you’re “listening” to is speaking, your mind is performing a B-Tree lookup on possible solutions, and when the final node of the B-Tree in your mind is reached, you blurt out the “only” solution there is to the problem, whether they are done or not. There are two issues here – both of them fatal if you don’t factor them in. First, your B-Tree may not be complete, or correct. That of course leads to an incorrect response, which blows your credibility. People will not trust you if this happens often. The second danger is that the person may modify their entire problem with a single word or phrase. I once had a client explain a detailed problem to me – and I just KNEW the answer. Then they said at the end “well, that’s what it used to do, anyway. Now it doesn’t do that anymore.” Which of course negated my entire solution – happily I had kept my mouth shut until they finished. So practice listening, rather than waiting for your turn to speak. Let the person finish, let them get the concept out, give them your full attention. They’ll appreciate the courtesy, you’ll look more intelligent, and you both may find the right answer to the problem. Share this post: email it! | bookmark it! | digg it! | reddit! | kick it! | live it!

    Read the article

  • Synced audio ouput on multiple machines? VLC? hardware solutions?

    - by zimmer62
    I'm wondering if there is any software or hardware solutions to synced audio or audio and video across multiple computers or devices on a network. I've seen Sonos, and it might be a good solution, but it's also a very expensive solution. I'd like to be able to play something with realtime audio output on one PC, but hear it on speakers throughout the house, being it the home theater receiver, or another computer in another room. I saw a solution using the apple iport express, but the latency was unacceptable for anything other than just music. I'd like to avoid running audio wires with baluns to a bunch of amplifiers scattered all over the place when I have cat5 run everywhere. Is anyone familiar with using this kind of process for whole home audio? The latency is a big deal for me, if I've got video attached to the sound (e.g. watching a hockey game)

    Read the article

  • Getting Requirements Right

    - by Tim Murphy
    Originally posted on: http://geekswithblogs.net/tmurphy/archive/2013/10/28/getting-requirements-right.aspxI had a meeting with a stakeholder who stated “I bet you wish I wasn’t in these meetings”.  She said this because she kept changing what we thought the end product should look like.  My reply was that it would be much worse if she came in at the end of the project and told us we had just built the wrong solution. You have to take the time to get the requirements right.  Be honest with all involved parties as to the amount of time it is taking to refine the requirements.  The only thing worse than wrong requirements is a surprise in budget overages.  If you give open visibility to your progress then management has the ability to shift priorities if needed. In order to capture the best requirements use different approaches to help your stakeholders to articulate their needs.  Use mock ups and matrix spread sheets to allow them to visualize and confirm that everyone has the same understanding.  The goals isn’t to record every last detail, but to have the major landmarks identified so there are fewer surprises along the way. Help the team members to understand that you all have the same goal.  You want to create the best possible solution for the given business problem.  If you do this everyone involved will do there best to outline a picture of what is to be built and you will be able to design an appropriate solution to fill those needs more easily. Technorati Tags: requirements gathering,PSC Group,PSC

    Read the article

  • USB-based AV application that restores compromised Windows files from CD/DVD?

    - by overtherainbow
    Hello I just tried a couple of rescue disks (AVG and Kaspersky), and I was wondering if someone knew of a solution that would work like this: The AV solution boots from a USB key, and works entirely from RAM (where the latest virus DB is downloaded) The user inserts his Windows CD/DVD in the drive If any Windows file is compromised, the AV application fetches a clean version from the CD/DVD and restores it on the hard drive optionally, any compromised drive/user-land application is quarantied, and it is up to the user to reinstall those after he successfully rebooted into a restored Windows setup Have you heard of a solution like this? It seems silly to reinstall a whole Windows computer just because one or a few system files were compromised. Thank you.

    Read the article

  • Export policy configuration from eTrust ITM 8.1

    - by grub
    Currently we are using the Enterprise AV Solution eTrust ITM 8.1. The licenses are running out in october and we are going to replace eTrust with another AV solution. The eTrust Server is running on Windows Server 2003 SP2 with an MS SQL 2000 Standard Edition. The problem is that we've got many different policy - sets which we have to redefine in the new AV solution. Is there any way with eTrust ITM 8.1 to export the different policies as csv, pdf ... whatever? I really dont want to do that manually (that would mean one print screen after the other ;-) ) Thank you very much. grub

    Read the article

  • SAN for Medium Business - Where to start? [closed]

    - by Henson
    I've always run Linux on my home computers, and done PC repair for years, but this is my first experience with needing to buy a SAN. I thought I was knowledgeable, but I feel a bit lost. I need to be able to support 25 VMs, which are currently managed through vSphere. The company I'm at is growing quickly though, so I'd like to plan for the future. Ideally, I want a solution that I can just tack arrays onto and manage as one large, iSCSI drive. Suggestions? Good resources? If I can find something that appears to software as one large drive, am I better off going with a solution like FreeNAS or Starwind, or an all-in-one proprietary solution like NetApp? Cost, is (of course, and always I'm sure) an issue.

    Read the article

  • Setting up a reverse proxy [on hold]

    - by mrwooster
    I am looking for the best solution for setting up a very low maintenance reverse proxy for a production website (example.com). The setup is as follows: A blog with will be hosted on heroku, and will reside at example.com/blog A static info page which will be hosted on S3 and will reside at example.com/signup A dynamic content management system, provided and hosted by an external vendor which will respond to requests for any other pages. The two solutions which come to mind are: Use HAProxy Ask the external vendor to reverse proxy requests for /blog and /signup The obvious solution would be to use HAProxy, but, if at all possible, I would like to avoid having to setup and maintain another server (especially such a critical one). I came across a company called Snapt which offers hosted HAProxy solutions, but its more geared towards load-balancing than reverse proxying. Option 2 is a possibility, but gives us very little control over changes and configuration. I see a lot of sites hosting blogs on /blog so this must be fairly common practice, am I missing an obvious solution?

    Read the article

  • How do I get Visual Studio build process to pass condition to library(external) project

    - by Billy Talented
    I have tried several solutions for this problem. Enough to know I do not know enough about MSBuild to do this elegantly but I feel like there should be a method. I have a set of libraries for working with .net projects. A few of the projects utilize System.Web.Mvc - which recently released Version 2 - and we are looking forward to the upgrade. Currently sites which reference this library reference it directly by the project(csproj) on the developer's computer - not a built version of the library so that changes and source code case easily be viewed when dealing code from this library. This works quite well and would prefer to not have to switch to binary references (but will if this is the only solution). The problem I have is that because of some of the functionality that was added onto the MVC1 based library (view engines, model binders etc) several of the sites reliant on these libraries need to stay on MVC1 until we have full evaluated and tested them on MVC2. I would prefer to not have to fork or have two copies on each dev machine. So what I would like to be able to do is set a property group value in the referencing web application and have this read by the above mentions library with the caviat that when working directly on the library via its containing solution I would like to be able to control this via Configuration Manager by selecting a build type and that property overriding the build behavior of the solution (i.e. 'Debug - MVC1' vs 'Debug -MVC2') - I have this working via: <Choose> <When Condition=" '$(Configuration)|$(Platform)' == 'Release - MVC2|AnyCPU' Or '$(Configuration)|$(Platform)' == 'Debug - MVC2|AnyCPU'"> <ItemGroup> <Reference Include="System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> </Reference> <Reference Include="Microsoft.Web.Mvc, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> <HintPath>..\Dependancies\Web\MVC2\Microsoft.Web.Mvc.dll</HintPath> </Reference> </ItemGroup> </When> <Otherwise> <ItemGroup> <Reference Include="System.Web.Mvc, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> <HintPath>..\Dependancies\Web\MVC\System.Web.Mvc.dll</HintPath> </Reference> </ItemGroup> </Otherwise> The item that I am struggling with is the cross solution issue(solution TheWebsite references this project and needs to control which build property to use) that I have not found a way to work with that I think is a solid solution that enabled the build within visual studio to work as it has to date. Other bits: we are using VS2008, Resharper, TeamCity for CI, SVN for source control.

    Read the article

  • MSBuild condition across projects

    - by Billy Talented
    I have tried several solutions for this problem. Enough to know I do not know enough about MSBuild to do this elegantly but I feel like there should be a method. I have a set of libraries for working with .net projects. A few of the projects utilize System.Web.Mvc - which recently released Version 2 - and we are looking forward to the upgrade. Currently sites which reference this library reference it directly by the project(csproj) on the developer's computer - not a built version of the library so that changes and source code case easily be viewed when dealing code from this library. This works quite well and would prefer to not have to switch to binary references (but will if this is the only solution). The problem I have is that because of some of the functionality that was added onto the MVC1 based library (view engines, model binders etc) several of the sites reliant on these libraries need to stay on MVC1 until we have full evaluated and tested them on MVC2. I would prefer to not have to fork or have two copies on each dev machine. So what I would like to be able to do is set a property group value in the referencing web application and have this read by the above mentions library with the caviat that when working directly on the library via its containing solution I would like to be able to control this via Configuration Manager by selecting a build type and that property overriding the build behavior of the solution (i.e. 'Debug - MVC1' vs 'Debug -MVC2') - I have this working via: <Choose> <When Condition=" '$(Configuration)|$(Platform)' == 'Release - MVC2|AnyCPU' Or '$(Configuration)|$(Platform)' == 'Debug - MVC2|AnyCPU'"> <ItemGroup> <Reference Include="System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> </Reference> <Reference Include="Microsoft.Web.Mvc, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> <HintPath>..\Dependancies\Web\MVC2\Microsoft.Web.Mvc.dll</HintPath> </Reference> </ItemGroup> </When> <Otherwise> <ItemGroup> <Reference Include="System.Web.Mvc, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> <HintPath>..\Dependancies\Web\MVC\System.Web.Mvc.dll</HintPath> </Reference> </ItemGroup> </Otherwise> The item that I am struggling with is the cross solution issue(solution TheWebsite references this project and needs to control which build property to use) that I have not found a way to work with that I think is a solid solution that enabled the build within visual studio to work as it has to date. Other bits: we are using VS2008, Resharper, TeamCity for CI, SVN for source control.

    Read the article

  • Pass MSBuild condition to library project

    - by Billy Talented
    I have tried several solutions for this problem. Enough to know I do not know enough about MSBuild to do this elegantly but I feel like there should be a method. I have a set of libraries for working with .net projects. A few of the projects utilize System.Web.Mvc - which recently released Version 2 - and we are looking forward to the upgrade. Currently sites which reference this library reference it directly by the project(csproj) on the developer's computer - not a built version of the library so that changes and source code case easily be viewed when dealing code from this library. This works quite well and would prefer to not have to switch to binary references (but will if this is the only solution). The problem I have is that because of some of the functionality that was added onto the MVC1 based library (view engines, model binders etc) several of the sites reliant on these libraries need to stay on MVC1 until we have full evaluated and tested them on MVC2. I would prefer to not have to fork or have two copies on each dev machine. So what I would like to be able to do is set a property group value in the referencing web application and have this read by the above mentions library with the caviat that when working directly on the library via its containing solution I would like to be able to control this via Configuration Manager by selecting a build type and that property overriding the build behavior of the solution (i.e. 'Debug - MVC1' vs 'Debug -MVC2') - I have this working via: <Choose> <When Condition=" '$(Configuration)|$(Platform)' == 'Release - MVC2|AnyCPU' Or '$(Configuration)|$(Platform)' == 'Debug - MVC2|AnyCPU'"> <ItemGroup> <Reference Include="System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> </Reference> <Reference Include="Microsoft.Web.Mvc, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> <HintPath>..\Dependancies\Web\MVC2\Microsoft.Web.Mvc.dll</HintPath> </Reference> </ItemGroup> </When> <Otherwise> <ItemGroup> <Reference Include="System.Web.Mvc, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> <HintPath>..\Dependancies\Web\MVC\System.Web.Mvc.dll</HintPath> </Reference> </ItemGroup> </Otherwise> The item that I am struggling with is the cross solution issue(solution TheWebsite references this project and needs to control which build property to use) that I have not found a way to work with that I think is a solid solution that enabled the build within visual studio to work as it has to date. Other bits: we are using VS2008, Resharper, TeamCity for CI, SVN for source control.

    Read the article

  • Isn't it better to use a single try catch instead of tons of TryParsing and other error handling sometimes?

    - by Ryan Peschel
    I know people say it's bad to use exceptions for flow control and to only use exceptions for exceptional situations, but sometimes isn't it just cleaner and more elegant to wrap the entire block in a try-catch? For example, let's say I have a dialog window with a TextBox where the user can type input in to be parsed in a key-value sort of manner. This situation is not as contrived as you might think because I've inherited code that has to handle this exact situation (albeit not with farm animals). Consider this wall of code: class Animals { public int catA, catB; public float dogA, dogB; public int mouseA, mouseB, mouseC; public double cow; } class Program { static void Main(string[] args) { string input = "Sets all the farm animals CAT 3 5 DOG 21.3 5.23 MOUSE 1 0 1 COW 12.25"; string[] splitInput = input.Split(' '); string[] animals = { "CAT", "DOG", "MOUSE", "COW", "CHICKEN", "GOOSE", "HEN", "BUNNY" }; Animals animal = new Animals(); for (int i = 0; i < splitInput.Length; i++) { string token = splitInput[i]; if (animals.Contains(token)) { switch (token) { case "CAT": animal.catA = int.Parse(splitInput[i + 1]); animal.catB = int.Parse(splitInput[i + 2]); break; case "DOG": animal.dogA = float.Parse(splitInput[i + 1]); animal.dogB = float.Parse(splitInput[i + 2]); break; case "MOUSE": animal.mouseA = int.Parse(splitInput[i + 1]); animal.mouseB = int.Parse(splitInput[i + 2]); animal.mouseC = int.Parse(splitInput[i + 3]); break; case "COW": animal.cow = double.Parse(splitInput[i + 1]); break; } } } } } In actuality there are a lot more farm animals and more handling than that. A lot of things can go wrong though. The user could enter in the wrong number of parameters. The user can enter the input in an incorrect format. The user could specify numbers too large or too small for the data type to handle. All these different errors could be handled without exceptions through the use of TryParse, checking how many parameters the user tried to use for a specific animal, checking if the parameter is too large or too small for the data type (because TryParse just returns 0), but every one should result in the same thing: A MessageBox appearing telling the user that the inputted data is invalid and to fix it. My boss doesn't want different message boxes for different errors. So instead of doing all that, why not just wrap the block in a try-catch and in the catch statement just display that error message box and let the user try again? Maybe this isn't the best example but think of any other scenario where there would otherwise be tons of error handling that could be substituted for a single try-catch. Is that not the better solution?

    Read the article

  • C# - Alternative to System.Timers.Timer, to call a function at a specific time.

    - by Fábio Antunes
    Hello everybody. I want to call a specific function on my C# application at a specific time. At first i thought about using a Timer (System.Time.Timer), but that soon became impossible to use. Why? Simple. The Timer Class requires a Interval in milliseconds, but considering that i might want the function to be executed, lets says in a week that would mean: 7 Days = 168 hours; 168 Hours = 10,080 minutes; 10,080 Minutes = 6,048,000 seconds; 6,048,000 Seconds = 6,048,000,000 milliseconds; So the Interval would be 6,048,000,000; Now lets remember that the Interval accepted data type is int, and as we know int range goes from -2,147,483,648 to 2,147,483,647. That makes Timer useless in this case once we cannot set a Interval bigger that 2,147,483,647 milliseconds. So i need a solution where i could specify when the function should be called. Something like this: solution.ExecuteAt = "30-04-2010 15:10:00"; solution.Function = "functionName"; solution.Start(); So when the System Time would reach "30-04-2010 15:10:00" the function would be executed in the application. How can this problem be solved? Thanks just by taking the time to read my question. But if you could provide me with some help i would be most grateful. Additional Info: What these functions will do? Getting climate information and based on that info: Starting / Shutting down other Applications (most of them Console Based); Sending custom Commands to those Console Applications; Power down, Rebooting, Sleep, Hibernate the computer; And if possible schedule the BIOS to Power Up the Computer; EDIT: It would seem that the Interval accepted data type is double, however if you set a value bigger that an int to the Interval, and call Start() it throws a exception [0, Int32.MaxValue]. EDIT 2: Jørn Schou-Rode suggested using Ncron to handle the scheduling tasks, and at first look this seems a good solution, but i would like to hear about some who as worked with it.

    Read the article

  • Seeking for faster $.(':data(key)')

    - by PoltoS
    I'm writing an extension to jQuery that adds data to DOM elements using el.data('lalala', my_data); and then uses that data to upload elements dynamically. Each time I get new data from the server I need to update all elements having el.data('lalala') != null; To get all needed elements I use an extension by James Padolsey: $(':data(lalala)').each(...); Everything was great until I came to the situation where I need to run that code 50 times - it is very slow! It takes about 8 seconds to execute on my page with 3640 DOM elements var x, t = (new Date).getTime(); for (n=0; n < 50; n++) { jQuery(':data(lalala)').each(function() { x++; }); }; console.log(((new Date).getTime()-t)/1000); Since I don't need RegExp as parameter of :data selector I've tried to replace this by var x, t = (new Date).getTime(); for (n=0; n < 50; n++) { jQuery('*').each(function() { if ($(this).data('lalala')) x++; }); }; console.log(((new Date).getTime()-t)/1000); This code is faster (5 sec), but I want get more. Q Are there any faster way to get all elements with this data key? In fact, I can keep an array with all elements I need, since I execute .data('key') in my module. Checking 100 elements having the desired .data('lalala') is better then checking 3640 :) So the solution would be like for (i in elements) { el = elements[i]; .... But sometimes elements are removed from the page (using jQuery .remove()). Both solutions described above [$(':data(lalala)') solution and if ($(this).data('lalala'))] will skip removed items (as I need), while the solution with array will still point to removed element (in fact, the element would not be really deleted - it will only be deleted from the DOM tree - because my array will still have a reference). I found that .remove() also removes data from the node, so my solution will change into var toRemove = []; for (vari in elements) { var el = elements[i]; if ($(el).data('lalala')) .... else toRemove.push(i); }; for (var ii in toRemove) elements.splice(toRemove[ii], 1); // remove element from array This solution is 100 times faster! Q Will the garbage collector release memory taken by DOM elements when deleted from that array? Remember, elements have been referenced by DOM tree, we made a new reference in our array, then removed with .remove() and then removed from the array. Is there a better way to do this?

    Read the article

  • ASP.Net MVC Exception Logging combined with Error Handling

    - by Saajid Ismail
    Hi. I am looking for a simple solution to do Exception Logging combined with Error Handling in my ASP.Net MVC 1.0 application. I've read lots of articles, including Questions posted here on StackOverflow, which all provide varying solutions for different situations. I am still unable to come up with a solution that suits my needs. Here are my requirements: To be able to use the [HandleError] attribute (or something equivalent) on my Controller, to handle all exceptions that could be thrown from any of the Actions or Views. This should handle all exceptions that were not handled specifically on any of the Actions (as described in point 2). I would like to be able to specify which View a user must be redirected to in error cases, for all actions in the Controller. I want to be able to specify the [HandleError] attribute (or something equivalent) at the top of specific Actions to catch specific exceptions and redirect users to a View appropriate to the exception. All other exceptions must still be handled by the [HandleError] attribute on the Controller. In both cases above, I want the exceptions to be logged using log4net (or any other logging library). How do I go about achieving the above? I've read about making all my Controllers inherit from a base controller which overrides the OnException method, and wherein I do my logging. However this will mess around with redirecting users to the appropriate Views, or make it messy. I've read about writing my own Filter Action which implements IExceptionFilter to handle this, but this will conflict with the [HandleError] attribute. So far, my thoughts are that the best solution is to write my own attribute that inherits from HandleErrorAttribute. That way I get all the functionality of [HandleError], and can add my own log4net logging. The solution is as follows: public class HandleErrorsAttribute: HandleErrorAttribute { private log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); public override void OnException(ExceptionContext filterContext) { if (filterContext.Exception != null) { log.Error("Error in Controller", filterContext.Exception); } base.OnException(filterContext); } } Will the above code work for my requirements? If not, what solution does fulfill my requirements?

    Read the article

  • UITableViewCell with selectable/copyable text that also detects URLs on the iPhone

    - by Jasarien
    Hi guys, I have a problem. Part of my app requires text to be shown in a table. The text needs to be selectable/copyable (but not editable) and any URLs within the text need to be highlighted and and when tapped allow me to take that URL and open my embedded browser. I have seen a couple of solutions that solve one of either of these problems, but not both. Solution 1: Icon Factory's IFTweetLabel The first solution I tried was to use the IFTweetLabel class made possible by Icon Factory and used in Twitterrific. While this solution allows for links (or anything you can find with a regex) to be detected to be handled on a case by case basis, it doesn't allow for selecting and copying. There is also an issue where if a URL is long enough to be wrapped, the button that the class overlays above the URL to make it interactive cannot wrap and draws off screen, looking very odd. Solution 2: Use IFTweetLabel and handle copy manually The second thing I tried was to keep IFTweetLabel in place to handle the links, but to implement the copying using a long-tap gesture, like how the SMS app handles it. This was just about working, but it doesn't allow for arbitrary selection of text, the whole text is copied, or none is copied at all... Pretty black and white. Solution 3: UITextView My third attempt was to add a UITextView as a subview of the table cell. The only thing that this doesn't solve is the fact that detected URLs cannot be handled by me. The text view uses UIApplication's openURL: method which quits my app and launched Safari. Also, as the table view can get quite large, the number of UITextViews added as subviews cause a noticeable performance drag on scrolling throughout the table, especially on iPhone 3G era devices (because of the creation, layout, compositing whenever a cell is scrolled on screen, etc). So my question to all you knowledgeable folk out there is: What can I do? Would a UIWebView be the best option? Aside from a performance drag, I think a webview would solve all the above issues, and if I remember correctly, back in the 2.0 days, the Apple documentation actually recommended web views where text formatting / hyperlinks were required. Can anyone think of a way to achieve this without a performance drag? Many thanks in advance to everyone who can help.

    Read the article

  • jqtransform and collapsed DIV

    - by Marco
    Hello, I am using a jQuery plugin called: jqtransform This plugin uses JavaScript to apply CSS styles to form elements. The problem that I have consists in the following scenario: I’m building a search page, with a advanced search option. When the page loads, the div called “advancedSearch” is hidden, and it will only show if the user clicks a element. Inside the div#advancedSearch I have several form elements. However, if I hide the div#advancedSearch with the CSS style: “diplay:none;”, the jqtransform plugin doesn’t work correctly with the elements that are hidden. So my solution was to hide the div#advancedsearch with JavaScript. This actually works, and it does not matter if it’s done after the document is ready or not. But… with the JavaScript solution, the div#advancedSearch stays visible for a couple of milliseconds… which is visually annoying. So I was wondering if the solution to this problem would be in the CSS, or in correcting the jqtransform plugin, or even in finding a way to immediately hide the div#advancedSearch with JS making it immediately hidden. UPDATE 1 After jeerose comment I decided to place here my function (please note that the <%= % are ASP.Net tags, that I use to get the images path) $('.toggleAdvancedSearch').click(function() { $('#advancedSearchWrap').slideToggle(250); $('form.jqtransform').jqTransform({ imgPath: '<%= ResolveClientUrl("~/masterpages/img/jqtransform/") %>' }); return false; }); UPDATE 2 To test the problem, I did the following: Added another element to the page, with the ID “applyStyle”, and onClick I call the $('form').jqTransform(); Disabled the the $('form').jqTransform(); from the load of the page. If I press the a#applyStyle, before expanding the div#advancedSearch I get the same problem that I had. But if I expand the the div#advancedSearch and press the the a#applyStyle after, the problem is solved. However, if I run the page with the $('form').jqTransform(); function on the load, I cannot reapply it after with the pressing of the a#applyStyle. I think that the solution could be: disabling the all the elements that are inside the div#advancedSearch, and on the same function that expands the div, make It also apply the styles to the elements that are inside the div#advancedSearch. However, I don’t know how to do this (nether if this will work). PS: This seems to be a known issue with the plugin, but I cannot wait indefinitely for a solution.

    Read the article

  • Write Scheme data structures so they can be eval-d back in, or alternative

    - by Jesse Millikan
    I'm writing an application (A juggling pattern animator) in PLT Scheme that accepts Scheme expressions as values for some fields. I'm attempting to write a small text editor that will let me "explode" expressions into expressions that can still be eval'd but contain the data as literals for manual tweaking. For example, (4hss->sexp "747") is a function call that generates a legitimate pattern. If I eval and print that, it becomes (((7 3) - - -) (- - (4 2) -) (- (7 2) - -) (- - - (7 1)) ((4 0) - - -) (- - (7 0) -) (- (7 2) - -) (- - - (4 3)) ((7 3) - - -) (- - (7 0) -) (- (4 1) - -) (- - - (7 1))) which can be "read" as a string, but will not "eval" the same as the function. For this statement, of course, what I need would be as simple as (quote (((7 3... but other examples are non-trivial. This one, for example, contains structs which print as vectors: pair-of-jugglers ; --> (#(struct:hand #(struct:position -0.35 2.0 1.0) #(struct:position -0.6 2.05 1.1) 1.832595714594046) #(struct:hand #(struct:position 0.35 2.0 1.0) #(struct:position 0.6 2.0500000000000003 1.1) 1.308996938995747) #(struct:hand #(struct:position 0.35 -2.0 1.0) #(struct:position 0.6 -2.05 1.1) -1.3089969389957472) #(struct:hand #(struct:position -0.35 -2.0 1.0) #(struct:position -0.6 -2.05 1.1) -1.8325957145940461)) I've thought of at least three possible solutions, none of which I like very much. Solution A is to write a recursive eval-able output function myself for a reasonably large subset of the values that I might be using. There (probably...) won't be any circular references by the nature of the data structures used, so that wouldn't be such a long job. The output would end up looking like `(((3 0) (... ; ex 1 `(,(make-hand (make-position ... ; ex 2 Or even worse if I could't figure out how to do it properly with quasiquoting. Solution B would be to write out everything as (read (open-input-string "(big-long-s-expression)")) which, technically, solves the problem I'm bringing up but is... ugly. Solution C might be a different approach of giving up eval and using only read for parsing input, or an uglier approach where the s-expression is used as directly data if eval fails, but those both seem unpleasant compared to using scheme values directly. Undiscovered Solution D would be a PLT Scheme option, function or library I haven't located that would match Solution A. Help me out before I start having bad recursion dreams again.

    Read the article

  • How to set text above and below a JButton icon?

    - by mre
    I want to set text above and below a JButton's icon. At the moment, in order to achieve this, I override the layout manager and use three JLabel instances (i.e. 2 for text and 1 for the icon). But this seems like a dirty solution. Is there a more direct way of doing this? Note -I'm not looking for a multi-line solution, I'm looking for a multi-label solution. Although this article refers to it as a multi-line solution, it actually seems to refer to a multi-label solution. EXAMPLE import java.awt.Component; import java.awt.FlowLayout; import javax.swing.BoxLayout; import javax.swing.Icon; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.SwingUtilities; import javax.swing.UIManager; public final class JButtonDemo { public static void main(String[] args) { SwingUtilities.invokeLater(new Runnable(){ @Override public void run() { createAndShowGUI(); } }); } private static void createAndShowGUI(){ final JFrame frame = new JFrame(); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setLayout(new FlowLayout()); frame.add(new JMultiLabelButton()); frame.pack(); frame.setLocationRelativeTo(null); frame.setVisible(true); } private static final class JMultiLabelButton extends JButton { private static final long serialVersionUID = 7650993517602360268L; public JMultiLabelButton() { super(); setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); add(new JCenterLabel("Top Label")); add(new JCenterLabel(UIManager.getIcon("OptionPane.informationIcon"))); add(new JCenterLabel("Bottom Label")); } } private static final class JCenterLabel extends JLabel { private static final long serialVersionUID = 5502066664726732298L; public JCenterLabel(final String s) { super(s); setAlignmentX(Component.CENTER_ALIGNMENT); } public JCenterLabel(final Icon i) { super(i); setAlignmentX(Component.CENTER_ALIGNMENT); } } }

    Read the article

< Previous Page | 77 78 79 80 81 82 83 84 85 86 87 88  | Next Page >