Search Results

Search found 4763 results on 191 pages for 'adams john'.

Page 140/191 | < Previous Page | 136 137 138 139 140 141 142 143 144 145 146 147  | Next Page >

  • How do I escape a new line character in a .ini file so that Zend_Config_Ini reads it literally?

    - by Nick
    I am trying to store a multiple line e-mail in an ini file using PHP/Zend Framework. My string has new lines characters in it, and when I use Zend_Config_Ini to parse the ini file, the new line characters come back escaped, so they are printed out on screen, instead of a line feed. Example: // ini file message = Hi {0},\n\nThis is a test message.\nGoodbye! is parsed by Zend_Config_Ini as: Hi {0},\\n\\nThis is a test message.\\nGoodbye! which then is printed out in the email as: Hi John,\n\nThis is a test message.\nGoodbye! Instead I want the e-mail to look like this: Hi John, This is a test message. Goodbye! Does anybody know how to achieve this? Thanks!

    Read the article

  • Change some data in input field with jQuery

    - by John
    Hi i need with jQuery to change data in input field when user click on some link <input value="height-size-width"> so when user click on some <a href link with width id script need to change only widht in input field.... if user click on height a href link script need to change only height in input field... Like youtube embed option Any help?

    Read the article

  • Best Book for a new Database Developer

    - by John
    We have just had a graduate join the team with the end aim of assisting out our very busy DBA. He has only a basic SQL knowledge from his degree so we are looking for a really good getting started book preferably based on MS SQL server. Purchase Update: Thanks to the replies we have now purchased Head First SQL to review what he already knows and Beginning SQL Server 2005 Programming to enhance these skills. Further down the page you can see my full review of the books for our needs. However still feel free to post more books as others may find them useful!

    Read the article

  • django convert list of objects to list of primary keys

    - by John
    Hi, As the title says I have a list of Django objects and I want to get a list of primary keys. What is the best way of doing this? I know I could do my_list = [] for item in object_list: my_list.append(item.pk) but was wondering if there is Django or Python specific way of doing this better. Thanks

    Read the article

  • Default string arguments

    - by John.M
    myPreciousFunction(std::string s1 = "", std::string s2 = "") { } int main() { myPreciousFunction(); } can i make the arguments look any more prettier? i want there to be empty string if no arguments were supplied.

    Read the article

  • Best way to handle storing (possibly NULL) char * in a std::string

    - by John
    class MyClass { public: void setVar(const char *str); private: std::string mStr; int maxLength; //we only store string up to this length }; What's the best approach to implement setVar when the external code is quite likely to pass in NULL for an empty string (and cannot be changed)? I currently do something a bit like: void MyClass::setVar(const char *str) { mStr.assign(str ? str : "",maxLength); } But it seems kind of messy. ideas?

    Read the article

  • Thread 0 crashed with X86 Thread State (32-bit): in cocoa Application

    - by John
    I am doing crash fixing in an osx application .The crash report shows Date/Time: 2012-05-01 16:05:58.004 +0200 OS Version: Mac OS X 10.5.8 (9L31a) Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x00000000545f5f00 Crashed Thread: 8 Thread 8 crashed with X86 Thread State (32-bit): eax: 0x140e0850 ebx: 0x00060fc8 ecx: 0x92df0ec0 edx: 0xc0000003 edi: 0x545f5f00 esi: 0x140e0870 ebp: 0xb0445988 esp: 0xb0445964 ss: 0x0000001f efl: 0x00010206 eip: 0x92dca68c cs: 0x00000017 ds: 0x0000001f es: 0x0000001f fs: 0x0000001f gs: 0x00000037 cr2: 0x545f5f00 How to tares the application code with this report? what is Thread 0 crashed with X86 Thread State (32-bit)? if anybody know please help me. Thanks in advance.

    Read the article

  • How can I combine a LINQ query with an IQueryable<Guid>

    - by John
    I have a LINQ query that uses 1 table + a large number of views. I'd like to be able to write something like this: IQueryable<Guid> mostViewedWriters; switch (datePicker) { case DatePicker.Last12Hours: mostViewedWriters = from x in context.tempMostViewed12Hours select x.GuidId; break; case DatePicker.Last24Hours: mostViewedWriters = from x in context.tempMostViewed12Hours select x.GuidId; break; case DatePicker.Last36Hours: mostViewedWriters = from x in context.tempMostViewed12Hours select x.GuidId; break; } var query = from x1 in context.Articles join x2 in context.Authors on x1.AuthorId == x2.AuthorId join x3 in mostViewedWriters on x2.AuthorId == x3.Id select new { x2.AuthorName, x1.ArticleId, x1.ArticleTitle }; The above C# is pseudo-code written to protect the innocent (me). The gist of the question is this: I have a query that is related to the results of a view. That view, however, could be one of many different views. All the views return the same data type. I thought that I might be able to create an IQueryable that would contain the Ids that I need and use that query. Alas, that effort has stalled.

    Read the article

  • database deign advice wanted: double data entry

    - by john
    hi, I'm designing a database for capturing clinical trial data. The data are entered twice by two persons, independently and the results must be matched. What are the best database tools to use to achieve the best results. Any one has similar experiences? Your helps are highly appreciated. thanks.

    Read the article

  • jQuery: serializing array returns empty string

    - by John Smith
    I did not forget to add name attributes as is a common problem and yet my serialized form is returning an empty string. What am I doing wrong? HTML/javascript: <head> <script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script> <script> $( document ).ready( function() { $('#word_form').submit(function(e) { e.preventDefault(); console.log($(this).serialize()); //returns an empty string }); }); </script> </head> <body> <div id="wrapper"> <form name="word_form" id="word_form" method="POST"> <input type="image" name="thumbsUp" id="thumb1" value="1" src="http://upload.wikimedia.org/wikipedia/commons/8/87/Symbol_thumbs_up.svg" style="width:50px;height:50px;"> <input type="image" name="thumbsDown" id="thumb2" value="2" src="http://upload.wikimedia.org/wikipedia/commons/8/84/Symbol_thumbs_down.svg" style="width:50px;height:50px;"> </form> </div> </body> Thanks!

    Read the article

  • simple question about oracle indexes

    - by john
    If I have an oracle query like below: SELECT * FROM table_a where A = "1", B = "2", C = "3" for this query to pickup one of the indexes of table_a...does the index need to be on all 3 of these columns? What I am asking is: What if Index is on A, B, C, D? What if Index is on B, C? Will the index only be picked when it is on A, B, C?

    Read the article

  • Ajax Code to run PHP query After Facebook Like Button is Clicked

    - by John
    I have the PHP below on a file called fblike.php. On another file, I have the Facebook Like button. The Like button functions. I would like to run the code below when the Facebook Like button is clicked. I know that FB.Event.subscribe('edge.create', function(response) {} is supposed to run whenever the Like button is clicked. I know that I am probably supposed to use Javascript and maybe Ajax to cause the PHP on fblike.php to run. But after multiple tries, I can't get it to work. What is the specific Ajax code that I could include within the Facebook Event? Do I need to do anything to the Like button code to allow the Facebook Event to work? $submissionid = $_POST['submissionid']; $uid = $_POST['uid']; mysql_connect("server", "username", "password") or die(mysql_error()); mysql_select_db("database") or die(mysql_error()); $q = "INSERT INTO fblikes VALUES (NULL, '$submissionid', '$uid', NULL)"; $r = mysql_query($q); if($r) { echo "Success!"; } elseif(!$r) { echo "Failed!"; }

    Read the article

  • PHP String to Float

    - by John
    I am not familiar with PHP at all and had a quick question. I have 2 variables @pricePerUnit and @invoicedUnits. Here's the code that is setting these to values: $InvoicedUnits = ((string) $InvoiceLineItem->InvoicedUnits); $pricePerUnit = ((string) $InvoiceLineItem->PricePerUnit); If I output this, I get the correct values. Lets say 5000 invoiced units and 1.00 for price. Now, I need to show the total amount spent. When I multiply these two together it doesn't work (as expected, these are strings). But I have no clue how to parse/cast/convert variables in PHP. What should I do?

    Read the article

  • Using JQuery to Style form elements

    - by John
    Hi, I've seen jquery used to change a form select drop down box in to a 'pretty' drop down list widget. I can't remember where I saw this but does anyone have any links or example code which show examples of how to use jquery to style form elements? I'd prefer it if it was code rather than a built in plug in. Thanks

    Read the article

  • Non-empty list with null elements returned from Hibernate query

    - by John
    Hi, I'm new to hibernate so not sure if this is an expected behaviour, anyway: Session session = (Session)entityManager.getDelegate(); Criteria criteria = session.createCriteria(myRequest.class); criteria.add(Restrictions.eq("username", username)); criteria.setProjection(Projections.max("accesscount")); List<myRequest> results = criteria.list(); The returned results is a non-empty list with a single null element. I can't think of any reason why it should behave this way, any idea if this is the expected behaviour or have I done something wrong? System is on hibernate/Syabse. Thanks.

    Read the article

  • simplify in declaring variables value in php

    - by Robert John Concepcion
    $jan5 = 0; $feb5 = 0; $mar5 = 0; $apr5 = 0; $may5 = 0; $jun5 = 0; $jul5 = 0; $aug5 = 0; $sep5 = 0; $oct5 = 0; $nov5 = 0; $dec5 = 0; $jan4 = 0; $feb4 = 0; $mar4 = 0; $apr4 = 0; $may4 = 0; $jun4 = 0; $jul4 = 0; $aug4 = 0; $sep4 = 0; $oct4 = 0; $nov4 = 0; $dec4 = 0; $jan3 = 0; $feb3 = 0; $mar3 = 0; $apr3 = 0; $may3 = 0; $jun3 = 0; $jul3 = 0; $aug3 = 0; $sep3 = 0; $oct3 = 0; $nov3 = 0; $dec3 = 0; this is the most time consuming code when i try to make for example i want the default value of $jan5 is equal to zero.. can some one teach me how to make this short? thank you so much for reading $date = 'smi_initialdate'; $level = 'smi_level'; $year = '2012'; $result1 = mysql_query("SELECT *, DATE_FORMAT( $date, '%m' ) As monthz FROM eis_mngt_sales_iti WHERE year($date) = '$year' ORDER BY $date"); while($row=mysql_fetch_array($result1)) { $count++; if($row['smi_level']=='5star') { if($row['monthz']==1) { $jan++; }elseif($row['monthz']==2) { $feb++; }elseif($row['monthz']==3) { $mar++; }elseif($row['monthz']==4) { $apr++; }elseif($row['monthz']==5) { $may++; }elseif($row['monthz']==6) { $jun++; }elseif($row['monthz']==7) { $jul++; }elseif($row['monthz']==8) { $aug++; }elseif($row['monthz']==9) { $sep++; }elseif($row['monthz']==10) { $oct++; }elseif($row['monthz']==11) { $nov++; }elseif($row['monthz']==12) { $dec++; } } } i decide to put this $jan5 = 0;$feb5 = 0;$mar5 = 0;$apr5 = 0;$may5 = 0;$jun5 = 0;$jul5 = 0; so that if the data did not pass to this condition if($row['smi_level']=='5star') they have the return value of zero(0). so that my output can adapt in this code [<?php echo$jan5.",".$feb5.",".$mar5.",".$apr5.",".$may5.",".$jun5.",".$jul5.",".$aug5.",".$sep5.",".$oct5.",".$nov5.",".$dec5; ?] if a dont use the above code the $jan5 = 0;$feb5 = 0;$mar5 = 0;$apr5 = 0;$may5 = 0;$jun5 = 0;$jul5 = 0;................ when i echo or print it i look like this 1,2,5,11,12 but with the use of that(the first sample code above) the output will be 1,0,0,0,0,0,0,1,2,5,11,12. thank, sorry if this became confusing, sorry about my grammar

    Read the article

  • Weird CSS behavior... removing a 1px border makes <DIV> move about 20px

    - by John
    I have the following: CSS #pageBody { height: 500px; padding:0; margin:0; /*border: 1px solid #00ff00;*/ } #pageContent { height:460px; margin-left:35px; margin-right:35px; margin-top:30px; margin-bottom:30px; padding:0px 0 0 0; } HTML <div id="pageBody"> <div id="pageContent"> <p> blah blah blah </p> </div> </div> </div> If I uncomment the border line in pageBody, everything fits sweetly... I had the border on to verify things were as expected. But removing the border, pageBody drops down the page about 20px, while pageContent does not appear to move at all. Now this is not the real page, but a subset. If nothing's obvious I can attempt to generate a working minimal sample, but I thought there might be an easy quick answer first. I see the same exact problem in Chrome and IE8, suggesting it's me not the browser. Any tips where to look? I wondered maybe the 1px border was some tipping point making the contents of a div just too big, but changing #pageContent height to e.g 400 makes no difference, other than clipping the bottom off that div.

    Read the article

  • Port AS3/Flex app to iPhone

    - by John
    I believe Adobe tools like CS5 have ways to output as an iPhone app, but what about a regular AS3 or Flex project? Are there any tools to auto-port, or AS3/Flex iPhone implementations out there? Out of interest, how does the CS5 thing work? Is it a totally different code-path or something less drastic? For instance Flash supports Shapes and Timelines, etc... do they in fact provide an iPhone Flash runtime of some sort?

    Read the article

  • Very basic database theory.

    - by John R
    I have a set of tables to show the relationship between organziations and supporters below. Although I have done some basic mySQL querries, I know very little about database 'design'. I plan to querry the database for: -a list of contributors to a specific organization... or, -a list of organizations that a specific suporter supports. The database tables for organiations and contributors may have other columns in the future and recieve a lesser amount of querries based on that information. A | X A | Y A | Z B | X B | Y C | X C | Z How should the tables be set up? I assume that there should be a third table, but there is still redundent information in the third table. Is there a better way of setting up the tables? +----+-------+ +-------------+----------+ +----+-------+ | id | org | | org | contr | | id | contr.| +----+-------+ +-------------+----------+ +----+-------+ | 1 | A | | 1 | 1 | | 1 | X | | 2 | B | | 1 | 2 | | 2 | Y | | 3 | C | | 1 | 3 | | 3 | Z | +----+-------+ | 2 | 1 | +----+-------+ | 2 | 2 | | 3 | 1 | | 3 | 3 | +-------------+----------+

    Read the article

  • Best way to add/change 1 GET value while keeping others?

    - by John Isaacks
    How can I make a link that justs adds or changes 1 GET var while maintaining all others? I have a page that is created using different GET vars. So it will be like mypage.php?color=red&size=7&brand=some%20brand So I want to have a link that sets it to page=2 or size=8. Whats the easiest way to have a link do that without reseting all the other vars? I hope that makes sense, let me know if I need to further explain anything

    Read the article

< Previous Page | 136 137 138 139 140 141 142 143 144 145 146 147  | Next Page >