Search Results

Search found 2876 results on 116 pages for 'cursor'.

Page 15/116 | < Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >

  • getting emacs to move cursor by words on a Mac

    - by hatorade
    It's supposed to be M + cursor, but any shortcut in emacs using M (escape) on my mac sucks, because every time i need to use it, i need to release M (the escape key) and then press it again. Is there a better shortcut for moving along words in emacs (kind of like ctr + arrow in windows?)

    Read the article

  • wxPython - ListCrtl and SQLite3

    - by Dunwitch
    I'm trying to get a SQLite3 DB to populate a wx.ListCrtl. I can get it to print to stdout/stderr without any problem. I just can't seem to figure out how to display the data in the DataWindow/DataList? I'm sure I've made some code mistakes, so any help is appreciated. Main.py import wx import wx.lib.mixins.listctrl as listmix from database import * import sys class DataWindow(wx.Frame): def __init__(self, parent = None): wx.Frame.__init__(self, parent, -1, 'DataList', size=(640,480)) self.win = DataList(self) self.Center() self.Show(True) class DataList(wx.ListCtrl, listmix.ListCtrlAutoWidthMixin, listmix.ColumnSorterMixin): def __init__(self, parent = DataWindow): wx.ListCtrl.__init__( self, parent, -1, style=wx.LC_REPORT|wx.LC_VIRTUAL|wx.LC_HRULES|wx.LC_VRULES) #building the columns self.InsertColumn(0, "Location") self.InsertColumn(1, "Address") self.InsertColumn(2, "Subnet") self.InsertColumn(3, "Gateway") self.SetColumnWidth(0, 100) self.SetColumnWidth(1, 150) self.SetColumnWidth(2, 150) self.SetColumnWidth(3, 150) class MainWindow(wx.Frame): def __init__(self, parent = None, id = -1, title = "MainWindow"): wx.Frame.__init__(self, parent, id, title, size = (800,600), style = wx.DEFAULT_FRAME_STYLE ^ (wx.RESIZE_BORDER)) # StatusBar self.CreateStatusBar() # Filemenu filemenu = wx.Menu() # Filemenu - About menuitem = filemenu.Append(-1, "&About", "Information about this application") self.Bind(wx.EVT_MENU, self.onAbout, menuitem) #Filemenu - Data menuitem = filemenu.Append(-1, "&Data", "Get data") self.Bind(wx.EVT_MENU, self.onData, menuitem) # Filemenu - Seperator filemenu.AppendSeparator() #Filemenu - Exit menuitem = filemenu.Append(-1, "&Exit", "Exit the application") self.Bind(wx.EVT_MENU, self.onExit, menuitem) # Menubar menubar = wx.MenuBar() menubar.Append(filemenu, "&File") self.SetMenuBar(menubar) # Show self.Show(True) self.Center() def onAbout(self, event): pass def onData(self, event): DataWindow(self) callDb = Database() sql = "SELECT rowid, address, subnet, gateway FROM pod1" records = callDb.select(sql) for v in records: print "How do I get the records on the DataList?" #print "%s%s%s" % (v[1],v[2],v[3]) #for v in records: #DataList.InsertStringItem("%s") % (v[0], v[1], v[2]) def onExit(self, event): self.Close() self.Destroy() def onSave(self, event): pass if __name__ == '__main__': app = wx.App() frame = MainWindow(None, -1) frame.Show() app.MainLoop() database.py import os import sqlite3 class Database(object): def __init__(self, db_file="data/data.sqlite"): database_allready_exists = os.path.exists(db_file) self.db = sqlite3.connect(db_file) if not database_allready_exists: self.setupDefaultData() def select(self,sql): cursor = self.db.cursor() cursor.execute(sql) records = cursor.fetchall() cursor.close return records def insert(self,sql): newID = 0 cursor = self.db.cursor() cursor.execute(sql) newID = cursor.lastrowid self.db.commit() cursor.close() return newID def save(self,sql): cursor = self.db.cursor() cursor.execute(sql) self.db.commit() cursor.close() def setupDefaultData(self): pass

    Read the article

  • Windows 7 Busy Icon won't stop spinning

    - by Lynda
    In windows 7 you have the busy icon that is a little blue wheel spinning beside the cursor when it is doing something. It has started to spin for about a second every 3-5 seconds. There is noting running that I can tell on the computer to cause the busy icon. It gets very annoying and I am not sure what to do to get it to stop. Ideas? Running a CPU Usage Gadget says I have less than 5% of the CPU being use and I have over 6GB of RAM free. (I have 8GB total) I am running a 3.6 GHZ AMD FX 4100 processor. EDIT- What I am actually seeing is the working in background pointer (the pointer is still visible beside the busy icon). EDIT 2 - After realizing this happened with the printer installation I turned on the the printer and the busy icon stopped. The printer is setup wirelessly. How do I stop Windows from (I guess) checking for the printer? That is what I assume it is doing. I am using a HP Officejet 8600

    Read the article

  • jquery Setting cursor position in contenteditable div

    - by Mark
    The old version of the question is below, after researching more, I decided to rephrase the question. The problem as before is, I need to focus a contenteditable div without highlighting the text, doing straight up focus highlights the text in Chrome. I realize that people solved this problems in textareas by resetting the caret position in the textarea. How can I do that with a contenteditable element? All the plugins I've tried only works with textareas. Thanks. Old Phrasing of the question: I have a contenteditable element that I want to focus, but only insofar as to place the cursor at the front of the element, rather selecting everything. elem.trigger('focus'); with jquery selects all the text in the entire element in chrome. Firefox behaves correctly, setting the caret at the front of the text. How can I get Chrome to behave the way I want, or is focus perhaps not what I'm looking for. Thanks

    Read the article

  • mouse_event WinAPI call not working when cursor is over Flash

    - by friederbluemle
    Hi, I am writing a small program which can simulate mouse clicks at specified positions. Using the Win32 API call mouse_event like so: [DllImport("user32.dll", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)] public static extern void mouse_event(uint dwFlags, uint dx, uint dy, uint dwData, UIntPtr dwExtraInfo); [Flags] public enum MouseEventFlags : uint { LEFTDOWN = 0x00000002, LEFTUP = 0x00000004, MIDDLEDOWN = 0x00000020, MIDDLEUP = 0x00000040, MOVE = 0x00000001, ABSOLUTE = 0x00008000, RIGHTDOWN = 0x00000008, RIGHTUP = 0x00000010 } mouse_event((uint)(MouseEventFlags.LEFTDOWN | MouseEventFlags.LEFTUP), x, y, 0, UIntPtr.Zero); Works perfectly fine, except when the mouse cursor is over a Flash application. Flash seems to ignore the simulated mouse click. What could be the reason for this? And how do I fix it? Thank you!

    Read the article

  • Get text under mouse cursor in mac osx leopard/snow leopard

    - by Liuyi Sun
    Hi there, is there any idea for getting the text under the mouse cursor? I'm trying to build a dictionary app, that pops up a panel of translates when mouse hangs over a word. I took a look at the accessiblity apis, and it only can find the current ui element, but not the current word... my last choice will be makeing screenshots frequently, and doing ocr... that'll be cpu consuming, I don't like that.. any idea for this? thanks in advance!

    Read the article

  • Bash alias to open Vim at last cursor position mark

    - by Pierre LaFayette
    The mark " in Vim takes you to your last cursor position. I want to create an alias that will open my Vim instance and jump to that mark; something which is obviously extremely useful. This works from the command line: $ vim -c "'\"" File.cpp Now I want to make an alias for this: $ alias v='vim -c "'\""' Well that's not going to work! You need to escape the first single quote you say... $ alias v='vim -c "\'\""' Hmm. That didn't work either... So I try a whole lot of variations of single quoted and double quoted madness, bang my head against the table and load up stackoverflow in my browser, and here we are. How do I properly escape this alias?

    Read the article

  • Set focus and carret position in textarea according to mouse position, as if user had clicked

    - by JeanHuguesRobert
    Once a page with a textarea is loaded, I want some textarea to have the focus immediatly if the mouse cursor is inside that textarea. This is the easy part because a onmousehover handler can set the focus. Now, how to I also set the position of the caret? I would like the caret to be where it would be if the user had clicked using the mouse to set the focus/caret. The basic use case is : User clicks on a link and waits (mouse barely moves) A page is delivered, it contains a big textarea only, full of text User types using keyboard Characters are inserted right below the mouse cursor Today the user has to wait until the caret is visible (at the top left of the textarea) and then click to move the caret before typing. Thanks!

    Read the article

  • How to get video file details eg. duration in Android?

    - by spirytus
    I struggle to get specific video file details so duration etc. from the file the files recorded earlier. All I can currently do is to get cursor with all the files, then loop one by one. Cursor cursor = MediaStore.Video.query(getContext().getContentResolver(), MediaStore.Video.Media.EXTERNAL_CONTENT_URI, new String[]{MediaStore.Video.VideoColumns.DURATION,MediaStore.Video.VideoColumns.DATE_TAKEN,MediaStore.Video.VideoColumns.RESOLUTION,MediaStore.Video.VideoColumns.DISPLAY_NAME}); if(cursor.moveToFirst()) while(!cursor.isLast()){ if(cursor.getString(3)==fight.filename) { // do something here } cursor.moveToNext(); } I need however to access details of specific files so I tried to create URI but no luck as cursor returned is always null. Where do I go wrong? Uri uri = Uri.parse(Environment.DIRECTORY_DCIM+"/FightAll_BJJ_Scoring/"+(fight.filename)); Cursor cursor = MediaStore.Video.query(getContext().getContentResolver(), uri, new String[]{MediaStore.Video.VideoColumns.DURATION,MediaStore.Video.VideoColumns.DATE_TAKEN,MediaStore.Video.VideoColumns.RESOLUTION,MediaStore.Video.VideoColumns.DISPLAY_NAME}); // cursor is always null here

    Read the article

  • CreateDIBSection is throwing, when trying to create cursor on Win

    - by Anaamika
    Hi, I am trying to create Cursor from png, and CreateDIBSection() is throwing. Follwoing is the snippet of code: HDC hdc = GetDC(NULL); void* lpBits = NULL; HBITMAP hBitmap; try { hBitmap = CreateDIBSection( hdc, (BITMAPINFO*)&bi, 0, &lpBits, NULL, (DWORD)0); } ReleaseDC(NULL, hdc); As CreateDIBSection is throwing, the code to release DC is not getting executed. can you please let me know the possible issue behind this?

    Read the article

  • strange Problem with WPF Textbox stringformat - Cursor moves back

    - by Emad
    I am using WPF 4.0 TextBox and binding. I am using StringFormat to format the number as currency. the XAML looks like this: <TextBox Text="{Binding Path=ValueProperty, ValidatesOnDataErrors=True, ValidatesOnExceptions=True, StringFormat={}{0:C}, UpdateSourceTrigger=PropertyChanged}"> </TextBox> Everything seems to work correctly except for a strange behavior: When for example a user types in 12: right after typing 1, the value in the textbox becomes $1.00 and the weird thing is the the cursor is moved to be between the $ and the 1. So when a user simply types in 12, the result becomes $21.00. How can I fix this strange behavior?

    Read the article

  • Usage CursorLoader without ContentProvider

    - by sealskej
    Android SDK documentation says that startManagingCursor() method is depracated: This method is deprecated. Use the new CursorLoader class with LoaderManager instead; this is also available on older platforms through the Android compatibility package. This method allows the activity to take care of managing the given Cursor's lifecycle for you based on the activity's lifecycle. That is, when the activity is stopped it will automatically call deactivate() on the given Cursor, and when it is later restarted it will call requery() for you. When the activity is destroyed, all managed Cursors will be closed automatically. If you are targeting HONEYCOMB or later, consider instead using LoaderManager instead, available via getLoaderManager() So I would like to use CursorLoader. But how can I use it with custom CursorAdapter and without ContentProvider, when I needs URI in constructor of CursorLoader?

    Read the article

  • Vim open file under cursor

    - by ereOn
    Hi, Let's say I have the following file tree: / include/ library/ a.hpp b.hpp src/ a.cpp b.cpp And the following /src/a.cpp file: #include "a.hpp" #include "b.hpp" I always open Vim at the root directory. So when I want to load a.hpp I do : :tabnew include/library/a.hpp or: :tabnew **/a.hpp I'd like to map <F4> to open the file under the cursor in a new tab, using a recursive search. I tried the following mapping command: :map <F4> :tabnew **/expand("<cfile>")<cr> But obviously, this can't work, as it tries to open the file "/expand(" instead. Any clue on how I could do that ? Thanks.

    Read the article

  • Filter rows from Cursor so they don't show up in ListView

    - by Richard
    I have a Cursor that returns rows I use with a SimpleCursorAdapter to populate a ListView. I would like to filter some of the rows so they don't get displayed in my ListView. I use the data from the rows elsewhere in my Activity so I don't want to change my SQL to filter them with a WHERE clause. What is the best way to keep a row from being displaying in my ListView? Ideally I would check a column in my row and then only add rows to the ListView that satisfy a condition.

    Read the article

  • pl/sql creating a function with parameterized cursor with return date

    - by user3134365
    create or replace FUNCTION get_next_sch_date(cert_id VARCHAR2,test_id VARCHAR2) RETURN DATE AS CURSOR next_sch_date(pb_id number,test_no varchar2) IS SELECT Sch_Controls,PBY_FRQ,START_AFTER__CAL_DAYS,PBY_DUE_BY,PBY_NEXT_SCH_TEST_DATE FROM ms_cmp_plan_pby WHERE pby_id=pb_id AND test_plan_id=test_no; l_new_date DATE; l_new_sch number; sch_ctrl VARCHAR2(100); pb_frq VARCHAR2(100); start_days NUMBER; due_days NUMBER; test_date DATE; pb_id NUMBER; test_no NUMBER; BEGIN OPEN next_sch_date(pb_id,test_no); loop FETCH next_sch_date INTO sch_ctrl,pb_frq,start_days,due_days,test_date; SELECT DISTINCT pby_rec_id INTO l_new_sch FROM ms_cmp_assignment_log WHERE ASSIGNMENT_ID=cert_id AND PLAN_ID=test_id; exit; end loop; CLOSE next_sch_date; RETURN l_new_date; Exception WHEN others THEN RETURN NULL; end; this is my function but i dont getting excepted result

    Read the article

  • terminal: where am I?

    - by sid_com
    Is there a variable or a function, which can tell me the actual position of the cursor? #!/usr/bin/env perl use warnings; use 5.012; use Term::ReadKey; use Term::Cap; use POSIX; my( $col, $row ) = GetTerminalSize(); my $termios = new POSIX::Termios; $termios->getattr; my $ospeed = $termios->getospeed; my $terminal = Tgetent Term::Cap { TERM => undef, OSPEED => $ospeed }; # some movement ... # at which position (x/y) is the cursor now?

    Read the article

  • Can I lock rows in a cursor if the cursor only returns a single count(*) row?

    - by RenderIn
    I would like to restrict users from inserting more than 3 records with color = 'Red' in my FOO table. My intentions are to A) retrieve the current count so that I can determine whether another record is allowed and B) prevent any other processes from inserting any Red records while this one is in process, hence the for update of. I'd like to do something like: cursor cur_cnt is select count(*) cnt from foo where foo.color = 'Red' for update of foo.id; Will this satisfy both my requirements or will it not lock only the rows in the count(*) who had foo.color = 'Red'?

    Read the article

  • Button border radius and cursor

    - by noober
    CSS border radius does affect button rendering (I see it's round form), but does not affect how it interacts with the user (I still can click button outside its border). How should I fix it? I see the behavior in Chrome. button { cursor: pointer; outline: none; background-size: 100% 100%; background-color: red; /*transparent;*/ /* It's actually red and ROUND. */ background-position: center center; background-repeat: no-repeat; border: 0px; -webkit-border-top-left-radius: 73px; -webkit-border-top-right-radius: 73px; -webkit-border-bottom-left-radius: 73px; -webkit-border-bottom-right-radius: 73px; width: 146px; height: 146px; background-image: url('leftarrow.png'); } Regards,

    Read the article

  • contentEditable cursor position/style in FireFox

    - by Ben McCann
    I'm having trouble using contentEditable in FireFox 3. I have a problem where the cursor will appear above or only partially in the div after I click in it (until I start typing at which time it behaves correctly). Any ideas on how I can stop this from happening? HTML: <html> <head><title>Test Page</title></head> <body> <div id="editor" style="position:absolute; left:157px; top:230px; width:120px; height:30px"> <div id="input" style="width:100%; height:100%; border:1px solid black; outline:none" contentEditable="true"> </div> </div> </body> </html>

    Read the article

  • How to bulk insert data from ref cursor to a temporary table in PL/SQL

    - by Sambath
    Could anyone tell me how to bulk insert data from a ref cursor to a temporary table in PL/SQL? I have a procedure that one of its parameters stores a result set, this result set will be inserted to a temporary table in another stored procedure. This is my sample code. CREATE OR REPLACE PROCEDURE get_account_list ( type_id in account_type.account_type_id%type, acc_list out sys_refcursor ) is begin open acc_list for select account_id, account_name, balance from account where account_type_id = type_id; end get_account_list; CREATE OR REPLACE PROCEDURE proc1 ( ... ) is accounts sys_refcursor; begin get_account_list(1, accounts); --How to bulk insert data in accounts to a temporary table? end proc1; In SQL Server, I can write as code below CREATE PROCEDURE get_account_list type_id int as select account_id, account_name, balance from account where account_type_id = type_id; CREATE PROCEDURE proc1 ( ... ) as ... insert into #tmp_data(account_id, account_name, balance) exec get_account_list 1 How can I write similar to the code in SQL Server? Thanks.

    Read the article

  • Intent provided by Cursor is not fired correctly (LiveFolders)

    - by Felix
    In my desperation with trying to get LiveFolders working, I have tried the following in my LiveFolder ContentProvider: public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder) { MatrixCursor mc = new MatrixCursor(new String[] { LiveFolders._ID, LiveFolders.NAME, LiveFolders.INTENT } ); Intent i = null; for (int j=0; j < 5; j++) { i = new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.google.com/")); mc.addRow(new Object[] { j, "hello", i} ); } return mc; } Which, in all normalness, should launch the Browser and display the Google homepage when clicking on an item in the LiveFolder. But it doesn't. It gives a Application is not installed on your phone error. No, I'm not defining a base intent for my LiveFolder. logcat says: I/ActivityManager( 74): Starting activity: Intent { act=android.intent.action.VIEW dat=Intent { act=android.intent.action.VIEW dat=http://www.google.com/ } flg=0x10000000 } It seems it embeds the Intent I give it in the data section of the actually fired Intent. Why is it doing this? I'm really starting to believe it's a platform bug.

    Read the article

< Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >