Search Results

Search found 14798 results on 592 pages for 'non english'.

Page 9/592 | < Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • SQL SERVER – Find First Non-Numeric Character from String

    - by pinaldave
    It is fun when you have to deal with simple problems and there are no out of the box solution. I am sure there are many cases when we needed the first non-numeric character from the string but there is no function available to identify that right away. Here is the quick script I wrote down using PATINDEX. The function PATINDEX exists for quite a long time in SQL Server but I hardly see it being used. Well, at least I use it and I am comfortable using it. Here is a simple script which I use when I have to identify first non-numeric character. -- How to find first non numberic character USE tempdb GO CREATE TABLE MyTable (ID INT, Col1 VARCHAR(100)) GO INSERT INTO MyTable (ID, Col1) SELECT 1, '1one' UNION ALL SELECT 2, '11eleven' UNION ALL SELECT 3, '2two' UNION ALL SELECT 4, '22twentytwo' UNION ALL SELECT 5, '111oneeleven' GO -- Use of PATINDEX SELECT PATINDEX('%[^0-9]%',Col1) 'Position of NonNumeric Character', SUBSTRING(Col1,PATINDEX('%[^0-9]%',Col1),1) 'NonNumeric Character', Col1 'Original Character' FROM MyTable GO DROP TABLE MyTable GO Here is the resultset: Where do I use in the real world – well there are lots of examples. In one of the future blog posts I will cover that as well. Meanwhile, do you have any better way to achieve the same. Do share it here. I will write a follow up blog post with due credit to you. Reference : Pinal Dave (http://blog.SQLAuthority.com) Filed under: PostADay, SQL, SQL Authority, SQL Function, SQL Query, SQL Server, SQL String, SQL Tips and Tricks, T SQL, Technology

    Read the article

  • C# XNA: Effecient mesh building algorithm for voxel based terrain ("top" outside layer only, non-destructible)

    - by Tim Hatch
    To put this bluntly, for non-destructible/non-constructible voxel style terrain, are generated meshes handled much better than instancing? Is there another method to achieve millions of visible quad faces per scene with ease? If generated meshes per chunk is the way to go, what kind of algorithm might I want to use based on only EVER needing the outer layer rendered? I'm using 3D Perlin Noise for terrain generation (for overhangs/caves/etc). The layout is fantastic, but even for around 20k visible faces, it's quite slow using instancing (whether it's one big draw call or multiple smaller chunks). I've simplified it to the point of removing non-visible cubes and only having the top faces of my cube-like terrain be rendered, but with 20k quad instances, it's still pretty sluggish (30fps on my machine). My goal is for the world to be made using quite small cubes. Where multiple games (IE: Minecraft) have the player 1x1 cube in width/length and 2 high, I'm shooting for 6x6 width/length and 9 high. With a lot of advantages as far as gameplay goes, it also means I could quite easily have a single scene with millions of truly visible quads. So, I have been trying to look into changing my method from instancing to mesh generation on a chunk by chunk basis. Do video cards handle this type of processing better than separate quads/cubes through instancing? What kind of existing algorithms should I be looking into? I've seen references to marching cubes a few times now, but I haven't spent much time investigating it since I don't know if it's the better route for my situation or not. I'm also starting to doubt my need of using 3D Perlin noise for terrain generation since I won't want the kind of depth it would seem best at. I just like the idea of overhangs and occasional cave-like structures, but could find no better 'surface only' algorithms to cover that. If anyone has any better suggestions there, feel free to throw them at me too. Thanks, Mythics

    Read the article

  • How to handle editing a large file for a non-technical user

    - by Luke
    I have a client who is given a tab delimited .txt file containing hundreds of thousands of rows. I have a user story as follows: As a user I want to take the text file and add a new value at the end of each line which contains the concatenated value of two of the columns. for example if the file read text_one text_two I need to output the following (preferably to a .txt file) text_one text_two text_onetext_two My first approach was to ask the vendor supplying the file to do the concatenation before providing the file, the easiest way to solve a problem is to eliminate it right? however they are very uncooperative and have point blank refused. I've looked at building a simple javascript application that does this client side so a non-technical user could select the file using a file selector. This approach has a few problems The file could be over a GB in size and so can't be loaded straight into memory, I've tried and the browser crashes There is no means to write a file in javascript so I'd need to output the content to the screen and have the user save it (somehow) I was thinking if I could get around the filesize limitations I could just output the edited content to the page and have the user save the page as a .txt file, however I think there is a better way than using javascript that will still accommodate the users lack of technical know-how. Please consider this question to be stack agnostic, but bear in mind that a nice little shell script or python script would be deemed unsuitable for a non technical user unless there is a way of "packaging" it nicely for a non-technical user. Updates The file is too large to open in excel. The process needs to be run weekly, but it doesn't require scheduling or automation...(yet)

    Read the article

  • Scaling along an arbitrary axis (Dealing with non-uniform scale)

    - by Jon
    I'm trying to build my own little engine to get more familiar with the concepts of 3D programming. I have a transform class that on each frame it creates a Scaling Matrix (S), a Rotation Matrix from a Quaternion (R) and concatenates them together (S*R). Once i have SR, I insert the translation values into the bottom of the three columns. So i end up with a transformation matrix that looks like: [SR SR SR 0] [SR SR SR 0] [SR SR SR 0] [tx ty tz 1] This works perfectly in all cases except when rotating an object that has a non-uniform scale. For example a unit cube with ScaleX = 4, ScaleY = 2, ScaleZ = 1 will give me a rectangular box that is 4 times as wide as the depth and twice as high as the depth. If i then translate this around, the box stays the same and looks normal. The problem happens whenever I try to rotate this scaled box. The shape itself becomes distorted and it appears as though the Scale factors are affecting the object on the World X,Y,Z axis rather than the local X,Y,Z axis of the object. I've done some pretty extensive research through a variety of textbooks (Eberly, Moller/Hoffman, Phar etc) and there isn't a ton there to go off of. Online, most of the answers say to avoid non-uniform scaling which I understand the desire to avoid it, but I'd still like to figure out how to support it. The only thing I can think off is that when constructing a Scale Matrix: [sx 0 0 0] [0 sy 0 0] [0 0 sz 0] [0 0 0 1] This is scaling along the World Axis instead of the object's local Direction, Up and Right vectors or it's local Z, Y, X axis. Does anyone have any tips or ideas on how to handle construction a transformation matrix that allows for non-uniform scaling and rotation? Thanks!

    Read the article

  • Find non-ascii characters from a UTF-8 string

    - by user10607
    I need to find the non-ASCII characters from a UTF-8 string. my understanding: UTF-8 is a superset of character encoding in which 0-127 are ascii characters. So if in a UTF-8 string , a characters value is Not between 0-127, then it is not a ascii character , right? Please correct me if i'm wrong here. On the above understanding i have written following code in C : Note: I'm using the Ubuntu gcc compiler to run C code utf-string is xvab c long i; char arr[] = "xvab c"; printf("length : %lu \n", sizeof(arr)); for(i=0; i<sizeof(arr); i++){ char ch = arr[i]; if (isascii(ch)) printf("Ascii character %c\n", ch); else printf("Not ascii character %c\n", ch); } Which prints the output like: length : 9 Ascii character x Not ascii character Not ascii character ? Not ascii character ? Ascii character a Ascii character b Ascii character Ascii character c Ascii character To naked eye length of xvab c seems to be 6, but in code it is coming as 9 ? Correct answer for the xvab c is 1 ...i.e it has only 1 non-ascii character , but in above output it is coming as 3 (times Not ascii character). How can i find the non-ascii character from UTF-8 string, correctly. Please guide on the subject.

    Read the article

  • C++: calling non-member functions with the same syntax of member ones

    - by peoro
    One thing I'd like to do in C++ is to call non-member functions with the same syntax you call member functions: class A { }; void f( A & this ) { /* ... */ } // ... A a; a.f(); // this is the same as f(a); Of course this could only work as long as f is not virtual (since it cannot appear in A's virtual table. f doesn't need to access A's non-public members. f doesn't conflict with a function declared in A (A::f). I'd like such a syntax because in my opinion it would be quite comfortable and would push good habits: calling str.strip() on a std::string (where strip is a function defined by the user) would sound a lot better than calling strip( str );. most of the times (always?) classes provide some member functions which don't require to be member (ie: are not virtual and don't use non-public members). This breaks encapsulation, but is the most practical thing to do (due to point 1). My question here is: what do you think of such feature? Do you think it would be something nice, or something that would introduce more issues than the ones it aims to solve? Could it make sense to propose such a feature to the next standard (the one after C++0x)? Of course this is just a brief description of this idea; it is not complete; we'd probably need to explicitly mark a function with a special keyword to let it work like this and many other stuff.

    Read the article

  • Why can't non-admin users install software?

    - by fiftyeight
    This is probably something I don't understand since I am used to Windows and am only starting out with Ubuntu. I know that software in linux comes in packages what I don't understand is why can't non-admin users install software. I mean, every application is run by a specific user, and that user will only be able to run that applciation with his privilages, so if he has no admin privileges, the application also won't be able to access unauthorized directories etc. I want most of the time to work on my PC with a non-admin user since it seems more safe to me, most of the time I have no need for admin privileges. and even though I know viruses in linux are uncommon I still think the best practice is to work on the computer in a state that you yourself can't make any changes to important files, that way viruses also can't harm any important files, but I need to install software for programming and web-design etc. and first of all I don't want to switch users all the time. But also it sounds safer to me that everything being done on the PC will be done through the non-admin user. I'll be glad to know what misunderstanding I have here, cause something here doesn't sound right.

    Read the article

  • How to catch non exist requested URL in Java servlet ?

    - by Frank
    My objects are stored online in two different places : <1 On my nmjava.com site, where I can put them in a directory called "Dir_My_App/Dir_ABC/" <2 On Google App Engine datastore When my Java app runs it checks both places for the objects, I designed the app so that it tries to get an object from a Url, it doesn't care whether it's an object in a directory or an object returned by a servlet. My_Object Get_Object(String Site_Url,String Object_Path) { ... get object by the name of Object_Path from the Site_Url ... } Now the request Url for my web site nmjava.com might look like this : http://nmjava.com/Dir_My_App/Dir_ABC/My_Obj_123 [ In a directory ] Or in the case of Google App Engine servlet : http://nm-java.appspot.com/Check_License/Dir_My_App/Dir_ABC/My_Obj_123 [ Non exist ] The "Object_Path" was generated by my app automatically. It can now get the object from my site by the above method like this : My_Object Get_Object("http://nmjava.com","/Dir_My_App/Dir_ABC/My_Obj_123"); In the Google App Engine, my servlet is running and ready to serve the object, if the request comes in correctly, but since I don't want to design my app to know whether the object is in one site's directory or in other site's datastore, I need to design the servlet to catch the non exist Url, such as the one above, and be able to make a call : My_Object Get_Object("http://nm-java.appspot.com/Check_License","/Dir_My_App/Dir_ABC/My_Obj_123"); So my question is : When a request comes into the servlet with a non exist Url, how should it catch it and analyze the url in order to respond properly, in my case it should know that : http://nm-java.appspot.com/Check_License/Dir_My_App/Dir_ABC/My_Obj_123 is asking for the object "My_Obj_123" [ ignore the dirs ] and return the object from the datastore. Now I'm getting this : Error: Not Found The requested URL /Check_License/Dir_My_App/Dir_ABC/My_Obj_123 was not found on this server. Where in my servlet and how do I detect the request for this non exist Url ?

    Read the article

  • Is it easy to switch from relational to non-relational databases with Rails?

    - by Tam
    Good day, I have been using Rails/Mysql for the past while but I have been hearing about Cassandra, MongoDB, CouchDB and other document-store DB/Non-relational databases. I'm planning to explore them later as they might be better alternative for scalability. I'm planning to start an application soon. Will it make a different with Rails design if I move from relational to non-relational database? I know Rails migrations are database-agnostic but wasn't sure if moving to non-relational will make difference with design or not.

    Read the article

  • I want to combine my www and non www and keep the link jucie from both.

    - by John Ray
    My website shows up for some keywords in the www and some in the non www. Seaquake shows more links to the non www version. It is a PR2 either way. I would like to combine the link juice of the two versions into the non www version. Does anyone know the best way to combine the two and keep the link juice of both. It is as simple as a 301 redirect and if so does the 301 need to be handled in any specific way.

    Read the article

  • What is the best euphemism for a non-developer?

    - by Edward Tanguay
    I'm writing a description for a piece of software that targets the user who is "not technically minded", i.e. a person who uses "browser/office/email" and has a low tolerance for anything technical, he just "wants it to work" without being involved in any of the technical details. What is the best non-disparaging term you have seen to describe this kind of user? non-technical user low-tech user office user normal user technically challenged user non-developer computer joe Surely there is some official, politically-correct retronym for this kind of user that the press and software marketing use.

    Read the article

  • Change Audio title from English to Sinhalese using ffmpeg

    - by user330461
    I insert an extra Sound track in my video file and it works well. ffmpeg -i news.mov -i news.wav -map 0:0 -map 0:1 -map 1:0 -pass 1 -vcodec libx264 -preset fast -b 512k -minrate 512k -maxrate 512k -bufsize 512k -threads 0 -f mp4 -an -y /dev/null && ffmpeg -i news.mov -i news.wav -map 0:0 -map 0:1 -map 1:0 -pass 2 -acodec libfaac -ab 128k -ac 2 -vcodec libx264 -preset fast -b 512k -minrate 512k -maxrate 512k -bufsize 512k -threads 0 -f mp4 news.mp4 The default audio track come with the label "English" and I would like to give it a label "Sinhalese" The Second Audio track come up without a label as "track#1" and I would like to give that a label of "Tamil". How do I do that ?

    Read the article

  • mounting a CIFS share fails in localized environment with non-english password

    - by user3684819
    A windows host creates a CIFS share and gives access to newuser (newuser is the user on windows host) newuser's password is set as UUUU*123 Windows host has a French Locale installed Now on linux host a mount command is given as follows (Linux host also has a french locale installed) mount -v -t cifs \iwf1113140.ind.hp.com\fl -o username=newuser,password=UUUU*123,ver=1,iocharset=utf8,osec=ntlmv2 /some_share_path The mount command fails with mount error[13] : permission denied. If the password is pure english say 'test123' mount succeeds. following is the locale output. LANG=fr_FR.utf8 Is there any idea why this may be happening?

    Read the article

  • Convert danish numbers to english ?

    - by francisf
    Hi , How do i convert a danish number to an english format for example : 8,5 is decimal number representation in danish and in english it would be 8.5 Now i need to convert 8,5 to 8.5 my current culture is danish and i am trying to convert this in javascript (NOT C#) Regards, Francis P.

    Read the article

  • Russian-to-English Parallel Word Corpus?

    - by Cygorger
    Hi: I am looking for a simple Russian to English word corpus. It can be as simple as a csv that lists a russian word in the first column and the equivalent English word in the second. Any ideas where I can find such a thing? Does the NLTK toolkit have something like this? Thanks

    Read the article

  • Why does writeUTFBytes mess up non-english characters?

    - by Lost_in_code
    I'm writing all sorts of multi lingual text to .txt files using AIR's fileStream.writeUTFBytes() For english characters everything works perfectly. But as soon as there are chinese, arabic or any other non-english characters the sentences are totally messed up. For example: ???????????.... becomes ÂØpÁùħßÂèîÊëÑÂO±Â?àÁöÑÁ°ÆÊ=°Áà±.... How can this be fixed?

    Read the article

  • how to read only english characters

    - by ralph
    I am reading a file that sometimes has chinese and characters of languages other than english. How can I write a regex that only reads english words/letters? should it just be /^[a-zA-Z]+/ ? If I do the above then words like eété will still be picked but I don't want them to be picked: "été".match(/^[a-zA-Z]+/) => #nil good I didnt want that word "eété".match(/^[a-zA-Z]+/) => #not nil tricked into picking something i did not want

    Read the article

  • SQL SERVER – Identify Numbers of Non Clustered Index on Tables for Entire Database

    - by pinaldave
    Here is the script which will give you numbers of non clustered indexes on any table in entire database. SELECT COUNT(i.TYPE) NoOfIndex, [schema_name] = s.name, table_name = o.name FROM sys.indexes i INNER JOIN sys.objects o ON i.[object_id] = o.[object_id] INNER JOIN sys.schemas s ON o.[schema_id] = s.[schema_id] WHERE o.TYPE IN ('U') AND i.TYPE = 2 GROUP BY s.name, o.name ORDER BY schema_name, table_name Here is the small story behind why this script was needed. I recently went to meet my friend in his office and he introduced me to his colleague in office as someone who is an expert in SQL Server Indexing. I politely said I am yet learning about Indexing and have a long way to go. My friend’s colleague right away said – he had a suggestion for me with related to Index. According to him he was looking for a script which will count all the non clustered on all the tables in the database and he was not able to find that on SQLAuthority.com. I was a bit surprised as I really do not remember all the details about what I have written so far. I quickly pull up my phone and tried to look for the script on my custom search engine and he was correct. I never wrote a script which will count all the non clustered indexes on tables in the whole database. Excessive indexing is not recommended in general. If you have too many indexes it will definitely negatively affect your performance. The above query will quickly give you details of numbers of indexes on tables on your entire database. You can quickly glance and use the numbers as reference. Please note that the number of the index is not a indication of bad indexes. There is a lot of wisdom I can write here but that is not the scope of this blog post. There are many different rules with Indexes and many different scenarios. For example – a table which is heap (no clustered index) is often not recommended on OLTP workload (here is the blog post to identify them), drop unused indexes with careful observation (here is the script for it), identify missing indexes and after careful testing add them (here is the script for it). Even though I have given few links here it is just the tip of the iceberg. If you follow only above four advices your ship may still sink. Those who wants to learn the subject in depth can watch the videos here after logging in. Reference: Pinal Dave (http://blog.sqlauthority.com) Filed under: PostADay, SQL, SQL Authority, SQL Index, SQL Query, SQL Server, SQL Tips and Tricks, T SQL, Technology

    Read the article

  • 301 redirect www to non-www [duplicate]

    - by Claudiu
    This question already has an answer here: Removing non-www support 4 answers I understand that it is better to make a 301 redirect to make sure that all your links are seen the same on Google. Until now I always used erasmus-plus.ro without the www. for my website. Is it ok to make a redirect from www. to non-www. From my search on Google all users spoke about it the other way around. And somewhere I read that redirects are not good for seo. Is 301 an exception?

    Read the article

  • REST or Non-REST on Internal Services

    - by tyndall
    I'm curious if others have chosen to implement some services internally at their companies as non-REST (SOAP, Thrift, Proto Buffers, etc...) as a way to auto-generate client libraries/wrappers? I'm on a two year project. I will be writing maybe 40 services over that period with my team. 10% of those services definitely make sense as REST services, but the other 90% feel more like they could be done in REST or RPC style. Of these 90%, 100% will be .NET talking to .NET. When I think about all the effort to have my devs develop client "wrappers" for REST services I cringe. WADL or RSDL don't seem to have enough mindshare. Thoughts? Any good discussions of this "internal service" issue online? If you have struggled with this what general rules for determining REST or non-REST have you used?

    Read the article

  • Is BDD actually writable by non-programmers?

    - by MattiSG
    Behavior-Driven Development with its emblematic “Given-When-Then” scenarios syntax has lately been quite hyped for its possible uses as a boundary object for software functionality assessment. I definitely agree that Gherkin, or whichever feature definition script you prefer, is a business-readable DSL, and already provides value as such. However, I disagree that it is writable by non-programmers (as does Martin Fowler). Does anyone have accounts of scenarios being written by non-programmers, then instrumented by developers? If there is indeed a consensus on the lack of writability, then would you see a problem with a tool that, instead of starting with the scenarios and instrumenting them, would generate business-readable scenarios from the actual tests?

    Read the article

  • Functional or non-functional requirement?

    - by killer_PL
    I'm wondering about functional or non-functional requirements. I have found lot of different definitions for those terms and I can't assign some of my requirement to proper category. I'm wondering about requirements that aren't connected with some action or have some additional conditions, for example: On the list of selected devices, device can be repeated. Database must contain at least 100 items Currency of some value must be in USD dollar. Device must have a name and power consumption value in Watts. are those requirements functional or non-functional ?

    Read the article

  • Changed url from non www to www...Google Indexing

    - by user20321
    I have recently changed (about 1 week ago) my url from non www version to www version. I told my hosting company to do this and they did it successfully all my urls are directed to www version. But google is indexing my non www version on the search results. I have updated new content on my website and google indexes that content with the changed url i.e with prefix www but the mainpage i.e the site name is still shown without www and its not updated. I have checked that my www.sitename.com is listed on google but not shown when I type www.sitename.com. So how much time does it take to remove the old urls from indexing and updating into new urls ??????

    Read the article

< Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >