Search Results

Search found 11277 results on 452 pages for 'jeff certain'.

Page 78/452 | < Previous Page | 74 75 76 77 78 79 80 81 82 83 84 85  | Next Page >

  • synchronizing reads to a java collection

    - by jeff
    so i want to have an arraylist that stores a series of stock quotes. but i keep track of bid price, ask price and last price for each. of course at any time, the bid ask or last of a given stock can change. i have one thread that updates the prices and one that reads them. i want to make sure that when reading no other thread is updating a price. so i looked at synchronized collection. but that seems to only prevent reading while another thread is adding or deleting an entry to the arraylist. so now i'm onto the wrapper approach: public class Qte_List { private final ArrayList<Qte> the_list; public void UpdateBid(String p_sym, double p_bid){ synchronized (the_list){ Qte q = Qte.FindBySym(the_list, p_sym); q.bid=p_bid;} } public double ReadBid(String p_sym){ synchronized (the_list){ Qte q = Qte.FindBySym(the_list, p_sym); return q.bid;} } so what i want to accomplish with this is only one thread can be doing anything - reading or updating an the_list's contents - at one time. am i approach this right? thanks.

    Read the article

  • Are there design-time watch windows for Visual Studio 2008/2010?

    - by Jeff
    There are many times when I need to test a little snippet of .net code but rebuilding and publishing the entire project or writing a suite of unit tests just seems like overkill. For example, I am writing a regular expression right now and I want to see if it the pattern is matching on the right parts. I could go and find a million other utilities that do that sort of thing, but that is not exactly my point. FireBug has an exact analogue to what I want - the FireBug console. There is a text box where the user can enter some JavaScript and FireBug will execute it on the spot and display the return value. I would love to be able to enter something like (new Regex("b+")).Replace("abc", "x") and see the results without having to do all the overhead. Does VS have anything like this?

    Read the article

  • jquery filtering content before specific string

    - by jeff
    Is is possible remove all content before a specific string with jquery? For instance say I wanted to strip all the text before the word "subcommittee" in this example below. How would I do that? With losses mounting among hoteliers, fishermen and others whose livelihoods have been curtailed by the spill, frustration is "rapidly escalating" along the Gulf Coast alive." Linn told a House Energy and Commerce subcommittee Monday that the amount of money BP has paid local residents for their losses has typically been about $5,000, a sum he dismissed as "a marketing ploy." Businesses such as his vacation rental company are borrowing money to pay their overhead costs, which he called "the only way we're going to keep our business alive."

    Read the article

  • How to publish to Facebook fan/business pages (not user profiles)

    - by Jeff Putz
    I'm trying to figure out if fan/business pages are conceptually similar to regular user pages. My end goal is to publish events from a third-party Web site (new content, announcements, etc.) into the FB page that promotes the third-party site. I'm not sure where to start exactly. Been looking at the .NET Facebook SDK, and it seems focused on FB apps and authentication. Not sure where I should be looking. Help is appreciated!

    Read the article

  • ios - almost there with updating Core Data

    - by Jeff Kranenburg
    I have been following the answer of this question: How to update existing object in core data? and in the answer it comes across this line of code to update a record within the array: Favorits* favoritsGrabbed = [results objectAtIndex:0]; Now this updates whatever is set a record 0 of the database, no matter what cell I select to edit. I am sorry but I cannot figure out how to change it into updating the cell I have selected. Starting to grow grey hairs here:-) The problem (maybe it is my mindset) is that I am required to give an integer and I am unable to find something to substitute it. Any help would be great.

    Read the article

  • Question about software that tracks divs better than notepad++

    - by Jeff
    I recently got hired as a web developer, and the project that I am overseeing has a formatting issue on one of the pages because one of the divs is out of whack. It is a fairly complex page with quite a bit of php, and from what I can gather, I am missing a </div> tag somewhere, and accordingly everything is messed up. I am currently using notepad++, which is decent at lining up divs, meaning that if you click on the opening div tag, it will highlight purple and also highlight the closing one. But it seems as though if you have div tags that span several lines (hundreds) it won't work. Has anyone else run into a similar situation? Is there a better editor I could be using that would do a better job of helping me with my div issue? Or do I have to go through and line up the divs 1 by 1? (there are like over 100). Please let me know!! Thanks

    Read the article

  • Adding Names to columns in a matrix

    - by Jeff
    I have my matrix I have created, a pic found here. http://s816.photobucket.com/albums/zz83/gavakie/?action=view&current=matrix.jpg The first three column what whats being grouped by but I can had the names of those columns, how can I do that in Reporting Services?

    Read the article

  • Parameterizing a SQL IN clause?

    - by Jeff Atwood
    How do I parameterize a query containing an IN clause with a variable number of arguments, like this one? select * from Tags where Name in ('ruby','rails','scruffy','rubyonrails') order by Count desc In this query, the number of arguments could be anywhere from 1 to 5. I would prefer not to use a dedicated stored procedure for this (or XML), but if there is some fancy SQL Server 2008 specific way of doing it elegantly, I am open to that.

    Read the article

  • SQL Modify question

    - by Jeff
    I need to replace a lot of values for a Table in SQL if the inactivity is greater then 30 days. I have UPDATE VERSION SET isActive = 0 WHERE customerNo = ( SELECT c.VersionNo FROM Activity b INNER JOIN VERSION c ON b.VersionNo = c.VersionNo WHERE (Months_between(sysdate, b.Activitye) > 30) ); It only works for one value though, if there is more then one returned it fails. What am I missing here? If someone could educate me on what is going on, I'd also appreciate it.

    Read the article

  • How can I treat a sequence value like a generated key?

    - by Jeff Knecht
    Here is my situation and my constraints: I am using Java 5, JDBC, and DB2 9.5 My database table contains a BIGINT value which represents the primary key. For various reasons that are too complicated to go into here, the way I insert records into the table is by executing an insert against a VIEW; an INSTEAD OF trigger retrieves the NEXT_VAL from a SEQUENCE and performs the INSERT into the target table. I can change the triggers, but I cannot change the underlying table or the general approach of inserting through the view. I want to retrieve the sequence value from JDBC as if it were a generated key. Question: How can I get access to the value pulled from the SEQUENCE. Is there some message I can fire within DB2 to float this sequence value back to the JDBC driver?

    Read the article

  • How to combine Option values in Scala?

    - by Jeff
    Hi! I want to be able to apply an operation f: (T,T) => T to two Option[T] values in Scala. I want the result to be None if any of the two values is None. More specifically, I want to know if is there a shorter way to do the following: def opt_apply[T](f: (T,T) => T, x: Option[T], y: Option[T]): Option[T] = { (x,y) match { case (Some(u),Some(v)) => Some(f(u,v)) case _ => None } } I have tryied (x zip y) map {case (u,v) => f(u,v)} but the result is an Iterator[T] not an Option[T]. Any help will be appreciated. Thanks.

    Read the article

  • ASP error 424 Object required

    - by jeff
    I've got a problem with the following code pasted below, the problem seems to be coming from the openastextstream this carries on from another question: Set str_text_stream = obj_file.OpenAsTextStream(ForReading, TristateUseDefault) response.Write "<table>" int_j = 0 int_x = 0 Err.number = 0 Do While Not str_text_stream.AtEndOfStream str_po_insert_sql = "INSERT into tbl_purchase_orders (purchase_order_number, purchase_order_vendor_number, purchase_order_vendor_name) " str_po_insert_sql = str_po_insert_sql & " VALUES (" str_line = str_text_stream.readline arr_line = Split(str_line, """,""", -1) if Ubound(arr_line) <> 2 then Response.write "<tr><td>The line " & str_line & " could not be imported.</td></tr>" int_x = 1 else int_y = Instr(arr_line(2), """,") - 1 str_field_0 = Replace(arr_line(0), """", "") str_field_0 = Replace(str_field_0, "'", "''") str_field_1 = Replace(arr_line(1), "'", "''") str_field_2 = Left(arr_line(2), int_y) str_field_2 = Replace(str_field_2, "'", "''") str_po_insert_sql = str_po_insert_sql & "'" & str_field_0 & "', '" & arr_line(1) & "', '" & str_field_2 & "')" rs_po_insert.Open str_po_insert_sql, dbConnection, 3 if Err.number <> 0 then Response.write "<tr><td>The line " & str_po_insert_sql & " was imported.</td></tr>" end if Err.number = 0 int_j = int_j + 1 end if loop data from test import: "4501366934","800002","Clancy Docwra Ltd",04/05/2010 00:00:00 "4501366935","800004","Clancy Docwra Ltd",04/05/2010 00:00:00 "4501366936","800004","Clancy Docwra Ltd",04/05/2010 00:00:00

    Read the article

  • Php Syntax Error

    - by Jeff Cameron
    I'm trying to update a table in php and I keep getting syntax errors. Here's what I've got: if (isset($_POST['inspect'])) { // get gis_id from pole table to update fm_poles $sql = "select gis_id from poles where pole_number = '".$_GET['polenumber']."'"; $rs = pg_query($sql) or die('Query failed: ' . pg_last_error()); $gisid = $row['gis_id']; pg_free_result($rs); // update fm_poles $sql = "update fm_poles set inspect ='".$_POST['inspect']."',co_date = '".$_POST['co_date']."',size = '".$_POST['size']."',date = ".$_POST['date'].",brand ='".$_POST['brand']."',backspan = ".$_POST['backspan']." WHERE gis_id = ".$gisid.""; print $sql."<BR>\n"; $rs = pg_query($sql) or die('Query failed: ' . pg_last_error()); pg_free_result($rs); } This is the error it gives me: update fm_poles set inspect ='20120208',co_date = '20030710',size = '30-5',date = 0,brand ='test',backspan = 300 WHERE gis_id = The error message: Query failed: ERROR: syntax error at end of input at character 129

    Read the article

  • Nhiberate, multiple tables, same class

    - by jeff
    It's been asked a million times, its like this. Say Invoice is the base class and InvoiceHistory is the class that simply inherits from Invoice. When I do something like invoiceList = session.CreateCriteria(typeof(Invoice)).List(); I get everything from Invoice (that I want, plus everything from InvoiceHistory). Do I need to have an InvoiceBase and create derived versions for Invoice and InvoiceHistory?

    Read the article

  • Apache RewriteRule not rewriting as expected

    - by Jeff
    Can you any one see anything wrong with the following apache rewrite rule: This is in my .htaccess file inside a folder called "text" a subdirectory of localhost/lombardpress I have the following rule Options +FollowSymlinks RewriteEngine on RewriteRule ([^/]+) /textdisplay.php?fs=$1 [NC] I was expecting this input: http://localhost/lombardpress-dev/text/lectio1 to rewrite to this: http://localhost/lombardpress-dev/text/textdisplay?fs=lectio1 But instead I get a 404 error. The requested URL /textdisplay.php was not found on this server. It looks to me like the RewriteRule has re-written the address but not as I intended - so there must be something wrong with my regular expression. Let me know if I can provide further information.

    Read the article

  • Passing a NSString to another ViewController using classes

    - by Jeff Kranenburg
    I know this insanely simple, but I am re-teaching myself the basics and trying to get my head around this:-) I have one ViewController called MainVC and I have one called ClassVC In ClassVC I have this code: @interface ClassVC : UIViewController { NSString *mainLine; } @property (nonatomic, retain) NSString *mainLine; @end and I have this in the implementation file: @synthesize mainLine = _mainLine; -(NSString *)_mainLine { _mainLine = @"This a string from a Class"; return _mainLine; } Now I was thinking that if I #import the ClassVC into MainVC I would be able to transfer that string along as well like so: This code is in the viewDidLoad _mainLabel.text = _secondClass.mainLine; NSLog(@"%@", _secondClass.mainLine); But that is not working - so cannot I not pass strings in through this way???

    Read the article

  • Grails views for subclasses

    - by Jeff Beck
    I have a domain object called page that only has a title, I then have subclasses what are StaticPage that also has a textblock and PicturePage that contains a url. I have a site object that has many pages, I am looking for a way in the view for the site to call the a different template for each subclass. I can easily iterate through the pages but I would like to call each subclasses own view.

    Read the article

  • best alternative to in-definition initialization of static class members? (for SVN keywords)

    - by Jeff
    I'm storing expanded SVN keyword literals for .cpp files in 'static char const *const' class members and want to store the .h descriptions as similarly as possible. In short, I need to guarantee single instantiation of a static member (presumably in a .cpp file) to an auto-generated non-integer literal living in a potentially shared .h file. Unfortunately the language makes no attempt to resolve multiple instantiations resulting from assignments made outside class definitions and explicitly forbids non-integer inits inside class definitions. My best attempt (using static-wrapping internal classes) is not too dirty, but I'd really like to do better. Does anyone have a way to template the wrapper below or have an altogether superior approach? // Foo.h: class with .h/.cpp SVN info stored and logged statically class Foo { static Logger const verLog; struct hInfoWrap; public: static hInfoWrap const hInfo; static char const *const cInfo; }; // Would like to eliminate this per-class boilerplate. struct Foo::hInfoWrap { hInfoWrapper() : text("$Id$") { } char const *const text; }; ... // Foo.cpp: static inits called here Foo::hInfoWrap const Foo::hInfo; char const *const Foo::cInfo = "$Id$"; Logger const Foo::verLog(Foo::cInfo, Foo::hInfo.text); ... // Helper.h: output on construction, with no subsequent activity or stored fields class Logger { Logger(char const *info1, char const *info2) { cout << info0 << endl << info1 << endl; } }; Is there a way to get around the static linkage address issue for templating the hInfoWrap class on string literals? Extern char pointers assigned outside class definitions are linguistically valid but fail in essentially the same manner as direct member initializations. I get why the language shirks the whole resolution issue, but it'd be very convenient if an inverted extern member qualifier were provided, where the definition code was visible in class definitions to any caller but only actually invoked at the point of a single special declaration elsewhere. Anyway, I digress. What's the best solution for the language we've got, template or otherwise? Thanks!

    Read the article

  • Flipping an image using a one dimensional array of characters.

    - by Jeff
    I have the data of an image loaded into memory as a one dimensional array. Since I'm trying to use OpenGL to draw it, and since it reads from the bottom up, I want to try and flip the elements of the array before they're sent to OpenGL. Maybe there's a way to tell OpenGL to read from the top to the bottom? Anyways, I tried using a few methods of sorting arrays and they also flip the image horizontally, which is very much like the original problem. So can I flip the data only one way?

    Read the article

  • MySql php: check if Row exists

    - by Jeff
    This is probably an easy thing to do but I'm an amateur and things just aren't working for me. I just want to check and see if a row exists where the $lectureName shows. If a row does exist with the $lectureName somewhere in it, I want the function to return "assigned" if not then it should return "available". Here's what I have. I'm fairly sure its a mess. Please help. function checkLectureStatus($lectureName) { $con = connectvar(); mysql_select_db("mydatabase", $con); $result = mysql_query("SELECT * FROM preditors_assigned WHERE lecture_name='$lectureName'"); while($row = mysql_fetch_array($result)); { if (!$row[$lectureName] == $lectureName) { mysql_close($con); return "Available"; } else { mysql_close($con); return "Assigned"; } } When I do this everything return available, even when it should return assigned.

    Read the article

  • Can I dynamically adjust the height of a css set div border?

    - by Jeff
    Ok so I have a div that contains a few forms that have dynamically generated content. There are categories, that if you click on, slide/toggle down to reveal that categories sub-contents, or projects. Right now, I have it setup so that if the height of the div expands to exceed a set amount, a scroll bar shows up at the side, and the user can scroll down and see the content. NOW I am being asked to get rid of the scroll bar, and just have the div's border (which is just 1px set in the css) height adjust dynamically with the height of the div's content...can I even do that? Is there some sort of jquery animation that would allow that? A point in the right direction would be greatly appreciated!! Thanks

    Read the article

  • (database) im trying to create a form in access 2007 with 2 drop down boxes to view a report by state or name

    - by jeff orris
    im an intern at a database mngmt company and the boss is training me in access...i took the access tutorials and were definitely not enough info involved to do a what seems a simple task.my problem is this: i have a simple table with contact info with 16 colums (Local_Utility, Requested_User_Type, First_Name, Last_Name, Address 1, Address 2, Country, State, City, Zip, Phone_Number, Username\Email, Password, Confirm Password, and Parcel_Number), with 6 rows of names (keep in mind this is just a test to help me from the boss) I created a form and with 2 drop down boxes (Last Name and State) and im trying to create a view button to view an individual report for a query i made for just simple contact info with 6 colums (Last_Name, First_Name, Address1, City, State, and Phone_Number) Problem1 is that i can view the query with the view by name or state button but cant view a simple individual report from the query using the button Problem2 is that for criteria on the query i put Forms!frmMyparamForm!txtMyStateParamField for the state drop box it works, but when i use Forms!frmMyparamForm!txtMyNameParamField it doesnt and that annoying parameter box pops up Problem3 is that after i close the query, all the states and names in my dropdown box on the form disappear Im a beginner at this please help me

    Read the article

< Previous Page | 74 75 76 77 78 79 80 81 82 83 84 85  | Next Page >