Search Results

Search found 507 results on 21 pages for 'jay stevens'.

Page 18/21 | < Previous Page | 14 15 16 17 18 19 20 21  | Next Page >

  • Confusion between JPA and Hibernate cascading

    - by Jay
    I'm using Hibernate 3.6 and have my code annotated (versus using hibernate mapping files). I ran into the known "problem" of using JPA cascading options that are not compatible with Hibernate's CascadeType (see this link for more info http://www.mkyong.com/hibernate/cascade-jpa-hibernate-annotation-common-mistake/). I was hoping to get a bit more clarification on the problem. I have some particular questions: 1) So @Cascade({CascadeType.SAVE_UPDATE}) works for saveOrUpdate(), but does it apply also if I use merge() or persist()? or do I have to use all three Hibernate CascadeTypes? 2) How do I decide whether to use JPA cascade options or the Hibernate @Cascade annotation instead? 2) There is a "bug" filed against this in Hibernate, but the developers apparently see this as a documentation issue, (I'm completely disagree with them), and I'm not seeing that it was addressed in said documentation. Anyone know why this is "working as designed" and not a bug in Hibernate's JPA implementation? Many thanks in advance.

    Read the article

  • Assigning two strings together getting Access Read Violation

    - by Jay Bell
    I am trying to pass a string to a class mutator and set the private member to that string here is the code that is sending the string void parseTradePairs(Exchange::Currency *curr, std::string *response, int begin, int exit) { int start; int end; string temp; string dataResponse; CURL *tempCurl; initializeCurl(tempCurl); int location = response->find("marketid", begin); if(location <= exit) { start = location + 11; begin = response->find("label", start); end = begin - start - 3; findStrings(start, end, temp, response); getMarketInfo(tempCurl, temp, dataResponse); curr->_coin->setExch(temp); // here is the line of code that is sending the string dataResponse >> *(curr->_coin); curr->_next = new Exchange::Currency(curr, curr->_position + 1); parseTradePairs(curr->_next, response, begin, exit); } } and here is the mutator within the coin class that is receiving the string and assigning it to _exch void Coin::setExch(string exch) { _exch = exch; } I have stepped through it and made sure that exch has the string in it. "105" but soon as it hits _exch = exch; I get the reading violation. I tried passing as pointer as well. I do not believe it should go out of scope. and the string variable in the class is initialized to zero in the default constructor but again that should matter unless I am trying to read from it instead of writing to it. /* defualt constructor */ Coin::Coin() { _id = ""; _label = ""; _code= ""; _name = ""; _marketCoin = ""; _volume = 0; _last = 0; _exch = ""; } Exchange::Exchange(std::string str) { _exch = str; _currencies = new Currency; std::string pair; std::string response; CURL *curl; initializeCurl(curl); getTradePairs(curl, response); int exit = response.find_last_of("marketid"); parseTradePairs(_currencies, &response, 0, exit); } int main(void) { CURL *curl; string str; string id; Coin coin1; initializeCurl(curl); Exchange ex("cryptsy"); curl_easy_cleanup(curl); system("pause"); return 0; } class Exchange { public: typedef struct Currency { Currency(Coin *coin, Currency *next, Currency *prev, int position) : _coin(coin), _next(next), _prev(prev), _position(position) {} Currency(Currency *prev, int position) : _prev(prev), _position(position), _next(NULL), _coin(&Coin()){} Currency() : _next(NULL), _prev(NULL), _position(0) {} Coin *_coin; Currency *_next; Currency *_prev; int _position; }; /* constructor and destructor */ Exchange(); Exchange(std::string str); ~Exchange(); /* Assignment operator */ Exchange& operator =(const Exchange& copyExchange); /* Parse Cryptsy Pairs */ friend void parseTradePairs(Currency *curr, std::string *response, int begin, int exit); private: std::string _exch; Currency *_currencies; }; here is what i changed it to to fix it. typedef struct Currency { Currency(Coin *coin, Currency *next, Currency *prev, int position) : _coin(coin), _next(next), _prev(prev), _position(position) {} Currency(Currency *prev, int position) : _prev(prev), _position(position), _next(NULL), _coin(&Coin()){} Currency() { _next = NULL; _prev = NULL; _position = 0; _coin = new Coin(); } Coin *_coin; Currency *_next; Currency *_prev; int _position; };

    Read the article

  • Difference between GIT and CVS

    - by jay
    What is the difference between git and cvs version control systems? I have been happily using CVS for over 10 years and have been told that GIT is much better. Could someone please explain what the difference between the two is and why one is better than the other?

    Read the article

  • Does Python Django support custom SQL and denormalized databases with no Foreign Key relationships?

    - by Jay
    I've just started learning Python Django and have a lot of experience building high traffic websites using PHP and MySQL. What worries me so far is Python's overly optimistic approach that you will never need to write custom SQL and that it automatically creates all these Foreign Key relationships in your database. The one thing I've learned in the last few years of building Chess.com is that its impossible to NOT write custom SQL when you're dealing with something like MySQL that frequently needs to be told what indexes it should use (or avoid), and that Foreign Keys are a death sentence. Percona's strongest recommendation was for us to remove all FKs for optimal performance. Is there a way in Django to do this in the models file? create relationships without creating actual DB FKs? Or is there a way to start at the database level, design/create my database, and then have Django reverse engineer the models file?

    Read the article

  • Fastest file reading in C.

    - by Jay
    Right now I am using fread() to read a file, but in other language fread() is inefficient i'v been told. Is this the same in C? If so, how would faster file reading be done?

    Read the article

  • Parsing a string in c#

    - by Jay
    Hi, Suppose there is an xml file like below: <Instances> <Bits = "16" XCoord = "64" YCoord = "64" ZCoord = "64" FileType="jpeg" Location="C:\Series1\Image1.jpg" ImageNumber = "1"/> <Bits = "16" XCoord = "64" YCoord = "64" ZCoord = "64" FileType="jpeg" Location="C:\Series1\Image2.jpg" ImageNumber = "2"/> <Bits = "16" XCoord = "64" YCoord = "64" ZCoord = "64" FileType="jpeg" Location="C:\Series1\Image3.jpg" ImageNumber = "3"/> <Bits = "16" XCoord = "64" YCoord = "64" ZCoord = "64" FileType="jpeg" Location="C:\Series1\Image4.jpg" ImageNumber = "4"/> <Bits = "16" XCoord = "64" YCoord = "64" ZCoord = "64" FileType="jpeg" Location="C:\Series1\Image5.jpg" ImageNumber = "5"/> </Instances> This xml file is read as a string and passed on to a function. This xml file has information about a particular image file. I want to extract the location of all the image files from this string. So whatever is value of "location" filed i need to collect all those value. What is the best way to achieve this in C#. Thanks,

    Read the article

  • How to write custom SQLite functions in Javascript inside a Webkit browser?

    - by Jay Godse
    I have just learned how to use the SQLite database for local storage in a Webkit web browser (e.g. Google Chrome or Apple Safari) using the Javascript API. For example the "Sticky Notes" application. However, I know that SQLite has a function called sqlite_create_function() that lets you add custom functions to your instance of SQLite on the fly which can then be used inside SQL queries. This function is described at sqlite.org. I also know that you can call an equivalent of this API in Ruby as described here. QUESTION: Can anybody show me how to do this in Javascript - i.e. write a custom function in Javascript that can be bound into the SQLite database at run time to be called by the SQLite engine, and all inside a Webkit browser?

    Read the article

  • How to make the swf load after all the images and text loaded?

    - by Jay
    My CMS system allow people to post some swf on the homepage, however, sometime there is video which is included in swf, not two files swf+flv. When the swf video load, it near used up the bandwidth and so the page seems not response for a while ... Can I use jQuery to control all the swf in a page that they load after the others done or maybe just load it after 3s or what? Thanks!!

    Read the article

  • generating images by user id php + mysql

    - by jay
    function user_image($id, $increment_views = false) { $id = mysql_real_escape_string($id); $q = mysql_query("SELECT * FROM `images` WHERE `id` = '$id'"); if (mysql_num_rows($q)) { $return = mysql_fetch_assoc($q); $q = mysql_query("SELECT * FROM `sources` WHERE `source_id` = $return[id] AND `source_flagged` = 0"); while ($r = mysql_fetch_assoc($q)) { $return['sources'][] = $r; } if ($increment_views) { $q = mysql_query("UPDATE `images` SET `views` = `views` + 1 WHERE `id` = $return[id]"); } return $return; } else { return false; } }

    Read the article

  • Redirecting to wrong relative address

    - by jay
    Hi All: I have an issue with not getting the correct relative url. Right now, say my home page is at (please ignore quotation) "http://www.foo.com/user/home" I have links on the homepage that should go to "http://www.foo.com/user/home/page1" but right now I'm getting "http://www.foo.com/page1" Everything worked locally, can this be fixed with modifying .htaccess and how? Thank you.

    Read the article

  • Application doesn't start

    - by Jay
    Hello, I am having a rather strange problem, I deployed 2 .NET applications on my machine. Both run on v2.0. Now, while one of it works smoothly, the other one doesn't even start! Moreover, it doesn't throw any error, I couldn't see any error listings in the Event Viewer. Becoming hard to debug. On every other machine, both the exe's work perfectly fine! Any known issues? Thanks

    Read the article

  • row convert to column in sql 2008

    - by jay
    create table #cusphone(cusid int,cusph1 int) insert into #cusphone values(1,48509) insert into #cusphone values(1,48508) insert into #cusphone values(1,48507) insert into #cusphone values(2,48100) out put 1 48509 48508 48507 2 48100 null null

    Read the article

  • Parsing command line options in Perl

    - by Jay Gridley
    Hi guys, I am parsing command line options in Perl using Getopt::Long. I am forced to use prefix - (one dash) for short commands (-s) and -- (double dash) for long commands (ex. --input=file), but problem is, that there is one special option (-r=) so it is long option for its requirement for argument, but it has to have one dash (-) prefix not double dash (--) like other long options. Is possible to setup Getopt::Long to accept these?

    Read the article

  • Generate form based on selection

    - by Jay
    I'm looking to build a web application that allows a person to select a plan and fill out an application for that plan. There are multiple plans and each plan generates a different application. Some of the questions are identical such as fields related to personal information. I'm thinking of using ASP.NET MVC to build this web application. When generating the multi page application would it be best to Create partial views (sections of applications) and combine them when generating the form. OR Build some type of dynamic form generator

    Read the article

  • Finding the longest road in a Settlers of Catan game algorithmically

    - by Jay
    I'm writing a Settlers of Catan clone for a class. One of the extra credit features is automatically determining which player has the longest road. I've thought about it, and it seems like some slight variation on depth-first search could work, but I'm having trouble figuring out what to do with cycle detection, how to handle the joining of a player's two initial road networks, and a few other minutiae. How could I do this algorithmically? For those unfamiliar with the game, I'll try to describe the problem concisely and abstractly: I need to find the longest possible path in an undirected cyclic graph.

    Read the article

  • Copying a 2D non-space array to another

    - by Jay
    I'm a total programming newb who started learning java programming this sem at uni. I'm up to a step where i need to copy some elements from one method to another. This program i'm creating is called an L_Game. The question I'm stuck is: the project(Slide other) method should take another slide as a parameter, and copy each non-space cell from this slide into the other slide (i.e. like a projector projecting slides onto a screen. I previously made a constructor with the parameter cells in it and believe i copied it to the project(Slide other) method. But i'm not sure what to do to copy each "non-space cell" With the "for" method or the "if" method? If my question isn't typed correctly or have information missing, please let me know. Any help will be appreciated. (I obviously have no idea with what i'm doing...)

    Read the article

  • cakephp redirecting to wrong relative address (htaccess?)

    - by jay
    Hi All: I have an issue with not getting the correct relative url. Right now, say my home page is at (please ignore quotation) "http://www.foo.com/user/home" I have links on the homepage that should go to "http://www.foo.com/user/home/page1" but right now I'm getting "http://www.foo.com/page1" Everything worked locally, can this be fixed with modifying .htaccess and how? Thank you.

    Read the article

  • C character from string shortcut

    - by Jay
    In javascript I am used to just being able to pick any character from a string like "exm[2]" and it would return to me the third character in a string. In C is there a way to do that or something without a function that requires a buffer?

    Read the article

  • Process for Upgrading from RedBean 3.5 to RedBean 4

    - by Jay Haase
    I am currently using RedBean version 3.5. I think I would like to move to the latest version of RedBean, version 4. I have found no documentation about upgrade process and have a number of significant questions: Is my RedBean 3.5 database schema compatible 4, or will up have to migrate all of the tables to some new format? Is any of my RedBean 3.5 code compatible with version 4, or wouldI need to rewrite all of my code that uses RedBean 3.5? Would it make more sense to upgrade to Doctrine? As a side note, I am also feeling concerned about RedBean's drop of support for Composer, which I have found to be über helpful in managing the various versions of libraries I am using.

    Read the article

  • .split("1px") into ["1px",1,"px"] in Javascript

    - by Jay
    I'm rubbish at Regular Expressions, really! What I'd like is to split a string containing a CCS property value into an array of [string,value,unit]. For example: if I supplied the .split() method with 1px it'd return ["1px",1,"px"]. If I were to supply, similarly, 10% it'd return ["10%",10,"%"]. Can this be done? I appreciate all your help!

    Read the article

  • Are parallel calls to send/recv on the same socket valid?

    - by Jay
    Can we call send from one thread and recv from another on the same socket? Can we call multiple sends parallely from different threads on the same socket? I know that a good design should avoid this, but I am not clear how these system APIs will behave. I am unable to find a good documentation also for the same. Any pointers in the direction will be helpful.

    Read the article

  • PHP SDK Requires two logins...doesn't recognize first

    - by Jay Konieczny
    I am using the following code to authenticate whether users are logged in or not. While users can log in, they have to click the login button twice. Additionally, sometimes even after they click the log-in button twice, my "user info" part of the page (earlier in the page than the content) shows them as logged out while the actual page shows them as logged in. Here is the code. Could someone suggest a better way of handling log-ins? function isLoggedIn($facebook) { if (isset($facebook) and $facebook->getUser() != 0) { // UserID exists, but user may still not be logged in. Let's check: try { $facebook->api('/me', 'GET'); // If this succeeds, then they are logged in. return true; } catch(FacebookApiException $e) { // Some kind of error, so not logged in. if(session_id() === '') session_destroy(); return false; } } else { if(session_id() === '') session_destroy(); return false; } } Thanks!

    Read the article

< Previous Page | 14 15 16 17 18 19 20 21  | Next Page >