Search Results

Search found 175 results on 7 pages for 'niels bom'.

Page 2/7 | < Previous Page | 1 2 3 4 5 6 7  | Next Page >

  • Just a small problem regarding javscript BOM question

    - by caramel1991
    The question is this: Create a page with a number of links. Then write code that fires on the window onload event, displaying the href of each of the links on the page. And this is my solution <html> <body language="Javascript" onload="displayLink()"> <a href="http://www.google.com/">First link</a> <a href="http://www.yahoo.com/">Second link</a> <a href="http://www.msn.com/">Third link</a> <script type="text/javascript" language="Javascript"> function displayLink() { for(var i = 0;document.links[i];i++) { alert(document.links[i].href); } } </script> </body> </html> This is the answer provided by the book <html> <head> <script language=”JavaScript” type=”text/javascript”> function displayLinks() { var linksCounter; for (linksCounter = 0; linksCounter < document.links.length; linksCounter++) { alert(document.links[linksCounter].href); } } </script> </head> <body onload=”displayLinks()”> <A href=”link0.htm” >Link 0</A> <A href=”link1.htm”>Link 2</A> <A href=”link2.htm”>Link 2</A> </body> </html> Before I get into the javascript tutorial on how to check user browser version or model,I was using the same method as the example,by acessing the length property of the links array for the loop,but after I read through the tutorial,I find out that I can also use this alternative ways,by using the method that the test condition will evalute to true only if the document.links[i] return a valid value,so does my code is written using the valid method??If it's not,any comment regarding how to write a better code??Correct me if I'm wrong,I heard some of the people say "a good code is not evaluate solely on whether it works or not,but in terms of speed,the ability to comprehend the code,and could posssibly let others to understand the code easily".Is is true??

    Read the article

  • PHP File unreadable after being downloaded

    - by Drew
    Hi I have a script that creates a file and stores it on the server. The file is encoded in UTF-8 and is a kind of xml file for the cmap software. If i open the file directly from the server then there is no problem and the file can be read. I am forcing a download of this file when a user goes to a specific url. After such a download, the file is unreadable by the cmap software. I have to go into my text editor (notepad++) and change the encoding from UTF-8 to UTF-8 without BOM. Am I sending the wrong headers? Is php doing something to the file when it is downloading it? Any advice on this would really be appreciated. Cheers Drew

    Read the article

  • WCF- "The underlying connection was closed: The connection was closed unexpectedly"

    - by SumGuy
    Hi there. I'm recieving that wonderfuly ambiguous error message when using one of my webmethods on my WCF webservice. As that error message doesn't provide any explanation whatsoever allow me to post my theory. I believe it may have something to do with the return type I'm using I have a Types DLL which is refrenced in both the webservice and the client. In this DLL is the base class ExceptionMessages. There is a child of this class called DrawingExcepions. Here is some code: public class ExceptionMessages { public object[] ReturnValue { get; set; } } public class DrawingExceptions : ExceptionMessages { private List<DrawingException> des = new List<DrawingException>(); } public class DrawingException { public Exception ExceptionMsg { get; set; } public List<object> Errors { get; set; } } The using code: [OperationContract] ExceptionMessages createNewBom(Bom bom, DrawingFiles dfs); public ExceptionMessages createNewBOM(Bom bom, DrawingFiles dfs) { return insertAssembly(bom, dfs); } public DrawingExceptions insertAssembly(Bom bom, DrawingFiles dfs) { DrawingExceptions des = new DrawingExceptions(); foreach (DrawingFile d in dfs.drawingFiles) { DrawingException temp = insertNewDrawing(bom, d); if (temp != null) des.addDrawingException(temp); if (d.Child != null) des.addDrawingException(insertAssembly(bom, d.Child)); } return des; } Returns to: ExceptionMessages ems = client.createNewBom(bom, currentDFS); if (ems is DrawingExceptions) { } Basically the return type from the webmethod is ExceptionMessages however I would usually be sending the child class back instead. My only idea is that it's the child that's causing the error but as far as I've read, this should have no effect. Has anyone got any ideas what could be going wrong here? If any more info is required, just ask :) Thanks.

    Read the article

  • Elegant way to search for UTF-8 files with BOM?

    - by vog
    For debugging purposes, I need to recursively search a directory for all files which start with a UTF-8 byte order mark (BOM). My current solution is a simple shell script: find -type f | while read file do if [ "`head -c 3 -- "$file"`" == $'\xef\xbb\xbf' ] then echo "found BOM in: $file" fi done Or, if you prefer short, unreadable one-liners: find -type f|while read file;do [ "`head -c3 -- "$file"`" == $'\xef\xbb\xbf' ] && echo "found BOM in: $file";done It doesn't work with filenames that contain a line break, but such files are not to be expected anyway. Is there any shorter or more elegant solution? Are there any interesting text editors or macros for text editors?

    Read the article

  • How to detect the character encoding of a text file?

    - by Cédric Boivin
    I try to detect which character encoding is used in my file. I try with this code to get the standard encoding public static Encoding GetFileEncoding(string srcFile) { // *** Use Default of Encoding.Default (Ansi CodePage) Encoding enc = Encoding.Default; // *** Detect byte order mark if any - otherwise assume default byte[] buffer = new byte[5]; FileStream file = new FileStream(srcFile, FileMode.Open); file.Read(buffer, 0, 5); file.Close(); if (buffer[0] == 0xef && buffer[1] == 0xbb && buffer[2] == 0xbf) enc = Encoding.UTF8; else if (buffer[0] == 0xfe && buffer[1] == 0xff) enc = Encoding.Unicode; else if (buffer[0] == 0 && buffer[1] == 0 && buffer[2] == 0xfe && buffer[3] == 0xff) enc = Encoding.UTF32; else if (buffer[0] == 0x2b && buffer[1] == 0x2f && buffer[2] == 0x76) enc = Encoding.UTF7; else if (buffer[0] == 0xFE && buffer[1] == 0xFF) // 1201 unicodeFFFE Unicode (Big-Endian) enc = Encoding.GetEncoding(1201); else if (buffer[0] == 0xFF && buffer[1] == 0xFE) // 1200 utf-16 Unicode enc = Encoding.GetEncoding(1200); return enc; } My five first byte are 60, 118, 56, 46 and 49. Is there a chart that shows which encoding matches those five first bytes?

    Read the article

  • Change encoding to UTF-8 recursively on Windows?

    - by Pekka
    Does anybody know a tool, preferably for the Explorer context menu, to recursively change the encoding of files in a project from / to UTF-8 and other encodings? Freeware or not too expensive would be great. Edit: Thanks for the answers, +1 for all of them as they are all fine but I am a lazy bastard sometimes, and would really like to be able to just right click a folder and say "convert all .php files to UTF-8". :) Further suggestions are appreciated.

    Read the article

  • Git Shell in Windows: patch's default character encoding is UCS-2 Little Endian - how to change this to ANSI or UTF-8 without BOM?

    - by Sk8erPeter
    When creating a diff patch with Git Shell in Windows (when using GitHub for Windows), the character encoding of the patch will be UCS-2 Little Endian according to Notepad++ (see the screenshots below). How can I change this behavior, and force git to create patches with ANSI or UTF-8 without BOM character encoding? It causes a problem because UCS-2 Little Endian encoded patches can not be applied, I have to manually convert it to ANSI.

    Read the article

  • remove item from array javascript

    - by Red
    I was trying to remove some items from an array , Array.prototype.remove = function(from, to) { var rest = this.slice((to || from) + 1 || this.length); this.length = from < 0 ? this.length + from : from; return this.push.apply(this, rest); }; var BOM = [0,1,0,1,0,1,1]; var bomlength = BOM.length; for(var i = 0; i < IDLEN ;++i) { if( BOM[i] == 1) { BOM.remove(i); //IDLEN--; } } RESULT IS BOM = [0,0,0,1]; expected result is BOM = [0,0,0]; its looks like i am doing something wrong , Please help me. Thanks.

    Read the article

  • Quicksilver doesn't open PDF's like it used to

    - by Niels Bom
    I've been using Quicksilver for a while now but lately I've been getting this problem that QS doesn't show the Acrobat Reader icon when a PDF is selected, but goes to the "Open With" tab. See the screenshot here: http://skitch.com/niels.bom/n8nw5/google-reader-1000 Is this a bug? Or did I somehow bork a preference setting? I'm using QS B54, 3815, which is the latest AFAIK and Mac OS X 10.5.8. Thanks!

    Read the article

  • Repair .NET Framework on Windows 2008 R2

    - by Niels R.
    One of our web servers has become inoperable and after some searching we think the .NET Framework might be corrupted in some way. The server runs Windows 2008 R2 and uses the 2.0 framework for the ASP.NET application that is (or better: was) running using IIS 7.5. I'm wondering how we can reinstall the .NET 2.0 Framework on Windows 2008 R2. Any ideas? Kind regards, Niels R.

    Read the article

  • Repair .NET Framework on Windows 2008 R2

    - by Niels R.
    One of our web servers has become inoperable and after some searching we think the .NET Framework might be corrupted in some way. The server runs Windows 2008 R2 and uses the 2.0 framework for the ASP.NET application that is (or better: was) running using IIS 7.5. I'm wondering how we can reinstall the .NET 2.0 Framework on Windows 2008 R2. Any ideas? Kind regards, Niels R.

    Read the article

  • Text editor capable of viewing invisibles?

    - by Timo
    A recent problem* left me wondering whether there is a text editor out there that lets you see every single character of the file, even if they are invisible? Specifically, I'm not looking for hex editing capabilities, I am interested in a text editor that'll show me all of the invisible characters (not just the common whitespace / line break characters). The BOM marker is just one example, others are e.g. mathematical invisibles or possibly unsupported characters. I'm not looking for a text editor that simply supports a large variety of text encoding / translations between encodings. All text editors I've come across treat the invisible characters correctly i.e. leave them invisible (or simply get removed in the translation as in the case of the BOM marker). I'm asking this mostly out of academic interests, so I'm not particular about any specific OS. I can easily test Linux and OSX solutions, but if you recommend a Windows editor, I would appreciate if you include descriptions of how the editor handles invisibles other than whitespace / line breaks. *The incident that lead me to this question: I wrote a perl script using TextWrangler and managed to change the encoding to UTF8 BOM, which inserts te BOM marker at the start of the file. Perl (or rather the operating system) promptly misses the #! and mayhem ensues. It then took me the better part of an afternoon to figure this out since most text editors do not show the BOM marker even with various "show invisibles" options turned on. Now I've learned my lesson and will use less immediately :-).

    Read the article

  • How not to send all traffic over SBS connection?

    - by Niels R.
    Hi, My girlfriend uses SBS Connection Manager to connect to her company's network. The problem is that the internet connection is überslow at work, so she wants to use the home internet connection to surf the web and use the SBS Connection to get to her work stuff. Normally with a VPN connection you just have to uncheck a box "Send all traffic over VPN connection" or "Use VPN as default gateway" or something like that. As I've never seen this SBS Connection Manager-thing before, I've no idea where to uncheck a similar box. (I've checked the properties of the connection in Network Connections, but it only has a few options about logging and firewall). Thanks for any help in advance! Kind regards, Niels R.

    Read the article

  • Best photo management software?

    - by Niels Basjes
    Hi, What I would like is a single piece of software (or a smart combination of tools) that allow me to manage my photos in a better way than what I've found so far. 1. Tags Primarily I need a way of tagging the images. So I can manually tag photos the same way we tag questions here at SO/SF/SU. I want this software to place a lot of the tags automagically (obvious things like date and resolution). 2. Face recognition What I would really like is that this software has a feature that it can recognize faces in images and places tags with the name of the person. So far I've only heard of one online photo system that can do that (Picasa) and not yet of any offline tool. 3. Version database I must have some way of having a central GIT/SVN/... that contains all images. I have had a harddrive corruption a few years ago and it took me a long time to figure out which images had been damaged. I always want to be able to go back to what the camera produced. 4. Website I want to be able to generate a website (few 'tag' specific websites) based on the actual content. 5. Easy bulk uploading Many photo tools have a one on one uploading option. I prefer simply 'throwing' my images on a file server under Linux (Samba) and let the system automagically integrate, tag, recognize, etc. all images. Ok, I know these are a bit much. Perhaps you guy's have some suggestions about existing tools that can make this possible. Or even a complete system that does this. EDIT: To clarify on the OS. I prefer Linux for any 'server' task and Windows XP for any 'desktop' task. Thanks for all your input. Niels Basjes

    Read the article

  • Display nice error message when there is something wrong after ajax request jqgrid

    - by Niels Ilmer
    Hello, I delete rows with this function: function deleteRow(){ rows = jQuery("#category_grid").getGridParam('selarrrow'); if( rows.length>0){ jQuery('#category_grid').delGridRow(rows,{ msg:'Verwijderen geselecteerde rijen?' }); }else{ alert("Selecteer eerst een rij om te verwijderen!"); } } but when it's fails in my php, server side and a exception is thrown. The errormessage looks not nice. How can i show errotext in the dialog box? or catch an error message after an ajax call? At the moment the error message looks like: error Status: 'CDbException'. Error code: 500 When i googled i found a event of the delGridRow function called errorTextFormat. Is this the event where i'm looking for? Can someone please give me an example of the implementation of this event? greetings niels

    Read the article

  • Beginner WPF/XML question: How to get an <element> in an <element>?

    - by Niels
    I have a rather simple question. I'm trying to get information out of an XML file, and now I need to get the that's inside another This is my XML code: <author> <name>Random_name1 (Random Name)</name> <uri>http://thisisanrandomurl.com</uri> </author> I can get the info with this code: Name = item.Element(ns + "author").Value, But this gives me: "Random_name1 (Random Name) http://thisisanrandomurl.com" I only want the info inside the tags. Any ideas? Thanks a lot, - Niels

    Read the article

  • How to get child container reference in View Model

    - by niels-verkaart
    Hello, I´m trying to share a Data Service (Entity Manager) wrapped in a Repository from a ViewModel (called 'AVM') in Module A to a ViewModel (called 'BVM') in Module B, and I can't get this working. We use PRISM/Unity 2.0 This is my scenario: A user may open multiple Customer screens (composite view as mini shell) each with another customer (unit of work). We realize this using child containers. Each child container resolves it's own repository with its own Entity manager (the repository is a singleton within the child container). This is done in module A. The main shell has a main region manager, and each Customer screen with its childcontainer creates a scoped region. In each customer screen there is a View 'AV' (connected to ViewModel 'AVM') with a SubRegion (tab control) registered as 'SubRegion'. We create this with a 'Screen Factory' In Module B we have a Customer Orders in View 'BV' and ViewModel 'BVM'. In the constructor of Module B we get the main container by injection. In the initialize method we resolve the (main) region manager and register View 'BV' with it. In the constructor of View 'BV' a ViewModel 'BVM' is injected/created. Now this works, but the ViewModel 'BVM' cannot get the child container. It only get the main container. Is this doable, or do I have to do this another way? Thanks, Niels

    Read the article

  • SEO: A whois server that work for .SE domains?

    - by Niels Bosma
    I'm developing a small domain checker and I can't get .SE to work: public string Lookup(string domain, RecordType recordType, SeoToolsSettings.Tld tld) { TcpClient tcp = new TcpClient(); tcp.Connect(tld.WhoIsServer, 43); string strDomain = recordType.ToString() + " " + domain + "\r\n"; byte[] bytDomain = Encoding.ASCII.GetBytes(strDomain.ToCharArray()); Stream s = tcp.GetStream(); s.Write(bytDomain, 0, strDomain.Length); StreamReader sr = new StreamReader(tcp.GetStream(), Encoding.ASCII); string strLine = ""; StringBuilder builder = new StringBuilder(); while (null != (strLine = sr.ReadLine())) { builder.AppendLine(strLine); } tcp.Close(); if (tld.WhoIsDelayMs > 0) System.Threading.Thread.Sleep(tld.WhoIsDelayMs); return builder.ToString(); } I've tried whois servers whois.nic-se.se and whois.iis.se put I keep getting: # Copyright (c) 1997- .SE (The Internet Infrastructure Foundation). # All rights reserved. # The information obtained through searches, or otherwise, is protected # by the Swedish Copyright Act (1960:729) and international conventions. # It is also subject to database protection according to the Swedish # Copyright Act. # Any use of this material to target advertising or # similar activities is forbidden and will be prosecuted. # If any of the information below is transferred to a third # party, it must be done in its entirety. This server must # not be used as a backend for a search engine. # Result of search for registered domain names under # the .SE top level domain. # The data is in the UTF-8 character set and the result is # printed with eight bits. "domain google.se" not found. Edit: I've tried changing to UTF8 with no other result. When I try using whois from sysinternals I get the correct result, but not with my code, not even using SE.whois-servers.net. /Niels

    Read the article

  • How do create an encrypted system with multiple Linux distributions?

    - by niels
    A few weeks ago I created a completely encrypted system on a notebook and must say I like the idea. It's a little bit annoying to enter the password on every boot, but it's nice to know even if I loose the computer I don't give my data to other people. With the alternate-cd it's easy to do. Now I have to setup a new system where I want to combine the new idea with my usual usage strategy. There I have more partitions: 3 system, Home, Different Data-Partitions for vm-data, photo-data and mp3-data. The background is that I prefer not to update a system. I prefer to install the new version parallel to the old system. So I can easily test it. Obviously the Data-Partitions are used for both systems. My questions is, how can I easily combine both my strategy and the crypto-approach? Or is it impossible. The way to do the crypted stuff by hand is in my eyes to complicated.

    Read the article

  • Languages on embedded systems in aeronautic and spatial sector

    - by Niels
    I know that my question is very broad but a general answer would be nice. I would like to know which are the main languages used in aeronautic and spatial sector. I know that the OS which run on embedded systems are RTOS (Real time OS) and I think that, this languages must be checked correctly by different methods (formal methods, unit tests) and must permit a sure verification of whole process of a program.

    Read the article

  • Text editor with "forensic" capabilities?

    - by Timo
    This is what happened: I wrote a perl script using TextWrangler and managed to change the encoding to UTF8 BOM, which inserts te BOM marker at the start of the file. Perl promptly misses the #! and mayhem ensues. It then takes me the better part of an afternoon to figure this out since most text editors do not show the BOM marker even with various "show invisibles" options turned on. Now, I've learned my lesson, I should have used less immediately, etc. etc.. What I'm wondering though is whether there is a text editor out there that lets you see every single byte of the file, even if they are "invisible"?

    Read the article

  • How can i add encoding to the python generated CSV file

    - by user1958218
    I am following this post http://stackoverflow.com/a/9016545 and i want to know that how can i do that in Python. I don't know how can i insert BOM data in there This is my current code response = HttpResponse(content_type='text/csv') response['Content-Type'] = 'application/octet-stream' response['Content-Disposition'] = 'attachment; filename="results.csv"' writer = UnicodeWriter(response, quoting=csv.QUOTE_ALL, encoding="utf-8") I want to convert to utf -16 . BOm data is this but don't know how to insert it From here http://stackoverflow.com/a/4440143 echo "\xEF\xBB\xBF"; // UTF-8 BOM But i want it for python and utf-16 I tried opening that csv in notepad and insert \xef\xbb\xb in beginning and excel displayed that correctly. But it is also visible before first column. How can i hide that because user wont like that

    Read the article

< Previous Page | 1 2 3 4 5 6 7  | Next Page >