Search Results

Search found 2474 results on 99 pages for 'patrick scott'.

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

  • Database PK-FK design for future-effective-date entries?

    - by Scott Balmos
    Ultimately I'm going to convert this into a Hibernate/JPA design. But I wanted to start out from purely a database perspective. We have various tables containing data that is future-effective-dated. Take an employee table with the following pseudo-definition: employee id INT AUTO_INCREMENT ... data fields ... effectiveFrom DATE effectiveTo DATE employee_reviews id INT AUTO_INCREMENT employee_id INT FK employee.id Very simplistic. But let's say Employee A has id = 1, effectiveFrom = 1/1/2011, effectiveTo = 1/1/2099. That employee is going to be changing jobs in the future, which would in theory create a new row, id = 2 with effectiveFrom = 7/1/2011, effectiveTo = 1/1/2099, and id = 1's effectiveTo updated to 6/30/2011. But now, my program would have to go through any table that has a FK relationship to employee every night, and update those FK to reference the newly-effective employee entry. I have seen various postings in both pure SQL and Hibernate forums that I should have a separate employee_versions table, which is where I would have all effective-dated data stored, resulting in the updated pseudo-definition below: employee id INT AUTO_INCREMENT employee_versions id INT AUTO_INCREMENT employee_id INT FK employee.id ... data fields ... effectiveFrom DATE effectiveTo DATE employee_reviews id INT AUTO_INCREMENT employee_id INT FK employee.id Then to get any actual data, one would have to actually select from employee_versions with the proper employee_id and date range. This feels rather unnatural to have this secondary "versions" table for each versioned entity. Anyone have any opinions, suggestions from your own prior work, etc? Like I said, I'm taking this purely from a general SQL design standpoint first before layering in Hibernate on top. Thanks!

    Read the article

  • PHP: cannot matching string "<br />

    - by Patrick
    hi, I'm having problems with string matching in PHP. I've 2 html elements in my page, I've copy pasted here the content with Firebug <div class="field-item odd"> <div class="field-label-inline-first"> Year:</div> 2009 </div> <div class="field-item odd"> <div class="field-label-inline-first"> Synopsis:</div> &lt;br /&gt; </div> This php line works perfectly (the element with 2009 is detected) <?php if ($items[0]['view'] == '2009') : echo "ok"; ?> However I'm not able to match the string containing element: <?php if ($items[0]['view'] == '<br />') : echo "ok"; ?> //doesn't work <?php if ($items[0]['view'] == '&lt;br /&gt;') : echo "ok"; ?> //again doesn't work any tip ? To give you some context: The strings are produced by CKEditor, an editor I'm using in my Drupal back-end. When I leave empty this editor, the tag is displayed on the string as plain text (because I set "plain text" as formatting option in the back-end) Thanks

    Read the article

  • What's the logic flaw in this conditional?

    - by Scott B
    I've created this code branch so that if the permalink settings do no match at least one of the OR conditions, I can execute the "do something" branch. However, I believe there is a flaw in the logic, since I've set permalinks to /%postname%.html and it still tries echo's true; I believe I need to change the ORs to AND, right? if (get_option('permalink_structure') !== "/%postname%/" || get_option('my_permalinks') !== "/%postname%/" || get_option('permalink_structure') !== "/%postname%.html" || get_option('my_permalinks') !== "/%postname%.html")) { //do something echo "true"; }

    Read the article

  • Generating new tasks in a foreach loop

    - by Scott Chamberlain
    I know from the codeing guidlines that I have read you should not do for (int i = 0; i < 5; i++) { Task.Factory.StartNew(() => Console.WriteLine(i)); } Console.ReadLine(); as it will write 5 5's, I understand that and I think i understand why it is happening. I know the solution is just to do for (int i = 0; i < 5; i++) { int localI = i; Task.Factory.StartNew(() => Console.WriteLine(localI)); } Console.ReadLine(); However is something like this ok to do? Task currentTask = myFirstTask; currentTask.Start(); foreach (Task task in _TaskList) { currentTask.ContinueWith((antecendent) => { if(antecendent.IsCompleated) { task.Start(); } else //do error handling; }); currentTask = task; } } or do i need to do this? Task currentTask = myFirstTask; foreach (Task task in _TaskList) { Task localTask = task; currentTask.ContinueWith((antecendent) => { if(antecendent.IsCompleated) { localTask.Start(); } else //do error handling; }); currentTask = task; }

    Read the article

  • CSS: how to move element from one column to another one without changing the html ?

    - by Patrick
    hi, I'm using css to edit the content of a page (NB. I cannot edit html code). I have 2 columns div1, div2. Each columns have several children (containing text). If the block has 2 or more lines of text all successive content is automatically moved down. I need to move a chidlren from the first column to the second one, in the middle. I was considering to use absolute positioning but then I realize how children are not anymore moving down as the number of text lines increases. How can I solve this ? <div id=div1> <div> blabla </div> <div> blabla </div> <div> blabla </div> </div> <div id=div2> <div> blabla </div> <div> blabla </div> <div> blabla </div> </div> thanks

    Read the article

  • web-development: how do you usually handle the "under costruction" page"?

    - by Patrick
    hi, I was wondering what's the best way to switch a website to a temporary "under costruction" page and switch it back to the new version. For example, in a website, my customer decided to switch from Joomla to Drupal and I had to create a subfolder for the new CMS, and then move all the content to the root folder. 1) Moving all the content back to the root folder always create some problems with file permissions, links, etc... 2) Creating a rewrite rule in .htaccess or forward with php is not a solution because another url is shown including the top folder. 3) Many host services do not allow to change the root directory, so this is not an option since I don't have access to apache config file. Thanks

    Read the article

  • How do I specify a wildcard (for ANY character) in a c# regex statement?

    - by Scott
    Trying to use a wildcard in C# to grab information from a webpage source, but I cannot seem to figure out what to use as the wildcard character. Nothing I've tried works! The wildcard only needs to allow for numbers, but as the page is generated the same every time, I may as well allow for any characters. Regex statement in use: Regex guestbookWidgetIDregex = new Regex("GuestbookWidget(' INSERT WILDCARD HERE ', '(.*?)', 500);", RegexOptions.IgnoreCase); If anyone can figure out what I'm doing wrong, it would be greatly appreciated!

    Read the article

  • FLEX: can I use a Repeater inside a Series element ?

    - by Patrick
    hi, can I use mx:Repeater inside mx:Series element ? <mx:series> <mx:AreaSeries id="timeArea" styleName="timeArea" name="A" dataProvider="{dataManager.tagViewTimelineModel.tags.getItemAt(0).yearPopularity}" yField="popularity" areaStroke="{new Stroke(0x0033CC, 2)}" areaFill="{new SolidColor(0x0033CC, 0.5)}" /> <mx:LineSeries styleName="timeLine" dataProvider="{dataManager.tagViewTimelineModel.tags.getItemAt(0).yearPopularity}" yField="popularity" stroke="{new Stroke(0xCC33CC, 2)}" /> </mx:series> I don't compiling errors, but my application just doesn't start. thanks

    Read the article

  • SQL Math in Excel VBA

    - by Scott
    Excel seems to have a problem with doing math in SQL queries. SELECT ( SELECT sum(column) FROM table1 ) + ( SELECT sum(column) FROM table2 ) AS total This technique works completely fine in ASP and ASP.NET. Has anyone had success doing this in Excel VBA? (My database engine is SQL Server 2000.)

    Read the article

  • PHP/MySQL Problem

    - by Scott
    Why does this only print the sites specific content under the first site, and doesn't do it for the other 2? <?php echo 'NPSIN Data will be here soon!'; // connect to DB $dbhost = 'localhost'; $dbuser = 'root'; $dbpass = 'root'; $conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to DB'); $dbname = 'npsin'; mysql_select_db($dbname); // get number of sites $query = 'select count(*) from sites'; $result = mysql_query($query) or die ('Query failed: ' . mysql_error()); $resultArray = mysql_fetch_array($result); $numSites = $resultArray[0]; echo "<br><br>"; // get all sites $query = 'select site_name from sites'; $result = mysql_query($query); // get site content $query2 = 'select content_name, site_id from content'; $result2 = mysql_query($query2); // get site files // print info $count = 1; while ($row = mysql_fetch_array($result, MYSQL_NUM)) { echo "Site $count: "; echo "$row[0]"; echo "<br>"; $contentCount = 1; while ($row2 = mysql_fetch_array($result2, MYSQL_NUM)) { $id = $row2[1]; if ($id == ($count - 1)) { echo "Content $contentCount: "; echo "$row2[0]"; echo "<br>"; } $contentCount++; } $count++; } ?>

    Read the article

  • Mac OS X: getting file system changes of the last minute?

    - by Patrick
    From older times (Mac OS 10.4) I had found this command line on the web somewhere: mdfind '(kMDItemFSContentChangeDate >= $time.now(-60)) && (kMDItemFSContentChangeDate <= $time.now)' it gave me a list of files that where changed in the last minute. This does not work anymore on Mac OS 10.6. Can anybody explain why this doesn't work? And even suggest a working command line?

    Read the article

  • can the web.config be changed so roles wouldn't work any more?

    - by Scott J.
    I have had two instances of this problem, first on my local computer, now on the main site. Users can log in to the site, but it doesn't seem to recognize their roles. When I log in (which the database still recognizes as having the role admin), the code does not recognize it as being in the admin role. If there are other web.configs in subfolders, would that cause the problem? What could possibly cause this issue? Thanks! scojomodena

    Read the article

  • Separating code logic from the actual data structures. Best practices?

    - by Patrick
    I have an application that loads lots of data into memory (this is because it needs to perform some mathematical simulation on big data sets). This data comes from several database tables, that all refer to each other. The consistency rules on the data are rather complex, and looking up all the relevant data requires quite some hashes and other additional data structures on the data. Problem is that this data may also be changed interactively by the user in a dialog. When the user presses the OK button, I want to perform all the checks to see that he didn't introduce inconsistencies in the data. In practice all the data needs to be checked at once, so I cannot update my data set incrementally and perform the checks one by one. However, all the checking code work on the actual data set loaded in memory, and use the hashing and other data structures. This means I have to do the following: Take the user's changes from the dialog Apply them to the big data set Perform the checks on the big data set Undo all the changes if the checks fail I don't like this solution since other threads are also continuously using the data set, and I don't want to halt them while performing the checks. Also, the undo means that the old situation needs to be put aside, which is also not possible. An alternative is to separate the checking code from the data set (and let it work on explicitly given data, e.g. coming from the dialog) but this means that the checking code cannot use hashing and other additional data structures, because they only work on the big data set, making the checks much slower. What is a good practice to check user's changes on complex data before applying them to the 'application's' data set?

    Read the article

  • javascript - query object graph?

    - by Scott
    Given an object like this: var obj = { first:{ second:{ third:'hi there' } } }; And a key like this "first.second.third" How can I get the value of the nested object "hi there"? I think maybe the Array.reduce function could help, but not sure.

    Read the article

  • MySQL AND alternative for eatch table in a join

    - by Scott
    I have a simple join in a query however I need to have a condition on both of the tables "confirmed='yes'" but if one of the tables doesn't have any that match the query returns with no rows. Database: .----------parties----------. | id - party_id - confirmed | |---------------------------| | 1 1 yes | | 1 2 no | | 1 3 no | +---------------------------+ .-----------events----------. | id - event_id - confirmed | |---------------------------| | 1 1 no | +---------------------------+ Query: SELECT p.party_id, e.event_id FROM parties p LEFT JOIN events e ON p.id=e.id WHERE p.id = '1' AND p.party_id IN (1,2,3) AND e.event_id IN (1) AND p.confirmed='yes' AND e.confirmed='yes' It returns nothing but I want it to return party_id 1 with a empty event_id. I hope this make sense and I not missing anything, Thanks for your help!

    Read the article

  • How to iterate over numerically named object properties

    - by Scott Schluer
    So I have a horribly designed class that I can't change that has properties like this: object.Color1 object.Color2 object.Color3 etc... How can I iterate through those with a for loop. In other words, something like this: for (int i = 0; i <= 40; i++) { string PropertyName = "Color" + i; if (object.PropertyName != "") { // do something } } Obviously this code wouldn't work but it gives you an idea of what I'm after. I have to do some processing on each property and I don't want to repeat my code 40 times. :) A loop would be perfect, I'm just not sure how to create the name of the property on the fly.

    Read the article

  • Should I name my solution files in lowercase for SEO?

    - by Scott
    I read that an SEO best practice is to use lowercase urls. Should I name my asp.net webforms project files lowercase as well? Visual Studio doesn't name default documents in new projects all lowercase. I'm not sure it matters since browsing to http://www.mysite.com/mypage.aspx will still work even if your page is named MyPage.aspx. Can somebody enlighten me on this?

    Read the article

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