Search Results

Search found 312 results on 13 pages for 'brandon montgomery'.

Page 11/13 | < Previous Page | 7 8 9 10 11 12 13  | Next Page >

  • Android 2.1 How to get Phone Numbers of contacts.

    - by Brandon Delany
    Hi, I am new to Android and have been working on an app that needs to get all of the user's contact's phone numbers. Apparently the code I have does not work with the 2.1 SDK. So far here is the code I am using: String[] projection = new String[] { Phone.NUMBER }; Cursor c = managedQuery( Phone.CONTENT_URI, projection, null, null, null ); int colIndex = -1; try { colIndex = c.getColumnIndexOrThrow( Phone.NUMBER ); } catch( Exception e ) { print( e.getMessage() ); } print( "Column Index = " + colIndex ); //count is equal to 3 for( int i = 0; i < count; i++ ){ try { print( c.getString( 2 ) ); //the 2 used to be colIndex } catch ( Exception e ) { print( e.getMessage() ); } } It seems that no matter what I pass into c.getString() it keeps telling me that I passed in -1. But I even hardcoded the 2, and it says the same thing. Any help would be much appreciated.

    Read the article

  • DataGridView and the CellEndEdit Event

    - by Brandon
    I have a DataGridView, and would like to hook into the CellEndEdit event. I've been able to successfully hook into the CellContentClick event, but am having issues with CellEndEdit. I added the following code to my Form1.cs file: private void dataGridView1_CellEndEdit(object sender, DataGridViewCellCancelEventArgs e) { dataGridView1[0, 0].Value = "Changed"; } With that code, nothing happens when I am done editing a cell. Is there anything else that I need to do to successfully hook into this event? I see that CellContentClick has a this.dataGridView1.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellContentClick); line of code in the Form1.Designer.cs file, but I tried to mimic this for CellEndEdit, and received a compile error (No overload for 'dataGridView1_CellEndEdit' matches delegate 'System.Windows.Forms.DataGridViewCellEventHandler')

    Read the article

  • Is there a web tool framework for building a video editing/manipulation widget other than custom Fla

    - by Brandon
    I am looking to build a widget for a site which allows users to tag images from individual frames of a video file but would prefer not to have to build a custom Flash tool. Is there an existing free library or framework which simplifies things like this in a webapplication setting? Features would also involve basic video playback functionality as well as time-driven meta-data and the ability to extract images from individual video frames. Are there existing open-source web-based tools for video manipulation other than building your own custom Flash app?

    Read the article

  • In .NET, How do I separate xml from compiled resource file?

    - by Brandon
    We have a customer that would like to modify application user messages that we store in .resx files. I'm thinking this can't be done since the xml file behind the .resx is embedded in a compiled dll. Am I correct? Or, is there a way keep the xml outside of the compiled dll? I realize this can easily be done by other means but I like the ease of the resx file--the classes/properties are created for you.

    Read the article

  • Is there a better way to keep track of session variable creation/access throughout different pages?

    - by Brandon
    Here's what I am working on. At my website I have multiple processes with each one containing multiple steps. Now in one of the processes, there is an error checking routine executed before proceeding to the next step of that process. A session var is set indicating the error status and it will either redirect back to the referrer or display the next page's contents. Now this kind of functionality, I believe, is common throughout web development. The issue that is occurring is that session vars are left around and are not being cleaned up properly. At times this introduces undesired behavior. My website is growing and I find that I am requiring more and more session vars to keep track of different system and error states. So I was thinking about creating a kind of "session variable keeper" to keep track of session var usage. The idea is fairly simple. It will have the notion of a context (e.g. registration process) and allow access to a predefined set of session vars within that context. In addition, the var and context will be paired with an action to proceed to some form of event handling. So if you haven't noticed I'm new to web development. Any thoughts or comments on the idea that I am proposing would be greatly appreciated. The back-end is written in PHP/MySQL.

    Read the article

  • Sort Java List/Map by order in which items are in an XML File

    - by Brandon Smith
    Hello everyone, What I'm looking to do is to sorta a Java List or Map in the order the items are in a XML File. For Example I have a list of function names as so: functionOne functionThree functionTwo The XML File looks like this: <xml> <function>functionOne</function> <function>functionTwo</function> <function>functionThree</function> </xml> So I would like to sort the list so the function names are as so: functionOne functionTwo functionThree Now Im trying to do this for Variables as well, so there are around 500+ unique 'items'. Does anyone have any idea how I can go about doing this? Now for the file that determines that sort order doesn't have to be XML it just what I use the most, it can be anything that can get the job done. Thanks in advance for your time.

    Read the article

  • How do I integrate VisualSVN into Visual Studio 2010?

    - by Brandon
    I have an existing setup of Visual Studio 2008 with VisualSVN integrated into the IDE. I have installed and am testing out Visual Studio 2010. How do I integrate VisualSVN into 2010? Can I import my existing settings? I was issued a laptop with all of this setup for me but now we're gonna upgrade to 2010 soon.

    Read the article

  • Why are my margins still collapsing?

    - by Brandon Dorsey
    My code in this "Fiddle" shows that I have adjacent elements which vertical margins are collapsing on one another. I understand that due to the nature of vertical margins in css, the largest of the two is chosen, In my case the p tag. What I am having trouble with is trying to break the margins by using a 1px border or 1px padding. I've seen it work with other workarounds such as position:absolute or float method. I am not understanding why using 1px border or padding is not working properly to give me 15px of space.

    Read the article

  • VB app to web service

    - by brandon
    I know very little about web service but I assumed it would be the solution I was looking for. Basically I made an application in VB that I want to be ubiquitous for a lack of a better word. I need it to receive requests from multiple users and respond all at once. I was told "technically if you write a webservice you can provide as many results back to users as are connected." Maybe there is another solution for me that will give me the results I want. Here is an example of what I'm trying to do. Lets say I make an application in VB that does math. I now make a website. My website allows for a person to input 1 + 1 they click submit and my website then connects to my VB application running on my server listening for a request. It accepts the request from my website, and then it solves the math problem and returns the answer back to the website "1 + 1 = 2" That is only an example of the type of thing I need. My problem is that I can't have multiple people visiting my website all connecting to that same application running on my server so somehow I need the application to be where it can be accessed by multiple users. I was told a web service would be the answer but if there is another solution I'd like to know. If the only solution is a web service, then how can I manage to either convert the VB app to a web service? Can I have to convert the app to asp.net or some other language? Is there an easier option?

    Read the article

  • Are duplicate directives in php.ini going to cause an issue?

    - by Brandon G
    I sent a request to ops today to update some php.ini directives, and found out that he merely appended them to the end of the file. My google search didn't really come up with any info on whether this is a problem or not to have duplicates in there and how they would be parsed. Obviously, it can cause confusion, but, I would have a stronger argument if I knew if this was acceptable or not. Any input? Thanks in advance...

    Read the article

  • Any tools or techniques for validating constraints programmatically between databases?

    - by Brandon
    If you had two databases, that had two tables between them that would normally implement a one to one (or many to many) constraint but cannot since they are separate databases, how would you validate this relationship in an application or test? Is there a simple way to do this? For example, a tool or technique that can, given a constraint type, tables and fields, does the validation. I imagine that this isn't the first time this come up so I'm hoping people can share their solution. Thanks.

    Read the article

  • C++ OOP - Can you 'overload a cast' <- hard to explain in 1 sentence

    - by Brandon Miller
    Well, the WinAPI has a POINT struct, but I am trying to make an alternative class to this so you can set the values of x and y from a constructor. /** * X-Y coordinates */ class Point { public: int X, Y; Point(void) : X(0), Y(0) {} Point(int x, int y) : X(x), Y(y) {} Point(const POINT& pt) : X(pt.x), Y(pt.y) {} Point& operator= (const POINT& other) { X = other.x; Y = other.y; } }; // I have an assignment operator and copy constructor. Point myPtA(3,7); Point myPtB(8,5); POINT pt; pt.x = 9; pt.y = 2; // I can assign a 'POINT' to a 'Point' myPtA = pt; // But I also want to be able to assign a 'Point' to a 'POINT' pt = myPtB; Is it possible to overload operator= in a way so that I can assign a Point to a POINT? Or maybe some other method to achieve this? Thanks in advance.

    Read the article

  • MySQL Locking table from Stored FUNCTION

    - by Brandon
    I have a function in a MySQL Database that determines some sync parameters for a mobile device. The function determines the last date/time the user synchronized with the database. During my sync operation I call this server side function twice. As soon as I call it the second time - the entire Sync_Records table is locked. I cannot write to it from any other connection anywhere (note, after first call, the table is not locked). I changed the function to a Procedure - and all is fine - no locking after the second call. The entire sync operation (including both calls to the function/procedure) is within a transaction. This is an InnoDb table. The function/procedure simply does two select statements. They are storing results in local variables and then returning the date time variable. I don't understand why the tables are locked. Does anyone have any ideas?

    Read the article

  • Merge two data frames together that have the same variable names and data types

    - by Brandon
    I have tried the merge function to merge two csv files that I imported. They both have the same variable names and data types but each time I run merge all that I get is an object that contains the names of the two data frames. I have tried the following: # ex1 obj <- merge(obj1, obj2, by=obj) # ex2 obj <- merge(obj1, obj2, all) and several other iterations of the above. Is merge the correct function? If so, what am I doing wrong?

    Read the article

  • How do I make a function in SQL Server that accepts a column of data?

    - by brandon k
    I made the following function in SQL Server 2008 earlier this week that takes two parameters and uses them to select a column of "detail" records and returns them as a single varchar list of comma separated values. Now that I get to thinking about it, I would like to take this table and application-specific function and make it more generic. I am not well-versed in defining SQL functions, as this is my first. How can I change this function to accept a single "column" worth of data, so that I can use it in a more generic way? Instead of calling: SELECT ejc_concatFormDetails(formuid, categoryName) I would like to make it work like: SELECT concatColumnValues(SELECT someColumn FROM SomeTable) Here is my function definition: FUNCTION [DNet].[ejc_concatFormDetails](@formuid AS int, @category as VARCHAR(75)) RETURNS VARCHAR(1000) AS BEGIN DECLARE @returnData VARCHAR(1000) DECLARE @currentData VARCHAR(75) DECLARE dataCursor CURSOR FAST_FORWARD FOR SELECT data FROM DNet.ejc_FormDetails WHERE formuid = @formuid AND category = @category SET @returnData = '' OPEN dataCursor FETCH NEXT FROM dataCursor INTO @currentData WHILE (@@FETCH_STATUS = 0) BEGIN SET @returnData = @returnData + ', ' + @currentData FETCH NEXT FROM dataCursor INTO @currentData END CLOSE dataCursor DEALLOCATE dataCursor RETURN SUBSTRING(@returnData,3,1000) END As you can see, I am selecting the column data within my function and then looping over the results with a cursor to build my comma separated varchar. How can I alter this to accept a single parameter that is a result set and then access that result set with a cursor?

    Read the article

  • Recaptcha with Ajax error

    - by Brandon
    I'm having trouble validating a recaptcha input. Heres my code: // Validate Recaptcha Input var challenge = $("#recaptcha_challenge_field").val(); var response = $("#recaptcha_response_field").val(); var dataString = 'recaptcha_challenge_field=' + challenge + '&recaptcha_response_field=' + response; var html = $.ajax({ type: "POST", url: "PHP/recaptchaverify.php", data: dataString, async: true }).responseText; console.log(html); if(html == 'accept') { alert("CORRECT"); } else { alert("The reCAPTCHA wasn't entered correctly. Go back and try it again."); $("#recaptcha_response_field").focus(); Recaptcha.reload(); return false; } Now I passed my variables to recpatchaverify.php require_once('../scripts/recaptcha-php/recaptchalib.php'); $privatekey = "MYKEY"; $resp = recaptcha_check_answer ($privatekey, $_SERVER["REMOTE_ADDR"], $_POST["recaptcha_challenge_field"], $_POST["recaptcha_response_field"]); if (!$resp->is_valid) { // What happens when the CAPTCHA was entered incorrectly echo "error"; } else { // Your code here to handle a successful verification echo "accept"; } Now my problem is the html variable is displaying "accept" whenever I enter the Recaptcha correctly, but it won't work in the IF statement?

    Read the article

  • How would I initialize these two lists so that modifying one doesn't modify the other?

    - by Brandon
    I'm aware of why this is happening, but is there any way to do this without having to implement ICloneable or a Copy() method? Preferably .net 2.0, but 3.5 is fine if it is necessary. Essentially I'm trying to implement an undo method. In most cases I can just perform the reverse action in the Undo(), but for others that is not possible. So I want to keep two lists. One for the list of items that I will be modifying, and one for the original, unmodified list of items. This way if I need to do an undo, I just delete the modified items and replace them with the originals. Most of the ways I've tried to assign the _originalItems variable doesn't work, so what would I need to do? public MyClass(List<SelectedItems> selectedItems) { _selectedItems = new List<SelectedItems>(selectedItems); _originalItems = ?? }

    Read the article

  • Jquery failure after site went live

    - by Brandon Condrey
    I have been designing a site for weeks using JQuery. I don't have a local server or a testing server so I just created a directory through FTP, '/testing'. Everything was working great in the testing directory. I attempted to go live tonight by moving all the files in '/testing' to the root directory and I changed all file paths and script sources accordingly. The site loads, but everything related to JQuery is non-functional. Javascript console gives errors of (just as an example from a plugin): '$.os.name' is not a function I'm at loss for what to do. I changed the paths referencing the JQuery library, installed a fresh copy of JQuery (to a new directory), etc. There is a wordpress installation in a different directory '/blog'. I've read about some compatibility issues with wordpress, but that seems to be related to using JQuery inside wordpress, which I am not. I'm not sure if any code would be beneficial since it was all functional in a different directory. Your help is greatly appreciated.

    Read the article

  • Handling a mix of server side code and html in a resource file?

    - by Brandon
    I'm trying to convert an ASP.NET web application to use resource files. I haven't used resource files before, so I'm just toying around with them and was wondering if this is possible. I have a message that returns from a search when no results are found, that prompts the user to return to the home page. A lot of these pages have methods to determine what is the proper page to send the user to, so there are many sections with markup similar to this: Sorry, but we could not find an item matching your search criteria. Please adjust your search criteria or <a href="<%= SomeMethodToDetermineUri() %>">return to (SomePage)</a>. So basically, some type of message, followed by a link or a list of links. Getting the message part works fine, it's the server side code to generate links thats the problem. What is the best way to put that into a resource file? It is able to recognize the html link part just fine, but the server side code gets inserted as plain text. Is the only way to break it into 2 resources? (Which seems messy) <%= Resources.Master.NoSearchResultsFound %> <a href="<%= SomeMethodToDetermineUri() %>"> <%= Resources.Master.NoSearchResultsFoundReturnLinkText %> </a>. Or is there a way to get the page to evaluate the server code?

    Read the article

  • Using new (this) to reuse constructors

    - by Brandon Bodnar
    This came up recently in a class for which I am a teaching assistant. We were teaching the students how to do copy constructors in c++, and the students who were originally taught java asked if you can call one constructor from another. I know the answer to this is no, as they are using the pedantic flag for their code in class, and the old standards do not have support for this. I found on Stackoverflow and other sites a suggestion to fake this using new (this) such as follows class MyClass { private: int * storedValue; public: MyClass(int initialValue = 0) { storedValue = new int(initialValue); } ~ MyClass() { delete storedValue; } MyClass(const MyClass &b) { new (this) MyClass(*(b.storedValue)); } int value() { return *storedValue; } }; This is really simple code, and obviously does not save any code by reusing the constructor, but it is just for example. My question is if this is even standard compliant, and if there are any edge cases that should be considered that would prevent this from being sound code?

    Read the article

  • How to research unmanaged memory leaks in .NET?

    - by Brandon
    I have a WCF service running over MSMQ. Memory gradually increases over time, indicating that there is some sort of memory leak. I ran the service locally and monitored some counters using PerfMon. Total CLR memory managed heap bytes remains relatively constant, while the process' private bytes increases over time. This leads me to believe that there is some sort of unmanaged memory leak. Assuming that unmanaged memory leak is the issue, how do I address the issue? Are there any tools I could use to give me hints as to what is causing the unmanaged memory leak? Also, all my service is doing is reading from the transactional queue and writing to a database, all as part of a DTC transaction (handled under the hood by requiring a transaction on the service contract). I am not doing anything explicitly with COM or DllImports. Thanks in advance!

    Read the article

  • Lucene Search Returning Extra, Undesired Records

    - by Brandon
    I have a Lucene index that contains a field called 'Name'. I escape all special characters before inserting a value into my index using QueryParser.Escape(value). In my example I have 2 documents with the following names respectively: Test Test (Test) They get inserted into my index as such (I can confirm this using Luke): [test] [test] [\(test\)] I insert these values as TOKENIZED and using the StandardAnalyzer. When I perform a search, I use the QueryParser.Escape(searchString) against my search string input to escape special characters and then use the QueryParser with my 'Name' field and the StandardAnalyzer to perform my search. When I perform a search for 'Test', I get back both documents in my index (as expected). However, when I perform a search for 'Test (Test)', I am getting back both documents still. I realize that in both examples it matches on the 'test' term in the index, but I am confused in my 2nd example why it would not just pull back the document with the value of 'Test (Test)' because my search should create two terms: [test] and [\(test\)] I would imagine it would perform some sort of boolean operator where BOTH terms must match in that situation so I would get back just one record. Is there something I am missing or a trick to make the search behave as desired?

    Read the article

< Previous Page | 7 8 9 10 11 12 13  | Next Page >