Search Results

Search found 669 results on 27 pages for 'bear'.

Page 18/27 | < Previous Page | 14 15 16 17 18 19 20 21 22 23 24 25  | Next Page >

  • Subversion svn:externals - What's wrong here?

    - by Brandon Montgomery
    I first want to say I've read the Subversion manual. I've read this question. I've also read this question. Here's my dilemma. Let's say I have 3 repositories laid out like this: DataAccessObject/ branches/ tags/ trunk/ DataAccessObject/ DataAccessObjectTests/ PlanObject/ branches/ tags/ trunk/ PlanObject/ PlanObjectTests/ WinFormsPlanViewer/ branches/ tags/ trunk/ WinFormsPlanViewer/ The PlanObject and DataAccessObject repositories contain shared projects. They are used by the WinFormsPlanViewer, but also by several other projects in several other repositories. Bear with me here. I put an svn:externals definition on the WinFormsPlanViewer/trunk folder like this: https://server/svn/PlanObject/trunk Objects https://server/svn/DataAccessObject/trunk Objects And here's what I see after I do an svn update. WinFormsPlanViewer/ branches/ tags/ trunk/ WinFormsPlanViewer/ Objects/ DataAccessObject/ DataAccessObjectTests/ The PlanObject stuff doesn't even come down in the update! I don't know if this has anything to do with it, but there's an externals definition on the PlanObject/trunk folder also: https://server/svn/DataAccessObject/trunk Objects What's going on here? What am I doing wrong? Are there bad consequences of referencing the PlanObject and the DataAccessObject from the WinFormsPlanViewer using svn:externals when the PlanObject references the DataAccessObject using svn:externals also?

    Read the article

  • c# Deserializing an element based on it's parent node's name

    - by daveharnett
    The XML I'm working with has the following structure: <fixture_statistics> <home_player_1 id="2306143" teamid="2"> <element_1>Some Data</element_1> <element_2>Some Data</element_2> </home_player_1> <home_player_2 id="2306144" teamid="2"> <element_1>Some Data</element_1> <element_2>Some Data</element_2> </home_player_2> </fixture_statistics> Now the code to deserialize it would normally look like this: [XmlRootAttribute("fixture_statistics", Namespace = "", IsNullable = false)] public class FixtureRoot { [XmlElement("home_player_1")] [XmlElement("home_player_2")] public List<FixtureStats> fixtures { get; set; } } public class FixtureStats { public string element_1; [XMLElement("element_2")] public string elementTwo; } Here's the question: I'd like the FixtureStats class to have a 'position' property which corrosponds to it's parent's element name (so the FixtureStat object corrosponding to home_player_1 would have position=1). Can this be done with the built-in serialization atrributes? If it's not possible, what's the cleanest workaround? Bear in mind that each document will have about 50 player elements, each with about 50 'child' data elements.

    Read the article

  • What specific features of LabView are frustrating to you?

    - by Underflow
    Please bear with me: this isn't a language debate or a flame. It's a real request for opinions. Occasionally, I have to help educate a traditional text coder in how to think in LabVIEW (LV). Often during this process, I get to hear about how LV sucks. Rarely is this insight accompanied by rational observations other than "Language X is just so much better!". While this statement is satisfying to them, it doesn't help me understand what is frustrating them. So, for those of you with LabVIEW and text language experience, what specific things about LV drive you nuts? ------ Summaries ------- Thanks for all the answers! Some of the issues are answered in the comments below, some exist on other sites, and some are just genuine problems with LV. In the spirit of the original question, I'm not going to try to answer all of these here: check LAVA or NI's website, and you'll be pleasantly surprised at how many of these things can be overcome. Unintentional concurrency No access to tradition text manipulation tools Binary-only source code control Difficult to branch and merge Too many open windows Text has cleaner/clearer/more expressive syntax Clean coding requires a lot of time and manipulation Large, difficult to access API/palette system Mouse required File namespacing: no duplicate files with the same name in memory LV objects are natively by-value only Requires dev environment to view code Lack of zoom Slow startup Memory pig "Giant" code is difficult to work with UI lockup is easy to do Trackpads and LV don't mix well String manipulation is graphically bloated Limited UI customization "Hidden" primitives (yes, these exist) Lack of official metaprogramming capability (not for much longer, though) Lack of unicode support [1]: http://www.lavag.org LAVA

    Read the article

  • How to remove accidental branch in TortoiseHg?

    - by msorens
    (I am a relative newcomer to TortoiseHg, so bear with me :-) I use TortoiseHg on two machines to talk to my remote source repository. I made changes on one machine, committed them, and attempted to push them to the remote repository BUT I forgot to first do a pull to get the latest code first. The push gave me a few lines of output, suggesting I may have forgotten to pull first (true!) and mentioned something like "abort: push creates new remote branches...". So I did a pull, which added several nodes to the head of my graph in the repository explorer. The problem is that the push I tried to do is now showing as a branch in the repository explorer. Looking from the server side (codeplex), it shows no sign of my attempted push, indicating this accidental branch is still local on my machine. How could I remove this accidental branch? I tried selecting that node in the graph then doing "revert" but it did not seem to do anything. I am wondering if it would be simplest to just discard my directory tree on my local machine and do a completely new, clean pull from the server...?

    Read the article

  • Moving a ASP.NET application to the cloud

    - by user102533
    I am new to cloud computing, so please bear with me here. I have an existing ASP.NET application with SQL Server 2008 hosted on a Virtual Private Server. Here's what it briefly does: The front end accepts user's requests and adds them to a DB table A Windows Service running in the background picks up the request, processes it and sets a flag. The Windows Services also creates a file for the user to download. User downloads file I'd like to move this web application with the service to the cloud. The architecture I envision is that I'll have 1 Web server in which I will install the front end and the windows service. I'll also have a cloud files server for file storage. The windows service should somehow create a file and transfer it to the cloud file server (I assume this is possible?) My questions: Does the architecture look like I am going in the right direction? I know Amazon has been providing cloud services for a long time. If I want to do minimal changes to my application, should I go with Amazon, Rackspace, Azure or some other provider? I understand that I would not only pay for file storage and web server but also for the bandwidth of users downloading the file and the windows servic uploading the file to the cloud server. Can I assume these costs are negligible? Should I go with VPS + Cloud Files combination to begin with? Any other thoughts/suggestions?

    Read the article

  • Using htaccess rewrite/redirect so single PHP file can display data according to GET/POST variables

    - by revive
    Hey gang, Bear with me as I try to learn more about .htaccess redirect rules - I'm a UI guy by profession and I'm doing my best to enhance my coding skills languages other than HTML/CSS/PHP, etc So, what I have is an index.php file that contains a menu - pretty simple. If Javascript is enabled on the users computer then forms are shown below the menu using simple jQuery goodies, with each link having a 'return false;' applied. What I am trying to do is make the page accessible with JS turned off, so instead of redirecting the user to a different page, I would like to use POST or GET variables from each link, to show the various forms.. within the same index.php file - but have the URL reflect the menu choice Here is an example using menu items named - Home, About, Form1 and Form2: With JS on, clicking on of the above example buttons simply slides the form or containing the data down onto the page. With JS off, if the user clicks the 'About' link, I would like to rewrite the URL to be http://domain.com/about - but keep the user on the index.php page (since it is the only page) and be able to use POST or GET variable to show the using PHP. So, accessing http://domain.com/index.php?page=about would show http://domain.com/about in the URL but pass the GET variable 'page' to the index.php file. Hope that makes sense.. and I'm sure there are many ways to accomplish this, so if you have ideas of how to improve on it, by all means, I'd love to hear it ! Thanks again Revive

    Read the article

  • Which Java Framework is best suited for a web application with reusable content/behavior

    - by Jacob
    I come from a .NET background and need to do a web project in Java. I have read a bit on all the different Java web frameworks out there: JSF, Stripes, Wicket, Tapestry etc. But I would like to hear from people with real-life expertise with these frameworks. Of course I want a framework that is up to date, supports AJAX, is cool and so on, but one of my main criteria is the ability to somehow create reusable components / tags. The customer needs to be able to move tags/components around without too much problem in order to customize it for their specific needs. In ASP.NET Webforms I would use custom controls and user controls for this, and in ASP.NET MVC I would use user controls as well as home made custom controls. So what Java frameworks excel in this? My own superficial research seems to conclude that JSF supports some kind of custom controls (Bear in mind i am not only talking about layout reuse, but also behavior reuse, so if for example the customer / client wants a customer list on page x and not only on page Y, he would simply put in a <jr:CustomerList runat="server" .... /> (fictional example with ASP.NET Webforms syntax)).

    Read the article

  • Play .ts video file on Android?

    - by user359519
    I am pretty new at streaming video, so please bear with me. :) I am trying to port an m3u8 stream over from iPhone to Android. Looking in the m3u8 feed, I found some .ts files. From what I can tell, .ts files are, themselves, wrappers that contain the video stream (Elementary Stream). Is it possible to play a .ts file in Android? (The docs only list 3gp and mp4 as supported formats.) Is there a way to extract the Elementary Stream and just process the video feed? If that is in 3gp or mp4, I should be ok. Will Stagefright handle .ts? Is Stagefright even available? I read that there are/were some problems with it. (As a further caveat, I am not getting much help from my server guys. They are pushing for a Flash player solution, including a proprietary player. They will not provide me with a 3gp or an mp4 feed, but I'm hoping I can find that in the .ts file.) I'm open to other suggestions. Thanks for your patience with this newbie. :)

    Read the article

  • Render action return View(); form problem

    - by Roger Rogers
    I'm new to MVC, so please bear with me. :-) I've got a strongly typed "Story" View. This View (story) can have Comments. I've created two Views (not partials) for my Comments controller "ListStoryComments" and "CreateStoryComment", which do what their names imply. These Views are included in the Story View using RenderAction, e.g.: <!-- List comments --> <h2>All Comments</h2> <% Html.RenderAction("ListStoryComments", "Comments", new { id = Model.Story.Id }); %> <!-- Create new comment --> <% Html.RenderAction("CreateStoryComment", "Comments", new { id = Model.Story.Id }); %> (I pass in the Story id in order to list related comments). All works as I hoped, except, when I post a new comment using the form, it returns the current (parent) View, but the Comments form field is still showing the last content I typed in and the ListStoryComments View isn’t updated to show the new story. Basically, the page is being loaded from cache, as if I had pressed the browser’s back button. If I press f5 it will try to repost the form. If I reload the page manually (reenter the URL in the browser's address bar), and then press f5, I will see my new content and the empty form field, which is my desired result. For completeness, my CreateStoryComment action looks like this: [HttpPost] public ActionResult CreateStoryComment([Bind(Exclude = "Id, Timestamp, ByUserId, ForUserId")]Comment commentToCreate) { try { commentToCreate.ByUserId = userGuid; commentToCreate.ForUserId = userGuid; commentToCreate.StoryId = 2; // hard-coded for testing _repository.CreateComment(commentToCreate); return View(); } catch { return View(); } }

    Read the article

  • QTableWidget::itemAt() returns seemingly random items

    - by Jordan Milne
    I've just started using Qt, so please bear with me. When I use QTableWidget-getItemAt(), it returns a different item from if I used currentItemChanged and clicked the same item. I believe it's necessary to use itemAt() since I need to get the first column of whatever row was clicked. Some example code is below: MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); QList<QString> rowContents; rowContents << "Foo" << "Bar" << "Baz" << "Qux" << "Quux" << "Corge" << "Grault" << "Garply" << "Waldo" << "Fred"; for(int i =0; i < 10; ++i) { ui->tableTest->insertRow(i); ui->tableTest->setItem(i, 0, new QTableWidgetItem(rowContents[i])); ui->tableTest->setItem(i, 1, new QTableWidgetItem(QString::number(i))); } } //... void MainWindow::on_tableTest_currentItemChanged(QTableWidgetItem* current, QTableWidgetItem* previous) { ui->lblColumn->setText(QString::number(current->column())); ui->lblRow->setText(QString::number(current->row())); ui->lblCurrentItem->setText(current->text()); ui->lblCurrentCell->setText(ui->tableTest->itemAt(current->column(), current->row())->text()); } For the item at 1x9, lblCurrentItem displays "9" (as it should,) whereas lblCurrentCell displays "Quux". Am I doing something wrong?

    Read the article

  • Static variable for communication among like-typed objects

    - by Dan Ray
    I have a method that asynchronously downloads images. If the images are related to an array of objects (a common use-case in the app I'm building), I want to cache them. The idea is, I pass in an index number (based on the indexPath.row of the table I'm making by way through), and I stash the image in a static NSMutableArray, keyed on the row of the table I'm dealing with. Thusly: @implementation ImageDownloader ... @synthesize cacheIndex; static NSMutableArray *imageCache; -(void)startDownloadWithImageView:(UIImageView *)imageView andImageURL:(NSURL *)url withCacheIndex:(NSInteger)index { self.theImageView = imageView; self.cacheIndex = index; NSLog(@"Called to download %@ for imageview %@", url, self.theImageView); if ([imageCache objectAtIndex:index]) { NSLog(@"We have this image cached--using that instead"); self.theImageView.image = [imageCache objectAtIndex:index]; return; } self.activeDownload = [NSMutableData data]; NSURLConnection *conn = [[NSURLConnection alloc] initWithRequest:[NSURLRequest requestWithURL:url] delegate:self]; self.imageConnection = conn; [conn release]; } //build up the incoming data in self.activeDownload with calls to didReceiveData... - (void)connectionDidFinishLoading:(NSURLConnection *)connection { NSLog(@"Finished downloading."); UIImage *image = [[UIImage alloc] initWithData:self.activeDownload]; self.theImageView.image = image; NSLog(@"Caching %@ for %d", self.theImageView.image, self.cacheIndex); [imageCache insertObject:image atIndex:self.cacheIndex]; NSLog(@"Cache now has %d items", [imageCache count]); [image release]; } My index is getting through okay, I can see that by my NSLog output. But even after my insertObject: atIndex: call, [imageCache count] never leaves zero. This is my first foray into static variables, so I presume I'm doing something wrong. (The above code is heavily pruned to show only the main thing of what's going on, so bear that in mind as you look at it.)

    Read the article

  • How should I manage my many-to-many relationships?

    - by wes
    Hello all, I have a database containing a couple tables: files and users. This relationship is many-to-many, so I also have a table called users_files_ref which holds foreign keys to both of the above tables. Here's the schema of each table: files - file_id, file_name users - user_id, user_name users_files_ref - user_file_ref_id, user_id, file_id I'm using Codeigniter to build a file host application, and I'm right in the middle of adding the functionality that enables users to upload files. This is where I'm running into my problem. Once I add a file to the files table, I will need that new file's id to update the users_files_ref table. Right now I'm adding the record to the files table, and then I imagined I'd run a query to grab the last file added, so that I can get the ID, and then use that ID to insert the new users_files_ref record. I know this will work on a small scale, but I imagine there is a better way of managing these records, especially in a heavy-traffic scenario. I am new to relational database stuff but have been around PHP for a while, so please bear with me here :-) I have primary and foreign keys set up correctly for the files, users, and users_files_ref tables, I'm just wondering how to manage the adding of file records for this scenario? Thanks for any help provided, it's much appreciated. -Wes

    Read the article

  • Animation not playing

    - by Tate Allen
    Hello again, I didn't say this last time but I am relatively new to iPhone programming and extremely new to iPhone game development so bear with me. In my game, when I tilt the device, the character moves and faces the correct direction, but does not animate. I am using an animated UIImageView. Here is the code: float newX = character.center.x + (accel.x * 12); if (newX 30 && newX < 290) character.center = CGPointMake(newX, character.center.y); if (accel.x < 0) { NSArray *imgArray = [[NSArray alloc] initWithObjects: [UIImage imageNamed:@"run3left.png"], [UIImage imageNamed:@"run1left.png"], [UIImage imageNamed:@"run2left.png"], [UIImage imageNamed:@"run1left.png"], nil]; character.animationImages = imgArray; character.animationDuration = 0.5; character.contentMode = UIViewContentModeBottomLeft; [self.view addSubview:character]; [character startAnimating]; } if (accel.x > 0) { NSArray *imgArray = [[NSArray alloc] initWithObjects: [UIImage imageNamed:@"run3.png"], [UIImage imageNamed:@"run1.png"], [UIImage imageNamed:@"run2.png"], [UIImage imageNamed:@"run1.png"], nil]; character.animationImages = imgArray; character.animationDuration = 0.5; character.contentMode = UIViewContentModeBottomLeft; [self.view addSubview:character]; [character startAnimating]; } }

    Read the article

  • JQuery UI Tabs: Apply opacity toggle to only specific inner element?

    - by Kerri
    I am using Jquery UI tabs, and have it set to toggle the opacity with each slide change. I'm wondering if there's a way to apply the opacity toggle to only a single element within each tab, instead of the entire tab. My understanding of jQuery is pretty basic, so bear with me. So, If I have something like this: <div id="tabs"> <ul id="tabs-nav><li></li></ul> <div id="tab-1"> <img /> <p /> </div> <div id="tab-2"> <img /> <p /> </div> ...etc </div> How could I set it so that only the <img> has an effect applied, and the rest just switches normally? Here are the basics of the call I have for UI tabs: var $tabs = $('#slides').tabs({fx: { opacity: 'toggle' } }); $(".ui-tabs-panel").each(function(i){ //stuff to create previous/next links }); $('.next-tab, .prev-tab').click(function() { $tabs.tabs('select', $(this).attr("rel")); return false; });

    Read the article

  • AS3 - Can't access properties or methods of a MC child that has been added in script

    - by Chris
    Hi All - I am still a bit of a beginner at AS3, so bear with me, please. I have created a loop to instantiate tiles on a board. In the following example, "Gametiles" is an array containing objects of class "Tile" which is a class that extends MovieClip. "Game" is a MC that I added to the stage in the flash developing environment. for(var i:uint=0;i < Gametiles.length;i++){ var pulledTile = Gametiles[i]; var tilename:String = "I_Tile_" + pulledTile.grid_y + "_" + pulledTile.grid_x; var createdTile = new InteractiveTile(); pulledTile.addAnims(createdTile); Game.addChildAt(pulledTile, 0); Game.getChildAt(0).name = tilename; } The above code works - but with a tricky problem. If I did something like the following: trace(Game.I_Tile_1_3.x); I get "TypeError: Error #1010: A term is undefined and has no properties." However, I am able to access theses children in the following manner: var testing = Game.getChildByName("I_Tile_1_3") trace(testing.x); This method is a bit cumbersome though. I really don't want to have to create a var and call getChildByName every time I want to interact with these properties or methods. How can I set up these children so that I can access them directly without the extra steps?

    Read the article

  • If attacker has original data and encrypted data, can they determine the passphrase?

    - by Brad Cupit
    If an attacker has several distinct items (for example: e-mail addresses) and knows the encrypted value of each item, can the attacker more easily determine the secret passphrase used to encrypt those items? Meaning, can they determine the passphrase without resorting to brute force? This question may sound strange, so let me provide a use-case: User signs up to a site with their e-mail address Server sends that e-mail address a confirmation URL (for example: https://my.app.com/confirmEmailAddress/bill%40yahoo.com) Attacker can guess the confirmation URL and therefore can sign up with someone else's e-mail address, and 'confirm' it without ever having to sign in to that person's e-mail account and see the confirmation URL. This is a problem. Instead of sending the e-mail address plain text in the URL, we'll send it encrypted by a secret passphrase. (I know the attacker could still intercept the e-mail sent by the server, since e-mail are plain text, but bear with me here.) If an attacker then signs up with multiple free e-mail accounts and sees multiple URLs, each with the corresponding encrypted e-mail address, could the attacker more easily determine the passphrase used for encryption? Alternative Solution I could instead send a random number or one-way hash of their e-mail address (plus random salt). This eliminates storing the secret passphrase, but it means I need to store that random number/hash in the database. The original approach above does not require storage in the database. I'm leaning towards the the one-way-hash-stored-in-the-db, but I still would like to know the answer: does having multiple unencrypted e-mail addresses and their encrypted counterparts make it easier to determine the passphrase used?

    Read the article

  • How to more effectively debug PHP code in the vein JavaScript with Firebug or XCode?

    - by racl101
    Hi everyone, I'm kind of a newbie with PHP so please bear with me. I would like to know if there was an effective way of debugging PHP code so that I don't have to have debugging messages display on the browser. For example, I find var_dump and print_r functions to be excellent for debugging variables, function calls and arrays respectively. The problem is I have been asked to debug code on a live site (no dev site, I know it is a horrible practice but this is not my project from the start.) So I would like to know what core function or php library or whatever else it is that I could use to log debugging calls in to log that I can check so I don't have to send debugging calls to the browser on a live site? I like the way you can use the console.log function in JavaScript code and check it in Firebug or the Webkit Console and I also like like the console window in Xcode and I was wondering if there was some similar tool for PHP debugging. Any extra info and pearls of wisdom would be greatly appreciated. Thanks, racl101.

    Read the article

  • Assigning Javascript click callbacks to Flash elements?

    - by Wes
    Bear in mind I'm a web developer but not a Flash developer and know little about Flash. I work with people who are the opposite and know very little about web development. Maybe someone who is good with both can answer this question? I work for an Advertisement software company and we are having fits with our Ad click-throughs opening tabs vs popups in different browsers. Tabs are preferred becaus pop-ups are subject to blockers. I read that tabs will always be opened if it is a callback triggered by a user click. This is fine with me. Problem is the Flash developers, using their external interface, are trying to open the new window when the Flash ad gets clicked themselves. So even though it's user initiated Flash behooves upon itself to open the website. I think this may be why they end up being popups instead of new tabs. Is there a way external to Flash using Javascript to assign the click events to Flash elements so that only new tabs will ever be opened by clicking the Flash element? Or a way through Flash can assign Javascript callbacks to its elements? Thanks!

    Read the article

  • Load Balancing of PHP/MYSQL script without big code changes

    - by DR.GEWA
    Sorry for my Dummy Question, but... I am making a script on php/mysql (codeigniter) and I am extremally interested in knowing if there is a way without big architectural changes of the script make a load balancing. I mean, that for example now I will rent a medium dedicated server with 2GB ram, 200GB memory and good processor, and this will be enough lets say half year for the users which will come. But when they will become more and more, and as its a social net and at nights the server is waiting to have 500-1500 or 5000-8000 users online, I wander if there is a way for lets say just add second server with some config which will bear next pressure. After again one and so on... ???? <? if($answer=YES) { how(??); } esle{ whatToDo(??); } ?> If there is no way, than maybe you could point to a easiest way of load balancing solution.... I will be extremally thanksfull if you can tell me for such purposes , should I move lets say to PostgreSQl or FireBird? Which of them will be more easy in the future to handle ? I am getting on the mysite.com/users/show/$userId page something like 60queries for all data... maybe too much, but anyway....after some optimization it can be 20-30....

    Read the article

  • Method that does conditional return of method calling it?

    - by Mattias Konradsson
    Ok this might be a bit of hack but bear with me :) The background is that i'm tired of methods that that some if-statement to that messes up indention for the whole method, like: public SomeClass DoStuff(string inputStr) { SomeClass result =null; if (IsOpenFilter(inputStr)) { .... } return result; } So I was thinking , wouldn't it be neat if I could do something like this instead: public SomeClass DoStuff(string inputStr) { Require(IsOpenFilter(inputStr),null); .... return result; } The idea is that if the statement does not evaluates to true it would return null. If there wasn't a return type for the method it would simply be: Require(IsOpenFilter(inputStr)); I realize that this is kinda overlapping with code contracts but these would be more like "conditional" or "soft" contracts evaluated at runtime rather than compile time. So I guess there's two questions, can this be done somehow? I'm stumped on how to do a conditional return from calling a method. The other question is, is this a good idea? It's a bit weird to monkeypatch the language like this but I'd rather like the way the code reads. I would be even cleaner if it could be put into an attribute above the method: [Require(IsOpenFilter(inputStr))]

    Read the article

  • Javascript hide/show classes with checkbox

    - by Christina
    I am just learning javascript, so please bear with me! I want to be able to use checkboxes to choose to hide/show div classes (to basically filter the amount of info being shown). It is done in this... but I'm try to figure out something much simpler (since I don't need to dynamically generate the checkbox options.) I came across this example: The Javascript: function showMe (it, box) { var vis = (box.checked) ? "block" : "none"; document.getElementById(it).style.display = vis; } The HTML <form> <input type="checkbox" checked="checked" value="value1" onclick="showMe('div1', this)" />value1 <input type="checkbox" checked="checked" value="value2" onclick="showMe('div2', this)" />value2 <input type="checkbox" checked="checked" value="value3" onclick="showMe('div3', this)" />value3 </form> <div id="div1" style="display:block">Show Div 1</div> <div id="div2" style="display:block">Show Div 2</div> <div id="div3" style="display:block">Show Div 3</div> </body> </html> But it only works for div ids, not classes. Any idea on how I can work this? Thanks in advance if you can help me out!

    Read the article

  • Realizing program with decision tree logics

    - by Vytas999
    The system realizes a game “Think animal”. Main use case is: 1. System offers user to think about any animal and the system will try to guess it 2. The system starts asking questions from the start of decision tree. Ex., “Question: It has fur?”, and provides possible answers – yes or no. 3. If the user answers Yes, the system proceeds to these steps: a. System tries to guess animal that has that feature, ex. “My guess: Is it bear?” and provides with possible answers – yes or no. b. If the user answer is Yes, the system offers to think off another animal 4. If the user answers is No, the system moves to No node in decision tree and moves to 2 step (and starts from asking from new node). 5. If system runs out of nodes (i.e., empty yes or no node was reached): a. the system announces that it has given up, and ask user to enter: i. What animal he had in mind ii. What is his characteristic feature b. User enters requested data c. The system creates a new node and links it to yes or no of last active node. Where i can get some information and some examples, when implementing decision tree logics in MS SQL Server and C#..? Any information will be usefull. Thanks

    Read the article

  • How can I remove certain characters from inside angle-brackets, leaving the characters outside alone

    - by Iain Fraser
    Edit: To be clear, please understand that I am not using Regex to parse the html, that's crazy talk! I'm simply wanting to clean up a messy string of html so it will parse Edit #2: I should also point out that the control character I'm using is a special unicode character - it's not something that would ever be used in a proper tag under any normal circumstances Suppose I have a string of html that contains a bunch of control characters and I want to remove the control characters from inside tags only, leaving the characters outside the tags alone. For example Here the control character is the numeral "1". Input The quick 1<strong>orange</strong> lemming <sp11a1n 1class1='jumpe111r'11>jumps over</span> 1the idle 1frog Desired Output The quick 1<strong>orange</strong> lemming <span class='jumper'>jumps over</span> 1the idle 1frog So far I can match tags which contain the control character but I can't remove them in one regex. I guess I could perform another regex on my matches, but I'd really like to know if there's a better way. My regex Bear in mind this one only matches tags which contain the control character. <(([^>])*?`([^>])*?)*?> Thanks very much for your time and consideration. Iain Fraser

    Read the article

  • SO what RDF database do i use for product attribute situation initially i thought about using EAV?

    - by keisimone
    Hi, i have a similar issue as espoused in http://stackoverflow.com/questions/695752/product-table-many-kinds-of-product-each-product-has-many-parameters i am convinced to use RDF now. only because of one of the comments made by Bill Karwin in the answer to the above issue but i already have a database in mysql and the code is in php. 1) So what RDF database should I use? 2) do i combine the approach? meaning i have a class table inheritance in the mysql database and just the weird product attributes in the RDF? I dont think i should move everything to a RDF database since it is only just products and the wide array of possible attributes and value that is giving me the problem. 3) what php resources, articles should i look at that will help me better in the creation of this? 4) more articles or resources that helps me to better understand RDF in the context of the above challenge of building something that will better hold all sorts of products' attributes and values will be greatly appreciated. i tend to work better when i have a conceptual understanding of what is going on. Do bear in mind i am a complete novice to this and my knowledge of programming and database is average at best.

    Read the article

  • OpenGL particle system

    - by allan
    I'm really new with OpenGL, so bear with me. I'm trying to simulate a particle system using OpenGl but I can't get it to work, this is what I have so far: #include <GL/glut.h> int main (int argc, char **argv){ // data allocation, various non opengl stuff ............ glutInit(&argc, argv); glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE ); glutInitWindowPosition(100,100); glutInitWindowSize(size, size); glPointSize (4); glutCreateWindow("test gl"); ............ // initial state, not opengl ............ glViewport(0,0,size,size); glutDisplayFunc(display); glutIdleFunc(compute); glutMainLoop(); } void compute (void) { // change state not opengl glutPostRedisplay(); } void display (void) { glClear(GL_COLOR_BUFFER_BIT); glBegin(GL_POINTS); for(i = 0; i<nparticles; i++) { // two types of particles if (TYPE(particle[i]) == 1) glColor3f(1,0,0); else glColor3f(0,0,1); glVertex2f(X(particle[i]),Y(particle[i])); } glEnd(); glFlush(); glutSwapBuffers(); } I get a black window after a couple of seconds (the window has just the title bar before that). Where do I go wrong? Any help would be very much appreciated. Thanks. LE: the x and y coordinates of each particle are within the interval (0,size)

    Read the article

< Previous Page | 14 15 16 17 18 19 20 21 22 23 24 25  | Next Page >