Search Results

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

Page 119/188 | < Previous Page | 115 116 117 118 119 120 121 122 123 124 125 126  | Next Page >

  • Is there any "modern" text editor with command-line?

    - by Pedro Morte Rolo
    A command line in a text editor is a wonderful feature. It allows the user to explore the editor's functionality and learn it's shortcuts in a textual way. It's much faster than using the mouse, and it is much easier to memorise "shortcuts" this way. Emacs and VI provide this, though, emacs and vi are not "modern". By "modern", I mean one that is original built to cope with the modern de-facto standards of selecting, copying, pasting, cutting, undoing, redoing and auto-completing. Cream/vi or EmacsCUE are not valid options, since there are loads of things built over them that conflict with the mentioned stuff. Is there any alternative? (I do not intend to use the "modern" term as derrogatory. I love both Emacs and VI, but I hate their keyboard shortcut baggage.) (please do not advertise Vim and Emacs, that's not answering the question. I am asking for alternatives)

    Read the article

  • Import Data from text file into sql DB using CSLA

    - by New Developer
    I am trying to import data from ~ Delimited Text file into SQL Server using CSLA. My text file has 92,000 records in it. Here are the issues i am having with the import When i create a BusinnessListBase .new and add all my records to it, it gives me a "Out of meory exception". So to fix it i create a new bussinessbase object and save it. this works fine and is much faster too. It takes 15 minutes I have to run my program again and check for any changes and hence update them, this is where it takes too much time. Is there any alternative way to speed up my import?

    Read the article

  • Javascript hasOwnProperty does not work under Google Chrome

    - by WebRookie
    I am currently working with some help and it has been going well, until this incident. function runCommand(commandString) { commands = new Object(); commands.clear = function(){ $('#terminal').html('') } parameters = commandString.split(" "); command = parameters.shift(); if( commands.hasOwnProperty(command)){ commandscommand; } else { $('#terminal').append(command+' command not recognized.'+''); } } The person who was helping me made this function, so I could run the "terminal-like" browsers that I needed to work on. It works fine when using Firefox, heres an example: guest@shell:/$ sudo make me sandwich sudo command not recognized. guest@shell:/$ clear *clears* guest@shell:/$ clear But under google chrome this happen: guest@shell:/$ sudo make me sandwich sudo command not recognized. guest@shell:/$ clear clear command not recognized. I believe that it has something to do with "commands.hasOwnProperty(command)" that is preventing it from working properly. I am using JQuery the javascript library to build the website, and I need to know how to solve this problem, or an alternative.

    Read the article

  • comments in svg path

    - by dr jerry
    I'm experimenting with jquery and svg, I make up my path but now I want to change that (based on some user input) I do something like var dpath = $('path').attr("d"); $('path').attr("d",dpath.replace("150 150", "450 450")); which works fine, but this not useful when my path grows, so I wonder is there a possibility to put a label or a comment in the path to serve as a replace hook? searching for svg path comments gives me all. I'm close to write my own "replaceble" pseudo svg path code, but is there an alternative possible in svg? regards, Jeroen.

    Read the article

  • How to extract img src, title and alt from html using php?

    - by Sam
    I would like to create a page where all images which reside on my website are listed with title and alternative representation. I already wrote me a little program to find and load all html files, but now I am stuck at how to extract src, title and alt from the html < img src="/image/fluffybunny.jpg" title="Harvey the bunny" alt="a cute little fluffy bunny"/ I guess this should be done with some regex, but since the order of the tags may vary, and I need all of them, I don't really know how to parse this in an elegant way (I could do it the hard char by char way, but thats painful).

    Read the article

  • What approaches are available to revert an IDirect3DDevice9 instance to its default render state?

    - by Rafael Goodman
    Given an instance of IDirect3DDevice9, what approaches are available to put it in its original render state (i.e. the state it was in when the device was initially created)? The cleanest way that I've come across is to create a state block via IDirect3DDevice9::CreateStateBlock just after the device has been created so that it can be applied later. Unfortunately, I'm operating under the constraints of an existing project such that I can't modify the device creation code; by the time my component gets the device, its default state has been modified. As a result, I'm looking for alternative approaches. Thx! ~Raf

    Read the article

  • Creating controls in ASP with dynamic IDs

    - by mattdell
    Hi, I'm creating a chat widget that will be dropped into CommunityServer. The widget works great, but I just discovered that if I drop two of these widgets onto the same page, only one of them works! And I'm quite certain the reason is because the chat window is defined in ASP, and now there are two instances of the chat window, with the same ID, on the same page. I am doing this with straight ASP & Javascript (not by choice), so my chat window is defined as: <telerik:RadListBox ID="rlbMessages" runat="server" > (don't mind that it's a telerik control). So I was hoping I could do something like this: <telerik:RadListBox ID="<%= 'rlbMessages' + chatRoomID %>" runat="server" > But from what I've gathered, apparently you can't assign ID's this way? What is the alternative?

    Read the article

  • mysql conditional query - complicated!

    - by emre
    i want to get distinct values for a field, let say: field1... ok this needs a query like: "select distint(field1) from table" however for some records, field1 is empty and there is another column that is an alternative to field1, which is field2. now; for the records where field1 is empty i need to use the value of field2. i think i need sort of a conditional select statement with if control something like: "select distinct( (if(field1!='') field1 else field2) ) from table" but i have no idea on how to write it. any help is appricated...

    Read the article

  • How can I leverage String constants in an XML file?

    - by jayshao
    I'd like to enforce standardized keys by storing them as static final String variables on a Java class, and either referencing or statically importing them, to use them as values in either XML, Strings, Methods, Annotations, etc. Does anyone know a good way to have Maven insert (like filtering) values like StringKeys.SOME_KEY into an XML file? e.g. something like <element value="${StringKeys.SOME_KEY}"/> or similar - the main idea is to enforce commonality and prevent key mis-alignment. Or an alternative solution to accomplish the same - with some semantic that if a non-existant String is referenced, that it fails during build? Bonus points if it works in C# as well.

    Read the article

  • MongoDB db.serverStatus() gives error when running using tunnel that is targetted to api.cloudfoundry.com

    - by Ajay
    Following is the console session... C:\Users\xxx>vmc tunnel myMongoDB Getting tunnel connection info: OK Service connection info: username : uuuu password : pppp name : db url : mongodb://uuuu:[email protected]:25200/db Starting tunnel to myMongoDB on port 10000. 1: none 2: mongo 3: mongodump 4: mongorestore Which client would you like to start?: 2 Launching 'mongo --host localhost --port 10000 -u uuuu -p pppp db' MongoDB shell version: 2.0.6 connecting to: localhost:10000/db > db.serverStatus() { "errmsg" : "need to login", "ok" : 0 } > Which credentials should I use to login (assuming should use db.auth) to get rid of the error "{ "errmsg" : "need to login", "ok" : 0 }". When I run the same in micro CF on my machine it works ok and gives me the expected output. P.S. I'm trying this to get to know the current connections on my application, written in node.js. Trying to debug some issues with connections to the DB. If there is any other alternative that I can use please suggest that as well.

    Read the article

  • Best datastructure for frequently queried list of objects

    - by panzerschreck
    Hello, I have a list of objects say, List. The Entity class has an equals method,on few attributes ( business rule ) to differentiate one Entity object from the other. The task that we usually carry out on this list is to remove all the duplicates something like this : List<Entity> noDuplicates = new ArrayList<Entity>(); for(Entity entity: lstEntities) { int indexOf = noDuplicates.indexOf(entity); if(indexOf >= 0 ) { noDuplicates.get(indexOf).merge(entity); } else { noDuplicates.add(entity); } } Now, the problem that I have been observing is that this part of the code, is slowing down considerably as soon as the list has objects more than 10000.I understand arraylist is doing a o(N) search. Is there a faster alternative, using HashMap is not an option, because the entity's uniqueness is built upon 4 of its attributes together, it would be tedious to put in the key itself into the map ? will sorted set help in faster querying ? Thanks

    Read the article

  • executing php cURL script for long time without changing php.ini settings

    - by Pragati Sureka
    Scenario I have a old blog on blogger that contains thousands of images and posts, i have already imported the posts from blogger to wordpress using their import service (which does not import images) now i want to write a php cURL script that will download all the images off my old blogger blog to wordpress. Problem I have already written a script that goes through all the posts and find the image links of blogger and download the links recursively and store them local to wordpress installation but the problem is that the script stops if its taking longer than max_execution_time which is generally set to 30 secs. Now i dont want to change setting in php.ini file. Is there some way that i can keep my script executing for that long or some other alternative.... like executing in batch or something else... Reason for not changing php.ini settings is that i want to release this script as opensource plugin for wordpress, and not many have access to their php.ini file on the server and and many don't like changing settings for just one script that might run just once. Thank You for helping....

    Read the article

  • Is there a way to attach Ruby Net::HTTP request to a specific IP address / network interface?

    - by Dan Sosedoff
    Hello, Im looking a way to use different IP addresses for each GET request with standard Net::HTTP library. Server has 5 ip addresses and assuming that some API`s are blocking access when request limit per IP is reached. So, only way to do it - use another server. I cant find anything about it in ruby docs. For example, curl allows you to attach it to specific ip address (in PHP): $req = curl_init($url) curl_setopt($req, CURLOPT_INTERFACE, 'ip.address.goes.here'; $result = curl_exec($req); Is there any way to do it with Net::HTTP library? As alternative - CURB (ruby curl binding). But it will be the latest thing i`ll try. Suggestions / Ideas?

    Read the article

  • Network message serialization for game

    - by George R
    Exit-games make a network library product called photon, and they have and actively develop a limited mmo demo. Rather than shooting off json or XML, etc. saying "MovePlayer" (with associated params), they nut that message down to a 2 digit int, via an enum - something like Operations.MovePlayer. There's no denying that a 2 digit int is smaller than a longer string, however I really hate the idea of statically burning each and every message into an enum. Would there be an alternative way to have a MessageID property assign itself a unique 2 digit int based on a lookup table or something? Has anyone dealt with this kind of thing before?

    Read the article

  • CSS3 text-shadow effect with jQuery

    - by Marco
    Hello, I wanted to be able to create a effect identical to CSS3 text-shadow Property, making it available to browsers that doesn’t support this CSS3 Property (like IE 7 and 8). And so I found two plugins: Text Shadow and Drop Shadow Effect. I decided to use Text Shadow, because it was released in the end of 2008, and because it was more straightforward. This worked great for IE8. However in IE7 shadows have twice the distance to the text, and links are weird. IE8 image IE7 image I am searching for a fix, or an alternative to this problem.

    Read the article

  • Dynamically load _gallery_ (not album) in SlideShowPro using SWFObject

    - by bccarlso
    Hi all. I have been successful in dynamically loading an album in SSP before, but using SSP Standalone. I did it like this: var flashvars = { xmlFilePath: "http://site.com/ssp_director/images.php?album=5" } What I'm looking to do now, though, is dynamically load a gallery when the page loads, using text entered in the javascript, or flashvars I'd assume. I'm using ActionScript 3 with this, so I'm not sure if I have to do something to the SSP instance in Flash. I'm not very good with AS3, so following advice or tutorials is about all I can muster. I'm also using SSP Director, so my gallery XML URLs would be similar to above in the example code. I'd be elated if this is possible, otherwise I will have to find an alternative solution. Thanks so much for help!

    Read the article

  • How to find links and modify an Html using BeautifulSoup in Python

    - by systempuntoout
    Starting from an Html input like this: <p> <a href="http://www.foo.com">this if foo</a> <a href="http://www.bar.com">this if bar</a> </p> using BeautifulSoup, i would like to change this Html in: <p> <a href="http://www.foo.com">this if foo[1]</a> <a href="http://www.bar.com">this if bar[2]</a> </p> saving parsed links in a dictionary with a result like this: links_dict = {"1":"http://www.foo.com","2":"http://www.bar.com"} Is it possible to do this using BeautifulSoup? Any valid alternative?

    Read the article

  • Design pattern to encapsulate common funtionality among UI controls

    - by Dan
    I'm brainstorming some ideas around a pattern to use for the following scenario. I have some 3rd party controls that I want to add common functionality to. Functionality is added by handling several of the the events and doing certain things when the events fire along with adding some private variables to hold some state info between events. I want to reuse the code and functionality so this is what I'd typically do. Create a class for this functionality and pass in the instance of the control that I want to add the functionality to in the constructor. Then I can add event handlers to the control in the instance of the class. Can anyone think of alternative patterns to use in order to create this kind of reusable functionality.

    Read the article

  • "Right" way to deallocate an std::vector object

    - by Jacob
    The first solution is: std::vector<int> *vec = new std::vector<int>; assert(vec != NULL); // ... delete vec; An alternative is: std::vector<int> v; //... vec.clear(); vec.swap(std::vector<int>(vec)); The second solution's a bit of a trick --- what's the "right" way to do it?

    Read the article

  • In SQL Server, can multiple inserts be replaced with a single insert that takes an XML parameter?

    - by Mayo
    So I have an existing ASP.NET solution that uses LINQ-to-SQL to insert data into SQL Server (5 tables, 110k records total). I had read in the past that XML could be passed as a parameter to SQL Server but my google searches turn up results that store the XML directly into a table. I would rather take that XML parameter and insert the nodes as records. Is this possible? How is it done (i.e. how is the XML parameter used to insert records in T-SQL, how should the XML be formatted)? Note: I'm researching other options like SQL bulk copy and I know that SSIS would be a good alternative. I want to know if this XML approach is feasible.

    Read the article

  • Using IPrinciple.Identity.Name as a key in a dataBase to identify user's rows.

    - by bplus
    I'm writing a small intranet app that uses Windows Authentication and Asp.Net MVC. I need to store various bits of data in a db against each user. As far as I can tell the IPrinciple object does not seem to have something like a unique id. So I was thinking I could just use User.Identity.Name as a unique value to identify rows in my db. Is this a bad idea? Is there an alternative to this approach? Thanks for any help.

    Read the article

  • How can i set isdigit() command as a variable?

    - by Nick
    I'm new to python but I caught on to the basics pretty quick and decided to start trying to make a program while I'm still learning, since I learn best by actually doing things. So I'm making a program in python that will add polynomials and I need to see if a character from the parser is numeric im using the isdigit() command. Instead of having to type isdigit() all the time in my code such as n.isdigit(), I want to assign it to a variable t = 'isdigit()' and then type n.t. This doesn't work, so is there an alternative to not typing the whole command?

    Read the article

  • Search pattern in string using regex in obj-c

    - by manileo86
    I'm working on a string pattern match algorithm. I use NSRegularExpression for finding the matches. For ex: I've to find all words starting with '#' in a string.. Currently I use the following regex function: static NSRegularExpression *_searchTagRegularExpression; static inline NSRegularExpression * SearchTagRegularExpression() { if (!_searchTagRegularExpression) { _searchTagRegularExpression = [[NSRegularExpression alloc] initWithPattern:@"(?<!\\w)#([\\w\\._-]+)? options:NSRegularExpressionCaseInsensitive error:nil]; } return _searchTagRegularExpression; } and I use it as below: NSRegularExpression *regexp = SearchTagRegularExpression(); [regexp enumerateMatchesInString:searchString options:0 range:stringRange usingBlock:^(NSTextCheckingResult *result, NSMatchingFlags flags, BOOL *stop) { // comes here for every match with range }]; This works properly. But i just want to know if this is the best way. suggest if there's any better alternative...

    Read the article

  • Rack URL Mapping

    - by Puru puru rin..
    Hi, I am trying to write two kind of Rack routes. Rack allow us to write such routes like so: app = Rack::URLMap.new('/test' => SimpleAdapter.new, '/files' => Rack::File.new('.')) In my case, I would like to handle those routes: "/" or "index" "/*" in order to match any other routes So I had trying this: app = Rack::URLMap.new('/index' => SimpleAdapter.new, '/' => Rack::File.new('./public')) This works well, but... I don't know how to add '/' path (as alternative of '/index' path). The path '/*' is not interpreted as a wildcard, according to my tests. Do you know how I could do? Thanks

    Read the article

  • php foreach as variable

    - by user167850
    I'd like to use foreach to loop though an array list and add an element to each array. $tom = array('aa','bb','cc'); $sally = array('xx','yy','zz'); $myArrays = array('tom','sally'); foreach($myArrays as $arrayName) { ${$arrayName}[] = 'newElement'; } Is the use of ${$arrayName}[] the best way to do this? Is there another option rather than using curly braces? It currently works but I'm just wondering if there is a better alternative. Thanks

    Read the article

< Previous Page | 115 116 117 118 119 120 121 122 123 124 125 126  | Next Page >