Search Results

Search found 11197 results on 448 pages for 'related'.

Page 10/448 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • Approach for altering Primary Key from GUID to BigInt in SQL Server related tables

    - by Tom
    I have two tables with 10-20 million rows that have GUID primary keys and at leat 12 tables related via foreign key. The base tables have 10-20 indexes each. We are moving from GUID to BigInt primary keys. I'm wondering if anyone has any suggestions on an approach. Right now this is the approach I'm pondering: Drop all indexes and fkeys on all the tables involved. Add 'NewPrimaryKey' column to each table Make the key identity on the two base tables Script the data change "update table x, set NewPrimaryKey = y where OldPrimaryKey = z Rename the original primarykey to 'oldprimarykey' Rename the 'NewPrimaryKey' column 'PrimaryKey' Script back all the indexes and fkeys Does this seem like a good approach? Does anyone know of a tool or script that would help with this? TD: Edited per additional information. See this blog post that addresses an approach when the GUID is the Primary: http://www.sqlmag.com/blogs/sql-server-questions-answered/sql-server-questions-answered/tabid/1977/entryid/12749/Default.aspx

    Read the article

  • Puzzle related to cake [closed]

    - by Abhi
    Dear All While having tea with one of my colleague at evening time yesterday. He asked me one puzzle related to cake. The puzzle goes this way: Suppose i have a circular cake. And to that cake, I have to cut three times anywhere with maximum number of pieces without bothering abt the equal segment So how many maximum number of pieces it will make? A/c to me, the maximum number of pieces will be 7. But i am not sure. So please can u all tell me how many maximum number of pieces it will make & how? Please answer one at a time..... Thanks in advance...

    Read the article

  • How to create symbolic links in Windows?

    - by guillermooo
    Related: In .NET, how do I Create a Junction in NTFS, as opposed to a Symlink? I've tried Winbolic (Windows XP), but i can't get it to work the way I want. Am I wrong here?: If I create a symbolic link within a folder in my %PATH%, the referenced directory should work as if it had actually been added to %PATH%, right?

    Read the article

  • Accessing non-related entities in LinqToSql entity classes

    - by Chris Johnson
    In LinqToSql, if I want to access a non-related entity in an entity partial class, how do I do this without creating a new DataContext? Here's the scenario: I have the tables Client, IssueType and ClientIssueType. A Client may specify a list of IssueTypes if they do not want to use the default IssueTypes. I have the default IssueTypes in the ClientIssueType table with a ClientId of null. In my Client partial I'd like to try to retrieve all IssueTypes, and if none are found, return all default IssueTypes. The only way I can see of accessing the IssueTypes with a null ClientId is by accessing the table through a new DataContext, which is problematic once I want to start assigning them to Issues. Where am I going wrong?

    Read the article

  • Design ideas for a versioned db schema with related tables also versioned

    - by vfilby
    Here is the drill, I want to version a database. I have done this before using multiple rows where the table primary key becomes a combination of the row id and either a datestamp or a version #. Now I want to version a table that depends on many other small tables. Versioning each table will be a giant PITA, so I am looking for good options to verion a schema where the data to be versioned spreads over multiple tables. All related tables are properly keyed with foreign key relationships. The database is currently on Sql Server 2005.

    Read the article

  • RSS Reader php (have already read related articles)

    - by lightingwrist
    Hey there. I've read all the related articles on here and can't find one that is specific to what I am looking for. I am new to RSS and am looking for the following reader if anyone know's the right direction to throw me in: An rss reader that I can put on my page that does NOT require mysql database A fairly light chunk of code that I can just add as many .xml,rss.php links/addresses to I can wrap div's around to style each segment specifically as possible can manually limit the amount of feeds that are read to conform to my desires of the pages content out put thanks in advance!

    Read the article

  • What is the relationship between programming and music?

    - by pheze
    Who here is both a musician and a programmer? I would also be curious to know which instruments you play, the ages at which you started programming and playing music, your personal experiences, etc. Perhaps we can find a relationship between these two things. I'll begin: Piano since 10, Computer since 12, I am 21. Note: Question originally from pheze.myopenid.com. Related: Jazz Programmer

    Read the article

  • Where to place the login/authentication related actions in MVC

    - by rogeriopvl
    I've searched around and found that when implementing an authentication module in MVC architecture some people opt to place the login related actions in the User controller while others place it in a controller dedicated to authentication only. In pseudo-java-like code: class UserController extends Controller { public login() { //... } } Accessed with http://mydomain.com/user/login. vs. class AuthController extends Controller { public login() { //... } } Accessed with http://mydomain.com/auth/login. I would like to know which approach is better, and why. That is, if there's really any difference at all. Thanks in advance.

    Read the article

  • Selecting data from mysql table and related data from another to join them

    - by knittledan
    Ive looked at other questions and answers but still dont understand which brings me here. I have one data base two tables. lets say table1 and table2 from database. I'm looking to grab all the information from table1 and only one column from table2 that coincides with the correct row in table1. Example which I know is wrong: SELECT table1.*, table2.time_stamp FROM table1, table2 WHERE table1.ticket_id=$var AND table1.user_id = table2.user_id Basically select data from table1 then use a value from the selected table to grab the related data from table2 and join them to output them as one mysql_query. Im sure its simple and has been asked before. edit: I dont receive an error. SQL just returns noting. log form of this would be: $sqlResults = mysql_query("SELECT table1.* FROM table1 WHERE table1.ticket_id=$var") while($rowResult = mysql_fetch_array( $sqlResults )) { $userID = $rowResult['user_id']; $sqlResults2 = mysql_query("SELECT table2.time_stamp FROM table2 WHERE table2.user_id=$userID") } I want to combine that into one sql statement so i dont have to hit table2 for every row table1 has

    Read the article

  • jQuery/CSS related problem

    - by MrAwesome
    Hi I am new to jQuery, and this is the page I'm currently developing. http://90.230.237.71/gandhi.html (Hope that works now :P) When I hit "Show/hide gallery" all the images are first opened vertically, and later they are corrected to their horizontal placement, that's the problem. They should be horizontal right away! I don't know if this is due to jQuerys slideDown or entirely CSS-related, but the code is all there for you. Initally, the images are set to display: none, perhaps they then are invisibly stored vertically. Then slideDown is performed and last, the CSS-attributes are changed to "display: inline". Perhaps I need to change execution order of slideDown and setting the CSS-attributes... but how? I NEED HELP... for many reasons, but I only want you to help me with this one ;) And also, please actually look at the code before making any assumptions. It's all there in the code.

    Read the article

  • Related Models in Rails 3

    - by Jack
    Hi, I am just starting my first Rails 3 project and am having some difficulties. I have two related models, projects and clients. I have set up the relationships as has_many and belongs_to. However in my projects views I can only access the client_id of the project. I would like to access the client's name and other parameters. I am sure that previously in rails, I could just use project.client.name, but this is not working. Is there a new feature of Rails 3 that I have missed? Cheers

    Read the article

  • Entity Framework: Delete Object and its related entities

    - by Waheed
    Hi, Does anyone know how to delete an object and all of it's related entities. For example i have tables, Products, Category, ProductCategory and productDetails, the productCategory is joining table of both Product and Category. I have red from http://msdn.microsoft.com/en-us/library/bb738580.aspx that Deleting the parent object also deletes all the child objects in the constrained relationship. This result is the same as enabling the CascadeDelete property on the association for the relationship. I am using this code Product productObj = this.ObjectContext.Product.Where(p => p.ProductID.Equals(productID)).First(); if (!productObj.ProductCategory.IsLoaded) productObj.ProductCategory.Load(); if (!productObj.ProductDetails.IsLoaded) productObj.ProductDetails.Load(); //my own methods. base.Delete(productObj); base.SaveAllObjectChanges(); But i am getting error on ObjectContext.SaveChanges(); i.e A relationship is being added or deleted from an AssociationSet 'FK_ProductCategory_Product'. With cardinality constraints, a corresponding 'ProductCategory' must also be added or deleted. Thanks in advance....

    Read the article

  • GTK#-related error on MonoDevelop 2.8.5 on Ubuntu 11.04

    - by Mehrdad
    When I try to create a new solution in MonoDevelop 2.8.5 in Ubuntu 11.04 x64, it shows me: System.ArgumentNullException: Argument cannot be null. Parameter name: path1 at System.IO.Path.Combine (System.String path1, System.String path2) [0x00000] in <filename unknown>:0 at MonoDevelop.Core.FilePath.Combine (System.String[] paths) [0x00000] in <filename unknown>:0 at MonoDevelop.Projects.ProjectCreateInformation.get_BinPath () [0x00000] in <filename unknown>:0 at MonoDevelop.Projects.DotNetProject..ctor (System.String languageName, MonoDevelop.Projects.ProjectCreateInformation projectCreateInfo, System.Xml.XmlElement projectOptions) [0x00000] in <filename unknown>:0 at MonoDevelop.Projects.DotNetAssemblyProject..ctor (System.String languageName, MonoDevelop.Projects.ProjectCreateInformation projectCreateInfo, System.Xml.XmlElement projectOptions) [0x00000] in <filename unknown>:0 at MonoDevelop.Projects.DotNetProjectBinding.CreateProject (System.String languageName, MonoDevelop.Projects.ProjectCreateInformation info, System.Xml.XmlElement projectOptions) [0x00000] in <filename unknown>:0 at MonoDevelop.Projects.DotNetProjectBinding.CreateProject (MonoDevelop.Projects.ProjectCreateInformation info, System.Xml.XmlElement projectOptions) [0x00000] in <filename unknown>:0 at MonoDevelop.Projects.ProjectService.CreateProject (System.String type, MonoDevelop.Projects.ProjectCreateInformation info, System.Xml.XmlElement projectOptions) [0x00000] in <filename unknown>:0 at MonoDevelop.Ide.Templates.ProjectDescriptor.CreateItem (MonoDevelop.Projects.ProjectCreateInformation projectCreateInformation, System.String defaultLanguage) [0x00000] in <filename unknown>:0 at MonoDevelop.Ide.Templates.ProjectTemplate.HasItemFeatures (MonoDevelop.Projects.SolutionFolder parentFolder, MonoDevelop.Projects.ProjectCreateInformation cinfo) [0x00000] in <filename unknown>:0 at MonoDevelop.Ide.Projects.NewProjectDialog.SelectedIndexChange (System.Object sender, System.EventArgs e) [0x00000] in <filename unknown>:0 I strace'd it and saw repeated failed accesses to files like: /usr/lib/mono/gac/gtk-sharp/2.12.0.0__35e10195dab3c99f/libgtk-x11-2.0.so.0.la so I'm assuming that's the cause of the problem. However, I've installed (and re-installed) anything GTK#-related that I could think of... and the error still occurs. Does anyone know how to fix it?

    Read the article

  • Resources related to data-mining and gaming on social networks

    - by darren
    Hi all I'm interested in the problem of patterning mining among players of social networking games. For example detecting cheaters of a game, given a company's user database. So far I have been following the usual recipe for a data mining project: construct a data warehouse that aggregates significant information select a classifier, and train it with a subsectio of records from the warehouse validate classifier with another test set lather, rinse, repeat Surprisingly, I've found very little in this area regarding literature, best practices, etc. I am hoping to crowdsource the information gathering problem here. Specifically what I'm looking for: What classifiers have worked will for this type of pattern mining (it seems highly temporal, users playing games, users receiving rewards, users transferring prizes etc). Are there any highly agreed upon attributes specific to social networking / gaming data? What is a practical amount of information that should be considered? One problem I've run into is data overload, where queries and data cleansing may take days to complete. Related to point above, what hardware resources are required to produce results? I've found it difficult to estimate the amount of computing power I will require for production use. It has become apparent that a white box in the corner does not have enough horse-power for such a project. Are companies generally resorting to cloud solutions? Are they buying clusters? Basically, any resources (theoretical, academic, or practical) about implementing a social networking / gaming pattern-mining program would be very much appreciated. Thanks.

    Read the article

  • Symfony / Doctrine - How to filter form field by property in related model

    - by Dan
    I have a UserForm class which has a select list populated from a related model (specified by a foreign relationship in the yml) like so: $this->setWidget('report_id', new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('Report')))); I'd like to filter the Report objects that come from this relation by one of the Report fields, "active" such that only Reports with active=1 appear in the form. I have a method, ReportTable::GetActiveReports() that performs the appropriate query and returns the filtered reports. So one option is to populate the Widget with the results of that function. Any tips on the syntax to do that? It seems to me the cleaner way is to use the UserFormFilter class to filter the reports by active=1 there. Unfortunately I couldn't find any documentation on how to use form filters (or really what they are), so maybe this is not the right solution. Is a Form Filter the appropriate tool for this job? It seems I should use the Doctrine_Record_Filter_Standard class as defined here: http://www.doctrine-project.org/api/orm/1.2/doctrine/doctrine_record_filter_standard.html But it's not clear to me the appropriate usage. Any guidance would be helpful. Thanks! Dan

    Read the article

  • number->string and related procedures in GIMP scheme scripting

    - by dim fish
    I am frustrated with string-to-number and number-to-string conversion in GIMP scripting. I am runnning GIMP 2.6.8 in Windows Vista. I understand that GIMP's internal Scheme implementation changes over the versions and I can't seem to nail down the documentation. From what I can gather GIMP's Scheme is a subset of TinyScheme and/or supports the R5RS standard procedures. In any case, I usually just look in the packaged script directory for examples when I want to try something new, because that should work for sure, right? For example, grid-system.scm comes with the latest GIMP release and has the expression, (string-append (number->string obj) " ") which is exactly what I want. However, if I use number-string in my own script, or even type it into GIMP's script console (which is how I usually test out new stuff I want to do) it tells me number-string is an unbound variable: > (number->string 3) Error: eval: unbound variable: number->string Other standard procedures from, say R5RS, work just fine: > (string-append "frust" "rated") "frustrated" So, 1) Is there some lurking documentation for current GIMP Scheme scripting other than something drastic like searching GIMP's source code? 2) Can I use the GIMP console to spit out a list of all defined procedures to find something I need? 3) Anyone else confirm that number-string is not defined for the current Windows build, even though it appears in the packaged scripts? My web searches haven't turned up any related problems, and a complete uninstall of all GIMP versions, back to latest puts me in the same scrape.

    Read the article

  • Microsoft Word Macro - Exporting Word Review Comments - How do you reference the sentence related to

    - by jspeaks
    I am trying to export of a Word document review comments. I want to export the sentence selection that was commented on followed by the comment. Screen shot of the image: http://jspeaks.com/mswordcomment.png I have found code to loop through the document comments, but I cannot figure out how to reference the sentence selection that the comment was related to. The current logic is: Sub ExportComments() Dim s As String Dim cmt As Word.Comment Dim doc As Word.Document For Each cmt In ActiveDocument.Comments s = s & cmt.Initial & cmt.Index & "," & cmt.Range.Text & vbCr Next Set doc = Documents.Add doc.Range.Text = s End Sub I tinkered with Selection.Range, however I cannot determine the proper object or property that contains the referenced sentence. I would like to produce output like the follow (if we use the example in picture above): Sentence: Here are more sentences that contain interesting facts - Comment: This is an interesting fact. Sentence: Here are more sentences that contain interesting facts. Here are more sentences that contain interesting facts. - Comment: This is a very interesting fact

    Read the article

  • Modeling related objects and their templates

    - by Duddle
    Hello everybody! I am having trouble correctly modeling related objects that can use templates. This is not homework, but part of a small project in the university. In this application the user can add several elements, which can either be passive or active. Each concrete element has different attributes, these must be set by the user. See diagram 1: Since the user will create many elements, we want there to be templates for each type of element, so some of the attributes are filled in automatically. See diagram 2: In my opinion, this is a bad design. For example, to get all possible templates for a PassiveElementA-object, there has to be a list/set somewhere that only holds PassiveElementATemplate-objects. There has to be a separate list for each subclass of Element. So if you wanted to add a new PassiveElement-child, you also have to edit the class which holds all these separate lists. I cannot figure out a good way to solve this problem. Since the concrete classes (i.e. PassiveElementA, ..., PassiveElementZ) have so many different attributes, many of the design patterns I know do not work. Thanks in advance for any hints, and sorry for my bad English.

    Read the article

  • Need a tool to search large structure text documents for words, phrases and related phrases

    - by pitosalas
    I have to keep up with structured documents containing things such as requests for proposals, government program reports, threat models and all kinds of things like that. They are in techno-legalese as I would call them: highly structured, with section numbering and 3, 4 and 5 levels of nesting. All in English I need a more efficient way to locate those paragraphs of nuggets that matter to me. So what I’d like is kind of a local document index/repository, that would allow me to have some standing queries and easily locate sections in documents that talk about my queries. Here’s an example: I’d like to load in 10 large PDF files, each of say 100 pages. Each PDF contains English text, formatted very nicely into paragraphs and sections. I’d like to specify that I am interested in “blogging platforms”, “weaknesses in Ruby”, “localization and internationalization” Ideally then look at a list that showed the section of text, the name of the document, and other information that seemed to be related to and/or include the words and phrases I specified. I am sure something like this exists. I would call it something like document indexing, document comprehension or structured searching.

    Read the article

  • Ideas Related to Subset Sum with 2,3 and more integers

    - by rolandbishop
    I've been struggling with this problem just like everyone else and I'm quite sure there has been more than enough posts to explain this problem. However in terms of understanding it fully, I wanted to share my thoughts and get more efficient solutions from all the great people in here related to Subset Sum problem. I've searched it over the Internet and there is actually a lot sources but I'm really willing to re-implement an algorithm or finding my own in order to understand fully. The key thing I'm struggling with is the efficiency considering the set size will be large. (I do not have a limit, just conceptually large). The two phases I'm trying to implement ideas on is finding two numbers that are equal to given integer T, finding three numbers and eventually K numbers. Some ideas I've though; For the two integer part I'm thing basically sorting the array O(nlogn) and for each element in the array searching for its negative value. (i.e if the array element is 3 searching for -3). Maybe a hash table inclusion could be better, providing a O(1) indexing the element? For the three or more integers I've found an amazing blog post;http://www.skorks.com/2011/02/algorithms-a-dropbox-challenge-and-dynamic-programming/. However even the author itself states that it is not applicable for large numbers. So I was for 2 and 3 and more integers what ideas could be applied for the subset problem. I'm struggling with setting up a dynamic programming method that will be efficient for the large inputs as well.

    Read the article

  • Javascript Function for related select elements onSubmit

    - by Livingston
    I am trying to create (4) Select elements within a form element. Each select element has a different number of options. So if a user click one option on Select #1 and then click another option on Select #2, after hitting submit they will be taken to www.blah.com/option1/option2 page which will display the filtered results. Or they can chose an option from all 4 select menus and be taken to option1/option2/option3/option4 page. The categories are all related .Select #1 is a category, Select #2 is a subcategory of 1, Select #3 is a subcategory of #2 and Select #4 is a subcategory of #3. A great example would be on (LINK) http://www.safavieh.com/rugs (LINK) except only four Select elements. I would also like to add the "Reset" button next to "Submit." I know I need to construct a function in my header and use onSubmit attribute within the form but other than that I am unsure of what's involved so I'm hoping someone could point me in the right direction. It's important I learn most of this for myself. Thanks for your time Livingston

    Read the article

  • MySQL get point in time totals from related tables

    - by batfastad
    Hi everyone We have an order book and invoicing system and I've been tasked with trying to output monthly rolling totals from these tables. But I don't know really where to start with this. I think there's some SQL syntax that I don't even know about yet. I'm familiar with INNER/LEFT/JOINS and GROUP BY etc but grouping by date is confusing since I don't know how to limit the data to only the current date that's being grouped by at that point. I think this will involve joining the tables to themselves or possibly a sub-select. I always thought it best to avoid sub-selects apart from when absolutely necessary. Basically the system has 3 tables orders: order_id, currency, order_stamp orders_lines: order_line_id, invoice_id, order_id, price invoices: invoice_id, invoice_stamp order_stamp and invoice_stamp are UTC unix timestamps stored as integers, not MySQL timestamps. I'm trying to get a listing by year/month showing the total of current unbilled orders (sum of price), at that point in time. Current orders are ones where order_stamp is less than or equal to 00:00 on the 1st of the month. Unbilled orders are ones where invoice_stamp is null or invoice_stamp is greater than 00:00 on the 1st of the month. At that point in time there may not be a related invoice yet and invoice_id might be null. Anyone got any suggestions on what I should join to what and what I need to group by? Cheers, B

    Read the article

  • Weird stuttering issues not related to GC.

    - by Smills
    I am getting some odd stuttering issues with my game even though my FPS never seems to drop below 30. About every 5 seconds my game stutters. I was originally getting stuttering every 1-2 seconds due to my garbage collection issues, but I have sorted those and will often go 15-20 seconds without a garbage collection. Despite this, my game still stutters periodically even when there is no GC listed in logcat anywhere near the stutter. Even when I take out most of my code and simply make my "physics" code the below code I get this weird slowdown issue. I feel that I am missing something or overlooking something. Shouldn't that "elapsed" code that I put in stop any variance in the speed of the main character related to changes in FPS? Any input/theories would be awesome. Physics: private void updatePhysics() { //get current time long now = System.currentTimeMillis(); //added this to see if I could speed it up, it made no difference Thread myThread = Thread.currentThread(); myThread.setPriority(Thread.MAX_PRIORITY); //work out elapsed time since last frame in seconds double elapsed = (now - mLastTime2) / 1000.0; mLastTime2 = now; //measures FPS and displays in logcat once every 30 frames fps+=1/elapsed; fpscount+=1; if (fpscount==30) { fps=fps/fpscount; Log.i("myActivity","FPS: "+fps+" Touch: "+touch); fpscount=0; } //this should make the main character (theoretically) move upwards at a steady pace mY-=100*elapsed; //increase amount I translate the draw to = main characters Y //location if the main character goes upwards if (mY<=viewY) { viewY=mY; } }

    Read the article

  • Doctrine 2 entity cannot be saved with its many-to-many related entities

    - by user1333185
    I'm writing a project in ZF and have many-to-many related accounts and videos entities and I provide the account with the videos collection. When I try to save the account I receive the following error: A new entity was found through the relationship 'Entities\Account#playlistVideos' that was not configured to cascade persist operations for entity: Entities\Video@000000004d5f02ef00000000196757dc. Explicitly persist the new entity or configure cascading persist operations on the relationship. If you cannot find out which entity causes the problem implement 'Entities\Video#__toString()' to get a clue. I found a suggested solution with cascade={"persist"} which should allow videos to be saved together with the account by only specifying $this-em-persist($account) but then I get the error: Fatal error: method_exists(): The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition "Proxies\EntitiesAccountProxy" of the object you are trying to operate on was loaded before unserialize() gets called or provide a __autoload() function to load the class definition in... The same happens when I try to manually persist videos and account. Thank you for the help in advance.

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >