Daily Archives

Articles indexed Friday April 30 2010

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

  • CSS: div text wrap around floated div

    - by Thildemar
    I am trying to create a site that has a fixed width content div and a floating div in the blank space on the right of the page, like so: <html> <div style="width:150px;float:right;border:thin black solid"> Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam.</div> <div style="width:400px"> Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. </div> </html> This works fine, but when the page is re sized too small either the left div jumps down or the text within it does not start wrapping around the right div until its about halfway through it. I would like the test within the left div to wrap around the float is the page width is too small. What am I missing??

    Read the article

  • Need MYSQL query for finding lowest score per game player

    - by Chris Barnhill
    I have a game on Facebook called Rails Across Europe. I have a Best Scores page where I show the players with the best 20 scores, which in game terms refers to the lowest winning turn. The problem is that there are a small number of players who play frequently, and their scores dominate the page. I'd like to make the scores page open to more players. So I thought that I could display the single lowest winning turn for each player instead of displaying all of the lowest winning turns for all players. The problem is that the query for this eludes me. So I hope that one of you brilliant StackOverflow folks can help me with this. I have included the relevant MYSQL table schemas below. Here are the the table relationships: player_stats contains statistics for either a game in progress or a completed game. If a game is in progress, winning_turn is zero (which means that games with a winning_turn of zero should not be included in the query). player_stats has a game_player table id reference. game_player contains data describing games currently in progress. game_player has a player table id reference. player contains data describing a person who plays the game. Here's the query I'm currently using: 'SELECT p.fb_user_id, ps.winning_turn, gp.difficulty_level, c.name as city_name, g.name as goods_name, d.cost FROM game_player as gp, player as p, player_stats as ps, demand as d, city as c, goods as g WHERE p.status = "ACTIVE" AND gp.player_id = p.id AND ps.game_player_id = gp.id AND d.id = ps.highest_demand_id AND c.id = d.city_id AND g.id = d.goods_id AND ps.winning_turn > 0 ORDER BY ps.winning_turn ASC, d.cost DESC LIMIT '.$limit.';'; Here are the relevant table schemas: -- -- Table structure for table `player_stats` -- CREATE TABLE IF NOT EXISTS `player_stats` ( `id` int(11) NOT NULL auto_increment, `game_player_id` int(11) NOT NULL, `winning_turn` int(11) NOT NULL, `highest_demand_id` int(11) NOT NULL, PRIMARY KEY (`id`), KEY `game_player_id` (`game_player_id`,`highest_demand_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=3814 ; -- -- Table structure for table `game_player` -- CREATE TABLE IF NOT EXISTS `game_player` ( `id` int(10) unsigned NOT NULL auto_increment, `game_id` int(10) unsigned NOT NULL, `player_id` int(10) unsigned NOT NULL, `player_number` int(11) NOT NULL, `funds` int(10) unsigned NOT NULL, `turn` int(10) unsigned NOT NULL, `difficulty_level` enum('STANDARD','ADVANCED','MASTER','ULTIMATE') NOT NULL, `date_last_used` datetime NOT NULL, PRIMARY KEY (`id`), KEY `game_id` (`game_id`,`player_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=3814 ; -- -- Table structure for table `player` -- CREATE TABLE IF NOT EXISTS `player` ( `id` int(11) NOT NULL auto_increment, `fb_user_id` char(255) NOT NULL, `fb_proxied_email` text NOT NULL, `first_name` char(255) NOT NULL, `last_name` char(255) NOT NULL, `birthdate` date NOT NULL, `date_registered` datetime NOT NULL, `date_last_logged_in` datetime NOT NULL, `status` enum('ACTIVE','SUSPENDED','CLOSED') NOT NULL, PRIMARY KEY (`id`), KEY `fb_user_id` (`fb_user_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1646 ;

    Read the article

  • Windows 7 "freezes" (chills?), and then "unfreezes" after about 1 minute.

    - by gbc001
    Hi, I have an Acer Timeline 1810T netbook (4GB RAM) with Windows 7 x64. About once or twice a day, it "freezes" - the reason I put this in quotation marks is that it does not really freeze, as I you cant move mouse, etc. I can move my mouse and jump between different applications, but I cant use the applications for anything. So I can jump between notepad and Firefox, but I cant browse to a new web page. I have been trying to determine the source of this misery for a while now, and I suspect it has something to do with the hard drive - indirectly if not directly. Here are some screen shots of the resource monitor during a "freeze" and during normal operation: Freeze: http://imgur.com/Gcgq1.jpg Normal operation: imgur.com/mlHaI.jpg As you can see, CPU is fine during freeze, but the disk is going bananas.. Does anyone have an idea of what these reading means, or about the problem in general? There seems to be no specific activity that sets this off - it can be during browsing, or during media playback with nothing else open. The fact that I can see navigate to applications but not use them might suggest a hard drive problem as well? Maybe I can access the stuff that is in RAM, but not anything that would require interaction with the drive.. Very appreciative of any help!

    Read the article

  • adding a background color to search term results

    - by turborogue
    I'm trying to add a background color to a user submitted search result when a user enters a search term on a page (which is basically one big table). This is a text based search. I'm using jquery to show/hide the table rows that do not have the search term as text within the TR, but I'd ideally like to take the additional step of taking the search term (the entered value), and matching any of those text terms in the remaining (showing) rows and adding say a yellow background to the word(s). I know my syntax is currently wrong, just not sure what is correct:) Hopefully this is clear...any help is greatly appreciated! html of form: jquery: $("#searchsubmit").click(function () { var searchexp = document.getElementById('searchbox').value; $("table tr").hide(); $("table tr.header").show(); $('tr:contains('+ searchexp +')').show(); $(searchexp).css('background-color','yellow'); });

    Read the article

  • Regex Lookaheads

    - by Michael
    Need to capture content of root <pubDate> element, but in document it can be either within <item> element or within <channel> element. Also <item> is child of <channel> I'll bring example <channel> ... <pubDate>10/2/2010</pubDate> ... <item> ... <pubDate>13/2/2029</pubDate> ... </item> ... </channel> need to capture 10/2/2010 With the <item> no problem, can capture it, along with its <pubDate>.

    Read the article

  • jQuery: Simple menu

    - by JamesBrownIsDead
    I'm trying to learn jQuery by implementing a simple menu. I've got <div> elements that act as buttons and have links in them. I'm trying to add onclick events to the divs that navigate the browser to the link's address in the div. This is basically my pseudo-code. What would the real code be? How can I improve this? Any feedback appreciated! // Iterate over each menu button $('.masterHeaderMenuButton').each(function () { // Get the link in each button and set the button's onclick to // redirect to the link's address var url = $('a', this).attr('href'); this.click(function () { window.location.href = url; }); // If the user is on the page for the current button, hilight it if (window.location.href === url) { $('a', this).addClass("masterHeaderMenuButtonSelected"); } });

    Read the article

  • get a set of files that have been modified after a certain date

    - by jcollum
    Does anyone have a handy powershell script that gets a set of files from TFS based on a modification date? I'd like to say "give me all the files in this folder (or subfolder) that were modified after X/Y/ZZZZ" and dump those files to a folder other than the folder they would normally go to. I know enough powershell to hack about and get this done, eventually, but I'm hoping to avoid that.

    Read the article

  • Indentation control while developing a small python like language

    - by sap
    Hello, I'm developing a small python like language using flex, byacc (for lexical and parsing) and C++, but i have a few questions regarding scope control. just as python it uses white spaces (or tabs) for indentation, not only that but i want to implement index breaking like for instance if you type "break 2" inside a while loop that's inside another while loop it would not only break from the last one but from the first loop as well (hence the number 2 after break) and so on. example: while 1 while 1 break 2 'hello world'!! #will never reach this. "!!" outputs with a newline end 'hello world again'!! #also will never reach this. again "!!" used for cout end #after break 2 it would jump right here but since I don't have an "anti" tab character to check when a scope ends (like C for example i would just use the '}' char) i was wondering if this method would the the best: I would define a global variable, like "int tabIndex" on my yacc file that i would access in my lex file using extern. then every time i find a tab character on my lex file i would increment that variable by 1. when parsing on my yacc file if i find a "break" keyword i would decrement by the amount typed after it from the tabIndex variable, and when i reach and EOF after compiling and i get a tabIndex != 0 i would output compilation error. now the problem is, whats the best way to see if the indentation got reduced, should i read \b (backspace) chars from lex and then reduce the tabIndex variable (when the user doesn't use break)? another method to achieve this? also just another small question, i want every executable to have its starting point on the function called start() should i hardcode this onto my yacc file? sorry for the long question any help is greatly appreciated. also if someone can provide an yacc file for python would be nice as a guideline (tried looking on Google and had no luck). thanks in advance.

    Read the article

  • Split the date in c#

    - by bachchan
    For Ex You date enter in the various form in textbox 12/Augest/2010 augest/12/2010 2010/12/Augest and out put is three textbox First is day show= 12 textbox second is Months show= augest textbox third is Year show= 2010

    Read the article

  • OO design for business logic

    - by hotyi
    I have one Sell Operation object and two Buy Operation objects, i want to implement such behavior that one Sell Operation discharges two Buy Operation, it looks like: sellOperation.Discharge(oneBuyOperation); sellOperation.Discharge(twoBuyOperation); so i want to ask whether i should call the repository function in the Discharge method, or i'd better call the repository save method outside Discharge method. like: opRepository.Save(sellOpertion); So anyone could give me some advise what are you going to implement in this scenario? using Service class or anything better way?

    Read the article

  • Visual Studio 2010 - Export (Project) Template menu option grayed out

    - by Jakobud
    In Visual Studio, I want to make a simple C++ project and export it out as a template, so I can use the template to start new projects to save me time. But the Export Template menu option is always grayed out. I've not once been able to click it. Anyone know why? Anyone know how to accomplish what I need (besides the obvious "make a copy of an existing project in explorer")? It seems like project templates should be a no-brainer feature for VS. This seems to be the case for Visual Studio 2005, 2010 (I probably 2008 as well I haven't checked).

    Read the article

  • Reducing moire when downsampling halftone comic images.

    - by drawnonward
    How can I reduce moire effects when downsampling halftone comic book images during live zoom on an iPhone or iPad? I am writing a comic book viewer. It would be nice to provide higher resolution images and allow the user to zoom in while reading the comic book. However, my client is averse to moire effects and will not allow this feature if there are noticeable moire artifacts while zooming, which of course there are. Modifying the images to be less susceptible to moire would only work if the modifications were not perceptible. Blur was specifically prohibited, as is anything that removes the beloved halftone dots. The images are black and white halftone and line art. The originals are 600 dpi but what we ship with the application will be half that at best, so probably 2500 pixels or less tall. So what are my options? If I write a custom downsampling algorithm would it be fast enough for real time on these devices? Are there other tricks I can do? Would it work to just avoid the size ratios that have the most visual moire effects? As you zoom in an out, there are definitely peaks where the moire effects are worst. Is there a way to calculate what those points are and just zoom to a nearby scale that is not as bad? Any suggestions are welcome. I have very little experience with image and signal processing, but am enjoying the opportunity to learn. I know nothing of wavelets and acutance and other jargon, so please be verbose.

    Read the article

  • Best keyboards for emacs?

    - by catphive
    For emacs users out there, what are your recommended keyboards? Bonus points for keyboards that: Have no capslock key. Instead, a control key in that position. Alt keys that are closer to the center, and easier to use with meta key combos. I find alt keys too far to the left to be a bit awkward to hit with my thumb in some key combos. Help ergonomically with emacs in other ways. I'm not a huge fan of model M style high and clacky keys. I instead prefer laptop style flat keys; however, I'm not disqualifying either category.

    Read the article

  • How can i attach to a process using gdbvim?

    - by thamurath
    Hi, I use Vim as primary IDE for programming, with some plugins i have a good environment but for a single point: debugging. I have recompiled Vim to use vimgdb, and it works, but the problem is that i need to attach to a process started by a root user so i have to use sudo to do it.... How can i do this with vimgdb? Thanks in advance.

    Read the article

  • How to posr these values to my model?

    - by udaya
    Hi I have the variables like this how can i parse these variables to my model page currently the variable is in my controller echo $d['mday'].'-'.$d['mon'].'-'.$d['year']."\n"; I have to pass the value s to my model Iam trying like this but it didnt work $res['ApproveLeave'] = $this->hostelmodel->putLeave($d); How can i do that?

    Read the article

  • help for splitting a string in javascript

    - by Hero
    Hi everyone... I'd asked a question about the splitting the a string like below: Input string: "a=aa| b=b||b | c=cc" and the output: a=aa b=b||b c=cc Kobi's answer was: var matches = "a=aa|b=b||b|c=cc".match(/(?:[^|]|\|\|)+/g) his answer was correct. But I need to use "split" method and save store the outputs in a array. so I can't use the Match Method. So please help me...

    Read the article

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