Search Results

Search found 1251 results on 51 pages for 'negative'.

Page 2/51 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • RegExp: want to find all links that do not end in ".html"

    - by grovel
    Hi, I'm a relative novice to regular expressions (although I've used them many times successfully). I want to find all links in a document that do not end in ".html" The regular expression I came up with is: href=\"([^"]*)(?<!html)\" In Notepad++, my editor, href=\"([^"]*)\" finds all the links (both those that end in "html" and those that do not). Why doesn't negative lookbehind work? I've also tried lookahead: href=\"[^"]*(?!html\") but that didn't work either. Can anybody help? Cheers, grovel

    Read the article

  • Converting Negative Decimal To String Loses the -

    - by coffeeaddict
    I'm required to send in a negative myDecimalValue.ToString("C"); The problem is if myDecimalValue is a negative, lets say -39, after conversion I'm getting $39.00 as the string not $39.00. So I'm not sure how to go about this. This is the utility method that takes in the decimal. If the decimal is negative, I want the ToString to show a negative public static BasicAmountType CreateBasicAmount(string amount, CurrencyCodeType currencyType) { BasicAmountType basicAmount = new BasicAmountType { currencyID = currencyType, Value = amount }; return basicAmount; } I could go either way, a C or F2, all I care is about getting that negative sign intothe string if the incoming decimal is negative. I suppose there's no way to do this unless I check for negativity inside my utility method here. I can't just send a negative number and expect the ToString to work and for the ToSTring to automatically see that the decimal is negative incoming?

    Read the article

  • Value of links on negative review pages

    - by Sam Healey
    A general assumption with SEO is more links = higher rankings. What I would like to know is does Google know what those links are referring to. I.e. if somebody gives a product a good review on their personal blog and links the review to another companies website (who are selling the product), would Google take consideration for the review/description link. Essentially would Google know that this link refers to a product. So if somebody is looking to buy a product, Google would know to include this page because the previous link said it sells products rather than just having information on products. Then to take this further, does Google know if a link is positive or negative. For example, If somebody creates a post saying, do not visit example.com, example.com is bad because of blah blah blah. Would Google know that the link is getting bad feedback and therefore would it have a negative affect on rankings, or would Google go oh its just another link and give it better rankings?

    Read the article

  • Data structure for grid with negative indeces

    - by The Secret Imbecile
    Sorry if this is an insultingly obvious concept, but it's something I haven't done before and I've been unable to find any material discussing the best way to approach it. I'm wondering what's the best data structure for holding a 2D grid of unknown size. The grid has integer coordinates (x,y), and will have negative indices in both directions. So, what is the best way to hold this grid? I'm programming in c# currently, so I can't have negative array indices. My initial thought was to have class with 4 separate arrays for (+x,+y),(+x,-y),(-x,+y), and (-x,-y). This seems to be a valid way to implement the grid, but it does seem like I'm over-engineering the solution, and array resizing will be a headache. Another idea was to keep track of the center-point of the array and set that as the topological (0,0), however I would have the issue of having to do a shift to every element of the grid when repeatedly adding to the top-left of the grid, which would be similar to grid resizing though in all likelihood more frequent. Thoughts?

    Read the article

  • Lubuntu: Sceen looks like in negative all the time

    - by Piotr
    I've just installed Lubuntu 12.10 on an old laptop (IBM ThinkPad 600X). However, after booting Lubuntu, everything looks like in negative (eg. colors are inverted, like there's some assistive technology enabled). During installation (using alternative installer), colors were OK. Before installing Lubuntu, I had windows installed, it was showing colors OK as well. So, I believe it's something with Lubuntu. Is there any way I can fix that?

    Read the article

  • Checking negative of a condition

    - by oym
    What is the (slightly pejorative) term for checking the negative of a condition (rather than the positive which is often more readable): e.g. if(!someVar) { return null; } else { return doSomethingInteresting(); } instead of doing this (which is arguably more readable) if(someVar) { return doSomethingInteresting(); } else { return null; } I vaguely remember there being a term for this; something in the same spirit as the term Yoda conditions.

    Read the article

  • CSS practices: negative positioning

    - by Corey
    I'm somewhat of a novice to CSS. Anyway, I noticed that an extremely common method used in CSS is to have negative or off-screen positioning, whether it be to hide text or preload images or what have you. Even on SE sites, like StackOverflow and this website, have #hlogo a { text-indent: -999999em } set in their CSS. So I guess I have a few questions. is this valid CSS? or is it just a "hack"? are there downsides to doing things this way? why is this so common? aren't there better ways to hide content?

    Read the article

  • Negative downtime, 200% uptime reported by uprecords/uptimed

    - by Psychoholic
    I'm curious as to how I could have negative downtime that keeps increasing, as well as uptime beyond 100%. I'm getting the below output from uprecords -adM: # Uptime | System Boot up ----------------------------+--------------------------------------------------- -> 1 14 days, 21:12:15 | Linux 3.2.0-29-generic Tue Aug 21 21:02:27 2012 2 14 days, 15:31:05 | Linux 3.2.0-29-generic Tue Aug 21 21:03:33 2012 ----------------------------+--------------------------------------------------- NewRec 0 days, 05:41:09 | since Wed Sep 5 12:33:32 2012 mst in 10 days, 02:40:18 | twenty-five days Sat Sep 15 21:02:26 2012 up 29 days, 12:43:20 | since Tue Aug 21 21:02:27 2012 down -14 days, -21:-11: | since Tue Aug 21 21:02:27 2012 %up 201.607 | since Tue Aug 21 21:02:27 2012 I installed uptimed sometime in the last week, have not rebooted, and just yesterday did I notice this odd behavior. I'm running Ubuntu 12.04.1, hosted in Hyper-V on Windows Server 2008 R2 64bit. Any insight would be appreciated.

    Read the article

  • Java chunk negative number problem

    - by user1990950
    I've got a tile based map, which is divided in chunks. I got a method, which puts tiles in this map and with positive numbers it's working. But when using negative numbers it wont work. This is my setTile method: public static void setTile(int x, int y, Tile tile) { int chunkX = x / Chunk.CHUNK_SIZE, chunkY = y / Chunk.CHUNK_SIZE; IntPair intPair = new IntPair(chunkX, chunkY); world.put(intPair, new Chunk(chunkX, chunkY)); world.get(intPair).setTile(x - chunkX * Chunk.CHUNK_SIZE, y - chunkY * Chunk.CHUNK_SIZE, tile); } This is the setTile method in the chunk class (CHUNK_SIZE is a constant with the value 64): public void setTile(int x, int y, Tile t) { if (x >= 0 && x < CHUNK_SIZE && y >= 0 && y < CHUNK_SIZE) tiles[x][y] = t; } What's wrong with my code?

    Read the article

  • Shortest acyclic path on directed cyclic graph with negative weights/cycles

    - by Janathan
    I have a directed graph which has cycles. All edges are weighted, and the weights can be negative. There can be negative cycles. I want to find a path from s to t, which minimizes the total weight on the path. Sure, it can go to negative infinity when negative cycles exist. But what if I disallow cycles in the path (not in the original graph)? That is, once the path leaves a node, it can not enter the node again. This surely avoids the negative infinity problem, but surprisingly no known algorithm is found by a search on Google. The closest is Floyd–Warshall algorithm, but it does not allow negative cycles. Thanks a lot in advance. Edit: I may have generalized my original problem too much. Indeed, I am given a cyclic directed graph with nonnegative edge weights. But in addition, each node has a positive reward too. I want to find a simple path which minimizes (sum of edge weights on the path) - (sum of node rewards covered by the path). This can be surely converted to the question that I posted, but some structure is lost. And some hint from submodular analysis suggests this motivating problem is not NP-hard. Thanks a lot

    Read the article

  • TFS Rant *WARNING* negative opinions are being expressed.

    - by ryanabr
    It has happened several times now where I end up installing TFS "over the shoulder" of the system admin guy whose job it will be to "own" the server when I am gone. TFS is challenging enough to stand up when doing it myself on a completely open platform, but at these locations, networks are locked down, machines are locked down, and the unexpected always seems to pop up. I personally have the tolerance for these things as a software developer, but as we are installing I have to listen to all of 'colorful' remarks being made about: "why is it like this" or "this is a piece of crap". Generally the issues center around SharePoint integration. TFS on it's own is straightforward, but the last flavor in everyone's mouth is the SharePoint piece. As a product I like SharePoint, but installation is a nightmare. In this particular case, we are going to use WSS since the customer would like this separate from their corp SharePoint 2010 installations since there dev team is really small (1 developer) and it is being used as a VSS replacement, more than a full blown ALM tool. The server where it is being installed as a Cisco Security Agent on it that seems to block 'suspicious' activity, and as far as I can tell is preventing WSS from installing properly. The most confounding thing we can find no meaningful log entries to help diagnose the issue. it didn't help matters that when we tried to contact Microsoft for support, because we mentioned TFS in the list of things that we were trying to install, that after waiting 2 hours that we got a TFS support person NOT the SharePoint person that we really needed, so after another 2 hours the SharePoint support that we did get managed to corrupt the registry sufficiently with his 'tools' that we ended up starting over from scratch the next day anyway after going home at midnight. My point to this is: The System Administrator who is going to own this, now thinks it is a piece of crap because SharePoint wouldn't install properly. Perception is everything.  Everyone today is conditioned that software installs and works in a very simple matter. When looking at the different options to install TFS with the different "modes" there is inconsistency in the information being presented which leads to choices that causes headaches and this bad perception before the product is even installed. I am highlighting this because I love TFS as a product, but I HATE installing it, and would like it to install as simply and elegantly as the product operates once it is installed.

    Read the article

  • problem with template: negative margins on float

    - by Fuxi
    hi, i'm having a very strange problem with the wordpress template. i'd like to place 2 divs besides each other like this: <div style='float:left;'> left div </div> <div style='float:right'> right div </div> normally this works as it should - both divs should stick directly to each other - but something in the style.css (which uses css reset) causes the right div to overlap the left div with ~ 5pixels. i searched the whole .css for it but couldn't find out :(( it's just a fact that it must be something with the default css. anyone knows what is causing this - some fix? thanks

    Read the article

  • How to combat negative SEO?

    - by Perturbed
    Someone has decided to create a hate blog on a hosted blogging service (wordpress.com) that bashes my company. The blog contains posts that completely flame myself, my service, and contains complete falsehoods about how I run my business. Without going into details, I'm pretty sure the author of this blog is an owner of a competing service (although it is authored completely anonymously). Frankly, I'm not sure if the content would qualify for defamation or not, but I really don't like the idea of spending money on a lawyer to even attempt to prove this. I also have no interest in retorting or even replying to the blog in any sort of way -- I feel this would justify the ludicrous claims that have been posted. Unfortunately, whoever wrote the blog was pretty smart about using key words that people commonly use to search for my service. Because my customer base is relatively small and local, our PageRank is not incredibly high. As a result, when someone Google's our business name, this blog is usually within the top five results (thankfully, it's never above the business' actual website, but it's usually within eyeshot). It's incredibly frustrating to hear from customers who have seen the link (luckily, most of the time they think the author is crazy). Is there anything I can do to combat this? Would it be worthwhile to setup my own hosted wordpress.com branded blog, in an effort to trump this wordpress.com with a blog that is more active of my own? TL;DR: Someone made a hate blog using wordpress.com and is now on the first page of my business' search results. What are my options?

    Read the article

  • problem with template: negative margins on float

    - by Fuxi
    i'm having a very strange problem with the wordpress template. i'd like to place 2 divs besides each other like this: <div style='float:left;'> left div </div> <div style='float:right'> right div </div> normally this works as it should - both divs should stick directly to each other - but something in the style.css (which uses css reset) causes the right div to overlap the left div with ~ 5pixels. i searched the whole .css for it but couldn't find out :(( it's just a fact that it must be something with the default css. anyone knows what is causing this - some fix? thanks

    Read the article

  • How to split a string with negative numbers using ActionScript 3.0

    - by inzombiak
    I'm having trouble loading my level. I'm using Ogmo to create my level then I import it. I have no problem converting 0's and 1's into an Array, but I can't figure out how to do the same for -1's. It separates the "-" and the "1". Any help would be great. I've posted my code and the XML files below levelXML = new XML(e.target.data); playerX = int(levelXML.Entities.Player.@x); playerY = int(levelXML.Entities.Player.@y); levelGrid = levelXML.Grid; levelGrid = levelGrid.split("\n").join(""); levelTiles = levelXML.Tiles; levelTiles = levelTiles.split("\n").join(""); levelTiles = levelTiles.split(",").join(""); tileArray = levelTiles.split(""); gridArray = levelGrid.split(""); for(i = 0; i <= 34; i++) { levelArray[i] = new Array(); for(j = 0; j <= 34; j++) { if(tileArray[j*35 + i] == 0) { gridArray[j*35+i] = -1; } var currentSymbol = gridArray[j*35+i]; levelArray[i][j] = currentSymbol; if(gridArray[j*35 + i] == 1) { wall = new Wall; addChild(wall); wall.x = i*20 + 10; wall.y = j*20 + 10; } else if(gridArray[j*35 + i] == -1) { pellet = new Pellet; addChild(pellet); pellet.x = i*20 + 10; pellet.y = j*20 + 10; } } } I know the code is very dirty, but I needed a quick fix. Grid exportMode="Bitstring" 11111111111111111111111111111111111 10000000000000000011000000000000001 10000000000000000011000000000000001 10011111001111110011001111110011001 10011111001111110011001111110011001 10011111001111110011001111110011001 10000000000000000000000000000000001 10000000000000000000000000000000001 10011111001100111111100110011111001 10011111001100000100000110011111001 10000000001100000100000110000000001 10000000001111100100111110000000001 11111111001111100100111110011111111 00000001001111100100111110010000000 00000001001100000000000110010000000 11111111001100000000000110011111111 00000000000000111111100000000000000 00000000000000100000100000000000000 11111111001100100000100110011111111 00000001001100111111100110010000000 00000001001100000000000110010000000 11111111001100111111100110011111111 10000000000000000100000000000000001 10000000000000000100000000000000001 10011111001111100100111110011111001 10000011000000000000000000011000001 10000011000000000000000000011000001 11110011001100111111100110011001111 11110011001100111111100110011001111 10000000001100000100000110000000001 10000000001100000100000110000000001 10011111111111100100111111111111001 10000000000000000000000000000000001 10000000000000000000000000000000001 11111111111111111111111111111111111 Tiles tileset="Tiles" exportMode="CSV"-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-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,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,0,-1 -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,0,-1 -1,-1,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1 -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1

    Read the article

  • how to avoid getting negative points from google adsense

    - by Napster
    I have news based website, in which primary contents include news,image albums and videos. out of these i have copy rights for images and videos are just youtube embedded videos. Coming to news my site is kind of a mashup. It gathers data from various sites and presents them in more user friendly way for quick digestion and access. My problem here is that since the news part of the site can be found from other sites, my site could suffer in search rankings. Is there any solution to this. One thing I thought of is to put disallow on all the news ariticles pages, so google does not crawl them. Will this be helpful to me. When applying to google adsense does google crawl these pages (disallow) also.

    Read the article

  • check_snmp warning & critical thresholds with negative values

    - by Oesor
    I'm querying some signal level values measured in dBm, and the SNMP host on the remove device reports the values as negative values, ie, -90 dBm. However, check-snmp seems to be incapable of dealing with negative numbers as part of its threshold values. If I specify the values as part of a collection of OIDs, it accepts the syntax but converts the snmp value to positive, thus always generating a WARNING/CRITICAL result: root@ops-00:/usr/local/nagios/libexec# ./check_snmp -H 192.168.1.100 -o DEVICE-MIB::AverageReceiveSNR.0,DEVICE-MIB::CurrentNoiseFloor.0 -w 10:,~:-85 -c 15:,~:-80 -vvvv /usr/bin/snmpget -t 1 -r 5 -m ALL -v 1 [authpriv] 192.168.1.100:161 DEVICE-MIB::AverageReceiveSNR.0 DEVICE-MIB::CurrentNoiseFloor.0 DEVICE-MIB::AverageReceiveSNR.0 = INTEGER: 25 DEVICE-MIB::CurrentNoiseFloor.0 = INTEGER: -97 Processing line 1 oidname: DEVICE-MIB::AverageReceiveSNR.0 response: = INTEGER: 25 Processing line 2 oidname: DEVICE-MIB::CurrentNoiseFloor.0 response: = INTEGER: -97 SNMP CRITICAL - 25 *97* | DEVICE-MIB::AverageReceiveSNR.0=25 DEVICE-MIB::CurrentNoiseFloor.0=97 If I run it with a single OID, it gives me an error that the format is incorrect: root@ops-00:/usr/local/nagios/libexec# ./check_snmp -H 192.168.1.100 -o DEVICE-MIB::CurrentNoiseFloor.0 -w ~:-85 -c ~:-80 -vvvv Range format incorrect And if I run it with no thresholds defined, it works properly and returns the right value. This makes the graphs correct, however it'll never generate a notification when out of range: root@ops-00:/usr/local/nagios/libexec# ./check_snmp -H 192.168.1.100 -o DEVICE-MIB::CurrentNoiseFloor.0 -vvvv /usr/bin/snmpget -t 1 -r 5 -m ALL -v 1 [authpriv] 192.168.1.100:161 DEVICE-MIB::CurrentNoiseFloor.0 DEVICE-MIB::CurrentNoiseFloor.0 = INTEGER: -97 Processing line 1 oidname: DEVICE-MIB::CurrentNoiseFloor.0 response: = INTEGER: -97 SNMP OK - -97 | DEVICE-MIB::CurrentNoiseFloor.0=-97 What am I doing wrong here? How would I, for example, generate a CRITICAL when the noise floor is -80 dBm or higher, a WARNING when it's -85 to -80 dBm, and an OK when -85 dBm or lower? Do I have to write my own SNMP plugins when dealing with negative values?

    Read the article

  • How to integer-divide round negative numbers *down*?

    - by Conrad Albrecht
    Seems like whenever I divide a negative int by a positive int, I need it to round down (toward -inf), not toward 0. But both C# and C++ round toward 0. So I guess I need a DivideDownward() method. I can write it in a few lines with a test for negative and so on, but my ideas seem klugey. So I'm wondering if I'm missing something and if you have an "elegant" way to round negative division downward.

    Read the article

  • Negative number representation across multiple architechture

    - by Donotalo
    I'm working with OKI 431 micro controller. It can communicate with PC with appropriate software installed. An EEPROM is connected in the I2C bus of the micro which works as permanent memory. The PC software can read from and write to this EEPROM. Consider two numbers, B and C, each is two byte integer. B is known to both the PC software and the micro and is a constant. C will be a number so close to B such that B-C will fit in a signed 8 bit integer. After some testing, appropriate value for C will be determined by PC and will be stored into the EEPROM of the micro for later use. Now the micro can store C in two ways: The micro can store whole two byte representing C The micro can store B-C as one byte signed integer, and can later derive C from B and B-C I think that two's complement representation of negative number is now universally accepted by hardware manufacturers. Still I personally don't like negative numbers to be stored in a storage medium which will be accessed by two different architectures because negative number can be represented in different ways. For you information, 431 also uses two's complement. Should I get rid of the headache that negative number can be represented in different ways and accept the one byte solution as my other team member suggested? Or should I stick to the decision of the two byte solution because I don't need to deal with negative numbers? Which one would you prefer and why?

    Read the article

  • Why doesn't negative values for the second index in a jagged array work in Python?

    - by univerio
    For example, if I have the following (data from Project Euler): s = [[75], [95, 64], [17, 47, 82], [18, 35, 87, 10], [20, 4, 82, 47, 65], [19, 1, 23, 75, 3, 34], [88, 2, 77, 73, 7, 63, 67], [99, 65, 4, 28, 6, 16, 70, 92], [41, 41, 26, 56, 83, 40, 80, 70, 33], [41, 48, 72, 33, 47, 32, 37, 16, 94, 29], [53, 71, 44, 65, 25, 43, 91, 52, 97, 51, 14], [70, 11, 33, 28, 77, 73, 17, 78, 39, 68, 17, 57], [91, 71, 52, 38, 17, 14, 91, 43, 58, 50, 27, 29, 48], [63, 66, 4, 68,89, 53, 67, 30, 73, 16, 69, 87, 40, 31], [4, 62, 98, 27, 23, 9, 70, 98, 73, 93, 38, 53, 60, 4, 23]] Why does s[1:][:-1] give me the same thing as s[1:] instead of (what I want) [s[i][:-1] for i in range(1,len(s))]. In other words, why does Python ignore my second index?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >