Search Results

Search found 1854 results on 75 pages for 'country'.

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

  • free sql script to get a list of countries, provinces/states and their cities.

    - by reggie
    I am working on a registration page for a php website as mysql as the backend database. I need a sql script to insert the list of countries with their associated provinces and the provinces with their associated cities. I need all the countries, provinces and cities all over the world which are related to each other. I can get the individual list of countries, provinces and cities but there is no list that relates them together.. any help appreciated.. thanks in advance.

    Read the article

  • Location detecting tecniques for IP adresses

    - by ilhan
    What are the location detecting tecniques for IP adresses? I know to look at the $_SERVER['HTTP_ACCEPT_LANGUAGE'] (not accurate but mostly useful to detect location, for example if an IP range's users set French to their browser then it means that this range belongs to France gethostbyaddr($_SERVER['REMOTE_ADDR']) then may be to whois gethostbyaddr($_SERVER['REMOTE_ADDR']) sometimes $HTTP_USER_AGENT (Firefox's user agent string has language code, not accurate but mostly can be used to detect the location) But what about cities?

    Read the article

  • Working with Joins in LINQ

    - by vik20000in
    While working with data most of the time we have to work with relation between different lists of data. Many a times we want to fetch data from both the list at once. This requires us to make different kind of joins between the lists of data. LINQ support different kinds of join Inner Join     List<Customer> customers = GetCustomerList();     List<Supplier> suppliers = GetSupplierList();      var custSupJoin =         from sup in suppliers         join cust in customers on sup.Country equals cust.Country         select new { Country = sup.Country, SupplierName = sup.SupplierName, CustomerName = cust.CompanyName }; Group Join – where By the joined dataset is also grouped.     List<Customer> customers = GetCustomerList();     List<Supplier> suppliers = GetSupplierList();      var custSupQuery =         from sup in suppliers         join cust in customers on sup.Country equals cust.Country into cs         select new { Key = sup.Country, Items = cs }; We can also work with the Left outer join in LINQ like this.     List<Customer> customers = GetCustomerList();     List<Supplier> suppliers = GetSupplierList();      var supplierCusts =         from sup in suppliers         join cust in customers on sup.Country equals cust.Country into cs         from c in cs.DefaultIfEmpty()  // DefaultIfEmpty preserves left-hand elements that have no matches on the right side         orderby sup.SupplierName         select new { Country = sup.Country, CompanyName = c == null ? "(No customers)" : c.CompanyName,                      SupplierName = sup.SupplierName};Vikram

    Read the article

  • Unnamed Refactoring

    - by Liam McLennan
    This post is a message in a bottle. It cast it into the sea in the hope that it will one day return to me, stuffed to the cork with enlightenment. Yesterday I  tweeted, what is the name of the pattern where you replace a multi-way conditional with an associative array? I said ‘pattern’ but I meant ‘refactoring’. Anyway, no one replied so I will describe the refactoring here. Programmers tend to think imperatively, which leads to code such as: public int GetPopulation(string country) { if (country == "Australia") { return 22360793; } else if (country == "China") { return 1324655000; } else if (country == "Switzerland") { return 7782900; } else { throw new Exception("What ain't no country I ever heard of. They speak English in what?"); } } which is horrid. We can write a cleaner version, replacing the multi-way conditional with an associative array, treating the conditional as data: public int GetPopulation(string country) { if (!Populations.ContainsKey(country)) throw new Exception("The population of " + country + " could not be found."); return Populations[country]; } private Dictionary<string, int> Populations { get { return new Dictionary<string, int> { {"Australia", 22360793}, {"China", 1324655000}, {"Switzerland", 7782900} }; } } Does this refactoring already have a name? Otherwise, I propose Replace multi-way conditional with associative array

    Read the article

  • If PHP websites represnt 70% of websites in my country then should I learn it?

    - by Fadi Tiwari
    In my country most of the sites are built using PHP and MySQL. Half of those sites use vbulletin and Wordpress. When it comes to companies, ministries and universities they use ASP.NET. I am not sure what should I learn to get more money as freelacer? Should I learn ASP.NET and focus my area to build companies and universities' sites? (And the question if they will know me one day and ask me to build any of their sites or not?) Or should I learn PHP and focus my business on people's sites and maybe some small formal sites? Which option will give me more money?

    Read the article

  • Should the English website use href="x-default" when it doesn't auto-redirect to the user's language or country?

    - by Noam
    For each URL on my site, I'm auto-redirecting according to header accept language. The site arch is English version: http://mydomain.com/page Spanish version http://es.mydomaina.com/page etc.. The english version is displayed unless I'm seeing a specific language other than en and that I support in the header, and then a redirect occurs. Google says this: For language/country selectors or auto-redirecting homepages, you should add an annotation for the hreflang value "x-default" as well: My pages aren't language selectors, nor are they the homepage. But I am auto-redirecting. My question is, should my english version be hreflang="x-default" or/and hrefland="en"?

    Read the article

  • href="x-default" for english version which isn't an auto-redirecting homepage or country selector?

    - by Noam
    for each url on my site, I'm auto-redirecting according to header accept language. The site arch is english version: http://mydomain.com/page spanish version http://es.mydomaina.com/page etc.. The english version is displayed unless I'm seeing a specific language other than en and that I support in the header, and then a redirect occurs. Google says this: For language/country selectors or auto-redirecting homepages, you should add an annotation for the hreflang value "x-default" as well: My pages aren't language selectors, nor are they the homepage. But I am auto-redirecting. My question is, should my english version be hreflang="x-default" or/and hrefland="en"?

    Read the article

  • How can I compile an IP address to country lookup database to make available for free?

    - by Nick
    How would I go about compiling an accurate database of IP addresses and their related countries to make available as an open source download for any web developer who wants to perform a geographic IP lookup? It seems that a company called MaxMind has a monopoly on geographic IP data, because most online tutorials I've seen for country lookups based on IP addresses start by suggesting a subscription to MaxMind's paid service (or their less accurate free 'Lite' version). I'm not completely averse to paying for their solution or using the free one, but the concept of an accurate open source equivalent that anyone can use without restriction appeals to me, and I think it would be useful for the web development community. How is geographic IP data collected, and how realistic is it to hope to maintain an up-to-date open version?

    Read the article

  • Use of another country domain name can influence search engines results?

    - by DontVoteMeDown
    I'm studing a way to create my company domain based on it's name. Consider that my company's name is Another Store and I want to register a domain like anothersto.re - this is just an example. That domain is strictly chosen by marketing. What happens is that my company is stabilished in Brazil and our domain here is .br. The .re domain stands for an island near France so haves nothing to do with my country. If that domain is chosen what it can imply about SEO questions? Did it will have any influence on search engines results considering that they look over user's region? This kind of domain use became common between modern companies - and marketing strategies - and that is why I'm considering it.

    Read the article

  • How can I register a domain that requires country residency?

    - by zzatkin
    I tried to register a .pm domain from ovh.co.uk, but they e-mailed me saying they want valid proof that I am a resident of the United Kingdom. I currently live in the United States though. I am aware that I have to be a resident. That's not the question I'm asking. I want to know if it's possible, whether through some website that will get residency or some 'hacking' method, to register the domain I am interested in without having to physically be a resident of the country. I will try and find out if ovh.co.uk will charge me an extra fee, but until then I am curious to know if there is any way I could do this. Also, is there any other website I could purchase .pm domains from?

    Read the article

  • If I'm running my App Engine app on localhost, will I not see a value for X-AppEngine-Country?

    - by Bartholomew
    According to the Release Notes: All user request have an X-AppEngine-Country header which contains the ISO-3166-1 alpha-2 country code for the user, based on the IP address of the client request. My app is running on localhost with the 1.5.1 Java release which contains the X-AppEngine-Country header but I don't seem to be receiving any value for this header in my requests. Do I have to deploy the app to a production instance to test this feature?

    Read the article

  • is there any way to get country names from iPhone APIs?

    - by chiemekailo
    Hi, I want to provide a picker to the user to select a country. I've had a look in the NSLocale docs and I can get a list of all of the country codes supported on the device, which feels like a start: Code: NSArray *codes = [[NSArray alloc] initWithArray:[NSLocale ISOCountryCodes]]; But I can't work out if there is a programatic way to convert this array into country names... Ideally this list would be localized as well, i.e. show the country name in the user's preferred language. Can anyone point me in the right direction?

    Read the article

  • How can i configure country code in wireless WEP communication?

    - by Renjith G
    hi I need to configure country code between my wireless communication points. I am using madwifi, wireless tools and hostapd set up in my ap(board- linux OS(2.6.10)) , and am using OLITEC stick usb 802.11g card in my windows machine. I can communicate successfully using WEP,WPA-PSK and WPA , but i need to configure some more additional options such as Country code and Beacon period and Beacon interval etc. Expecting the reply, /renjith g

    Read the article

  • How can I set the date format to my country setting?

    - by Jamina Meissner
    I am German, but I use only English software. Hence, I am also using English Ubuntu. It's not because I don't know how to install German Ubuntu. It's because I prefer to work with English software environment. However, I would like to keep date & time format in German format, just as I use a German keyboard layout in English Ubuntu. I can set the time format to 24h time. But how can I set the date format to German time format? It is irritating for me to have the day number before the time numbers: In other words, instead of "Oct 14 15:16" I want it to display "14 Okt" or (if only English language is available) "14 Oct 15:16" or "14th Oct 15:16". At least, the number of the day should be displayed before the month. In Windows, it was no problem to choose time/date/currency settings according to a chosen country. Where can I do this in Ubuntu? The best would be if I could freely enter the date/time format myself with variables (DD.MM hh.mm.ss etc). I found answers for Ubuntu 11.04, but not for Ubuntu 12.04. I am using Ubuntu 12.04, 64-bit. Keep in mind that I am a beginner. So I'd like to be able to do this via GUI, if possible. EDIT: I found the answer in a forum. Go to System Settings... and choose Language Support. There are two tabs, Language and Reginal Formats. You are by default on the Language tab. On the Language tab, click Install / Remove Languages. A window with a list of languages opens. Mark the language(s) you want to add for your time/date/currency format. Click Apply Changes. Ubuntu will now download and install the additional language files, as well as help files of other applications in this language. So don't be irritated. When Ubuntu has finished applying the changes, switch to Regional Formats tab. (Do not change the Language for menus and windows on the Language tab if you only want to change the date/time/unit format). There you can choose from the dropdown list the language for your preferred format for date/time/currency/unit. Log out and log in again to have the changes take effect.

    Read the article

  • criticle join query mysql

    - by Bharanikumar
    i have table country and having country name and country code, i have customer table having countomer mobile number like customer_mobile field values like 0044-123456798 , 0024-582654753 , 012-52686145 , i want to populate my country oce into combo, that country name should in customer table which country code count is high that country name should come in the dropdown list top , How to write the join query... Thanks

    Read the article

  • sort the "rollup" in group by

    - by shantanuo
    I found that the "with rollup" option used with group by is very useful. But it does not behave with "order by" clause. Is there any way to order by the way I want as well as calculate the sub-totals? CREATE TABLE `mygroup` ( `id` int(11) default NULL, `country` varchar(100) default NULL ) ENGINE=MyISAM ; INSERT INTO `mygroup` VALUES (1,'India'),(5,'India'),(8,'India'),(18,'China'),(28,'China'),(28,'China'); mysql>select country, sum(id) from mygroup group by country with rollup; +---------+---------+ | country | sum(id) | +---------+---------+ | China | 74 | | India | 14 | | NULL | 88 | +---------+---------+ 3 rows in set (0.00 sec) mysql>select country, sum(id) as cnt from mygroup group by country order by cnt ; +---------+------+ | country | cnt | +---------+------+ | India | 14 | | China | 74 | +---------+------+ 2 rows in set (0.00 sec) mysql>select country, sum(id) as cnt from mygroup group by country with rollup order by cnt; ERROR 1221 (HY000): Incorrect usage of CUBE/ROLLUP and ORDER BY Expected Result: +---------+------+ | country | cnt | +---------+------+ | India | 14 | | China | 74 | | NULL | 88 | +---------+---------+ 3 rows in set (0.00 sec)

    Read the article

  • SQL Server JOIN with optional NULL values

    - by Paul McLoughlin
    Imagine that we have two tables as follows: Trades ( TradeRef INT NOT NULL, TradeStatus INT NOT NULL, Broker INT NOT NULL, Country VARCHAR(3) NOT NULL ) CTMBroker ( Broker INT NOT NULL, Country VARCHAR(3) NULL ) (These have been simplified for the purpose of this example). Now, if we wish to join these two tables on the Broker column, and if a country exists in the CTMBroker table on the Country, we have the following two choices: SELECT T.TradeRef,T.TradeStatus FROM Trades AS T JOIN CTMBroker AS B ON B.Broker=T.Broker AND ISNULL(B.Country, T.Country) = T.Country or SELECT T.TradeRef,T.TradeStatus FROM Trades AS T JOIN CTMBroker AS B ON B.Broker=T.Broker AND (B.COUNTRY=T.Country OR B.Country IS NULL) These are both logically equivalent, however in this specific circumstance for our database (SQL Server 2008, SP1) two different execution plans are produced for these two queries with the second version significantly outperforming the first version in terms of both time and logical reads. My question really is as follows: as a general rule would (2) be preferred to (1), or does this just happen to be exploiting some particular idiosyncracy of the optimiser in 2008 SP1 (that could therefore change with future versions of SQL Server).

    Read the article

  • Detect at runtime which country's App Store my iPhone app was downloaded from?

    - by Mike McMaster
    I have a feature in my iPhone application that, for business reasons, should only be shown/available to customers in the US. If I want to release this app to App Stores outside the US, what's the best way to figure out which country I'm in without relying on user-defined settings such as language and locale? In my mind, the ideal solution is that there's some runtime property that can tell me which App Store country the app was downloaded from, and I can take action accordingly. Looking through the docs and searching the web, I'm not coming up with anything in this department. I don't expect the solution to be 100% foolproof as far as users not being in the country they say they're from, but as close as possible would be nice. I suppose one solution would be to make a separate build for a new product on the App Store and have two versions, one for the US and one for the others, but that doesn't seem ideal. I'm hoping it can be the same product on the App Store to prevent things like fragmentation of user reviews. Thanks in advance!

    Read the article

  • Is there a way to change the string format for an existing CSR "Country Code" field from UTF8 to Printable String?

    - by Mike B
    CentOS 5.x The short version: Is there a way to change the encoding format for an existing CSR "Country Code" field from UTF8 to Printable String? The long version: I've got a CSR generated from a product using standard java security providers (jsse/jce). Some of the information in the CSR uses UTF8 Strings (which I understand is the preferred encoding requirement as of December 31, 2003 - RF 3280). The certificate authority I'm submitting the CSR to explicitly requires the Country Code to be specified as a PrintableString. My CSR has it listed as a UTF8 string. I went back to the latest RFC - http://www.ietf.org/rfc/rfc5280.txt. It seems to conflict specifically on countryName. Here's where it gets a little messy... The countryName is part of the relative DN. The relative DN is defined to be of type DirectoryString, which is defined as a choice of teletexString, printableString, universalString, utf8String, or bmpString. It also more specifically defines countryName as being either alpha (upper bound 2 bytes) or numeric (upper bound 3 bytes). Furthermore, in the appendix, it refers to the X520countryName, which is limited to be only a PrintableString of size 2. So, it is clear why it doesn't work. It appears that the certificate authority and Sun/Java do not agree on their interpretation of the requirements for the countryName. Is there anything I can do to modify the CSR to be compatible with the CA?

    Read the article

  • New ASP.NET 4.0 Web routing rules based on domain country extension?

    - by Nick
    Consider multiple domains (with different country extensions) that go to one singe physical website. Depending on the country extension of the domain, I want to route to a specific subfolder while keeping the active domain! Examples: www.mydomain.com/we/about-us.aspx to www.mydomain.com/content/com/we/about-us.aspx www.mydomain.fr/we/about-us.aspx to www.mydomain.fr/content/fr/we/about-us.aspx www.mydomain.be/we/about-us.aspx to www.mydomain.be/content/be/we/about-us.aspx Is this possible with the new web routing features in ASP.NET 4.0? Thanks, Nick

    Read the article

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