I have a .smi file. When i open with notepad++ i had:  &lt;font color="#FF8040"&gt;&lt;I&gt;- °øµ¿¹ø¿ªÀÌ´Ùº¸´Ï Áö¸í°ú ÀÌ¸§ÀÌ ¾à°£¾¿ Æ²¸±¼ö ÀÖ½À´Ï´Ù.-&lt;/I&gt;&lt;/font&gt;   Then i set Character sets > Korean > UEC-KR:  &lt;font color="#FF8040"&gt;&lt;I&gt;- 공동번역이다보니 지명과 이름이 약간씩 틀릴수 있습니다.  -&lt;/I&gt;&lt;/font&gt;   So, what can i do it in C#? I want when i open a file, app can detect Character sets and display in a richtextbox. I used:  System.IO.StreamReader sr = new System.IO.StreamReader(openFile.FileName); inputText.Text = sr.ReadToEnd(); inputText.SelectAll(); inputText.SelectionFont = new Font("Arial Unicode MS",9,FontStyle.Regular);   Result in inputText:  &lt;font color="#FF8040"&gt;&lt;I&gt;- ���������̴ٺ��� ����� �̸��� �ణ�� Ʋ���� �ֽ��ϴ�.  -&lt;/I&gt;&lt;/font&gt;
In our application, we receive text files (.txt, .csv, etc.) from diverse sources. When reading, these files sometimes contain garbage, because the files where created in a different/unknown codepage.  Is there a way to (automatically) detect the codepage of a text file?   The detectEncodingFromByteOrderMarks, on the StreamReader constructor, works for UTF8  and other unicode marked files, but I'm looking for a way to detect code pages, like ibm850, windows1252.     Thanks for your answers, this is what I've done.  The files we receive are from end-users, they do not have a clue about codepages. The receivers are also end-users, by now this is what they know about codepages: Codepages exist, and are annoying.  Solution:    Open the received file in Notepad, look at a garbled piece of text. If somebody is called François or something, with your human intelligence you can guess this. I've created a small app that the user can use to open the file with, and enter a text that user knows it will appear in the file, when the correct codepage is used.  Loop through all codepages, and display the ones that give a solution with the user provided text.  If more as one codepage pops up, ask the user to specify more text.
How to quit Skype on Android? Is it possible to convert a Physical Ubuntu Install (Intel based PC with Ubuntu 10.10) to a virtual box disk, so that I can use that same environment on a separate pc or can keep it virtual for testing?  Something similar to "Disk2VHD" which converts a physical Windows 2K3 and above box into a VHD or VMware image.  Will be grateful for your assistance ! Kind Regards Does Python SciPy need BLAS? Allow [tag:tag-name] syntax to link to any site Which folder is recycle bin in on Win7? How to check files there? I was using another account before. Let me call it account A. And I deleted a lot of files to the Recycle Bin at that time. But before I removed account A I forgot to empty the Recycle Bin.   My question is, are my files still there? I've searched and found that the Recycle Bin may live in $Recycle.Bin, but I can't open files there so I can't know what they are. Any help how to open deleted files or how to delete them permanently? Is it possible to generate electric energy from the radiation of radioactive materials I wonder if it is possible to generate electric energy from the radiation of radioactive materials like nuclear waste? If it is then wouldn't that also mean that it could be used as an energy source for a very long time since the radiation takes a long time to decay? What is the relationship between a chi squared test and test of equal proportions? Suppose that I have three populations with four, mutually exclusive characteristics.  I take random samples from each population and construct a crosstab or frequency table for the characteristics that I am measuring.  Am I correct in saying that:   If I wanted to test whether there is any relationship between the populations and the characteristics (e.g. whether one population has a higher frequency of one of the characteristics), I should run a chi-squared test and see whether the result is significant. If the chi-squared test is significant, it only shows me that there is some relationship between the populations and characteristics, but not how they are related. Furthermore, not all of the characteristics need to be related to the population.  For example, if the different populations have significantly different distributions of characteristics A and B, but not of C and D, then the chi-squared test may still come back as significant. If I wanted to measure whether or not a specific characteristic is affected by the population, then I can run a test for equal proportions (I have seen this called a z-test, or as prop.test() in R) on just that characteristic.   In other words, is it appropriate to use the prop.test() to more accurately determine the nature of a relationship between two sets of categories when the chi-squared test says that there is a significant relationship? Is there a NumPy function to return the first index of something in an array? I know there is a method for a Python list to return the first index of something:  &gt;&gt;&gt; l = [1, 2, 3] &gt;&gt;&gt; l.index(2) 1   Is there something like that for NumPy arrays? Recently, Firefox has changed the default folder for newly created bookmarks (using Ctrl+D) from the Bookmarks Menu to "Other Bookmarks".  Is there some way to change that back? Or some alternate method instead of Ctrl+D?  EDIT  A native way to do this (without an add-on) would be best. Which stats / gear can get the best our of wasteland exploration? Trying to get the best out of wasteland exploration here! I get it that you'd obviously need a big gun for survival out there, but apart from that, I'm wondering which stats / gear can get the best out of exploration.    How would you choose who to send out exploring from your dwellers. Which stat is the most important to choose explorers? Strength or endurance maybe? Does it make much of a difference equipping combat outfits? If so, whats the most important stat to boost through outfits? For some time, Microsoft has supported an option to remove the limit of 260 symbols for NTFS file name length.  The web is full of articles, describing what should be done.   Hit the Windows key, type gpedit.msc and press Enter. Navigate to Local Computer Policy > Computer Configuration > Administrative Templates > System > Filesystem > NTFS. Double click the Enable NTFS long paths option and enable it.   However, I don't have such option. Please see the screenshot below:    Am I missing some Windows update, or is it something else? Lightning component : Get the id of a record In a lightning component I display a list of articles (Article__c custom object) so I ca see, for example, the name of the article, the price, and a button that I'd like redirect to another component which display the details of the article selected.   For now I'm just trying to get the id of the article, in a basic alert in javascript, but I doesn't work : it says the id is null.   Here is a part of the component :  &lt;aura:handler name="init" value="{!this}" action="{!c.doInit}" /&gt; &lt;aura:attribute name="wrappers" type="ListeArticlesWrapper" /&gt; &lt;aura:attribute name="articles" type="Article__c" /&gt;  &lt;aura:attribute name="Detail" type="String"/&gt; &lt;aura:registerEvent name="navigate" type="c:NavigateToDetail"/&gt;  &lt;div class="page"&gt;     &lt;h1&gt;Liste des articles&lt;/h1&gt;     &lt;div class="slds"&gt;         &lt;table class="slds-table slds-table--bordered slds-table--cell-buffer"&gt;             &lt;thead&gt;                 &lt;tr class="slds-text-heading--label"&gt;                     &lt;th scope="col" class="head"&gt;&lt;/th&gt;                     &lt;th scope="col" class="head"&gt;Nom&lt;/th&gt;                     &lt;th scope="col" class="head"&gt;Type&lt;/th&gt;                     &lt;th scope="col" class="head"&gt;Prix&lt;/th&gt;                     &lt;th scope="col" class="head"&gt;&lt;/th&gt;                 &lt;/tr&gt;             &lt;/thead&gt;             &lt;tbody&gt;                 &lt;aura:iteration items="{!v.wrappers}" var="wrap"&gt;                     &lt;tr&gt;                         &lt;td class="cell"&gt;                             &lt;ui:inputCheckbox value="{!wrap.selected}" /&gt;                         &lt;/td&gt;                         &lt;td class="cell"&gt;                            &lt;ui:outputText value="{!wrap.art.Name}" /&gt;                         &lt;/td&gt;                         &lt;td class="cell"&gt;                             &lt;ui:outputText value="{!wrap.art.Type__c}" /&gt;                         &lt;/td&gt;                         &lt;td class="cell"&gt;                             &lt;ui:outputText value="{!wrap.art.Prix__c}" /&gt;                         &lt;/td&gt;                         &lt;td class="cell"&gt;                             &lt;button class="slds-button slds-button--neutral slds-not-selected"                                      onclick="{!c.getDetail}" data="{!wrap.art.Id}"&gt;Details&lt;/button&gt;                         &lt;/td&gt;                     &lt;/tr&gt;                 &lt;/aura:iteration&gt;             &lt;/tbody&gt;         &lt;/table&gt;   The associated controller js (with the function getDetail)  ({ doInit : function(component, event, helper) {     helper.init(component, event); },  getArticles : function(component, event, helper) {     helper.getArticles(component, event); },  getDetail : function(component, event, helper){     var id = event.target.getAttribute("data-data") || event.target.parentNode.getAttribute("data-data")     alert('detail article : id = ' + id); //it gives me null } })   Thanks !  EDIT  And the wrapper class in case you wonder what is the "art" :  public with sharing class ListeArticlesWrapper { //wrapper pour récupérer les articles selectionnés @AuraEnabled public Article__c art {get; set;}  @AuraEnabled public Boolean selected {get; set;} } Sudden increase in timing when summing over 250 entries Where has the trailing newline char gone from my command substitution? The following code best describes the situation.  Why is the last line not outputting the trailing newline char?  Each line's output is shown in the comment.  I'm using GNU bash, version 4.1.5          echo -n $'a\nb\n'                  | xxd -p  # 610a620a              x=$'a\nb\n'   ; echo -n "$x" | xxd -p  # 610a620a      echo -ne "a\nb\n"                  | xxd -p  # 610a620a x="$(echo -ne "a\nb\n")" ; echo -n "$x" | xxd -p  # 610a62 The locus of the intersection point of two perpendicular tangents to a given ellipse Is it possible to dynamically set Views' pager settings? Say for instance, you have a view that displays when viewing a certain node type, but you want the pager settings to be different for each individual node. I was thinking of making a CCK field like "pager setting" and then give it an integer option of x-y. But I don't know if it's possible to somehow dynamically plug that field into the Views' settings. Or is there another way to do this maybe? Do professors care about their rating on websites such as RateMyProfessor or Koofers? I am wondering if a professor is already an Associate Professor, do they still care about their reputation in the eyes of the department considering tenureship is already granted? Capacitor Voltage Rating How to find the voltage rating of a capacitor after knowing the capacitance value.  Example, For a power supply, If the input voltage is 60V and output is 5V. The input capacitor(C1) value is 100uf and output capacitor value is 1000uf.  What is the voltage rating for both the capacitors and how to find them. Why do first order languages have at most countably many symbols? Every proof that I read seems to assume that $|L|\leq\aleph_0$. But then how do you model things like field over $\mathbb{R}$ without running out of variable symbols?  More importantly, how can I prove that $|L|\leq\aleph_0$? Err http://archive.canonical.com natty InRelease     Err http://security.ubuntu.com oneiric-security InRelease                Err http://extras.ubuntu.com natty InRelease                             Err http://security.ubuntu.com oneiric-security Release.gpg   Temporary failure resolving ‘security.ubuntu.com’ Err http://archive.canonical.com natty Release.gpg   Temporary failure resolving ‘archive.canonical.com’ Err http://extras.ubuntu.com natty Release.gpg   Temporary failure resolving ‘extras.ubuntu.com’ Err http://gb.archive.ubuntu.com oneiric InRelease Err http://gb.archive.ubuntu.com oneiric-updates InRelease Err http://gb.archive.ubuntu.com natty-backports InRelease Err http://gb.archive.ubuntu.com oneiric Release.gpg   Temporary failure resolving ‘gb.archive.ubuntu.com’ Err http://gb.archive.ubuntu.com oneiric-updates Release.gpg   Temporary failure resolving ‘gb.archive.ubuntu.com’ Err http://gb.archive.ubuntu.com natty-backports Release.gpg   Temporary failure resolving ‘gb.archive.ubuntu.com’  Reading package lists... Done W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/oneiric/InRelease       W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/oneiric-updates/InRelease   W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/natty-backports/InRelease   W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/oneiric-security/InRelease   W: Failed to fetch http://archive.canonical.com/ubuntu/dists/natty/InRelease   W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/natty/InRelease   W: Failed to fetch http://archive.canonical.com/ubuntu/dists/natty/Release.gpg  Temporary failure resolving ‘archive.canonical.com’ W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/oneiric-security/Release.gpg  Temporary failure resolving ‘security.ubuntu.com’ W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/natty/Release.gpg  Temporary failure resolving ‘extras.ubuntu.com’ W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/oneiric/Release.gpg  Temporary failure resolving ‘gb.archive.ubuntu.com’ W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/oneiric-updates/Release.gpg  Temporary failure resolving ‘gb.archive.ubuntu.com’ W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/natty-backports/Release.gpg  Temporary failure resolving ‘gb.archive.ubuntu.com’ W: Some index files failed to download. They have been ignored, or old ones used instead.   This is what I'm seeing when I try to run sudo apt-get update. I did an update on my instance yesterday and am now experiencing this.