Search Results

Search found 43178 results on 1728 pages for 'remove method'.

Page 42/1728 | < Previous Page | 38 39 40 41 42 43 44 45 46 47 48 49  | Next Page >

  • Alternate method to dependent, nested if statements to check multiple states

    - by octopusgrabbus
    Is there an easier way to process multiple true/false states than using nested if statements? I think there is, and it would be to create a sequence of states, and then use a function like when to determine if all states were true, and drop out if not. I am asking the question to make sure there is not a preferred Clojure way to do this. Here is the background of my problem: I have an application that depends on quite a few input files. The application depends on .csv data reports; column headers for each report (.csv files also), so each sequence in the sequence of sequences can be zipped together with its columns for the purposes of creating a smaller sequence; and column files for output data. I use the following functions to find out if a file is present: (defn kind [filename] (let [f (File. filename)] (cond (.isFile f) "file" (.isDirectory f) "directory" (.exists f) "other" :else "(cannot be found)" ))) (defn look-for [filename expected-type] (let [find-status (kind-stat filename expected-type)] find-status)) And here are the first few lines of a multiple if which looks ugly and is hard to maintain: (defn extract-re-values "Plain old-fashioned sub-routine to process real-estate values / 3rd Q re bills extract." [opts] (if (= (utl/look-for (:ifm1 opts) "f") 0) ; got re columns? (if (= (utl/look-for (:ifn1 opts) "f") 0) ; got re data? (if (= (utl/look-for (:ifm3 opts) "f") 0) ; got re values output columns? (if (= (utl/look-for (:ifm4 opts) "f") 0) ; got re_mixed_use_ratio columns? (let [re-in-col-nams (first (utl/fetch-csv-data (:ifm1 opts))) re-in-data (utl/fetch-csv-data (:ifn1 opts)) re-val-cols-out (first (utl/fetch-csv-data (:ifm3 opts))) mu-val-cols-out (first (utl/fetch-csv-data (:ifm4 opts))) chk-results (utl/chk-seq-len re-in-col-nams (first re-in-data) re-rec-count)] I am not looking for a discussion of the best way, but what is in Clojure that facilitates solving a problem like this.

    Read the article

  • remove default.aspx from a request

    - by b0x0rz
    i am trying to remove default.aspx from any request that might have it. protected void Application_BeginRequest(object sender, EventArgs e) { HttpContext context = HttpContext.Current; string url = context.Request.Url.ToString(); // remove default.aspx if (url.EndsWith("/default.aspx", StringComparison.OrdinalIgnoreCase)) { url = url.Substring(0, url.Length - 12); } context.Response.Redirect(url); } gives an error: **too many redirects occurred trying to open...** what can i change to make it work? thnx

    Read the article

  • Exchange Server Contact Categories - How to Remove/Update All

    - by ben
    I've been tasked with cleaning up our companies contact database sitting on our Exchange Server 2003. The rub is this database of contacts has been neglected for the past couple of years and is now a bit messy. My issue is I have say a person named 'Bob Smith', and Bob is listed in multiple categories, 'Students' and 'Student'. I would really like to remove the 'Student' category from Bob and anyone else out there that has the same category. My question is, is there an easy way to edit the master category lists for contacts on the exchange server? I feel like I am missing something simple here since if I were playing with the categories that I use, to say organize email its very easy to do so, but I can't seem to find the proper way to do it for categories that are up on the server. I'm attempting to work through Outlook 2007 and Exchange 2003. Any insight would be very helpful as I really don't want to change 8000+ contacts by hand.

    Read the article

  • Remove HTML entities

    - by Sreelal
    Hi, I am developing an application for iPhone.I need to remove html entities like ["<p>"] in a parsed xml response.Is there any direct way to remove all such entities.??

    Read the article

  • Remove Live ID authentication from user account

    - by slugster
    I've just run in to a really annoying issue with Windows 8.1 - it seems I cannot remove the need to use Live ID credentials from an account without completely deleting that account. I know the process to do it - use the Disconnect link from the Accounts-Your account screen. The trouble comes when you get to the Switch to a local account screen, it will not let you enter the current account for the user name, instead you must enter a new one thus creating a new user account. Can I revert back to using just a local login without having to recreate the account? It seems quite retarded that I have to recreate the account, as deep down the only change required is which credential provider is used to authenticate the login. (Note that this Live ID linkage was created by using the Windows Store, not as a result of an upgrade from 8 to 8.1).

    Read the article

  • Execute method with Action<T> argument using Reflection

    - by JGr
    How can i create a Action method to use as a argument to the following function? public void When(Action<T> action) { if (internalValue != null) action(internalValue); } I have the MethodInfo on the method, and the parameter type like so: var methods = value.GetType().GetMethods(); MethodInfo mInfo = methods.First(method => method.Name == "When"); Type parameterType = (mInfo.GetParameters()[0]).ParameterType; But after that i have no idea how to make the actual Action method to pass as argument, i also do not know how to define the Action method body.

    Read the article

  • Remove server from loadbalancer [on hold]

    - by Cris
    Our datacenter is load balancing the traffic to our weblogic servers based on an application deployed on each server called probe.ear It is a simple java app which is accessed by the loadbalancer and if it accessible it will redirect traffic to this server as well. When we want to remove one node from the loadbalancer we just stop the probe app and new traffic is not redirected to it BUT I am asking myself what about the current requests? The responses for the current requests are executed (completed). I did not had time to test (will do that first thing when go back to work) but on theoretical level for me it make sense to do so unless the loadbalancer has some special settings. Does my reasoning make sense to you? Just to make it clear since it was reported the question is not clear. Is there a way to configure a load balancer in a way that from a specific moment will not redirect traffic to a certain server without reseting the current requests ?

    Read the article

  • Useful Extension Method for ICloneable

    - by DesigningCode
    In the past, I’ve had to put a type specific clone in each cloneable class, but with extension methods you can write a generic T specific clone class Program { static void Main(string[] args) { var b = new Blah() {X = 1, Y = 2}; var bb = b.Clone(); Console.WriteLine(string.Format("{0} {1}", bb.X, bb.Y)); } } public class Blah : ICloneable { public int X; public int Y; object ICloneable.Clone() { return MemberwiseClone(); } } public static class CloneExtension { public static T Clone<T>(this T o) where T : ICloneable { return (T)o.Clone(); } }

    Read the article

  • How can we remove specific string from string ?

    - by Harikrishna
    I will have a different type of string(string will not have fixed format,they will be different every time) from them I want to remove some specific substring.Like the string can be FUTIDX 26FEB2009 NIFTY 0 FUTSTK ONGC 27 Mar 2008 FUTIDX MINIFTY 30 Jul 2009 FUTIDX NIFTY 27 Aug 2009 NIFTY FUT XP: 29/05/2008 Now I want to Remove the string which starts with FUT how can I do that ?

    Read the article

  • How to remove uninstalled programs from Notification Area

    - by ekaj
    For some reason I had 2 instances of Apache running, and I have no idea how. I also had two instances of ApacheMonitor.exe showing in the "Notification Area Icons" place when you right click on your taskbar and go to properties. To fix the multiple instance issue, I deleted Apache completely and uninstalled the service (I did not use the .msi, I install from a .zip). Anyways, Everything from Apache is gone except the two things in the Notification Area Icon page. Does anyone know how to remove these two icons? I have completely uninstalled Apache, cleaned my registry with CCleaner, and rebooted. Does anyone have any other suggestions? Despite what the picture says, I do NOT have Apache installed, and it is not running.

    Read the article

  • Inspiring the method of teaching. Example- C++ :)

    - by Ashwin
    A year ago I graduated with a degree in Computer Science and Engineering. Considering C++ as the first choice of programming language I have been in the process of learning C++ in many ways. At first - five years back - I had many conceptions, most of which were so abstract to me. It started when I knew almost everything about Structs in C and nothing about Classes in C++. I went through a great time experimenting them all and learning a lot. I had a hard time evaluating Procedural programming vs Object-Oriented Programming. Deciding when to choose Procedural or Object-Oriented Programming took a great deal of patience for me. I knew that I cannot underestimate any of these Programming styles... Though Procedural programming is often a better choice than simple sequential unstructured programming, when solving problems with procedural programming, we usually divide one problem into several steps in order regarded as functions. Then we call these functions one by one to get the result of the problem. When solving problems with Object Oriented Priciples we divide one problem into several classes and form the interaction between them. Evaluating these two at the beginning (as a learner) required a lot of inspiration and thoughts. Instructing to think step by step. Relative concepts to understand deeply. Intensive interests to contrast both solving in both POP and OOP. If you were ever a mentor: What ideas/methods would you teach to students in which it will Inspire them to learn a programming language (in general, computer sciences)?

    Read the article

  • OOP private method parameters coding style

    - by Jake
    After coding for many years as a solo programmer, I have come to feel that most of the time there are many benefits to write private member functions with all of the used member variables included in the parameter list, especially development stage. This allow me to check at one look what member variables are used and also allow me to supply other values for tests and debugging. Also, a change in code by removing a particular member variable can break many functions. In this case however, the private function remains isolated am I can still call it using other values without fixing the function. Is this a bad idea afterall, especially in a team environment? Is it like redundant or confusing, or are there better ways?

    Read the article

  • Compare Two NameValueCollections Extension Method

    - by Jon Canning
    public static class NameValueCollectionExtension     {         public static bool CollectionEquals(this NameValueCollection nameValueCollection1, NameValueCollection nameValueCollection2)         {             return nameValueCollection1.ToKeyValue().SequenceEqual(nameValueCollection2.ToKeyValue());         }         private static IEnumerable<object> ToKeyValue(this NameValueCollection nameValueCollection)         {             return nameValueCollection.AllKeys.OrderBy(x => x).Select(x => new {Key = x, Value = nameValueCollection[x]});         }     }

    Read the article

  • Guaranteed Restore Points as Fallback Method

    - by Mike Dietrich
    Thanks to the great audience yesterday in the Upgrade & Migration Workshop in Utrecht. That was really fun and I was amazed by our new facilities (and the  "wellness" lights surrounding the plenum room's walls). And another reason why I like to do these workshops is that often I learn new things from you So credits here to Rick van  Ek who has highlighted the following topic to me. Yesterday (and in some previous workshops) I did mention during the discussion about Fallback Strategies that you'll have to switch on Flashback Database beforehand to create a guaranteed restore point in case you'll encounter an issue during the database upgrade. I knew that we've made it possible since Oracle Database 11.2 to switch Flashback Database on without taking the database into MOUNT status (you could switch it off anyway while the database is open before in all releases). But before Oracle Database 11.2 that did require MOUNT status. SQL> create restore point rp1 guarantee flashback database ; create restore point rp1 guarantee flashback database * ERROR at line 1: ORA-38784: Cannot create restore point 'RP1'. ORA-38787: Creating the first guaranteed restore point requires mount mode when flashback database is off. But Rick did mention that I won't need to switch Flashback Database On to create a guaranteed restore point. And he's right - in older releases I would have had to go into MOUNT state to define the restore point which meant to restart the database. But in 11.2 that's no necessary anymore. And the same will apply when you upgrade your pre-11.2 database (e.g. an Oracle Database 10.2.0.4) to Oracle Database 11.2. As soon as you start your "old" not-yet-upgraded database in your 11.2 environment with STARTUP UPGRADE you can define a guaranteed restore point. If you tail the alert.log you'll see that the database will start the RVWR (Recovery Writer) background process - you'll just have to make sure that you'd define the values for db_recovery_file_dest_size and db_recovery_file_dest. SQL> startup upgrade ORACLE instance started. Total System Global Area  417546240 bytes Fixed Size                  2228944 bytes Variable Size             134221104 bytes Database Buffers          272629760 bytes Redo Buffers                8466432 bytes Database mounted. Database opened. SQL> create restore point grpt guarantee flashback database; Restore point created.SQL> drop restore point grpt; And don't forget to drop that restore point the sooner or later as it is guaranteed - and will fill up your Fast Recovery Area pretty quickly Just on the side: in any case archivelog mode is required if you'd like to work with restore points. - Mike

    Read the article

  • How to remove the dlinksearch browser search hijack

    - by Bish
    Hi Gang, For the last few weeks all the machines on my home network are having the same problem whilst browsing the internet. When the user enters an invalid URL in the browser address bar, instead of the default browser behaviour, the request is sent to http://www1.dlinksearch.com/. As far as I can tell this is all machines and all browsers. It is so consistent I am wondering whether it has anything to do with our router. We use a DLink DIR-655 router so maybe the clue is in the name :) Anyhow, I cannot figure out how to disable/remove the offending behaviour. I've checked hosts files, spyware, AV etc. etc. Anybody have any ideas? Paul P.S. Apologies if this is not the right place to ask this type of question. I'm a bit stuck

    Read the article

  • Connected to internet but can't browse after trying to remove Covenant Eyes

    - by Joanna
    I recently got a MacBook Pro. It connects to ethernet\wifi and has internet but when I open Safari or Firefox, nothing happens. I get a timeout for all websites. I had Covenant Eyes on my Mac before and tried to remove it. My friends who work with computers have tried everything (ping, nslookup etc). Network diagnostics show no problems I can see I'm connected through ifconfig because I get an IP. I also get a response pinging www.google.gr. There are no proxies set in my Network preferences. Any ideas?

    Read the article

  • How to remove $data stream from file in windows 8

    - by chris.w.mclean
    Windows for a while now has added an additional hidden stream to files that were downloaded from the internet. If you attempted to use these files, you'd get all kinds of odd behavior as windows was detecting this additional stream and then preventing the app / exe from getting all sorts of security clearance. But in previous versions of windows you could right click on a file, go to properties then click 'Unblock' which removed the extra stream. Windows 8 seems to be doing the additional streams trick, but I haven't yet found a way to remove them using the win 8 UI. Anyone know how to do this?

    Read the article

  • SharePoint 2010 User Profile Sync - Remove Disabled Users

    - by ScaleOvenStove
    I have SharePoint 2010 set up to sync active directory users and it is working great. I am getting disabled users in the sync though. I have tried what all the blogs say, filter on userAccountControl bit on equals 2 but to no avail, the disabled users are still syncing. I am at a loss on where to look next. My last resort would be to create a ou/folder in AD and move disabled users there and remove that from the sync connector, but I don't really want to go there. Any ideas?

    Read the article

  • Problem in calling a method recursively in nodejs mongodb [closed]

    - by Nilesh
    I am trying to create a tree using nodejs and mongodb.Wanted to show a path of a particulr node from the root.So I am finding the destination path and looping back to its parent iteratively until the root.So this is the snippet I am using which results in infinite looping articleProvider.finditsparent(t,function(error,tap){ if(tap[0].parent=='null') { t=(tap[0].parent); console.log(n); } else { n.push(tap[0].parent); console.log(tap[0].parent); t=(tap[0].parent); res.send(n); } }); res.send(n); }); How should I get rid of this problem?Is there any way to call it recursively?

    Read the article

  • Private Cloud: Putting some method behind the madness

    - by Sudip Datta
    Finally, I decided to join the blogging community. And what could be a better time to start than the week after OpenWorld 2012. 50K+ attendees, demonstrations, speaker sessions and a whole lot of buzz on Oracle Cloud..It was raining clouds in this year's Openworld. I am not here to write about Oracle's cloud strategy in general, but on Enterprise Manager's cloud management capabilities. This year's Openworld was the first after we announced the 12c Cloud Control and we were happy to share the stage with quite a few early adopters. Stay tuned for videos from our customers and partners, I will post them as they get published. I met a number of platform administrators in Oracle-DBAs, Middleware Admins, SOA Admins...The cloud has affected them all, at least to the point where it beckoned more than just curiosity..Most IT infrastructure are already heavily virtualized (on VMWare and on others including Oracle VM), and some would claim they are already on “cloud” (at least their Sysadmins told them so). But none of them were confident of the benefits because their pain points continued to grow.. Isn't cloud supposed to ease those? Instead, they were chasing hundreds of databases running on hundreds of VMs, often with as much certainty propounded by Heisenberg. What happened to the age-old IT discipline around administration, compliance, configuration management? VMs are great for what they are. I personally think they have opened the doors to new approaches in which an application stack gets provisioned and updated. In fact, Enterprise Manager 12c is possibly the only tool out there that can provision full-fledged application as VM Assemblies. In this year's Openworld, customers talked on how they provisioned RAC and Siebel assemblies, which as the techies out there know, are not trivial (hearing provisioning time for Siebel down from weeks to hours was gratifying indeed). However, I do have an issue with a "one-size fits all" approach to cloud. In a week's span, I met several personas: Project owners requiring an EC2 like VM instance for their projects Admins needing the same for Sparc-Solaris. DBAs requiring dedicated databases for new projects APEX Developers needing just a ready-to-consume schema as a service Java Developers looking for a runtime platform QA engineers needing a fast clone of their production environment If you drill down further, you will end up peeling more layers of the details. For example, the requirements for Load testing and Functional testing are very different. For Load testing the test environment should ideally be the same as the production. You shouldn't run production on Exadata and load test on a VM; they will just not be good representations of one another. For Functional testing it does not possibly matter. DBAs seem to be at the worst affected of the lot. It seems they have been asked to choose between agile provisioning and  faster runtime performance. And in some cases, it is really a Hobson's choice, because their infrastructure provider made no distinction between the OLTP application and the Virtual desktop! Sad indeed. When one looks at the portfolio of services that we already offer (vanilla IaaS, VM Assembly based PaaS, DBaaS) or have announced (Java PaaS, Instant Cloning, Schema-aaS), one can possibly think that we are trying to be the "renaissance man" ! Well I would have possibly digested that had it not been for the various personas that I described above. Getting the use cases right is very important for an application such as cloud management. We iterate and iterate over these over and over again and re-validate them in CABs (Customer Advisory Boards). We consider over the major aspects of tenancy: service placement, resource isolation (can a tenant execute an expensive SQL and run away with all the resources), quota and security. We, in Engineering, keep reminding ourselves that we are dealing with enterprise clouds. We owe it to our customer base ! In the coming posts, I will drill down more into each of the services. In the meanwhile, here are some collateral and  demos for starters with EM 12c. http://www.oracle.com/technetwork/oem/cloud-mgmt/index.html Sudip Datta The views expressed here are my own and do not necessarily reflect the views of Oracle. Stay Connected: Twitter | Facebook | YouTube | Linkedin | Newsletter --

    Read the article

  • Application development : method to manage backgound process

    - by Simon Dubois
    I am developing an application with different behavior depending on the arguments : - "-config" starts a Gtk window to change options, start and close the daemon. - "-daemon" starts a background process that does something every X minutes. I already know how to use fork/system/exec etc... But I would like to know the main logic of such application to : - restart or refresh the daemon when configuration change. - keep only one instance of the daemon. I have red that killing the daemon to restart it is not a clean way to do. How other applications do ? (ubuntuone, weather forecast, rss feed working with notification area) Thanks for your help. PS : I don't want to create a system-wide daemon, just a user application with a background process.

    Read the article

< Previous Page | 38 39 40 41 42 43 44 45 46 47 48 49  | Next Page >