Search Results

Search found 1115 results on 45 pages for 'steven lee'.

Page 25/45 | < Previous Page | 21 22 23 24 25 26 27 28 29 30 31 32  | Next Page >

  • Problem with displaying usernames in my flash[:notice] - Agile Web Development With Rails - Chapter

    - by Lee
    I can't figure out what I'm doing wrong here. I can’t seem to get the #{@user.name} to work in my flash[:notice] Everything else works just fine I can add new users, but when I add a new user instead of saying “User John Doe was successfully created”, it says “User #{@user.name} was successfully created.” I'm at this point in the depot app: depot_p/app/controllers/users_controller.rb to work.

    Read the article

  • Generate a Constant expression from a function

    - by Lee
    For my Google Wave robot, on the onDocumentChanged event I want to apply a filter as follows: @Capability(filter = FILTER) @Override public void onDocumentChanged(DocumentChangedEvent event) { ... } I want the filter to be generated the first time the robot is run, which I'm trying to do as follows: private static final String FILTER = generateFilter(); private static final String generateFilter(){ ... } However, it complains FILTER isn't a constant expression when used within @Capability. generateFilter() will return the same string every time it is called, I'm only using it to create the string so that when I make changes, I don't need to worry about updating the filter. Now I could be going about this all wrong, so wondered if anyone knew what I'm doing wrong, or knew a better way in which I could generate a constant expression from the function.

    Read the article

  • SQLite MYSQL character encoding

    - by Lee Armstrong
    I have a strange situation where the following code works however XCode warns it is deprecated... NSString *col1 = [NSString stringWithCString:(char *)sqlite3_column_text(compiledStatement, 0)]; However as that is the deprecated method if I set an encoding the string comes out wrong! I have tried all the encodings but none work! NSString *col1 = [NSString stringWithCString:(char *)sqlite3_column_text(compiledStatement, 0) encoding:NSASCIIStringEncoding];

    Read the article

  • Error with my JQuery code in IE but not Firefox

    - by Kaz Lee
    Guys, I have this code below which works in firefox and all others except in IE. Am I making a syntaxt error somewhere? Can't seem to find it and its driving me nuts. Any help is appreciated! <script> $(document).ready(function(){ $("label:contains('Number')").html("Register:"); $("input[type='textbox']").each(function(){ var name = $(this).attr('name'); // grab name of original /* create new visible input */ var html = '<input type="checkbox" class="NetscapeFix" size="4" maxlength="5" name="'+name+'" id="'+name+'" value="1" dir="rtl" />'; $(this).after(html).remove(); // add new, then remove original input }); }); </script> Thank you, Kaz

    Read the article

  • Changing a Select dropdown with a jquery ui slider

    - by Chris J. Lee
    Trying to set a select dropdown with a slider. You move the jquery ui slider and then it will change the selection of the other two dropdowns. is there a current method in jquery that would set these options? Current dropdown: <select id="alert-options-frequency-opts"> <option value=""></option> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> <option value="6">6</option> <option value="7">7</option> <option value="8">8</option> <option value="9">9</option> <option value="10">10</option> </select>

    Read the article

  • 'cross-referencing' DataTable's

    - by Lee
    I have a DataGridView that is being filled with data from a table. Inside this table is a column called 'group' that has the ID of an individual group in another table. What I would like to do, is when the DataGridView is filled, instead of showing the ID contained in 'group', I'd like it to display the name of the group. Is there some type of VB.net 'magic' that can do this, or do I need to cross-reference the data myself? Here is a breakdown of what the 2 tables look like: table1 id group (this holds the value of column id in table 2) weight last_update table2 id description (this is what I would like to be displayed in the DGV.) BTW - I am using Visual Studio Express.

    Read the article

  • interpreting assembly instructions

    - by David Lee
    I am trying to translate the following: Action: pushl %ebp movl %esp, %eax subl $32, %esp movl $0, -8(%eax) movl $0, -4(%eax) movl -4(%eax), %eax cmpl 32(%eax), %ebp movl -4(%ebp), %eax sall $2, %ebp addl 8(%ebp), %ebp movl (%ebp), %ebp addl %ebp, -8(%eax) addl $1, -4(%eax) What is the best way to learn assembly and translating this code?

    Read the article

  • Rails activerecord includes. How to access the included columns?

    - by Lee Quarella
    I my User has_many :event_patrons and EventPatron belongs_to :user. I would like to slap together the user with one specific event patron with something like this sql statement: SELECT * FROM `users` INNER JOIN `event_patrons` ON `event_patrons`.`user_id` = `users`.`id` WHERE `event_patrons`.`event_id` = 1 So in rails I tried this: User.all(:joins => :event_patrons, :condidions => {:event_patrons => {:event_id => 1}}) But that gives me SELECT users.* instead of SELECT *: SELECT `users`* FROM `users` INNER JOIN `event_patrons` ON `event_patrons`.`user_id` = `users`.`id` WHERE `event_patrons`.`event_id` = 1 I then tried to switch the :joins with :include and got a whole jumbled mess that still returned me only the columns in User and none from EventPatron. What am I missing?

    Read the article

  • Rename INDEX Column

    - by Lee
    Hey All I have a database with around 40 tables and need to rename every index column. IE USER a table has a bunch of fields like user_id | user_username | user_password | etc... I want to rename the ID columns just to id ie id | user_username | user_password | etc... But I keep getting mysql errors on the alter table command ie. ALTER TABLE database RENAME COLUMN user_id to id; Plus many different variations. Whats the best way to do this ? Hope you can advise

    Read the article

  • Wordpress Hooks vs. includes?

    - by Chris J. Lee
    This is somewhat a subjective question. Noticed themes like thematic and carrington use hooks to display their themes. Trying to figure out which works best for a more efficient workflow. Which seems more efficient at theming? Trying to weigh in the cons and pros of hooks vs. just including static files.

    Read the article

  • Python/Ruby IDE (Windows)?

    - by Lee Tang
    Are there any Windows IDEs that support both Ruby and Python? I'm talking about the type of IDE that has syntax suggestions (auto-completion feature). I've tried Netbeans but it only seems to support Ruby (maybe there's a way to add Python support?)

    Read the article

  • Can I load a 32 bit DLL into a 64 bit process on Windows?

    - by Lee
    I recently upgraded a c# windows service to run as a 64 bit .net process. Normally, this would be trivial, but the system makes use of a 32-bit DLL written in C++. It is not an option to convert this DLL to 64 bit, so I wrapped the DLL in a separate 32 bit .net process and exposed a .net interface via remoting. This is quite a reliable solution, but I would prefer to run the system as a single process. Is there any way I can load my 32 bit DLL into a 64 bit process and access it directly (perhaps through some sort of thunking layer)?

    Read the article

  • How to retrieve the TabHost object, if you're not using TabActivity?

    - by Lee Olayvar
    I am attempting to use a few of the simple android examples for Tab Views. One thing i am attempting to do different than all the examples i've seen so far, is to not use a TabActivity. I am trying to use a normal activity, which means i need to retrieve the TabHost object some how, so i can add tabs and etc to it. How can this be done? If you wanted to retrieve a view, you can simply use findViewById(R.id.blah), but how can you retrieve the TabHost object in a similar manner?

    Read the article

  • Error occurs while using SPADE method in R

    - by Yuwon Lee
    I'm currently mining sequence patterns using SPADE algorithm in R. SPADE is included in "arulesSequence" package of R. I'm running R on my CentOS 6.3 64bit. For an exercise, I've tried an example presented in http://en.wikibooks.org/wiki/Data_Mining_Algorithms_In_R/Sequence_Mining/SPADE When I tried to do "cspade(x, parameter = list(support = 0.4), control = list(verbose = TRUE))" R says: parameter specification: support : 0.4 maxsize : 10 maxlen : 10 algorithmic control: bfstype : FALSE verbose : TRUE summary : FALSE preprocessing ... 1 partition(s), 0 MB [0.096s] mining transactions ... 0 MB [0.066s] reading sequences ...Error in asMethod(object) : 's' is not an integer vector When I try to run SPADE on my Window 7 32bit, it runs well without any error. Does anybody know why such errors occur?

    Read the article

  • *(char**) how to understand this construct?

    - by House.Lee
    recently, while reading former's code in my current project, I encounter the problems below: while implementing the Queue, my former wrote codes like this: while(uq->pHead) { char *tmp = uq->pHead; uq->pHead = *(char **)tmp; //... } the uq-pHead has definition like: typedef struct { char* pHead; //... } Queue; Well, I'm quite confused about the usage that "uq->pHead = *(char**)tmp" , could anyone explain it to me in detail? if we assume that *(uq-pHead) = 32(i.e. ' ') , *(char**)tmp would translate this into pointer-form, but...how could it make sense? Thanks a lot.

    Read the article

  • Email flow problem in Exchange 2003

    - by Hugo Garcia
    Hello colleagues, I have a problem whit some emails that are not being delivered to the user inbox. The SMTP server on the DMZ that receives email from the internet is a Symantec Brigthmail Gateway, this server reports that the message was delivered normally to the exchange server: The DMZ server forwars the incoming mail to the exchange server that is on the LAN segment, and the message tracking on the exchange server reports the email being submited to the advanced queue: I have done severals searches on google, without any luck. have any one of you guys experienced similar problems? Any help or pointers would be very appreciated. as requested, here is a transcript of a smtp session: helo 250 mail2.XXXXXXXXXXXXXXXX.XXX.XX Hello [192.168.9.6] MAIL FROM: [email protected] RCPT TO: [email protected] DATA Subject: Mensaje de Prueba Test . 250 2.1.0 [email protected] OK 250 2.1.5 [email protected] 354 Start mail input; end with <CRLF>.<CRLF> 250 2.6.0 <'[email protected]> Queued mail for delivery

    Read the article

  • Bash Parallelization of CPU-intensive processes

    - by ehsanul
    tee forwards its stdin to every single file specified, while pee does the same, but for pipes. These programs send every single line of their stdin to each and every file/pipe specified. However, I was looking for a way to "load balance" the stdin to different pipes, so one line is sent to the first pipe, another line to the second, etc. It would also be nice if the stdout of the pipes are collected into one stream as well. The use case is simple parallelization of CPU intensive processes that work on a line-by-line basis. I was doing a sed on a 14GB file, and it could have run much faster if I could use multiple sed processes. The command was like this: pv infile | sed 's/something//' > outfile To parallelize, the best would be if GNU parallel would support this functionality like so (made up the --demux-stdin option): pv infile | parallel -u -j4 --demux-stdin "sed 's/something//'" > outfile However, there's no option like this and parallel always uses its stdin as arguments for the command it invokes, like xargs. So I tried this, but it's hopelessly slow, and it's clear why: pv infile | parallel -u -j4 "echo {} | sed 's/something//'" > outfile I just wanted to know if there's any other way to do this (short of coding it up myself). If there was a "load-balancing" tee (let's call it lee), I could do this: pv infile | lee >(sed 's/something//' >> outfile) >(sed 's/something//' >> outfile) >(sed 's/something//' >> outfile) >(sed 's/something//' >> outfile) Not pretty, so I'd definitely prefer something like the made up parallel version, but this would work too.

    Read the article

  • Scrolling an HTML 5 page using JQuery

    - by nikolaosk
    In this post I will show you how to use JQuery to scroll through an HTML 5 page.I had to help a friend of mine to implement this functionality and I thought it would be a good idea to write a post.I will not use any JQuery scrollbar plugin,I will just use the very popular JQuery Library. Please download the library (minified version) from http://jquery.com/download.Please find here all my posts regarding JQuery.Also have a look at my posts regarding HTML 5.In order to be absolutely clear this is not (and could not be) a detailed tutorial on HTML 5. There are other great resources for that.Navigate to the excellent interactive tutorials of W3School.Another excellent resource is HTML 5 Doctor.Two very nice sites that show you what features and specifications are implemented by various browsers and their versions are http://caniuse.com/ and http://html5test.com/. At this times Chrome seems to support most of HTML 5 specifications.Another excellent way to find out if the browser supports HTML 5 and CSS 3 features is to use the Javascript lightweight library Modernizr.In this hands-on example I will be using Expression Web 4.0.This application is not a free application. You can use any HTML editor you like.You can use Visual Studio 2012 Express edition. You can download it here. Let me move on to the actual example.This is the sample HTML 5 page<!DOCTYPE html><html lang="en">  <head>    <title>Liverpool Legends</title>        <meta http-equiv="Content-Type" content="text/html;charset=utf-8" >        <link rel="stylesheet" type="text/css" href="style.css">        <script type="text/javascript" src="jquery-1.8.2.min.js"> </script>     <script type="text/javascript" src="scroll.js">     </script>       </head>  <body>    <header>        <h1>Liverpool Legends</h1>    </header>        <div id="main">        <table>        <caption>Liverpool Players</caption>        <thead>            <tr>                <th>Name</th>                <th>Photo</th>                <th>Position</th>                <th>Age</th>                <th>Scroll</th>            </tr>        </thead>        <tfoot class="footnote">            <tr>                <td colspan="4">We will add more photos soon</td>            </tr>        </tfoot>    <tbody>        <tr class="maintop">        <td>Alan Hansen</td>            <td>            <figure>            <img src="images\Alan-hansen-large.jpg" alt="Alan Hansen">            <figcaption>The best Liverpool Defender <a href="http://en.wikipedia.org/wiki/Alan_Hansen">Alan Hansen</a></figcaption>            </figure>            </td>            <td>Defender</td>            <td>57</td>            <td class="top">Middle</td>        </tr>        <tr>        <td>Graeme Souness</td>            <td>            <figure>            <img src="images\graeme-souness-large.jpg" alt="Graeme Souness">            <figcaption>Souness was the captain of the successful Liverpool team of the early 1980s <a href="http://en.wikipedia.org/wiki/Graeme_Souness">Graeme Souness</a></figcaption>            </figure>            </td>            <td>MidFielder</td>            <td>59</td>        </tr>        <tr>        <td>Ian Rush</td>            <td>            <figure>            <img src="images\ian-rush-large.jpg" alt="Ian Rush">            <figcaption>The deadliest Liverpool Striker <a href="http://it.wikipedia.org/wiki/Ian_Rush">Ian Rush</a></figcaption>            </figure>            </td>            <td>Striker</td>            <td>51</td>        </tr>        <tr class="mainmiddle">        <td>John Barnes</td>            <td>            <figure>            <img src="images\john-barnes-large.jpg" alt="John Barnes">            <figcaption>The best Liverpool Defender <a href="http://en.wikipedia.org/wiki/John_Barnes_(footballer)">John Barnes</a></figcaption>            </figure>            </td>            <td>MidFielder</td>            <td>49</td>            <td class="middle">Bottom</td>        </tr>                <tr>        <td>Kenny Dalglish</td>            <td>            <figure>            <img src="images\kenny-dalglish-large.jpg" alt="Kenny Dalglish">            <figcaption>King Kenny <a href="http://en.wikipedia.org/wiki/Kenny_Dalglish">Kenny Dalglish</a></figcaption>            </figure>            </td>            <td>Midfielder</td>            <td>61</td>        </tr>        <tr>            <td>Michael Owen</td>            <td>            <figure>            <img src="images\michael-owen-large.jpg" alt="Michael Owen">            <figcaption>Michael was Liverpool's top goal scorer from 1997–2004 <a href="http://www.michaelowen.com/">Michael Owen</a></figcaption>            </figure>            </td>            <td>Striker</td>            <td>33</td>        </tr>        <tr>            <td>Robbie Fowler</td>            <td>            <figure>            <img src="images\robbie-fowler-large.jpg" alt="Robbie Fowler">            <figcaption>Fowler scored 183 goals in total for Liverpool <a href="http://en.wikipedia.org/wiki/Robbie_Fowler">Robbie Fowler</a></figcaption>            </figure>            </td>            <td>Striker</td>            <td>38</td>        </tr>        <tr class="mainbottom">            <td>Steven Gerrard</td>            <td>            <figure>            <img src="images\steven-gerrard-large.jpg" alt="Steven Gerrard">            <figcaption>Liverpool's captain <a href="http://en.wikipedia.org/wiki/Steven_Gerrard">Steven Gerrard</a></figcaption>            </figure>            </td>            <td>Midfielder</td>            <td>32</td>            <td class="bottom">Top</td>        </tr>    </tbody></table>          </div>            <footer>        <p>All Rights Reserved</p>      </footer>     </body>  </html>  The markup is very easy to follow and understand. You do not have to type all the code,simply copy and paste it.For those that you are not familiar with HTML 5, please take a closer look at the new tags/elements introduced with HTML 5.When I view the HTML 5 page with Firefox I see the following result. I have also an external stylesheet (style.css). body{background-color:#efefef;}h1{font-size:2.3em;}table { border-collapse: collapse;font-family: Futura, Arial, sans-serif; }caption { font-size: 1.2em; margin: 1em auto; }th, td {padding: .65em; }th, thead { background: #000; color: #fff; border: 1px solid #000; }tr:nth-child(odd) { background: #ccc; }tr:nth-child(even) { background: #404040; }td { border-right: 1px solid #777; }table { border: 1px solid #777;  }.top, .middle, .bottom {    cursor: pointer;    font-size: 22px;    font-weight: bold;    text-align: center;}.footnote{text-align:center;font-family:Tahoma;color:#EB7515;}a{color:#22577a;text-decoration:none;}     a:hover {color:#125949; text-decoration:none;}  footer{background-color:#505050;width:1150px;}These are just simple CSS Rules that style the various HTML 5 tags,classes. The jQuery code that makes it all possible resides inside the scroll.js file.Make sure you type everything correctly.$(document).ready(function() {                 $('.top').click(function(){                     $('html, body').animate({                         scrollTop: $(".mainmiddle").offset().top                     },4000 );                  });                 $('.middle').click(function(){                     $('html, body').animate({                         scrollTop: $(".mainbottom").offset().top                     },4000);                  });                     $('.bottom').click(function(){                     $('html, body').animate({                         scrollTop: $(".maintop").offset().top                     },4000);                  }); });  Let me explain what I am doing here.When I click on the Middle word (  $('.top').click(function(){ ) this relates to the top class that is clicked.Then we declare the elements that we want to participate in the scrolling. In this case is html,body ( $('html, body').animate).These elements will be part of the vertical scrolling.In the next line of code we simply move (navigate) to the element (class mainmiddle that is attached to a tr element.)      scrollTop: $(".mainmiddle").offset().top  Make sure you type all the code correctly and try it for yourself. I have tested this solution will all 4-5 major browsers.Hope it helps!!!

    Read the article

< Previous Page | 21 22 23 24 25 26 27 28 29 30 31 32  | Next Page >