Search Results

Search found 2358 results on 95 pages for 'rob thomas'.

Page 71/95 | < Previous Page | 67 68 69 70 71 72 73 74 75 76 77 78  | Next Page >

  • MySQL Query For Copying Contents Into Another Field, Same Row

    - by Rob Adler
    Is there a single query (subqueries in it are allowed) where I can copy the content of one field into another field, per row. Example: price, and priceBackup Records: 45.55 47.77 45.55 copies into priceBackup for that specific row, 47.77 copies into priceBackup for that specific row. I do have a primary key, auto increment on it under 'id'. Thanks guys!

    Read the article

  • Multithreaded linked list traversal

    - by Rob Bryce
    Given a (doubly) linked list of objects (C++), I have an operation that I would like multithread, to perform on each object. The cost of the operation is not uniform for each object. The linked list is the preferred storage for this set of objects for a variety of reasons. The 1st element in each object is the pointer to the next object; the 2nd element is the previous object in the list. I have solved the problem by building an array of nodes, and applying OpenMP. This gave decent performance. I then switched to my own threading routines (based off Windows primitives) and by using InterlockedIncrement() (acting on the index into the array), I can achieve higher overall CPU utilization and faster through-put. Essentially, the threads work by "leap-frog'ing" along the elements. My next approach to optimization is to try to eliminate creating/reusing the array of elements in my linked list. However, I'd like to continue with this "leap-frog" approach and somehow use some nonexistent routine that could be called "InterlockedCompareDereference" - to atomically compare against NULL (end of list) and conditionally dereference & store, returning the dereferenced value. I don't think InterlockedCompareExchangePointer() will work since I cannot atomically dereference the pointer and call this Interlocked() method. I've done some reading and others are suggesting critical sections or spin-locks. Critical sections seem heavy-weight here. I'm tempted to try spin-locks but I thought I'd first pose the question here and ask what other people are doing. I'm not convinced that the InterlockedCompareExchangePointer() method itself could be used like a spin-lock. Then one also has to consider acquire/release/fence semantics... Ideas? Thanks!

    Read the article

  • Can Wordpress Duplicate An Entire Page Structure?

    - by rob walsh
    I have a wordpress site that i've been working on that has some pages (as in NOT posts) that a client changes content on in order to target particular keywords. these pages have been using podscms for content management. The client now wants to be able to duplicate these pages any number of times and edit the text within them. So basically, he wants to be have a dozen or so versions of about 4 linked pages. Does anyone know if it's possible to duplicate an entire multipage structure like this in WP? Or any WP driven sites that implement segmentation similarly?

    Read the article

  • Leftover Nav Bar in Landscape View

    - by Rob Bonner
    Hello, I am working to force a view into landscape mode, and have picked up all kinds of cool tips to make this happen, but am stuck on one item that is left on the screen. I have my XIB file laid out in landscape, and in my code I create the view controller normally: RedeemViewController *aViewController = [[RedeemViewController alloc] initWithNibName:@"RedeemViewController" bundle:nil]; aViewController.hidesBottomBarWhenPushed = YES; aViewController.wantsFullScreenLayout = YES; [[self navigationController] pushViewController:aViewController animated:YES]; Inside the controller viewDidLoad I complete the following: [[UIApplication sharedApplication] setStatusBarOrientation:UIInterfaceOrientationLandscapeRight]; [[self navigationController] setNavigationBarHidden:YES animated:YES]; [UIView beginAnimations:@"View Flip" context:nil]; [UIView setAnimationDuration:.75]; [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut]; if (self.interfaceOrientation == UIInterfaceOrientationPortrait) { self.view.transform = CGAffineTransformIdentity; self.view.transform = CGAffineTransformMakeRotation(degreesToRadian(90)); self.view.bounds = CGRectMake(0.0, 0.0, 480, 320); } [UIView commitAnimations]; What I end up with is a perfectly rotated view, with a grey vertical bar on the left side (see pic). So to the question, how do I get rid of the bar? Edit: I am pretty sure this is the navigation bar that is not being hidden. This is a duplicate of another post, with some modified code, the other question was being answered with the bug.

    Read the article

  • Catch a PHP Object Instantiation Error

    - by Rob Wilkerson
    It's really irking me that PHP considers the failure to instantiate an object a Fatal Error (which can't be caught) for the application as a whole. I have set of classes that aren't strictly necessary for my application to function--they're really a convenience. I have a factory object that attempts to instantiate the class variant that's indicated in a config file. This mechanism is being deployed for message storage and will support multiple store types: DatabaseMessageStore FileMessageStore MemcachedMessageStore etc. A MessageStoreFactory class will read the application's preference from a config file, instantiate and return an instance of the appropriate class. It might be easy enough to slap a conditional around the instantiation to ensure that class_exists(), but MemcachedMessageStore extends PHP's Memcached class. As a result, the class_exists() test will succeed--though instantiation will fail--if the memcached bindings for PHP aren't installed. Is there any other way to test whether a class can be instantiated properly? If it can't, all I need to do is tell the user which features won't be available to them, but let them continue one with the application. Thanks.

    Read the article

  • Creating a new Guid inside a code snippet using c#

    - by Rob
    I want to make an intellisense code snippet using Ctl K + Ctl X that actually executes code when it runs... for example, I would like to do the following: <![CDATA[string.Format("{MM/dd/yyyy}", System.DateTime.Now);]]> But rather than giving me that string value, I want the date in the format specified. Another example of what I want is to create a new Guid but truncate to the first octet, so I would want to use a create a new Guid using System.Guid.NewGuid(); to give me {798400D6-7CEC-41f9-B6AA-116B926802FE} for example but I want the value: 798400D6 from the code snippet. I'm open to not using an Intellisense Code Snippet.. I just thought that would be easy.

    Read the article

  • How do I compare two PropertyInfos or methods reliably?

    - by Rob Ashton
    Same for methods too: I am given two instances of PropertyInfo or methods which have been extracted from the class they sit on via GetProperty or GetMember etc, (or from a MemberExpression maybe). I want to determine if they are in fact referring to the same Property or the same Method so (propertyOne == propertyTwo) or (methodOne == methodTwo) Clearly that isn't going to actually work, you might be looking at the same property, but it might have been extracted from different levels of the class hierarchy (in which case generally, propertyOne != propertyTwo) Of course, I could look at DeclaringType, and re-request the property, but this starts getting a bit confusing when you start thinking about Properties/Methods declared on interfaces and implemented on classes Properties/Methods declared on a base class (virtually) and overridden on derived classes Properties/Methods declared on a base class, overridden with 'new' (in IL world this is nothing special iirc) At the end of the day, I just want to be able to do an intelligent equality check between two properties or two methods, I'm 80% sure that the above bullet points don't cover all of the edge cases, and while I could just sit down, write a bunch of tests and start playing about, I'm well aware that my low level knowledge of how these concepts are actually implemented is not excellent, and I'm hoping this is an already answered topic and I just suck at searching. The best answer would give me a couple of methods that achieve the above, explaining what edge cases have been taken care of and why :-)

    Read the article

  • MVC C# Controller Method to return Tables

    - by Rob Tiu
    I'm a real beginner with MVC and my issue is this, I have a mdf database with multiple tables and I want to have a method return "ANY" table from the database and pass it to a aspx view. Examples of other tables in the database: Articles, Products, Supplies Here is an example of my code to view an Article Table from the database: //USING LINQ-SQL CONTEXT DATABASE public ActionResult ArticlePage() { tinypeas_db_contextDataContext context = HttpContext.Application["context"] as tinypeas_db_contextDataContext; try { return View(context.Articles); } catch { return Json(false, JsonRequestBehavior.AllowGet); } } How would I modify this method to dynamically pass any table to the view? Or should I be using something else other than Linq-to-SQL

    Read the article

  • Serializing persistent/functional data structures

    - by Rob
    Persistent data structures depend on the sharing of structure for efficiency. For an example, see here. How can I preserve the structure sharing when I serialize the data structures and write them to a file or database? If I just naively traverse the datastructures, I'll store the correct values, but I'll lose the structure sharing. I'd like to be able to save data-structures with shared components to a file, restore them, and still have most of the structure shared in the restored data.

    Read the article

  • Implementing C# for the JVM

    - by Rob
    Is anyone attempting to implement C# for the JVM? As a Java developer, I've been eyeing C# with envy, but am unwilling to give up the portability and maturity of the JVM, not to mention the diverse range of tools for it. I know there are some important differences between the JVM and CLR but is there anything that is a showstopper?

    Read the article

  • Using an IN clause in Vb.net to save something to the database using SQL

    - by Rob
    I have a textbox and a button on a form. I wish to run a query (in Vb.Net) that will produce a query with the IN Values. Below is an example of my code myConnection = New SqlConnection("Data Source=sqldb\;Initial Catalog=Rec;Integrated Security=True") myConnection.Open() myCommand = New SqlCommand("UPDATE dbo.Recordings SET Status = 0 where RecID in ('" & txtRecID.Text & "') ", myConnection) ra = myCommand.ExecuteNonQuery() myConnection.Close() MsgBox("Done!", _ MsgBoxStyle.Information, "Done") When I enter a single value it works but when I enter values with commas it throws an error: "Conversion failed when converting the varchar value '1234,4567' to data type int." Could someone please help me to solve this or if there is an alternative way? Many Thanks

    Read the article

  • Using Uploadify, I'm renaming uploaded files via uploadify.php, how do I get the check script to now check for this renamed file??

    - by Rob Macintosh
    I've modified my uploadify.php file to rename my uploaded files, i'm appending them with my clients company name. As you can see i'm using scriptData to set the company name, so that uploadify.php can use it. documents.php 'scriptData': { 'PHPSESSID': '<?php echo session_id();?>', 'client_company': '<?php echo $_SESSION['company'] . "-";?>' }, This all works great - but now it breaks my check.php. I'm using the default check script, but now it simply thinks the file doesn't exist, so it overwrites it. I've tried appending the client_company POST variable to the file check; check.php $fileArray = array(); foreach ($_POST as $key => $value) { if ($key != 'folder') { if (file_exists($_SERVER['DOCUMENT_ROOT'] . $_POST['folder'] . '/' . $_POST['client_company'] . $value)) { $fileArray[$key] = $value; } } } echo json_encode($fileArray); But it doesn't work :( Can anyone help?

    Read the article

  • MySQL Full Text Search Boolean Mode Partial Match

    - by Rob
    I've found boolean mode of MySQL full text search useful, however there are a couple of things I can't seem to figure out how to achieve. For instance imagine I have a full text column containing the words "Steve's Javascript Tutorial - Part One". I would like to match this for each of the following searches: "tutorials", "javascript tutorials", "java", "java script", "script" Imagine that each of those searches is simply assigned to a variable in whatever language may be being used (I always use PHP). How could I modify this to make sure that Steve's article is returned on each of those searches? MATCH (article_title) AGAINST ('"+$variable+"*' IN BOOLEAN MODE)

    Read the article

  • Gridview adding row dynamically on RowDataBound with the same RowState (Alternate or Normal)

    - by rob waminal
    I am adding rows dynamically on code behind depending on the Row currently bounded on RowDataBound event. I want that added row to be the same state (Alternate or Normal) of the currently bounded row is this possible? I'm doing something like this but it doesn't follow what I want. I'm expecting the added row dynamically would be the same as the current row. But it is not. protected void gv_RowDataBound(object sender, GridViewRowEventArgs e) { if(e.Row.RowType == DataControlRowType.DataRow) { GVData data = e.Row.DataItem as GVData; // not original object just for brevity if(data.AddHiddenRow) { // the row state here should be the same as the current GridViewRow tr = new GridViewRow(e.Row.RowIndex +1, e.Row.RowIndex + 1, DataControlRowType.DataRow, e.Row.RowState); TableCell newTableCell = new TableCell(); newTableCell.Style.Add("display", "none"); tr.Cells.Add(newTableCell); ((Table)e.Row.Parent).Rows.Add(tr); } } }

    Read the article

  • Pattern for iPhone background loading during init?

    - by Rob S.
    Hi everyone, I'm currently kicking off a background thread to do some REST queries in my app delegate's didFinishLaunchingWithOptions. This thread creates some objects and populates the model as the rest of the app continues to load (because I don't block, and didFinishLaunchingWithOptions returns YES). I also put up a loading UIViewController 'on top' of the main view that I tear down after the background initialization is complete. My problem is that I need to notify the first view (call it the Home view) that the model is ready, and that it should populate itself. The trick is that the background download could have finished before Home.viewDidAppear is called, or any of the other Home.initX methods. I'm having difficulty synchronizing all of this and I've thought about it long enough that it feels like I'm barking up the wrong tree. Are there any patterns here for this sort of thing? I'm sure other apps start by performing lengthy operations with loading screens :) Thanks!

    Read the article

  • recognizing a link in an email

    - by Rob Bonner
    Is there a mechanism where I can identify a string in an email, say a order number, and have it route to my iPhone application? I know that base types do this, but not sure if I can create a new type for my app. Thanks!

    Read the article

  • Does anyone know of a way to easily convert a PDF to a docx format programmatically

    - by Rob
    We have a couple 3rd party systems that give us PDFs. We would like to convert those PDFs for display on the web without using an Adobe product. Ideally we would like to use Silverlight to render the PDFs but are having trouble converting from a PDF to Xaml or using docx format as a middle man. There are lots of libraries that give PDFs but that is not what we need. If there is a library out there that does this, a .net lib would be preferable but we can run the conversion using the command line as well if that is an option.

    Read the article

  • iPhone adding a timer to an app

    - by Rob J
    How would I go about adding a simple 2 minute timer to my app in almost the exact same way that the clock app does? I just want the user to click start and have the timer start displaying the timer counting down from 2:00 and beep when it hits 0:00.

    Read the article

  • Real life example fo Floating Point error

    - by Rob
    Is there any examples of a company that was burned by floating point data that caused a rounding issue? We're implementing a new system and all the monetary values are stored in floats. I think if i can show actual examples of why this has failed it'll have more weight than the theory of why the values can't be stored properly.

    Read the article

  • Dynamic picture that displays the visitors IP address?

    - by Rob
    I see this a lot now, jpg files displaying your IP address. To you of course, not to others, they would see their own For example: How is this even possible? If this is possible, would it be possible to log an IP into a MySQL database from the picture as well? Is my IP getting logged when I view this?

    Read the article

  • gzinflate erroring

    - by Rob
    Well, I'm trying to gzdeflate my code to perform some very low level encryption for distribution, to use with eval(gzinflate('deflated_code')); However whenever I try to inflate the deflated string, it outputs an error. For example: echo(gzdeflate('test')); outputs +I-.? But when I try to echo(gzinflate('+I-.?')); it only outputs Warning: gzinflate() [function.gzinflate]: data error Is there something I'm missing? Why is it outputting this error rather than test?

    Read the article

< Previous Page | 67 68 69 70 71 72 73 74 75 76 77 78  | Next Page >