Search Results

Search found 1183 results on 48 pages for 'robert schneider'.

Page 38/48 | < Previous Page | 34 35 36 37 38 39 40 41 42 43 44 45  | Next Page >

  • Creating a floating button

    - by Robert Smith
    Hey all, I'm working on a Firefox extension and am out of ideas on how to implement a floating button. I need a button that is overlayed on my page that I can show/hide and dynamically position just about anywhere on my page. I thought I could do something like a fancy CSS tool-tip except replace it with button functionality, but that idea failed because I couldn't pull my example apart well enough to understand what all I need to include, need to change, etc. I've thought about using jQuery(though wouldn't mind avoiding, unless it makes this painfully easy) but will be looking more into that as a possibility now. If anyone can offer a tutorial link, ideas, sample code, anything to help get me moving in the right direction I will greatly appreciate it! Thanks! Edit: Clarification I'm not entirely sure how to actually create the overlayed button. I tried to create a a floating div with some text in it, and nothing showed up, but I got no errors, which means I'm doing something wrong, but I have no idea what that is. http://www.fijiwebdesign.com/blog/css-tooltips-floating-html-elements.html If you take a look at that webpage you see that there is that floating "feedback" button, I would like to create something similar, only it wouldn't be anchored to the sides, but I could position it over text, etc. #floatingBtn { position: absolute; z-index: 10000; top: 50%; left: 50%; } Thats the CSS I used to try and float my div. I don't know if I'm creating the div in the wrong place or... I thought if I could get a floating div with some text, I could turn that into my button.

    Read the article

  • What's the best way to return different cells depending on position in a UITableView

    - by Robert Conn
    I have a grouped UITableView that has 3 sections and a number of cells in each section that each need to be a different custom cell, with different display requirements. I currently have a large if statement in cellForRowAtIndexPath, with each branch instantiating and returning the appropriate custom cell based on interrogating the indexPath's section and row properties. e.g. if (indexPath.section == 0 && indexPath.row == 0) { // instantiate and return cell A } else if (indexPath.section == 1 && indexPath.row == 2) { // instantiate and return cell B } //etc etc What is best practice for this scenario? A large if statement does the job, but is it the best implementation?

    Read the article

  • Why would one want to use the public constructors on Boolean and similar immutable classes?

    - by Robert J. Walker
    (For the purposes of this question, let us assume that one is intentionally not using auto(un)boxing, either because one is writing pre-Java 1.5 code, or because one feels that autounboxing makes it too easy to create NullPointerExceptions.) Take Boolean, for example. The documentation for the Boolean(boolean) constructor says: Note: It is rarely appropriate to use this constructor. Unless a new instance is required, the static factory valueOf(boolean) is generally a better choice. It is likely to yield significantly better space and time performance. My question is, why would you ever want to get a new instance in the first place? It seems like things would be simpler if constructors like that were private. For example, if they were, you could write this with no danger (even if myBoolean were null): if (myBoolean == Boolean.TRUE) It'd be safe because all true Booleans would be references to Boolean.TRUE and all false Booleans would be references to Boolean.FALSE. But because the constructors are public, someone may have used them, which means that you have to write this instead: if (Boolean.TRUE.equals(myBoolean)) But where it really gets bad is when you want to check two Booleans for equality. Something like this: if (myBooleanA == myBooleanB) ...becomes this: if ( (myBooleanA == null && myBooleanB == null) || (myBooleanA == null && myBooleanA.equals(myBooleanB)) ) I can't think of any reason to have separate instances of these objects which is more compelling than not having to do the nonsense above. What say you?

    Read the article

  • Endless saving of CoreData Context

    - by Robert
    Sometimes I noticed that a 'save:' operation an a ManagedObjectContext never returns and consumes 100% CPU. I'm using an SQL Store in a GarbageCollected environment (Mac OS X 10.6.3). The disk activity shows about 700 KB/s writing. While having a look at the folder that contains the sqlite database file the "-journal" file appears and disappears, appears and disappears, ... This is part of the call graph from the process analysis: 2203 -[NSManagedObjectContext save:] 1899 -[NSPersistentStoreCoordinator(_NSInternalMethods) executeRequest:withContext:] 1836 -[NSSQLCore executeRequest:withContext:] 1836 -[NSSQLCore saveChanges:] 1479 -[NSSQLCore performChanges] ... 335 -[NSSQLCore recordChangesInContext:] ... 20 -[NSSQLCore rollbackChanges] ... 2 -[NSSQLCore prepareForSave:] ... 62 -[NSPersistentStoreCoordinator(_NSInternalMethods) _checkRequestForStore:originalRequest:andOptimisticLocking:] ... 1 -[NSPersistentStore(_NSInternalMethods) _preflightCrossCheck] ... 184 -[NSMergePolicy resolveConflicts:] ... 120 -[NSManagedObjectContext(_NSInternalChangeProcessing) _prepareForPushChanges:] ... Everything a happening in the main GUI thread. Any ideas what I can to do to resolve the problem?

    Read the article

  • Programmatically adding an object and selecting the correspondig row does not make it become the CurrentRow

    - by Robert
    I'm in a struggle with the DataGridView: I do have a BindingList of some simple objects that implement INotifyPropertyChanged. The DataGridView's datasource is set to this BindingList. Now I need to add an object to the list by hitting the "+" key. When an object is added, it should appear as a new row and it shall become the current row. As the CurrentRow-property is readonly, I iterate through all rows, check if its bound item is the newly created object, and if it is, I set this row to "Selected = true;" The problem: although the new object and thereby a new row gets inserted and selected in the DataGridView, it still is not the CurrentRow! It does not become the CurrentRow unless I do a mouse click into this new row. In this test program you can add new objects (and thereby rows) with the "+" key, and with the "i" key the data-bound object of the CurrentRow is shown in a MessageBox. How can I make a newly added object become the CurrentObject? Thanks for your help! Here's the sample: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace WindowsFormsApplication1 { public partial class Form1 : Form { BindingList<item> myItems; public Form1() { InitializeComponent(); myItems = new BindingList<item>(); for (int i = 1; i <= 10; i++) { myItems.Add(new item(i)); } dataGridView1.DataSource = myItems; } public void Form1_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Add) { addItem(); } } public void addItem() { item i = new item(myItems.Count + 1); myItems.Add(i); foreach (DataGridViewRow dr in dataGridView1.Rows) { if (dr.DataBoundItem == i) { dr.Selected = true; } } } private void btAdd_Click(object sender, EventArgs e) { addItem(); } private void dataGridView1_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Add) { addItem(); } if (e.KeyCode == Keys.I) { MessageBox.Show(((item)dataGridView1.CurrentRow.DataBoundItem).title); } } } public class item : INotifyPropertyChanged { public event PropertyChangedEventHandler PropertyChanged; private int _id; public int id { get { return _id; } set { this.title = "This is item number " + value.ToString(); _id = value; InvokePropertyChanged(new PropertyChangedEventArgs("id")); } } private string _title; public string title { get { return _title; } set { _title = value; InvokePropertyChanged(new PropertyChangedEventArgs("title")); } } public item(int id) { this.id = id; } #region Implementation of INotifyPropertyChanged public void InvokePropertyChanged(PropertyChangedEventArgs e) { PropertyChangedEventHandler handler = PropertyChanged; if (handler != null) handler(this, e); } #endregion } }

    Read the article

  • C++ function object terminology functor, deltor, comparitor, etc..

    - by Robert S. Barnes
    Is there a commonly accepted terminology for various types for common functors? For instance I found myself naturally using comparitor for comparison functors like this: struct ciLessLibC : public std::binary_function<std::string, std::string, bool> { bool operator()(const std::string &lhs, const std::string &rhs) const { return strcasecmp(lhs.c_str(), rhs.c_str()) < 0 ? 1 : 0; } }; Or using the term deltor for something like this: struct DeleteAddrInfo { void operator()(const addr_map_t::value_type &pr) const { freeaddrinfo(pr.second); } }; If using these kinds of shorthand terms is common, it there some dictionary of them all someplace?

    Read the article

  • Running ARM assembly code in Android

    - by Robert Joseph Dacunto
    I've been following the guide posted here, trying to get this Hello, World program to run on my Samsung Galaxy S3. It's rooted already, and I successfully pushed the "hello" file onto the sdcard. Now when I enter the shell as the superuser (# instead of $), and try to run the file, I get "cannot execute - permission denied". I used chmod 755 hello to see if that would fix it, still nothing. Is there something I'm missing? This is my first time fiddling around with Android, just got the phone, and wanted to see if I could get this to work. Very new to it all. Thanks!

    Read the article

  • Calculating collission for a moving circle, without overlapping the boundaries

    - by Robert Vella
    Let's say I have circle bouncing around inside a rectangular area. At some point this circle will collide with one of the surfaces of the rectangle and reflect back. The usual way I'd do this would be to let the circle overlap that boundary and then reflect the velocity vector. The fact that the circle actually overlaps the boundary isn't usually a problem, nor really noticeable at low velocity. At high velocity it becomes quite clear that the circle is doing something it shouldn't. What I'd like to do is to programmitically take reflection into account and place the circle at it's proper position before displaying it on the screen. This means that I have to calculate the point where it hits the boundary between it's current position and it's future position -- rather than calculating it's new position and then checking if it has hit the boundary. This is a little bit more complicated than the usual circle/rectangle collission problem. I have a vague idea of how I should do it -- basically create a bounding rectangle between the current position and the new position, which brings up a slew of problems of it's own (Since the rectangle is rotated according to the direction of the circle's velocity). However, I'm thinking that this is a common problem, and that a common solution already exists. Is there a common solution to this kind of problem? Perhaps some basic theories which I should look into?

    Read the article

  • Is there a simple library that will render JSON objects as trees?

    - by Robert Gould
    So, is there a VERY simple library that will render JSON objects as trees? I know that this can be done in many ways (such as YUI), but for debug purposes I'd like to simply be able to view a JSON objects I receive from a server as a tree, nothing fancy (but collapsable tree's would be a bonus). The kind of solution I'm looking for would be something like: <script source="something.js"/> <script> obj ={"hello":"world"} lib.renderJSON("someid",obj); </script> ... <div id="someid"/> Any ideas?

    Read the article

  • Efficiency: what block size of kernel-mode memory allocations?

    - by Robert
    I need a big, driver-internal memory buffer with several tens of megabytes (non-paged, since accessed at dispatcher level). Since I think that allocating chunks of non-continuous memory will more likely succeed than allocating one single continuous memory block (especially when memory becomes fragmented) I want to implement that memory buffer as a linked list of memory blocks. What size should the blocks have to efficiently load the memory pages? (read: not to waste any page space) A multiple of 4096? (equally to the page size of the OS) A multiple of 4000? (not to waste another page for OS-internal memory allocation information) Another size? Target platform is Windows NT = 5.1 (XP and above) Target architectures are x86 and amd64 (not Itanium)

    Read the article

  • Sorting an NSArray of NSString

    - by Robert Eisinger
    Can someone please show me the code for sorting an NSMutableArray? I have the following NSMutableArray: NSMutableArray *arr = [[NSMutableArray alloc] init]; with elements such as "2", "4", "5", "1", "9", etc which are all NSString. I'd like to sort the list in descending order so that the largest valued integer is highest in the list (index 0). I tried the following: [arr sortUsingSelector:@selector(compare:)]; but it did not seem to sort my values properly. Can someone show me code for properly doing what I am trying to accomplish? Thanks!

    Read the article

  • Browse for folder can't see camera device

    - by Robert Frank
    In Delphi 2010, I want to allow users to browse and select a folder. The folder is on a device (?) created by a DSLR: The folder is visible in the Windows Explorer as shown above. And, the folder is visible in a TOpenDialog, allowing them to browse into the folder and choose a file. Unfortunately, I have been unable to get either SHBrowseForFolder (code I found on the web but don't understand) or SelectDirectory to see the camera device or folder beneath it. (Side note: IMO, SelectDirectory is a far nicer UI, since the user can see the files in the folders while browsing.) I assume this has to do with the fact that the folder is in a device (?) created by the camera software. I've seen some tricks where you call TOpenDialog to browse for folders with '*.' and then ExtractFileDir on the result, but that's not robust or, IMO, a good UI. What I'm looking for is a "Browse for folder" that can see the same devices (including the camera device) the TOpenDialog & Windows Explorer can see. (Ideally, it would have the nice appearance like the one below!) Any suggestions? Image of a MS-Word's folder browsing in Win7. (I wonder if it looks this pretty in XP.)

    Read the article

  • Spring deployment-level configuration

    - by Robert Wilson
    When I wrote JEE apps, I used JBoss Datasources to control which databases the deployment used. E.g. the dev versions would use a throwaway hibernate db, the ref and ops would use stable MySQL deployments. I also used MBeans to configure various other services and rules. Now that I'm using Spring, I'd like the same functionality - deploy the same code, but with different configuration. Crucially, I'd also like Unit Tests to still run with stub services. My question is this - is there a way, in JBoss, to inject configuration with files which live outside of the WAR/EAR, and also include these files in test resources.

    Read the article

  • simple c++ file opening issue

    - by Robert
    #include <iostream> #include <fstream> using namespace std; int main () { ofstream testfile; testfile.open ("test.txt"); testfile << "success!\n"; testfile.close(); return 0; } 1)called "g++ testfile.cpp" 2)created "test.txt" 3)called "chmod u+x a.out" 4)??? 5)file remains blank. I feel like an idiot for failing at something as trivial as this is supposed to be.

    Read the article

  • Unicode symbols coming wrong

    - by robert
    Obviously, there must be something stupid i'm doing. The unicode chart for subscripts and superscripts says #00B2 is superscript 2, but i get scrambled output. 0078 is x, but I get N, and 0120 is x. Am i reading wrong manual? EDIT $x = '&#0078;'; print html_entity_decode($x, ENT_NOQUOTES, 'UTF-8') . "\n";

    Read the article

  • INSERT 0..n records into table 'A' based on content of table 'B' in MySql 5

    - by Robert Gowland
    Using MySql 5, I have a task where I need to update one table based on the contents of another table. For example, I need to add 'A1' to table 'A' if table 'B' contains 'B1'. I need to add 'A2a' and 'A2b' to table 'A' if table 'B' contains 'B2', etc.. In our case, the value in table 'B' we're interested is an enum. Right now I have a stored procedure containing a series of statements like: INSERT INTO A SELECT 'A1' FROM B WHERE B.Value = 'B1'; --Repeat for 'B2' -> 'A2a'; 'B2' -> 'A2b'; 'B3' -> 'A3', etc... Is there a nicer more DRY way of accomplishing this? Edit: There may be values in table 'B' that have no equivalent value for table 'A'.

    Read the article

  • Communication between Multiple Threads in a WPF Application

    - by Robert
    I'm creating a WPF application that uses a custom object to populate all the controls. The constructor of that object is initiated by an EventHandler that waits for an API. The problem I'm having is when I try to access any information from that object using a button for example, it returns an error saying "The calling thread cannot access this object because a different thread owns it". I'm assuming this is because the EventHandler creates a new thread which doesn't allow the Main Thread to have access to it. Any ideas on how to get around this? I'm basically having the error "The calling thread cannot access this object because a different thread owns it" when trying to get or set a CollectionViewSource.

    Read the article

< Previous Page | 34 35 36 37 38 39 40 41 42 43 44 45  | Next Page >