Search Results

Search found 2950 results on 118 pages for 'co lega'.

Page 75/118 | < Previous Page | 71 72 73 74 75 76 77 78 79 80 81 82  | Next Page >

  • Determining the hostname/IP address from the MX record in PHP

    - by pmmenneg
    Hi there, have a basic email domain validation script that takes a user's email domain, resolves the IP address from that and then checks that against various published blacklists. Here is how I am determining the IP: $domain = substr(strchr($email, '@'), 1); $ip = gethostbyname($domain); The problem is that some email address domains, such as [email protected], use an MX record rather than an A record, so using gethostbyname('alumni.example.net') will fail to resolve. I know when a user's email is using an MX in the email itself by using the PHP checkdnsrr function, but once at that stage am a little stuck as to how to proceed. In theory, I could parse out the 'root' domain, i.e. 'example.net' and check it, but I've not found reliable regex that can handle this task when the user could easily have an email the format of [email protected].co.uk... So, any suggestions on how to best tackle this??

    Read the article

  • Writing JSON with XSLT

    - by JP
    Hi, I'm trying to write XSLT to transform a specific web page to JSON. The following code demonstrates how Ruby would do this conversion, but the XSLT doesn't generate valid JSON (there's one too many commas inside the array) - anyone know how to write XSLT to generate valid JSON? require 'rubygems' require 'nokogiri' require 'open-uri' doc = Nokogiri::HTML(open('http://bbc.co.uk/radio1/playlist')) xslt = Nokogiri::XSLT(DATA.read) puts out = xslt.transform(doc) # Now follows the XSLT __END__ <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml"> <xsl:output method="text" encoding="UTF-8" media-type="text/plain"/> <xsl:template match="/"> [ <xsl:for-each select="//*[@id='playlist_a']//div[@class='artists_and_songs']//ul[@class='clearme']"> {'artist':'<xsl:value-of select="li[@class='artist']" />','track':'<xsl:value-of select="li[@class='song']" />'}, </xsl:for-each> ] </xsl:template> </xsl:stylesheet>

    Read the article

  • Should developers know how to use office suites?

    - by systempuntoout
    How deep is your knowledge on Office suites? Personally i don't like them, i hate create and manage word documents, excel datasheets etc. etc. I'm not talking about opening a word document and write some text or calculate sum and division on excel; i'm talking about advanced features like revisions, vba macros and so on. I have a co-worker, actually he's a talented functional analyst, that don't know anything about programming but he's kind a monster guru on Microsoft Office suite. When he sits on my desk and asks me to open and modify some of his hardly complicated Microsoft Excel multicolor multipivotal recursive datasheet, ehm, i feel like a baby in front of a nuclear plant console.It' not a great feeling if you know what i mean. As programmer, do you feel guilty about not knowing office suites enough?

    Read the article

  • What do you consider your "worst" hack?

    - by magcius
    What is the worst hack you've ever written? This is different from What is the worst code you've ever written?, because that, as I understand it, revolves around code later called worst because of ignorance. hack: code written, knowing it is horrible code, for the sake of convenience, deadlines, working around another broken system or bug, etc., but not ignorance. If you want, you can describe your co-workers' reaction, how bad your hospital bill was after showing them the code, if you felt disappointed in yourself for coming up with it or proud of yourself for coming up with a creative and clever solution. This doesn't have to be shipped code, this could also be code written for personal purposes.

    Read the article

  • Incorrectly formatted html inconsistencies between DOM and what's displayed in firefox plugin

    - by deadalnix
    I'm currently developing a firefox plugin. This plugin has to handle very crappy website that is really incorrectly formatted. I cannot modify these websites, so I have to handle them. I reduced the bug I'm facing to a short sample of html (if this appellation is appropriate for an horror like this) : <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <title>Some title.</title> <!-- Oh fuck yes ! --> <div style="visability:hidden;"> <a href="//example.com"> </a> </div> <!-- If meta are reduced, then the bug disapears ! --> <meta name="description" content="Homepage of Company.com, Company's corporate Web site" /> <meta name="keywords" content="Company, Company & Co., Inc., blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla" /> <meta http-equiv="Content-Language" content="en-US" /> <meta http-equiv="content-type" content="text/html; charset=utf-8"/> </head> <body class="homePage"> <div class="globalWrapper"><a href="/page.html">My gorgeous link !</a></div> </body> </html> When opening the webpage, « My gorgeous link ! » if displayed and clickable. However, when I'm exploring the DOM with Javascript into my plugin, everything behaves (DOM exploration and innerHTML property) like the code was this one : <html> <head> <title>Some title.</title> <!-- Oh fuck yes ! --> </head><body><div style="visability:hidden;"> <a href="//example.com"> </a> </div> <!-- If meta are reduced, then the bug disapears ! --> <meta name="description" content="Homepage of Company.com, Company's corporate Web site"> <meta name="keywords" content="Company, Company &amp; Co., Inc., blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla, blablabla"> <meta http-equiv="Content-Language" content="en-US"> </body> </html> So, when exploring the DOM within the plugin, the document is somehow fixed by firefox. But this fixed DOM is inconsistent with what is in the webpage. Thus, my plugin doesn't behave as expected. I'm really puzzled with that issue. The problem exists in both firefox 3.6 and firefox 4 (didn't tested firefox 5 yet). For example, reducing the meta, will fix the issue. Where does this discrepancy come from ? How can I handle it ? EDIT: With the answer I get, I think I should be a little more precise. I do know what firefow is doing when modifying the webpage in the second code snippet. The problem is the following one : « In the fixed DOM that I get into my plugin, the gorgeous link doesn't appear anywhere, but this link is actually visible on the webpage, and works. So the DOM I'm manipulating, and the DOM in the webpage are different - they are fixed in a different manner. » . So where does the difference come in the fixing behaviour, and how can I handle that, or, in other terms, how can I be aware, in my plugin, of the existance of the gorgeous link ?

    Read the article

  • in php, how to send the html tag to mail

    - by zahir hussain
    <script type="text/javascript"> var head= 23; </script> <?php $h="<script language='javascript'> document.write(head);</script>"; $headers = "MIME-Version: 1.0" . "\r\n"; $headers .= "Content-type:text/html;charset=ISO-8859-1" . "\r\n"; $mail_from='summa@yy.co.in'; $name="husssain"; $headers.="From: $name <$mail_from>"; $con="Welcome to world"; $to ="[email protected]"; $send_contact = mail($to,$con,$h,$headers); ?> then i send the $h to my mail id but i recieve only this <script language='javascript'> document.write(head);</script>

    Read the article

  • iPhone app development : How can i get a table view in which whn i click on a cell a text view shoul

    - by Vivek Sharma
    How can i get a table view in which whn i click on a cell a text view should expand just below that cell it should look like clicking on a button an it will create a text view in between clicked button and its below button... i m trying to create a pictorial view... tabel view: button 1 button 2 button 3 table view: button 1 button 2 v . . . text view . button 3 plz solve my problem i m new for iphone app development.... reply me on sharma_ecb@yahoo.co.in advance thnx Vivek Sharma India

    Read the article

  • Why is XCode Organizer console sometimes empty when I connect my iPhone

    - by toofah
    When testing my iPhone app I have found it incredibly useful to log information to the console window. I think it is amazing that I can send out an adhoc build to my co-workers and if they experience problems I am able to plug their iPhone into my mac and grab their console output. However, sometimes the console window is blank when we do this. Why is this the case? The code has been built with logging enabled. Besides that, it seems that the console output, when I see it, contains information about not only my app, but other iphone system logging. Thanks for any insight you can provide.

    Read the article

  • How to use Scala interpreter options with SBT?

    - by John Threepwood
    When using the Scala interpreter, one could start it with an option like: C:\Users\John>scala -unchecked Welcome to Scala version 2.9.2 (Java HotSpot(TM) Client VM, Java 1.6.0_32). Type in expressions to have them evaluated. Type :help for more information. scala> When using sbt, how can one start the Scala interpreter with options ? The following try will not work: C:\Users\John\Test Scala Project 1>sbt [...] [info] Loading global plugins from C:\Users\John\.sbt\plugins [info] Set current project to default-8d4ecc (in build file:/C:/Users/John/Tes t%20Scala%20Project%201/) > console -unchecked [error] Expected end of input. [error] console -unchecked [error] ^ With Google & Co I could not figure out how to do this from within the sbt shell. Does anyone know ?

    Read the article

  • Why is the meaning of “ours” and “theirs” reversed with git-svn

    - by Marc Liyanage
    I use git-svn and I noticed that when I have to fix a merge conflict after performing a git svn rebase, the meaning of the --ours and --theirs options to e.g. git checkout is reversed. That is, if there's a conflict and I want to keep the version that came from the SVN server and throw away the changes I made locally, I have to use ours, when I would expect it to be theirs. Why is that? Example: mkdir test cd test svnadmin create svnrepo svn co file://$PWD/svnrepo svnwc cd svnwc echo foo > test.txt svn add test.txt svn ci -m 'svn commit 1' cd .. git svn clone file://$PWD/svnrepo gitwc cd svnwc echo bar > test.txt svn ci -m 'svn commit 2' cd .. cd gitwc echo baz > test.txt git commit -a -m 'git commit 1' git svn rebase git checkout --ours test.txt cat test.txt # shows "bar" but I expect "baz" git checkout --theirs test.txt cat test.txt # shows "baz" but I expect "bar"

    Read the article

  • Flex 3 "product store" example?

    - by Poni
    Hi! I'm looking for something like this: http://nwebb.co.uk/blog/?p=132 http://www.adobe.com/devnet/flex/samples/flex_store/ The first one doesn't provide the source code and the second one is for Flex 2, and I have no clue how to port it to Flex 3. At the second one Adobe writes: Minor changes in the description and code may be necessary before it can be applied to Flex 3. These guys are funny.......! Anyway does anyone here knows of something similar I can learn from? Thank you!

    Read the article

  • Prevent bot from crawling certain areas of site.

    - by Skoder
    Hey, I don't know much about SEO and how web spiders work, so forgive my ignorance here. I'm creating a site (using ASP.NET-MVC) which has areas that displays information retrieved from the database. The data is unique to the user, so there's no real server-side output caching going on. However, since the data can contain things the user may not wish to have displayed from search engine results, I'd like to prevent any spiders from accessing the search results page. Are there any special actions I should take to ensure that the search result directory isn't crawled? Also, would a spider even crawl a page that's dynamically generated and would any actions preventing certain directories being search mess up my search engine rankings? edit: I should add, I'm reading up on robots.txt protocol, but it relies on co-operation from the web crawler. However, I'd also like to prevent any data-mining users who will ignore the robots.txt file. I appreciate any help!

    Read the article

  • Can't get to Pex download (or visual studio 2010)

    - by Vaccano
    I know this is probably not a "True" stackoverflow question, but here it is anyway: Is anyone able to get to the MSDN Download of Visual Studio 2010? I just get "Your search did not match any products." when I click on the New Downloads-Visual Studio 2010 link. I was able to download Visual Studio on Monday. But it is gone now. That is not really my issue though. That page is also where the pex download is. With that page down I can't download pex either. (I checked with a co-worker (who is having the same issue) before posting. So I know it is not just me.)

    Read the article

  • Rotating text in postscript

    - by Mrgreen
    I have the following postscript code: /outputtext { /data exch def /rot exch def /xfont exch def /Times-Roman findfont xfont scalefont setfont /y1 exch def /x1 exch def x1 y1 moveto rot rotate data show } def % x y fontsize rotation (text) outputtext 20 300 12 0 (text1) outputtext 20 400 12 90 (text2) outputtext 20 500 12 90 (text3) outputtext 20 600 12 0 (text4) outputtext showpage The function simply outputs text based on a x, y co-ords and the text to display, there is also a variable for rotation. For some reason when I output text with a rotation of 0 degrees, all other text that comes after that will not work, I can't seem to figure out why this is the case. In the example above, 'text1' and 'text2' will display, but not 3 and 4.

    Read the article

  • Convert doc/docx to semantic HTML

    - by sandstrom
    I would like to convert doc/docx documents to semantic HTML. Some wishes/requirements: Semantic HTML such that headers in the document are <h1>, <h2> etc., tables are <table> and so forth. Should preferably be possible to handle headings, lists, tables and images. Graphs and math formulas is a nice extra. • Doesn't have to be converted straight from doc/docx to html, could use an intermediary format, such as xml or docbook. • Should work programatically, and with large number of documents. The closest thing to a solution I've found so far is http://holloway.co.nz/docvert/index.html, but unfortunately there are many a few bugs, small user base and it can't handle a lot of documents. More of a proof of concept.

    Read the article

  • How do I do a postback to a CGI service

    - by TheLearner
    I am building a C# client for a CGI service (not sure what its called exactly). It accepts a bunch of XML and spits out a response. I have tested it straight in Firefox and it works (see below). Now I am not sure how to do this in C# code though? Does anyone have a helpful snippet of code, I can't imagine it would be that difficult? http://www.travelcommunications.co.uk/cgi-bin/d3web_gzip.ssh?%3CTCOML%20version=%22NEWFORMAT%22%3E%3CTransferOnly%3E%3CAvailability%3E%3CRequest%3E%3CAgentCode%3ETEST%3C/AgentCode%3E%3CAgentType%3ETA%3C/AgentType%3E%3CDeparturePointCode%3EALC%3C/DeparturePointCode%3E%3CDeparturePointType%3EAIRPORT%3C/DeparturePointType%3E%3CArrivalPointCode%3EBEN%3C/ArrivalPointCode%3E%3CArrivalPointType%3ERESORT%3C/ArrivalPointType%3E%3CSectorType%3ERETURN%3C/SectorType%3E%3CArrDate%3E10.10.10%3C/ArrDate%3E%3CArrTime%3E10:00%3C/ArrTime%3E%3CRetDate%3E17.10.10%3C/RetDate%3E%3CRetTime%3E10:00%3C/RetTime%3E%3CBrochure%3E001%3C/Brochure%3E%3CAdults%3E2%3C/Adults%3E%3CChildren%3E0%3C/Children%3E%3CInfants%3E0%3C/Infants%3E%3CCurrencyCode%3EUKL%3C/CurrencyCode%3E%3C/Request%3E%3C/Availability%3E%3C/TransferOnly%3E%3C/TCOML%3E

    Read the article

  • Is it possible to "merge" the values of multiple records into a single field without using a stored

    - by j0rd4n
    A co-worker posed this question to me, and I told them, "No, you'll need to write a sproc for that". But I thought I'd give them a chance and put this out to the community. Essentially, they have a table with keys mapping to multiple values. For a report, they want to aggregate on the key and "mash" all of the values into a single field. Here's a visual: --- ------- Key Value --- ------- 1 A 1 B 1 C 2 X 2 Y The result would be as follows: --- ------- Key Value --- ------- 1 A,B,C 2 X,Y They need this in SQLServer 2005. Again, I think they need to write a stored procedure, but if anyone knows a magic out-of-the-box function that does this, I'd be impressed.

    Read the article

  • Creating a dataframe in pandas by multiplying two series together

    - by Aoife
    Say I have two series in pandas, series A and series B. How do I create a dataframe in which all of those values are multiplied together, i.e. with series A down the left hand side and series B along the top. Basically the same concept as this, where series A would be the yellow on the left and series B the yellow along the top, and all the values in between would be filled in by multiplication: http://www.google.co.uk/imgres?imgurl=http://www.vaughns-1-pagers.com/computer/multiplication-tables/times-table-12x12.gif&imgrefurl=http://www.vaughns-1-pagers.com/computer/multiplication-tables.htm&h=533&w=720&sz=58&tbnid=9B8R_kpUloA4NM:&tbnh=90&tbnw=122&zoom=1&usg=__meqZT9kIAMJ5b8BenRzF0l-CUqY=&docid=j9BT8tUCNtg--M&sa=X&ei=bkBpUpOWOI2p0AWYnIHwBQ&ved=0CE0Q9QEwBg Thanks!

    Read the article

  • Tables are not visible in SQL Server Management Studio but they are in Visual Studio using same acco

    - by Germ
    I'm experiencing a weird problem with a particular SQL login. When I connect to the server in Microsoft SQL Server Management Studio (2008) using this account, I cannot see any of the tables, stored procedures etc. that this account should have access to. When I connect to the same server within Visual Studio (2008) with the same account everything is there. I've also had a co-worker connect to the server using the same login and he's able to view everything as well. The strange thing is if I switch logins, I'm able to view objects that the other account has access to which indicates that there isn't a problem with MSSMS on my PC. Does anyone have any suggestions on how I can diagnose this problem? I've check to make sure I don't have any Table filters etc.

    Read the article

  • How to convert *.aspx (HTML) page to Image format

    - by Swapnil Fegade
    I want to convert *.aspx (HTML) page's (User Interface) to Image such as JPEG. I am using below code for that Protected Sub btnGet_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnGet.Click saveURLToImage("http://google.co.in") End Sub Private Sub saveURLToImage(ByVal url As String) If Not String.IsNullOrEmpty(url) Then Dim content As String = "" Dim webRequest__1 As System.Net.WebRequest = WebRequest.Create(url) Dim webResponse As System.Net.WebResponse = webRequest__1.GetResponse() Dim sr As System.IO.StreamReader = New StreamReader(webResponse.GetResponseStream(), System.Text.Encoding.GetEncoding("UTF-8")) content = sr.ReadToEnd() 'save to file Dim b As Byte() = Convert.FromBase64String(content) Dim ms As New System.IO.MemoryStream(b, 0, b.Length) Dim img As System.Drawing.Image = System.Drawing.Image.FromStream(ms) img.Save("c:\pic.jpg", System.Drawing.Imaging.ImageFormat.Jpeg) img.Dispose() ms.Close() End If End Sub But I am getting Error as "Invalid character in a Base-64 string" at line Dim b As Byte() = Convert.FromBase64String(content)

    Read the article

  • New to Rails. Doubt in Big URL Routing

    - by Gautam
    Hi, I have just started learning ruby on rails. I have a doubt wrt routing. Default Routing in Rails is :controller/:action/:id It works really fine for the example lets say example.com/publisher/author/book_name Could you tell me how do you work with something very big like this site http://www.telegraph.co.uk/sport/football/leagues/premierleague/chelsea/ Could you let me understand about the various controllers, actions, ids for the above mentioned url and how to code controller, models so as to achieve this. Could you suggest me some good tutorials when dealing with this big urls. Looking forward for your help Thanks in advance Gautam

    Read the article

  • Flashing window in gnu screen

    - by gotts
    I really like gnu screen but there is a problem in my environment when I use it. Examle: username@domain:/var/www$ l Display all 130 possibilities? (y or n) when you click [Tab] to perform autocompletion there is a screen flashing for a very short period of time(looks like white screen but I can see it for a very-very short time). There isn't any problems with that when I execute the same action in normal/non-screen environment. This is what my .screenrc looks like: attrcolor b ".I" termcapinfo xterm 'Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm' defbce "on" term screen-256color-bce

    Read the article

  • Styling a hr for internet explorer

    - by Qwibble
    Hey, in my quest to create as image light a site as possible, I'm looking to create two tone hr's. I've achieved this in modern browsers, but want to achieve the same effect in ie6 and 7. The current code I am using is hr { border-bottom:1px solid #FFFFFF; border-top:1px solid #dcdcdc; clear:both; height:0; border-left:0px; border-right:0px; } I've tried, with no success to make this work in ie6 and 7 without having to target the browsers specifically. Any thoughts? (Heres my current project where I am employing this code, and looking to make it cross browser - http://www.qwibbledesigns.co.uk/preview/aurelius/ ) Cheers Matt

    Read the article

  • Using sphinx to create context sensitive html help

    - by bluebill
    Hi all, I am currently using AsciiDoc (http://www.methods.co.nz/asciidoc/) for documenting my software projects because it supports pdf and html help generation. I am currently running it through cygwin so that the a2x tool chain functions properly. This works well for me but is a pain to setup on other windows computers. I have been looking for alternative methods and recently revisited Sphinx. Noticing that it now produces html help files I gave it a try and it seems to work well in the small tests I performed. My question is, is there a way to specify map id's for context sensitive help in the text so that my windows programs can call the proper help api and the file is launched and opened to the desired location? In AsciiDoc I am using "pass::[]". By using these constructs a context.h and alias.h are generated along with the other html help files (context sensitive help information).

    Read the article

  • navigateToUrl AS3 is not opening a web browser

    - by Ronnie
    I have a textField on my stage named 'adBuy', which when clicked I want to open up my browser with the defined in URL request. However when I click on the 'adBuy' textField on my SWF it opens Coda, the piece of software I'm using to write this small piece of code? I am puzzled. Here is my code: adBuy.defaultTextFormat = adFormat; adBuy.textColor = 0xFF65CB; adBuy.x = 640; adBuy.y = 455; adBuy.text = "Buy Now"; parent.addChild(adBuy); adBuy.addEventListener(MouseEvent.CLICK, buyAdvert); var request:URLRequest = new URLRequest("http://www.google.co.uk"); function buyAdvert(event:MouseEvent):void { navigateToURL(request, "_blank"); trace("link clicked"); } Is there an error in my code, or is this a common problem for which there is an answer?

    Read the article

< Previous Page | 71 72 73 74 75 76 77 78 79 80 81 82  | Next Page >