Search Results

Search found 7190 results on 288 pages for 'character codes'.

Page 89/288 | < Previous Page | 85 86 87 88 89 90 91 92 93 94 95 96  | Next Page >

  • Vim Misbehaving

    - by zchtodd
    I'm not sure what changed, but lately Vim has been driving me nuts. Whenever I try to do a column mode insert, vim takes my current character and adds to the last character I inserted. For example, the first time I do a block comment by inserting # on multiple lines, it works fine. The next time, however, I end up with ## inserted on every line, and the problem just compounds from there. To do this, I'm hitting Ctrl-V, down or up arrow, Shift-I, #, and then Esc. This worked for months, but now it seems to be pasting extra stuff in. I've tried disabling all .vimrc files, but the behavior remains the same. Any ideas?

    Read the article

  • How to map Ctrl + ',' to greater key( '>') or Ctrl + '.' to less key( '<' ) using xmodmap?

    - by Maxrunner
    So im trying to creating a combination of keys to generate the ISO key for Portuguese layout, the key in question is the <, pressing it normally will generate the '<' character, pressing + shift will generate the ' ' character. So i'm trying to create a combination while using xmodmap, and i want this to work for all programs.I've been searching on Google and came up with this example for Control + P = Up: Control + p = Up arrow example The example for that behaviour is: xmodmap -e "keycode 33 = p P Up" keycode 33 matches the p key, so where does control comes up in that command? regards,

    Read the article

  • Input multiple file names in windows open file dialog box

    - by goodiet
    Windows 7 allows you to select multiple files to open at once by using ctrl or shift key. The "File Name" input field at the bottom of the dialog box would auto populate with the following sample: "aaa.txt" "bbb.txt" "ccc.txt" "ddd.txt" I have 14,000 files in a folder and I only need a range of files (approx 500). When I use the shift key to select a range of files, the "File Name" field auto populates all 500 file names. Windows would cut me off at the 260th character when I try to paste in a pre-generated string into the "File Name" field. Is there a way to bypass the 260 character limit so it would accept my entire string with 500 file names?

    Read the article

  • Using system time directly to get random numbers

    - by Richard Mar.
    I had to return a random element from an array so I came up with this placeholder: return codes[(int) (System.currentTimeMillis() % codes.length - 1)]; Now than I think of it, I'm tempted to use it in real code. The Random() seeder uses system time as seed in most languages anyway, so why not use that time directly? As a bonus, I'm free from the worry of non-random lower bits of many RNGs. It this hack coming back to bite me? (The language is Java if that's relevant.)

    Read the article

  • How to show the animation without exposing the code?

    - by bonCodigo
    There's an animation done in jQuery within jsfiddle. I do not have a website as of now to "implant" it and share the URL. I also can't give the jsfiddle. So how can I share my animation to the audience without showing the code? Does github or any other facility tools allow locking the code and showing the final product without having a website, yet I could get a URL for the audience to view it? I regret for the rookie-question in this context as I am still new to web stuff. EDIT: jsFiddle shows 3 code windows along the results :html, css, js. My requirement is to only show the results window to the audience and by all means to hide codes and leads via URL to the codes. Ideal solution demands a results to be shown and URL that is encrypted (at best).

    Read the article

  • Finding the index of a given value in a pre-sorted array

    - by bobo
    Today, I went for an interview and the interviewer asked me how I would find the index of a given value (number) in a pre-sorted array like this: $preSortedArr=array(23,32,36,41,45,54); He also said that using recursion is not allowed. I think the function should look like this: function findIndexByValue($preSortedArray,$value){ //some codes here } What solution do you think he was expecting from me? EDIT: sorry, I forgot to add that, he originally asked me to write psuedo codes but I said I don't know. I tried to write in PHP, but I think he's expecting a language-independent solution.

    Read the article

  • left click + hold = add checkbox

    - by Reigel
    html <button>a</button> <div class="headerer"> <p>visit <a href="http://reigel-codes.co.cc">reigel-codes.co.cc</a></p> </div> problem how can I add anchors checkbox after <button by pressing and hold left click ?.. then stop adding when left click is release... I have tried so far, $(document).ready(function(){ $('button').mousedown(function(){ $(this).after('<input type="checkbox">') }); })

    Read the article

  • Having trouble searching for a ‘.’ using htaccess.

    - by ThisLanham
    I'm setting up a website that (ideally) would allow users to access other users' homepages with a url in the format "www.mysite.com/ThisLanham" where 'ThisLanham' is the username. The username begins with a letter and can consists of any alphanumeric character along with an underscore, hyphen, or period. So far, the redirection has worked perfectly when I ignore usage of the period character. The following code handles that request: RewriteRule ^([a-zA-Z][0-9a-zA-Z-_]*)/?$ Page/?un=$1 [NC,L] However, I've tried a number of ways it check for the period as well, but all have resulted in a 500 Internal Server Error. Here are some my attempts: RewriteRule ^([a-zA-Z][0-9a-zA-Z-\_\\.]\*)/?$ Page/?un=$1 [NC,L] RewriteRule ^([0-9a-zA-Z-\_\\.]\*)/?$ Page/?un=$1 [NC,L] RewriteRule ^([a-zA-Z].\*)/?$ Page/?un=$1 [NC,L] RewriteRule ^(.\*)/?$ Page/?un=$1 [NC,L] also tried... RewriteCond $1 != index.php RewriteRule ^([a-z][0-9a-z-_.]*)/?$ Page/?un=$1 [NC,L] My backup plan is to no longer allow users to include periods in their usernames, but I'd much rather find a solution. Any ideas?

    Read the article

  • MySQL: Selecting One Record When Others Have Same Data

    - by LoganFrederick
    I have a table of cities that all share the same area code: 367 01451 Harvard Worcester Massachusetts MA 978 Eastern 368 01452 Hubbardston Worcester Massachusetts MA 978 Eastern 369 01453 Leominster Worcester Massachusetts MA 978 Eastern The table has multiple area codes, all with multiple cities. What I'd like to do is only select one city from each area code and delete any extra cities from duplicate area codes. What would be the best query to accomplish this? I believe: http://stackoverflow.com/questions/596629/mysql4-sql-for-selecting-one-or-zero-record Is coming close to what I need but didn't quite get what/how those answers were working. Note The "978" row is the "area_code" row, table name is "zip_code".

    Read the article

  • Possible to convert list of #defines into strings (C++)

    - by brandonC
    Suppose I have a list of #defines in a header file for an external library. These #defines represent error codes returned from functions. I want to write a conversion function that can take as an input an error code and return as an output a string literal representing the actual #define name. As an example, if I have #define NO_ERROR 0 #define ONE_KIND_OF_ERROR 1 #define ANOTHER_KIND_OF_ERROR 2 I would like a function to be able to called like int errorCode = doSomeLibraryFunction(); if (errorCode) writeToLog(convertToString(errorCode)); And have convertToString() be able to auto-convert that error code without being a giant switch-case looking like const char* convertToString(int errorCode) { switch (errorCode) { case NO_ERROR: return "NO_ERROR"; case ONE_KIND_OF_ERROR: return "ONE_KIND_OF_ERROR"; ... ... ... I have a feeling that if this is possible, it would be possible using templates and metaprogramming, but that would only work the error codes were actually a type and not a bunch of processor macros. Thanks

    Read the article

  • VBA: Parse preceding numbers from string

    - by buttonsrtoys
    I need to parse into two substrings a string that always starts with numeric text followed by alphnumeric text. The strings can vary a bit, but not too much. Below are examples of incoming format and the strings I need: "00 10 50 Information to Bidders" ==> "00 10 50", "Information to Bidders" "001050 Information to Bidders" ==> "001050", "Information to Bidders" "00 10 50 - Information to Bidders" ==> "00 10 50", "Information to Bidders" "001050 -- Information to Bidders" ==> "001050", "Information to Bidders" I was hoping it would only be a half dozen lines of VBA, but my code is turning into a loop where I'm testing every character in the string to see where the changeover from numeric-only to non-numeric, then parsing the string based on the changeover location. Not a big deal, but messier than I was hoping for. Are there VBA functions that would eliminate the need to iterate through each string character?

    Read the article

  • Why call iframe from javascript

    - by sammville
    I want to know why some ad codes or embed codes don't directly give you iframe code to embed on your site instead they give a javascript code which links to another javascript file on their server. The file on their server calls the iframe which serves the content. Why is this done and what are the benefits of this method. Example: this is the code issued by amazon: <script type="text/javascript" src="http://www.assoc-amazon.co.uk/s/ads.js"></script> Which opens another javascript file that calls the iframe.

    Read the article

  • PHP uploads and checking

    - by user147685
    Hi all, I want to update/insert file by using upload box to the database but before that it will check for the file type thats only pdf can be upload. Somthing wrong with the codes and i dont know what..Please help here are part of my updates codes: $id=$rs['id']; $qry = "SELECT a.faillampiran FROM {$CFG->prefix}ptk_lampiran a, {$CFG->prefix}ptk b WHERE a.ptkid=$id and b.id=$id"; $sql = get_records_sql($qry); if($_POST['check']){ $ext = pathinfo($faillampiran,PATHINFO_EXTENSION); $err = "Upload Only PDF File. "; if ($ext =='pdf'){ $qry="UPDATE {$CFG->prefix}ptk_lampiran SET faillampiran='".$faillampiran."' WHERE ptkid='".$_GET['id']."'"; $sql=mysql_query($qry); $qry = "SELECT a.faillampiran FROM {$CFG->prefix}ptk_lampiran a, {$CFG->prefix}ptk b WHERE b.id = '".$rs[id]."' AND a.ptkid = '".$rs[id]."' "; $sql = get_records_sql($qry); foreach($sql as $rs){ ?> <?=basename($rs->faillampiran); ?><br> <? } ?> <tr><td></td><td></td><td> <input type="file" size="50" name="faillampiran" alt="faillampiran" value= "<?=$faillampiran;?>" /> <input type="submit" name="edit" value="Muat naik fail ini" /><br /> </td></tr> } else { echo "<script>alert('$err')</script>"; } } else { foreach($sql as $rs){ ?> <?=basename($rs->faillampiran); ?><br> <? } ?> <input type="file" size="50" name="faillampiran" alt="faillampiran" value= "<?=$faillampiran;?>" /> <input type="submit" name="edit" value="Muat naik fail ini" /><br /> <?} Sori bout the messiness of the codes, im still a beginner in this languages. thx

    Read the article

  • How to extend the list of available Java Locales

    - by alfonx
    I am looking for a way to add more Locales to the Locales available in Java 1.6. But the Locales I want to create do not have ISO-3166 country codes, nor ISO-639 language codes. Is there any way to do this anyways? The Locales I want to add only differ in the language names, but the smaller an ethnic group is, the more picky they get about their identity ;-) So I thought about extending an existing Locale, something like UserDefinedLocale extends Locale { UserDefinedLocale (Locale parentLocale) {...} } but java.util.Locale is final, which makes it especially hard to hack something around... So, is the idea that the list of Java Locales is exhaustive? Am I the first to miss some more Locales?

    Read the article

  • freeing malloc and checkin it is empty or not

    - by gcc
    char *p; p="kjkjk"; . .//there are codes which are checking another command . if(.....)//i used pointer p in only that area free(p); . . //there are codes which are checking another command . if(p==NULL) //i check whether is empty .... if(p==-1) //can we use "EOF==p " in if statement ... //are there any usage like that EOF==p else .... I think there is big error , but where?

    Read the article

  • Exception handling pattern

    - by treefrog
    It is a common pattern I see where the error codes associated with an exception are stored as Static final ints. when the exception is created to be thrown, it is constructed with one of these codes along with an error message. This results in the method that is going to catch it having to look at the code and then decide on a course of action. The alternative seems to be- declare a class for EVERY exception error case Is there a middle ground ? what is the recommended method ?

    Read the article

  • /dev/null file became regular file

    - by user197719
    In our production server suddenly /dev/null became a regular file and due to this sshd service got stopped and not able to login the server. And also we tried to the below steps to configure back to character device file, rm -rf /dev/null mknod /dev/null c 1 3 As soon as we run the rm command /dev/null is being re-created as a regular file before mknod can run. We can't figure out how this happening and which component is creating this file. So until we solve this issue we are unable to create /dev/null as character device file.

    Read the article

  • Loading Nested JS Files on the Page

    - by Aidin
    Hi, I have a JS file that is dependent to another Js file. this Js file is something like this (Common.js) //Some codes here window.onload = PageLoad; //some codes here and then I implement PageLoad function in another Js file. ( I do this because every page has its own PageLoad implementation) and I Load these files like this on my Main.aspx : `<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">` `<\script language="javascript" type="text/javascript" src="PagesJS/pgeMain.js"></script>` `<\script language="javascript" type="text/javascript" src="JS/Common.js"></script>` ... ... `</asp:Content>` Every thing works fine on local but when I deploy it, sometimes I get PageLoad undefined Error! Can any one tells me what is wrong with this? Thanks. Aidin

    Read the article

  • Error including errno.h

    - by TechWiz
    Every time I try to compile a project that includes errno.h in linux, I get issues using the error codes. GCC spits out errors saying the error codes aren't declared and I get the same issue with 3rd party projects that are, of course, known to compile. I have the Linux headers for my kernel installed. Any suggestions as to what else it could be? edit: Snippet at error code: if ((res != 0) && (errno == EEXIST)) Snippet of includes: ... #include <dirent.h> #include <errno.h> #include <stdarg.h> ... as is with no ifdef edit: Well I'm convinced my system's Linux headers are hosed somehow... that, or I'm missing some environment vars.

    Read the article

  • Why i get this following error when using dir in Matlab?

    - by nata
    Matlab keep give me following error message : ??? Error using == dir Argument must contain a string. Error in == Awal at 15 x = dir(subDirs) Below is my codes : %MY PROGRAM clear all; clc; close all; %-----Create Database----- TrainDB = uigetdir('','Select Database Directory'); TrainFiles = dir(TrainDB); dirIndex = [TrainFiles.isdir]; [s subDirNumber] = size(dirIndex); for i = 3:subDirNumber subDirs = {TrainFiles(i).name}; subDirs = strcat(TrainDB,'\',subDirs); x = dir(subDirs) %<-------Error Here end Is something wrong with the codes? Your help will be appreciated. I'm sorry for my bad English.

    Read the article

  • Error - Trying to get property of non-object

    - by Patrick Lanfranco
    I am currently getting this error on one of my files: /var/www/vhosts/httpdocs/generator/index.php on line 6 Line 6 would be resulting in: echo $results->GetBookCodesResult->BookCodes->BookInfo->ServiceCode; My code: <?php $config['soap_url'] = "http://myservice.com?WSDL"; if(isset($_REQUEST['codes'])) { $results = request_Data(explode("\n",$_REQUEST['codes'])); echo $results->GetBookCodesResult->BookCodes->BookInfo->ServiceCode; } .... What is the best method to have this fixed? Some advice would be appreciated.

    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

  • Using a database with C#

    - by Mike
    I have been trying to do something that I think would be really easy but have never used C# before and am having trouble with the details. I simple want to use a sql database with Visual C# Express 2008. For testing purposes I have a datagrid on my form that can reflect changes to the db. If i use this: codesTableAdapter.Fill(dataSet1.codes); The datagrid(dataset) will fill with the info from the sql database. If i then do something like this: codesTableAdapter.InsertQuery(txtCode.Text,txtName.Text); codesTableAdapter.Fill(dataSet1.codes); codesTableAdapter.Update(dataSet1); dataSet1.AcceptChanges(); The datagrid reflects the changes but if close the program and go to the database the changes are not there. When I open the program again the changes are not there. I have a feeling this isn't too clear as my understanding here is very low so please let me know what other info is needed. Thanks

    Read the article

< Previous Page | 85 86 87 88 89 90 91 92 93 94 95 96  | Next Page >