Search Results

Search found 291 results on 12 pages for 'travis jensen'.

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

  • structDelete doesn't effect the shallow copy?

    - by Travis
    I was playing around onError so I tried to create an error using a large xml document object. <cfset variables.XMLByRef = variables.parsedXML.XMLRootElement.XMLChildElement> <cfset structDelete(variables.parsedXML, "XMLRootElement")> <cfset variables.startXMLShortLoop = getTickCount()> <cfloop from = "1" to = "#arrayLen(variables.XMLByRef)#" index = "variables.i"> <cfoutput>#variables.XMLByRef[variables.i].id.xmltext#</cfoutput><br /> </cfloop> <cfset variables.stopXMLShortLoop = getTickCount()> I expected to get an error because I deleted the structure I was referencing. From LiveDocs: Variable Assignment - Creates an additional reference, or alias, to the structure. Any change to the data using one variable name changes the structure that you access using the other variable name. This technique is useful when you want to add a local variable to another scope or otherwise change a variable's scope without deleting the variable from the original scope. instead I got 580df1de-3362-ca9b-b287-47795b6cdc17 25a00498-0f68-6f04-a981-56853c0844ed ... ... ... db49ed8a-0ba6-8644-124a-6d6ebda3aa52 57e57e28-e044-6119-afe2-aebffb549342 Looped 12805 times in 297 milliseconds <cfdump var = "#variables#"> Shows there's nothing in the structure, just parsedXML.xmlRoot.xmlName with the value of XMLRootElement. I also tried <cfset structDelete(variables.parsedXML.XMLRootElement, "XMLChildElement")> as well as structClear for both. More information on deleting from the xml document object. http://help.adobe.com/en_US/ColdFusion/9.0/Developing/WSc3ff6d0ea77859461172e0811cbec22c24-78e3.html Can someone please explain my faulty logic? Thanks.

    Read the article

  • Approaching Java from a Ruby perspective

    - by Travis
    There are plenty of resources available to a Java developer for getting a jump-start into Ruby/Rails development. The reverse doesn't appear to be true. What resources would you suggest for getting up-to-date on the current state of java technologies? How about learning how to approach DRY (don't repeat yourself) without the use of metaprogramming? Or how to approach various scenarios where a ruby developer is used to passing in a function (proc/lambda/block) as an argument (callbacks, etc)?

    Read the article

  • C++ Suppress Automatic Initialization and Destruction

    - by Travis G
    How does one suppress the automatic initialization and destruction of a type? While it is wonderful that T buffer[100] automatically initializes all the elements of buffer, and destroys them when they fall out of scope, this is not the behavior I want. #include <iostream> static int created = 0, destroyed = 0; struct S { S() { ++created; } ~S() { ++destroyed; } }; template <typename T, size_t KCount> class Array { private: T m_buffer[KCount]; public: Array() { // some way to suppress the automatic initialization of m_buffer } ~Array() { // some way to suppress the automatic destruction of m_buffer } }; int main() { { Array<S, 100> arr; } std::cout << "Created:\t" << created << std::endl; std::cout << "Destroyed:\t" << destroyed << std::endl; return 0; } The output of this program is: Created: 100 Destroyed: 100 I would like it to be: Created: 0 Destroyed: 0 My only idea is to make m_buffer some trivially constructed and destructed type like char and then rely on operator[] to wrap the pointer math for me, although this seems like a horribly hacked solution. Another solution would be to use malloc and free, but that gives a level of indirection that I do not want.

    Read the article

  • How to open links in new window ONLY IF the check box is checked

    - by Travis
    Here is what i have so far. I have it so they open in new windows, but i want it only if the check box is checked... <!DOCTYPE html> <html> <head> <script> function new() { if ( document.getElementById('checkbox').checked ) window.open( 'y', 'n', 't', 'New Window' ); } else { break; } var OpenNew = document.getElementById('opennew'); OpenNew.addEventListener('click', OpenWin, false ); </script> </head> <body> <p> <form name="test"> <p>Open link in a new window &nbsp; <input type="checkbox" id="checkbox" name="check" /></p> </form> </p> <p> <h2>My favorite Websites to visit</h2> <a href="http://www.youtube.com" target="new" id="y">Youtube</a><br /> <a href="http://www.newegg.com" target="new" id="n">Newegg</a><br /> <a href="http://www.twitch.tv" target="new" id="t">Twitch.tv</a><br /> </p> </body> </html> I am unsure how to actually do the if statement if it is checked then open. It does currently open in a new tab.. i just need it to be only when its checked. Any help with this will be greatly appreciated! Thanks!

    Read the article

  • Using items in a list as arguments

    - by Travis Brown
    Suppose I have a function with the following type signature: g :: a -> a -> a -> b I also have a list of as—let's call it xs—that I know will contain at least three items. I'd like to apply g to the first three items of xs. I know I could define a combinator like the following: ($$$) :: (a -> a -> a -> b) -> [a] -> b f $$$ (x:y:z:_) = f x y z Then I could just use g $$$ xs. This makes $$$ a bit like uncurry, but for a function with three arguments of the same type and a list instead of a tuple. Is there a way to do this idiomatically using standard combinators? Or rather, what's the most idiomatic way to do this in Haskell? I thought trying pointfree on a non-infix version of $$$ might give me some idea of where to start, but the output was an abomination with 10 flips, a handful of heads and tails and aps, and 28 parentheses. (NB: I know this isn't a terribly Haskelly thing to do in the first place, but I've come across a couple of situations where it seems like a reasonable solution, especially when using Parsec. I'll certainly accept "don't ever do this in real code" if that's the best answer, but I'd prefer to see some clever trick involving the ((->) r) monad or whatever.)

    Read the article

  • Select next element in the page source using jQuery

    - by Travis
    I have an arbitrarily deep list of the form: <ul> <li></li> <li> <ul> <li></li> </ul> </li> </ul> I am trying to build a function "nextElement" that returns a jQuery selector. The first time the function is called, it returns the first li in the list. The second time it is called, it returns the next li in the page. Etc. I'd like this function to pay no attention to siblings, parents, children, etc. All I care about is that everytime it is called, the next li in the source gets chosen. Any suggestions on how to go about approaching this? Thanks

    Read the article

  • Can a Snapshot transaction fail and only partially commit in a TransactionScope?

    - by Travis Brooks
    Greetings I stumbled onto a problem today that seems sort of impossible to me, but its happening...I'm calling some database code in c# that looks something like this: using(var tran = MyDataLayer.Transaction()) { MyDataLayer.ExecSproc(new SprocTheFirst(arg1, arg2)); MyDataLayer.CallSomethingThatEventuallyDoesLinqToSql(arg1, argEtc); tran.Commit(); } I've simplified this a bit for posting, but whats going on is MyDataLayer.Transaction() makes a TransactionScope with the IsolationLevel set to Snapshot and TransactionScopeOption set to Required. This code gets called hundreds of times a day, and almost always works perfectly. However after reviewing some data I discovered there are a handful of records created by "SprocTheFirst" but no corresponding data from "CallSomethingThatEventuallyDoesLinqToSql". The only way that records should exist in the tables I'm looking at is from SprocTheFirst, and its only ever called in this one function, so if its called and succeeded then I would expect CallSomethingThatEventuallyDoesLinqToSql would get called and succeed because its all in the same TransactionScope. Its theoretically possible that some other dev mucked around in the DB, but I don't think they have. We also log all exceptions, and I can find nothing unusual happening around the time that the records from SprocTheFirst were created. So, is it possible that a transaction, or more properly a declarative TransactionScope, with Snapshot isolation level can fail somehow and only partially commit?

    Read the article

  • Best datastructure for this relationship...

    - by Travis
    I have a question about database 'style'. I need a method of storing user accounts. Some users "own" other user accounts (sub-accounts). However not all user accounts are owned, just some. Is it best to represent this using a table structure like so... TABLE accounts ( ID ownerID -> ID name ) ...even though there will be some NULL values in the ownerID column for accounts that do not have an owner. Or would it be stylistically preferable to have two tables, like so. TABLE accounts ( ID name ) TABLE ownedAccounts ( accountID -> accounts(ID) ownerID -> accounts(ID) ) Thanks for the advice.

    Read the article

  • In mySQL, Is it possible to SELECT from two tables and merge the columns?

    - by Travis
    If I have two tables in mysql that have similar columns... TABLEA id name somefield1 TABLEB id name somefield1 somefield2 How do I structure a SELECT statement so that I can SELECT from both tables simultaneously, and have the result sets merged for the columns that are the same? So for example, I am hoping to do something like... SELECT name, somefield1 FROM TABLEA, TABLEB WHERE name="mooseburgers"; ...and have the name, and somefield1 columns from both tables merged together in the result set. Thank-you for your help!

    Read the article

  • How to find every possible combination of an arbitrary number of arrays in PHP

    - by Travis
    I have an arbitrary number of nested arrays in php. For example: Array ( [0] => Array ( [0] => 36 [0] => 2 [0] => 9 ) [1] => Array ( [0] => 95 [1] => 21 [2] => 102 [3] => 38 ) [2] => Array ( [0] => 3 [1] => 5 ) ) I want to find the most efficient way to combine all possible combinations of each of these nested arrays. I'd like to end up with something that looks like this... Array ( [0] => "36,95,3" [1] => "36,95,5" [2] => "36,21,3" [3] => "36,21,5" etc... ) The order the results are combined in is not important. That is to say, there is no difference between "3,95,36", "36,95,3", and "95,36,3". I would like to omit these redundant combinations. Any suggestions on how to go about this would be much appreciated. Thanks in advance,

    Read the article

  • Can anyone tell me what is wrong with my create trigger syntax?

    - by Travis
    I am experimenting with triggers for the first time. When I try to create a trigger using the following: CREATE TRIGGER t_foldersPrivate BEFORE DELETE ON foldersPrivate FOR EACH ROW BEGIN DELETE FROM programs WHERE folderType = '0' AND folderID = OLD.ID; END; I receive the following error: `1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 3` (mysql 5.1.37) If I get rid fo the delete statement the create trigger statement works fine. So I am assuming it must have something to do with that. But for the life of me I'm not sure what...

    Read the article

  • Update ancestors in a nested set?

    - by Travis
    I am using nested sets to represent a tree in mysql, like so: Tree ID title lft rgt Given the ID of a node in the tree, what is the easiest / best way to UPDATE that node as well as all of it's ancestors? For example, let's say that the node ID (36) is 4 levels deep in the tree. I would like to update its title, as well as every parent node's title, all the way to the root, to the word "fish". (Should be four updates in all.) Thanks for your help!

    Read the article

  • How do I set an og:type for the first time without losing likes?

    - by Travis
    When I first created my site, I neglected to add the Open Graph tags that Facebook recommends (http://developers.facebook.com/docs/opengraph/), and the site now has about 1200 Facebook likes through a fb:comments widget. http://graph.facebook.com/http://feedtheanimalssamples.com/ shows this: { "id": "http://feedtheanimalssamples.com/", "shares": 1204 } Recently, I've added added the following OG tags: <meta property="fb:app_id" content="59193243341" /> <meta property="og:title" content="Girl Talk - Feed The Animals Samples (old)" /> <meta property="og:image" content="http://feedtheanimalssamples.com/fta_small.png" /> <meta property="og:url" content="http://feedtheanimalssamples.com" /> But when I add the og:type tag: <meta property="og:type" content="website" /> and Lint the site, I lose all my likes. http://graph.facebook.com/http://feedtheanimalssamples.com/ starts showing this: { "id": "170545342993850", "name": "Girl Talk - Feed The Animals Samples", "picture": "http://profile.ak.fbcdn.net/hprofile-ak-snc4/188039_170545342993850_3277642_s.jpg", "link": "http://www.facebook.com/pages/Girl-Talk-Feed-The-Animals-Samples/170545342993850", "category": "Website", "website": "http://feedtheanimalssamples.com/", "description": "Interactively identifies the samples in the 2008 album 'Feed The Animals' by mashup artist Girl Talk.", "likes": 1 } (Note the "likes": 1.) So: How do I set the og:type without losing my likes? I'm trying to let my likers know that I've created a new and improved site. I'm following the instuctions at http://developers.facebook.com/blog/post/397 under "Publishing to Connected Users via Graph API", but using that API apparently requires specifying an og:type. Thanks!

    Read the article

  • mysqli::query returns true on SELECT statement

    - by Travis Pessetto
    I have an application that reads in one of its classes: public function __construct() { global $config; //Establish a connection to the database and get results set $this->db = new Database("localhost",$config["dbuser"],$config["dbpass"],"student"); $this->records = $this->db->query("SELECT * FROM major") or die("ERROR: ".$this->db->error); echo "<pre>".var_dump($this->records)."</pre>"; } My problem is that var_dump shows that $this->records is a boolean. I've read the documentation and see that the SELECT query should return a result set. This is the only query used by the application. Any ideas where I am going wrong?

    Read the article

  • What's the best graphics library for node.js for image cropping?

    - by Travis
    I'm creating a website using node.js. I have seen many libraries mentioned that piggy back on top of imagemagick etc. There is a list here: https://github.com/ry/node/wiki/modules#graphics What I'm trying to do is take the image that a user uploads, crop it/size it to certain dimensions the site requires. What is the best/most active script to do this? I'd like one with npm support. Does anyone have actual experience using some of these?

    Read the article

  • How can I connect PHP 5.1 to Oracle 7?

    - by Travis Beale
    I have been able to query newer Oracle databases using the PHP oci8 extension with the Oracle 10.2 Instant Client. Unfortunately, the Oracle Instant Client seems to be unable to connect to an Oracle 7 database (version 7.3.3 to be precise). Is there a way to query an older Oracle database from PHP?

    Read the article

  • Finding Those Pesky Unicode Characters in Visual Studio

    - by fallen888
    Sometimes I’m handed HTML that I need to wire up and I find these characters.  Usually there are only a couple on the page and, while annoying to find, it’s not a big deal.  Recently I found dozens and dozens of these guys on a page and wasn’t very happy at the prospect of having to manually search them all out and remove/replace them.  That is, until I did some research and found this very  helpful article by Aaron Jensen - Finding Non-ASCII Characters with Visual Studio. Aaron’s wonderful solution: Try searching your code with the following regular expression: [^\x00-\x7f] Open any of Visual Studio’s find windows and enter the regular expression above into the “Find what:” text box. Click the “Find Options” plus sign to expand the list of options. Check the last box “Use:” and choose “Regular expressions” from the drop down menu. Easy and efficient.  Thanks, Aaron!

    Read the article

  • JavaOne 2012 session slides: "Dev Berkeley DB & DB Mobile Server for Java Embedded Tech"

    - by hinkmond
    The latest JavaOne 2012 slides are available on the Web. Here's the presentation that Eric Jensen and I did on "Developing Berkeley DB & DB Mobile Server for Java Embedded Technology". Enjoy! See: Click here for the slides in a new window It was fun to present this talk at JavaOne 2012 with Eric. We had some good questions from the audience. Let me know in the Comments if you have any further questions. I'll pass all the good questions to Eric and keep the bad questions for myself. Hinkmond

    Read the article

  • Healthcare Mobile Database Synchronization Demonstration

    - by Jim Connors
    Like many of you, I learn best by getting my hands dirty.  When confronted with the task of understanding a new set of products and technologies and figuring out how they might apply to a vertical industry like healthcare, I set out to create a demonstration.  The video that follows aims to show how the Oracle embedded software portfolio can be applied to a healthcare application.  The demonstration utilizes among others, Java SE Embedded, Berkeley DB, Apache Tomcat, Oracle 11gR2 and Oracle Database Mobile Server. Eric Jensen gives a great critique and description of the demo here.  To sum it up, we aim to show how live medical data can be collected on a medical device, stored in a local database, synchronized to a master database and furthermore propagated to a mobile phone (Android) application.  Come take a look!

    Read the article

  • PHP composer question

    - by kdub
    just getting started with composer and I have a couple of questions. When I use composer to add a dependency, the dependency gets added to my folder's Vendor directory. The newly added package not only comes with the source code for that package, but all packagist required files for the developer to test and add that package to packagist repo (composer.json, .travis.yaml, license, readme.md, etc). For my project, do I need to keep the vendor's required packagist files in my project? Can I clean the package folder structure up a little? I added the package, Slim micro framework, which nests the source files three directories deep upon installation, ../vendor/slim/slim/Slim/(source Files). Is it worth moving these files to the top Slim directory like: ../vendor/Slim/(source files)? Or will this ruin the integrity of the package?

    Read the article

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