Search Results

Search found 295 results on 12 pages for 'brandon vogel'.

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

  • 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

  • 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

  • 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

  • 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

  • Inexplicably slow query in MySQL

    - by Brandon M.
    Given this result-set: mysql> EXPLAIN SELECT c.cust_name, SUM(l.line_subtotal) FROM customer c -> JOIN slip s ON s.cust_id = c.cust_id -> JOIN line l ON l.slip_id = s.slip_id -> JOIN vendor v ON v.vend_id = l.vend_id WHERE v.vend_name = 'blahblah' -> GROUP BY c.cust_name -> HAVING SUM(l.line_subtotal) > 49999 -> ORDER BY c.cust_name; +----+-------------+-------+--------+---------------------------------+---------------+---------+----------------------+------+----------------------------------------------+ | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | +----+-------------+-------+--------+---------------------------------+---------------+---------+----------------------+------+----------------------------------------------+ | 1 | SIMPLE | v | ref | PRIMARY,idx_vend_name | idx_vend_name | 12 | const | 1 | Using where; Using temporary; Using filesort | | 1 | SIMPLE | l | ref | idx_vend_id | idx_vend_id | 4 | csv_import.v.vend_id | 446 | | | 1 | SIMPLE | s | eq_ref | PRIMARY,idx_cust_id,idx_slip_id | PRIMARY | 4 | csv_import.l.slip_id | 1 | | | 1 | SIMPLE | c | eq_ref | PRIMARY,cIndex | PRIMARY | 4 | csv_import.s.cust_id | 1 | | +----+-------------+-------+--------+---------------------------------+---------------+---------+----------------------+------+----------------------------------------------+ 4 rows in set (0.04 sec) I'm a bit baffled as to why the query referenced by this EXPLAIN statement is still taking about a minute to execute. Isn't it true that this query only has to search through 449 rows? Anyone have any idea as to what could be slowing it down so much?

    Read the article

  • How can I set default seed for all identities within a SQL Server database?

    - by Brandon DuRette
    Is there a way to tell SQL server to use specific default seed value for IDENTITY columns - assuming the (to be run) CREATE TABLE statements do not specify one? I don't really care about altering existing data or altering the seed values for specific IDENTITY columns. I want the same seed for all newly created identity columns. Assume I cannot modify the individual CREATE TABLE statements in any way.

    Read the article

  • Javascript not executing (I included format.js)

    - by Brandon
    I added format.js to my controller, yet I still cannot get the js in index.js.erb to execute when I view my index page. The only thing I can figure out is that it must be because of the model name. I had to add ActiveSupport::Inflector.inflections do |inflect| inflect.irregular 'business', 'businesses' end to my inflections.rb file...because my model is called Business. my views/js are located at views/businesses/* Please help before I pull my hair out! All I have in the index.js.erb file is: alert(1); Obviously the goal is that I will get an alert when I finally get the issue fixed, letting me know it is working.

    Read the article

  • Sorting results by a char(1) column

    - by Brandon
    I have a stored procedure which basically does something like select top 1 expiryDate, flag, (bunch of other columns) from someTable (bunch of joins) order by expiryDate desc So this will grab the record that expires last. This works for most cases, except some records have a flag that are just a char(1). Most of the time it's just Y or N. So it'll return something like 2010-12-31 N 2010-10-05 Y 2010-08-05 N 2010-03-01 F 2010-01-31 N This works, most of the time, but is there any way to order it by the Flag column as well? So I'd want to group the results by Y, then N, and F and any other flags can go last in any order. I thought this would just be an order by, but since the flags are not weighted by the alphabetic value, I'm a little stumped. (Note: These are not my tables, I don't know if using the characters like this was a good idea or not, but it's not something I can change).

    Read the article

  • Help with my application please! Can’t open image(s) with error: External component has thrown an ex

    - by Brandon
    I have an application written in C# I believe and it adds images to a SQL Server 2005 Database. It requires .NET 3.5 to be installed on my computer. I installed .NET 3.5 and setup a database. It runs fine but then once it gets to image 100 when running on one computer, It stops and gives me this error: Can't open image(s) with error: External component has thrown an exception.... When I run the program on my own computer I am able to reach 300 images but then it stops after 300 images and gives me Can't open image(s) with error: External component has thrown an exception.... error once again. please help!

    Read the article

  • Cannot Install/Start MySQL Server

    - by Peezy Bro
    Okay, I decided to migrate from MySQL Server 5.5.37 to Percona Server 5.6. I ended up removing MySQL Server by the following: sudo apt-get --purge remove mysql-server mysql-server-5.5 mysql-server-core-5.5 mysql-client mysql-client-core-5.5 mysql-common sudo apt-get autoremove sudo apt-get autoclean rm -rf /var/lib/mysql rm -rf /etc/mysql Now here is my problem, when I try to install MySQL Server 5.6 it goes through its process and when it asks me for a password, it comes up with Cannot set MySQL "root" password. After it "installs" MySQL wont start up and I get permission denied?. Reading package lists... Done Building dependency tree Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 35 not upgraded. brandon@brandon-DB:~$ sudo apt-get install mysql-server Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: libdbd-mysql-perl libdbi-perl libmysqlclient18 libterm-readkey-perl mysql-client-5.5 mysql-client-core-5.5 mysql-common mysql-server-5.5 mysql-server-core-5.5 Suggested packages: libmldbm-perl libnet-daemon-perl libplrpc-perl libsql-statement-perl tinyca mailx The following NEW packages will be installed: libdbd-mysql-perl libdbi-perl libmysqlclient18 libterm-readkey-perl mysql-client-5.5 mysql-client-core-5.5 mysql-common mysql-server mysql-server-5.5 mysql-server-core-5.5 0 upgraded, 10 newly installed, 0 to remove and 35 not upgraded. Need to get 0 B/8,955 kB of archives. After this operation, 96.3 MB of additional disk space will be used. Do you want to continue? [Y/n] y Preconfiguring packages ... Selecting previously unselected package mysql-common. (Reading database ... 167760 files and directories currently installed.) Preparing to unpack .../mysql-common_5.5.37-0ubuntu0.14.04.1_all.deb ... Unpacking mysql-common (5.5.37-0ubuntu0.14.04.1) ... Selecting previously unselected package libmysqlclient18:amd64. Preparing to unpack .../libmysqlclient18_5.5.37-0ubuntu0.14.04.1_amd64.deb ... Unpacking libmysqlclient18:amd64 (5.5.37-0ubuntu0.14.04.1) ... Selecting previously unselected package libdbi-perl. Preparing to unpack .../libdbi-perl_1.630-1_amd64.deb ... Unpacking libdbi-perl (1.630-1) ... Selecting previously unselected package libdbd-mysql-perl. Preparing to unpack .../libdbd-mysql-perl_4.025-1_amd64.deb ... Unpacking libdbd-mysql-perl (4.025-1) ... Selecting previously unselected package libterm-readkey-perl. Preparing to unpack .../libterm-readkey-perl_2.31-1_amd64.deb ... Unpacking libterm-readkey-perl (2.31-1) ... Selecting previously unselected package mysql-client-core-5.5. Preparing to unpack .../mysql-client-core-5.5_5.5.37-0ubuntu0.14.04.1_amd64.deb ... Unpacking mysql-client-core-5.5 (5.5.37-0ubuntu0.14.04.1) ... Selecting previously unselected package mysql-client-5.5. Preparing to unpack .../mysql-client-5.5_5.5.37-0ubuntu0.14.04.1_amd64.deb ... Unpacking mysql-client-5.5 (5.5.37-0ubuntu0.14.04.1) ... Selecting previously unselected package mysql-server-core-5.5. Preparing to unpack .../mysql-server-core-5.5_5.5.37-0ubuntu0.14.04.1_amd64.deb ... Unpacking mysql-server-core-5.5 (5.5.37-0ubuntu0.14.04.1) ... Processing triggers for man-db (2.6.7.1-1) ... Setting up mysql-common (5.5.37-0ubuntu0.14.04.1) ... Selecting previously unselected package mysql-server-5.5. (Reading database ... 168116 files and directories currently installed.) Preparing to unpack .../mysql-server-5.5_5.5.37-0ubuntu0.14.04.1_amd64.deb ... Unpacking mysql-server-5.5 (5.5.37-0ubuntu0.14.04.1) ... Selecting previously unselected package mysql-server. Preparing to unpack .../mysql-server_5.5.37-0ubuntu0.14.04.1_all.deb ... Unpacking mysql-server (5.5.37-0ubuntu0.14.04.1) ... Processing triggers for ureadahead (0.100.0-16) ... Processing triggers for man-db (2.6.7.1-1) ... Setting up libmysqlclient18:amd64 (5.5.37-0ubuntu0.14.04.1) ... Setting up libdbi-perl (1.630-1) ... Setting up libdbd-mysql-perl (4.025-1) ... Setting up libterm-readkey-perl (2.31-1) ... Setting up mysql-client-core-5.5 (5.5.37-0ubuntu0.14.04.1) ... Setting up mysql-client-5.5 (5.5.37-0ubuntu0.14.04.1) ... Setting up mysql-server-core-5.5 (5.5.37-0ubuntu0.14.04.1) ... Setting up mysql-server-5.5 (5.5.37-0ubuntu0.14.04.1) ... start: Job failed to start invoke-rc.d: initscript mysql, action "start" failed. dpkg: error processing package mysql-server-5.5 (--configure): subprocess installed post-installation script returned error exit status 1 dpkg: dependency problems prevent configuration of mysql-server: mysql-server depends on mysql-server-5.5; however: Package mysql-server-5.5 is not configured yet. dpkg: error processing package mysql-server (--configure): dependency problems - leaving unconfigured Processing triggers for libc-bin (2.19-0ubuntu6) ... No apport report written because the error message indicates its a followup error from a previous failure. Processing triggers for ureadahead (0.100.0-16) ... Errors were encountered while processing: mysql-server-5.5 mysql-server E: Sub-process /usr/bin/dpkg returned an error code (1) I have all my database/tables dumped and on a seperate HDD. This is also a Dev Machine and not my main Production Machine. I also backed up the MySQL_Config and MySQL_Data.

    Read the article

  • SQL Saturday #156 : Providence, RI

    - by AaronBertrand
    Well, East Greenwich, RI. Another successful event, this one put on by John Miner, Brandon Leach, Steve Simon, Scott Abrants and a host of other folks. Several #SQLFamily friends in attendance as well: Grant Fritchey, Mike Walsh, Jack Corbett, Wayne Sheffield and others. I gave a session in the morning and then a session to cap off the day. Thanks to everyone who attended! The downloads are here: T-SQL : Bad Habits & Best Practices The Ins & Outs of Contained Databases...(read more)

    Read the article

  • Les nouvelles pubs pour Windows 8 et un crash test de la tablette Surface veulent marquer une rupture dans la communication de Microsoft

    Les nouvelles pubs pour Windows 8 Et un crash test de la tablette Surface Windows 8 arrive après-demain. Et avec lui toute une batterie de nouvelles publicités. Si l'OS marque une rupture avec ses prédécesseurs, ces vidéos sont également censées faire entrer Microsoft dans une nouvelle ère de communication. « L'idée est d'être plus centré sur l'expérience produit ? montrer plus et parler moins ? en utilisant les registres émotionnels et culturels » explique Brandon LeBlanc, de l'équipe Windows 8, « la musique est donc au coeur de cette campagne ». Notamment avec des groupes en devenir comme Best Coast (USA), Labrinth (UK), Lenka (Chine) et Hogarth (Brésil) et ...

    Read the article

  • Microsoft réagit à l'abandon progressif de Windows par Google en rappelant que son OS est de plus en

    Mise à jour du 07/06/10 Microsoft réagit à l'abandon progressif de Windows par Google En rappelant que son OS est de plus en plus sécurisé Sur son blog, Brandon LeBlanc, responsable de développement Windows, a réagit la semaine dernière à l'annonce de Google sur l'abandon progressif de l'OS de Microsoft par la société suite aux attaques de pirates chinois liées, selon Google, à des vulnérabilités des produits de Redmond (cf. article ci-avant). « Lorsqu'il s'agit de sécurité, même les hackers admettent que nous faisons un meilleur travail que n'importe qui d'autre pour rendre nos produits plus sûrs », écrit-il. « Des leaders ...

    Read the article

  • Microsoft Releasing Windows 8 in Late October

    The one thing Microsoft did not give was the exact date in October that this latest operating system would become available. But that may be difficult to predict. Brandon LeBlanc, Microsoft communications manager, stated only that Windows 8 is on track for a release to manufacturers (RTM) in August. The company, on average, produces a new version of Windows every three years; the last one to come out was Windows 7, back in October of 2009. The operating system will enjoy a widespread release, coming out in 109 languages across 231 markets throughout the world. It will be used not only in PCs...

    Read the article

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