Search Results

Search found 344 results on 14 pages for 'sarah boyd'.

Page 7/14 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • Getting data from array of DataSet objects returned from web service

    - by Sarah Vessels
    I have a web service that I want to access when it is added as a web reference to my C# project. A particular method in the web service takes a SQL query string and returns the results of the query as a custom type. When I add the web service reference, the method shows up as returning DataSet[] instead of the custom type. This is fine provided I can still somehow access the data returned from the query within those DataSet objects. I ran a particular query that should return 6 rows; I got back a DataSet[] array with 6 elements. However, when I iterate over those DataSet objects, none of them has any tables (via the Tables property on the DataSet). What gives? Where is my data? The web service is tested and works when I use it as a data source in a Report Builder 2.0 report. I am able to send an XML SOAP query to the web service and get back XML results containing my data.

    Read the article

  • Relational database data explorer / visualization?

    - by Ian Boyd
    Is there a tool that can let one browse relational data as a graph of connected nodes? For example, i'm faced with trying to cleanse some anomolous data. i can start with two offending rows. In this particular example, the TransactionID should, by business rules, be unique to the table, but i find a transaction that violates that rule: SELECT * FROM LCTTrans WHERE TransactionID = 1075048 LCTID TransactionID ========= ============= 4358 1075048 4359 1075048 2 row(s) affected But really what i want to begin to hunt down all the related data, to try to see which is right. So this hypothetical software would start by showing me these two rows: Next, i want to see that transaction that is linked into this table: Now that transaction points to an MAL, so show me that: Now lets add those two LCTs, that the transaction is "on". A transaction can be on only one LCT, yet this one is pointing to two: Okay computer, both of those LCTs point to an MAL and the transaction that created them, show me those: Those last two transactions, they also point at an MAL, and they themselves point to an LCT, show me those: Okay, now are there any entries in LCTTrans that point to LCTs 4358 or 4359?... And so on, and so on. Now i did all this manually, running single selects, copying and pasting uniqueidentifier keys and converting them into friendly id numbers so i could easily see the relationships. Is there software that can do this?

    Read the article

  • .NET: What's the difference between HttpMethod and RequestType of HttpRequest?

    - by Ian Boyd
    The HttpRequest class defines two properties: HttpMethod: Gets the HTTP data transfer method (such as GET, POST, or HEAD) used by the client. public string HttpMethod { get; } The HTTP data transfer method used by the client. and RequestType: Gets or sets the HTTP data transfer method (GET or POST) used by the client. public string RequestType { get; set; } A string representing the HTTP invocation type sent by the client. What is the difference between these two properties? When would i want to use one over the other? Which is the proper one to inspect to see what data transfer method was used by the client? The documentation indicates that HttpMethod will return whatever verb was used: such as GET, POST, or HEAD while the documentation on RequestType seems to indicate only one of two possible values: GET or POST i test with a random sampling of verbs, and both properties seem to support all verbs, and both return the same values: Testing: Client Used HttpMethod RequestType GET GET GET POST POST POST HEAD HEAD HEAD CONNECT CONNECT CONNECT MKCOL MKCOL MKCOL PUT PUT PUT FOOTEST FOOTEST FOOTEST What is the difference between: HttpRequest.HttpMethod HttpRequest.RequestType and when should i use one over the other? Keywords: iis asp.net http httprequest httphandler

    Read the article

  • Segmentation fault in std function std::_Rb_tree_rebalance_for_erase ()

    - by Sarah
    I'm somewhat new to programming and am unsure how to deal with a segmentation fault that appears to be coming from a std function. I hope I'm doing something stupid (i.e., misusing a container), because I have no idea how to fix it. The precise error is Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_INVALID_ADDRESS at address: 0x000000000000000c 0x00007fff8062b144 in std::_Rb_tree_rebalance_for_erase () (gdb) backtrace #0 0x00007fff8062b144 in std::_Rb_tree_rebalance_for_erase () #1 0x000000010000e593 in Simulation::runEpidSim (this=0x7fff5fbfcb20) at stl_tree.h:1263 #2 0x0000000100016078 in main () at main.cpp:43 The function that exits successfully just before the segmentation fault updates the contents of two containers. One is a boost::unordered_multimap called carriage; it contains one or more struct Infection objects that contain two doubles. The other container is of type std::multiset< Event, std::less< Event EventPQ called ce. It is full of Event structs. void Host::recover( int s, double recoverTime, EventPQ & ce ) { // Clearing all serotypes in carriage // and their associated recovery events in ce // and then updating susceptibility to each serotype double oldRecTime; int z; for ( InfectionMap::iterator itr = carriage.begin(); itr != carriage.end(); itr++ ) { z = itr->first; oldRecTime = (itr->second).recT; EventPQ::iterator epqItr = ce.find( Event(oldRecTime) ); assert( epqItr != ce.end() ); ce.erase( epqItr ); immune[ z ]++; } carriage.clear(); calcSusc(); // a function that edits an array cout << "Done with sync_recovery event." << endl; } The last cout << line appears immediately before the seg fault. I hope this is enough (but not too much) information. My idea so far is that the rebalancing is being attempting on ce after this function, but I am unsure why it would be failing. (It's unfortunately very hard for me to test this code by removing particular lines, since they would create logical inconsistencies and further problems, but if experienced programmers still think this is the way to go, I'll try.)

    Read the article

  • Vista/7: How to get glass color?

    - by Ian Boyd
    How do you use DwmGetColorizationColor? The documentation says it returns two values: a 32-bit 0xAARRGGBB containing the color used for glass composition a boolean parameter that is true "if the color is an opaque blend" (whatever that means) Here's a color that i like, a nice puke green: You can notice the color is greeny, and the translucent title bar (against a white background) shows the snot color very clearly: i try to get the color from Windows: DwmGetColorizationColor(dwCcolorization, bIsOpaqueBlend); And i get dwColorization: 0x0D0A0F04 bIsOpaqueBlend: false According to the documentation this value is of the format AARRGGBB, and so contains: AA: 0x0D (13) RR: 0x0A (10) GG: 0x0F (15) BB: 0x04 (4) This supposedly means that the color is (10, 15, 4), with an opacity of ~5.1%. But if you actually look at this RGB value, it's nowhere near my desired snot green. Here is (10, 15, 4) with zero opacity (the original color), and (10,15,4) with 5% opacity against a white/checkerboard background: So the question is: How to get glass color in Windows Vista/7? i tried using DwmGetColorizationColor, but that doesn't work very well. A person with same problem, but a nicer shiny picture to attract you squirrels: So, it boils down to – DwmGetColorizationColor is completely unusable for applications attempting to apply the current color onto an opaque surface. i love this guy's screenshots much better than mine. Using his screenshots as a template, i made up a few more sparklies: For the last two screenshots, the alpha blended chip is a true partially transparent PNG, blending to your browser's background. Cool! (i'm such a geek) Edit 2: Had to arrange them in rainbow color. (i'm such a geek) Edit 3: Well now i of course have to add Yellow. Undocumented/Unsupported/Fragile Workarounds There is an undocumented export from DwmApi.dll at entry point 137, which we'll call DwmGetColorizationParameters: HRESULT GetColorizationParameters_Undocumented(out DWMCOLORIZATIONPARAMS params); struct DWMCOLORIZATIONPARAMS { public UInt32 ColorizationColor; public UInt32 ColorizationAfterglow; public UInt32 ColorizationColorBalance; public UInt32 ColorizationAfterglowBalance; public UInt32 ColorizationBlurBalance; public UInt32 ColorizationGlassReflectionIntensity; public UInt32 ColorizationOpaqueBlend; } We're interested in the first parameter: ColorizationColor. We can also read the value out of the registry: HKEY_CURRENT_USER\Software\Microsoft\Windows\DWM ColorizationColor: REG_DWORD = 0x6614A600 So you pick your poison of creating appcompat issues. You can rely on an undocumented API (which is bad, bad, bad, and can go away at any time) use an undocumented registry key (which is also bad, and can go away at any time) See also Is there a list of valid parameter combinations for GetThemeColor / Visual Styles API How does Windows change Aero Glass color? DWM - Colorization Color Handling Using DWMGetColorizationColor Retrieving Aero Glass base color for opaque surface rendering i've been wanting to ask this question for over a year now. i always knew that it's impossible to answer, and that the only way to get anyone to actually pay attention is to have colorful screenshots; developers are attracted to shiny things. But on the downside it means i had to put all kinds of work into making the lures.

    Read the article

  • Delphi: Fast(er) widestring concatenation

    - by Ian Boyd
    i have a function who's job is to convert an ADO Recordset into html: class function RecordsetToHtml(const rs: _Recordset): WideString; And the guts of the function involves a lot of wide string concatenation: while not rs.EOF do begin Result := Result+CRLF+ '<TR>'; for i := 0 to rs.Fields.Count-1 do Result := Result+'<TD>'+VarAsString(rs.Fields[i].Value)+'</TD>'; Result := Result+'</TR>'; rs.MoveNext; end; With a few thousand results, the function takes, what any user would feel, is too long to run. The Delphi Sampling Profiler shows that 99.3% of the time is spent in widestring concatenation (@WStrCatN and @WstrCat). Can anyone think of a way to improve widestring concatenation? i don't think Delphi 5 has any kind of string builder. And Format doesn't support Unicode. And to make sure nobody tries to weasel out: pretend you are implementing the interface: IRecordsetToHtml = interface(IUnknown) function RecordsetToHtml(const rs: _Recordset): WideString; end; Update One I thought of using an IXMLDOMDocument, to build up the HTML as xml. But then i realized that the final HTML would be xhtml and not html - a subtle, but important, difference. Update Two Microsoft knowledge base article: How To Improve String Concatenation Performance

    Read the article

  • synchronizing XML nodes between class and file using C#

    - by Sarah Vessels
    I'm trying to write an IXmlSerializable class that stays synced with an XML file. The XML file has the following format: <?xml version="1.0" encoding="utf-8" ?> <configuration> <logging> <logLevel>Error</logLevel> </logging> ...potentially other sections... </configuration> I have a DllConfig class for the whole XML file and a LoggingSection class for representing <logging> and its contents, i.e., <logLevel>. DllConfig has this property: [XmlElement(ElementName = LOGGING_TAG_NAME, DataType = "LoggingSection")] public LoggingSection Logging { get; protected set; } What I want is for the backing XML file to be updated (i.e., rewritten) when a property is set. I already have DllConfig do this when Logging is set. However, how should I go about doing this when Logging.LogLevel is set? Here's an example of what I mean: var config = new DllConfig("path_to_backing_file.xml"); config.Logging.LogLevel = LogLevel.Information; // not using Logging setter, but a // setter on LoggingSection, so how // does path_to_backing_file.xml // have its contents updated? My current solution is to have a SyncedLoggingSection class that inherits from LoggingSection and also takes a DllConfig instance in the constructor. It declares a new LogLevel that, when set, updates the LogLevel in the base class and also uses the given DllConfig to write the entire DllConfig out to the backing XML file. Is this a good technique? I don't think I can just serialize SyncedLoggingSection by itself to the backing XML file, because not all of the contents will be written, just the <logging> node. Then I'd end up with an XML file containing only the <logging> section with its updated <logLevel>, instead of the entire config file with <logLevel> updated. Hence, I need to pass an instance of DllConfig to SyncedLoggingSection. It seems almost like I want an event handler, one in DllConfig that would notice when particular properties (i.e., LogLevel) in its properties (i.e., Logging) were set. Is such a thing possible?

    Read the article

  • IWebBrowser: How to specify the encoding when loading html from a stream?

    - by Ian Boyd
    Using the concepts from the sample code provided by Microsoft for loading HTML content into an IWebBrowser from an IStream using the web browser's IPersistStreamInit interface: HRESULT LoadWebBrowserFromStream(IWebBrowser* pWebBrowser, IStream* pStream) { [snip] } How can one specify the encoding of the html inside the IStream? The IStream will contain a series of bytes, but the problem is what do those bytes represent? They could, for example, contain bytes where: each byte represents a character from the current Windows code-page (e.g. 1252) each byte could represent a character from the ISO-8859-1 character set the bytes could represent UTF-8 encoded characters every 2 bytes could represent a character, using UTF-16 encoding In my particular case, i am providing the IWebBrowser an IStream that contains a series of double-bytes characters (UTF-16), but the browser (incorrectly) believes that UTF-8 encoding is in effect. This results in garbled characters.

    Read the article

  • Set HTML dropdown selected option using JSTL

    - by sarah
    In the same context i have another query ${productSubCategoryList} and the corresponding setting in request is like for(int i=0;i } here i have multiple select drop down ,even though i get the return value from for as two ,in the UI only one data is getting higlighted not the second one,What is wrong in the code ?

    Read the article

  • On Ubuntu, how do you install a newer version of python and keep the older python version?

    - by Trevor Boyd Smith
    Background: I am using Ubuntu The newer python version is not in the apt-get repository (or synaptic) I plan on keeping the old version as the default python when you call "python" from the command line I plan on calling the new python using pythonX.X (X.X is the new version). Given the background, how do you install a newer version of python and keep the older python version? I have downloaded from python.org the "install from source" *.tgz package. The readme is pretty simple and says "execute three commands: ./configure; make; make test; sudo make install;" If I do the above commands, will the installation overwrite the old version of python I have (I definitely need the old version)?

    Read the article

  • ADO/SQL Server: What is the error code for "timeout expired"?

    - by Ian Boyd
    i'm trying to trap a "timeout expired" error from ADO. When a timeout happens, ADO returns: Number: 0x80040E31 (DB_E_ABORTLIMITREACHED in oledberr.h) SQLState: HYT00 NativeError: 0 The NativeError of zero makes sense, since the timeout is not a function of the database engine (i.e. SQL Server), but of ADO's internal timeout mechanism. The Number (i.e. the COM hresult) looks useful, but the definition of DB_E_ABORTLIMITREACHED in oledberr.h says: Execution stopped because a resource limit was reached. No results were returned. This error could apply to things besides "timeout expired" (some potentially server-side), such as a governor that limits: CPU usage I/O reads/writes network bandwidth and stops a query. The final useful piece is SQLState, which is a database-independent error code system. Unfortunately the only reference for SQLState error codes i can find have no mention of HYT00. What to do? What do do? Note: i can't trust 0x80040E31 (DB_E_ABORTLIMITREACHED) to mean "timeout expired", anymore than i could trust 0x80004005 (E_UNSPECIFIED_ERROR) to mean "Transaction was deadlocked on lock resources with another process and has been chosen as the deadlock victim". My pseudo-question becomes: does anyone have documentation on what the SQLState "HYT000" means? And my real question still remains: How can i specifically trap an ADO timeout expired exception thrown by ADO? Gotta love the questions where the developer is trying to "do the right thing", but nobody knows how to do the right thing. Also gotta love how googling for DB_E_ABORTLIMITREACHED and this question is #9, with MSDN nowhere to be found. Update 3 From the OLEdb ICommand.Execute reference: DB_E_ABORTLIMITREACHED Execution has been aborted because a resource limit has been reached. For example, a query timed out. No results have been returned. "For example", meaning not an exhaustive list.

    Read the article

  • problem in accessing the path involving pagination using display tag

    - by sarah
    Hi All, I am using display tag for pagiantion and display of the data in table format the code is like <display:column title="Select" style="width: 90px;"> <input type="checkbox" name="optionSelected" value="<c:out value='${userList.loginName}'/>"/> </display:column> <display:column property="loginName" sortable="false" title="UserName" paramId="loginName" style="width: 150px; text-align:center" href="./editUser.do?method=editUser"/> the pagesize is one it will display one in a page and eidt page will be dispaly on click of login name,but when i go to the second page i get an error saying /views/editUser path not found.How exactly should i define the path ? the struts-config is like <!-- action for edit user --> <action path="/editUser" name="editUserForm" type="com.actions.UserManagementAction" parameter="method" input="/EditUser.jsp" scope="request"> <forward name="success" path="/views/EditUser.jsp" /> <forward name="failure" path="/views/failure.jsp" /> </action> Pleas tell me how should i define the access path for display tag as on click of edit link the first page works but not the second edit

    Read the article

  • Delphi: How to set the default project in a project group?

    - by Ian Boyd
    i have two projects in a project group: ProjectA ProjectB Whenever i open the ProjectGroup.bpg in Delphi, it always starts with the 2nd project as the active one: ProjectA ProjectB And every time i have to flip it to the the "real" project: ProjectA ProjectB How can i make ProjectA the default project that opens with the project group? ProjectGroup.bpg #------------------------------------------------------------------------------ VERSION = BWS.01 #------------------------------------------------------------------------------ !ifndef ROOT ROOT = $(MAKEDIR)\.. !endif #------------------------------------------------------------------------------ MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$** DCC = $(ROOT)\bin\dcc32.exe $** BRCC = $(ROOT)\bin\brcc32.exe $** #------------------------------------------------------------------------------ PROJECTS = ProjectA.exe ProjectB.exe #------------------------------------------------------------------------------ default: $(PROJECTS) #------------------------------------------------------------------------------ ProjectA.exe: ProjectA.dpr $(DCC) ProjectB.exe: childfolder\ProjectB.dpr $(DCC)

    Read the article

  • Help with infrequent segmentation fault in accessing struct

    - by Sarah
    I'm having trouble debugging a segmentation fault. I'd appreciate tips on how to go about narrowing in on the problem. The error appears when an iterator tries to access an element of a struct Infection, defined as: struct Infection { public: explicit Infection( double it, double rt ) : infT( it ), recT( rt ) {} double infT; // infection start time double recT; // scheduled recovery time }; These structs are kept in a special structure, InfectionMap: typedef boost::unordered_multimap< int, Infection > InfectionMap; Every member of class Host has an InfectionMap carriage. Recovery times and associated host identifiers are kept in a priority queue. When a scheduled recovery event arises in the simulation for a particular strain s in a particular host, the program searches through carriage of that host to find the Infection whose recT matches the recovery time (double recoverTime). (For reasons that aren't worth going into, it's not as expedient for me to use recT as the key to InfectionMap; the strain s is more useful, and coinfections with the same strain are possible.) assert( carriage.size() > 0 ); pair<InfectionMap::iterator,InfectionMap::iterator> ret = carriage.equal_range( s ); InfectionMap::iterator it; for ( it = ret.first; it != ret.second; it++ ) { if ( ((*it).second).recT == recoverTime ) { // produces seg fault carriage.erase( it ); } } I get a "Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_INVALID_ADDRESS at address..." on the line specified above. The recoverTime is fine, and the assert(...) in the code is not tripped. As I said, this seg fault appears 'randomly' after thousands of successful recovery events. How would you go about figuring out what's going on? I'd love ideas about what could be wrong and how I can further investigate the problem.

    Read the article

  • Iterator failure while moving over equal_range in Boost MultiIndex container

    - by Sarah
    I'm making some mistake with my iterators, but I can't see it yet. I have a Boost MultiIndex container, HostContainer hmap, whose elements are boost::shared_ptr to members of class Host. All the indices work on member functions of class Host. The third index is by Host::getHousehold(), where the household member variable is an int. Below, I'm trying to iterate over the range of Hosts matching a particular household (int hhold2) and load the corresponding private member variable Host::id into an array. I'm getting an "Assertion failed: (px != 0), function operator-, file /Applications/boost_1_42_0/boost/smart_ptr/shared_ptr.hpp, line 418" error in runtime when the household size is 2. (I can't yet tell if it happens anytime the household size is 2, or if other conditions must be met.) typedef multi_index_container< boost::shared_ptr< Host >, indexed_by< hashed_unique< const_mem_fun<Host,int,&Host::getID> >, // 0 - ID index ordered_non_unique< const_mem_fun<Host,int,&Host::getAgeInY> >, // 1 - Age index ordered_non_unique< const_mem_fun<Host,int,&Host::getHousehold> > // 2 - Household index > // end indexed_by > HostContainer; typedef HostContainer::nth_index<2>::type HostsByHH; // inside main() int numFamily = hmap.get<2>().count( hhold2 ); int familyIDs[ numFamily ]; for ( int f = 0; f < numFamily; f++ ) { familyIDs[ f ] = 0; } int indID = 0; int f = 0; std::pair< HostsByHH::iterator, HostsByHH::iterator pit = hmap.get<2().equal_range( hhold2 ); cout << "\tNeed to update households of " << numFamily << " family members (including self) of host ID " << hid2 << endl; while ( pit.first != pit.second ) { cout << "Pointing at new family member still in hhold " << ((pit.first))-getHousehold() << "; " ; indID = ((pit.first) )-getID(); familyIDs[ f ] = indID; pit.first++; f++; } What could make this code fail? The above snippet only runs when numFamily 1. (Other suggestions and criticisms are welcome too.) Thank you in advance.

    Read the article

  • XSLT: Is there a way to "inherit" canned functionality?

    - by Ian Boyd
    i am once again having to cobble together a bit of XSLT into order to turn generated XML into (rather than simply generating HTML). i'm having huge deja-vu this time again. i'm once again having to solve again basic problems, e.g.: how to convert characters into valid html entity references how to preserve whitespace/carriage returns when converting to html how to convert to HTML as opposed to xhtml how to convert dates from xml format into presentable format how to tear apart strings with substring This is all stuff that i've solved many times before. But every time i come back to XSLT i have to start from scratch, re-inventing the wheel every time. If it were a programming language i would have a library of canned functions and procedures i can call. i would have subroutines to perform the commonly repeated tasks. i would inherit from a base class that already implements the ugly boilerplate stuff. Is there any way in XSLT to grow, expand and improve the ecosystem with canned code?

    Read the article

  • Python: finding lowest integer

    - by sarah
    I have the following code: l = ['-1.2', '0.0', '1'] x = 100.0 for i in l: if i < x: x = i print x The code should find the lowest value in my list (-1.2) but instead when i print 'x' it finds the value is still 100.0 Where is my code going wrong?

    Read the article

  • ObjectDisposedException when outputting to console

    - by Sarah Vessels
    If I have the following code, I have no runtime or compilation problems: if (ConsoleAppBase.NORMAL_EXIT_CODE == code) { StdOut.WriteLine(msg); } else { StdErr.WriteLine(msg); } However, in trying to make this more concise, I switched to the following code: (ConsoleAppBase.NORMAL_EXIT_CODE == code ? StdOut : StdErr ).WriteLine(msg); When I have this code, I get the following exception at runtime: System.ObjectDisposedException: Cannot write to a closed TextWriter Can you explain why this happens? Can I avoid it and have more concise code like I wanted?

    Read the article

  • Floats will not align, stay staggered, can't find a solution?

    - by Sarah Proper
    What I am trying to do is build a multi column layout. The main two sections are divided 2/3 to 1/3 and inside the 2/3 column is divided 2/3 1/3 as well. My problem is that my floats will not align nicely with each other, choosing instead to stagger like stairs. I have tried declaring the widths smaller, floating them individually, including in the float sections display:block,inline, or inline-block and nothing seems to be working. I am getting really frustrated and would appreciate any help! Thanks! <div class="wrapper"> <div class="width50" style="float:left;"> <h1>Our Mission:</h1> <p> Bacon ipsum dolor sit amet swine spare ribs pork meatloaf pancetta filet mignon. Rump frankfurter pork belly prosciutto beef boudin andouille pig pork chop meatball ham drumstick filet mignon. Strip steak flank shank pig, tongue tri-tip jowl leberkas sirloin brisket t-bone. Ground round spare ribs salami capicola filet mignon. Capicola turkey t-bone corned beef sausage ham hock. Corned beef capicola leberkas pork chop, swine pastrami drumstick. Frankfurter fatback bacon jowl short loin, jerky pancetta bresaola corned beef shoulder drumstick ball tip tri-tip.</p> <div class="width50 float-left"> <img src="@Url.StaticContent(Links.Content.images.map_homepage_png)" alt="Map" /> </div> <div class="width33 float-right"> <img src="@Url.StaticContent(Links.Content.images.address_line_text_png)" alt="addressline" /> <br /> <h3>address</h3> <b>405 Empire Boulevard<br /> Rochester, NY 14609 </b> </div> </div> <div class="width33" style="float:right;"> <h1>Events</h1> <ul class="events"> <li> <h2>Fall Volunteer Festival</h2> <p> <b>october 6<br /> 10 am to 3pm </b> </p> <p> come to our town location for some fun activities for family and friends! </p> </li> <li> <h2>Fall Volunteer Festival</h2> <p> <b>october 6<br /> 10 am to 3pm </b> </p> <p> come to our town location for some fun activities for family and friends! </p> </li> <li> <h2>Fall Volunteer Festival</h2> <p> <b>october 6<br /> 10 am to 3pm </b> </p> <p> come to our town location for some fun activities for family and friends! </p> </li> </ul> </div> </div> </div> and the css: .clearfix:before, .clearfix:after, .grid-block:before, .grid-block:after, .deepest:before, .deepest:after { content: ""; display: table; } .clearfix:after, .grid-block:after, .deepest:after { clear: both; } .grid-box { float: left; } /* Grid Units */ .width16 { width: 16.666%; } .width20 { width: 20%; } .width25 { width: 25%; } .width33 { width: 39.333%; } .width40 { width: 40%; } .width50 { width: 50%; } .width60 { width: 60%; } .width66 { width: 66.666%; } .width75 { width: 75%; } .width80 { width: 80%; } .width100 { width: 100%; } .width16, .width20, .width25, .width33, .width40, .width50, .width60, .width66, .width75, .width80, .width100 { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; padding: 5px 10px 5px 10px; } /* Create new Block Formatting Contexts */ .bfc-o { overflow: hidden; } .bfc-f { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; width: 100%; float: left; } /* Align Boxes */ .float-left { float: left; } .float-right { float: right; } /* Grid Gutter */ .grid-gutter.grid-block { margin: 0 -15px; } .grid-gutter > .grid-box > * { margin: 0 15px; } .grid-gutter > .grid-box > * > :first-child { margin-top: 0; } .grid-gutter > .grid-box > * > :last-child { margin-bottom: 0; } /* Layout Defaults --------------------------------------------------------------------------------------- -------------*/ /* Center Page */ .wrapper { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; margin: auto; } /* Header */ #header { position: relative; padding-top: 10px; } #toolbar .float-left .module, #toolbar .float-left > time { margin: 0 15px 0 0; float: left; } #toolbar .float-right .module { margin: 0 0 0 15px; float: right; } #headerbar .module { max-width: 300px; margin-right: 0; float: right; } #logo, #logo > img, #menu { float: left; } #search { float: right; } #banner { position: absolute; top: 0; right: -200px; } /* Footer */ #footer { position: relative; text-align: center; } /* Absolute */ #absolute { position: absolute; z-index: 15; width: 100%; }

    Read the article

  • Delphi: Alternative to using Reset/ReadLn for text file reading

    - by Ian Boyd
    i want to process a text file line by line. In the olden days i loaded the file into a StringList: slFile := TStringList.Create(); slFile.LoadFromFile(filename); for i := 0 to slFile.Count-1 do begin oneLine := slFile.Strings[i]; //process the line end; Problem with that is once the file gets to be a few hundred megabytes, i have to allocate a huge chunk of memory; when really i only need enough memory to hold one line at a time. (Plus, you can't really indicate progress when you the system is locked up loading the file in step 1). The i tried using the native, and recommended, file I/O routines provided by Delphi: var f: TextFile; begin Reset(f, filename); while ReadLn(f, oneLine) do begin //process the line end; Problem withAssign is that there is no option to read the file without locking (i.e. fmShareDenyNone). The former stringlist example doesn't support no-lock either, unless you change it to LoadFromStream: slFile := TStringList.Create; stream := TFileStream.Create(filename, fmOpenRead or fmShareDenyNone); slFile.LoadFromStream(stream); stream.Free; for i := 0 to slFile.Count-1 do begin oneLine := slFile.Strings[i]; //process the line end; So now even though i've gained no locks being held, i'm back to loading the entire file into memory. Is there some alternative to Assign/ReadLn, where i can read a file line-by-line, without taking a sharing lock? i'd rather not get directly into Win32 CreateFile/ReadFile, and having to deal with allocating buffers and detecting CR, LF, CRLF's. i thought about memory mapped files, but there's the difficulty if the entire file doesn't fit (map) into virtual memory, and having to maps views (pieces) of the file at a time. Starts to get ugly. i just want Reset with fmShareDenyNone!

    Read the article

  • MSTest unit test passes by itself, fails when other tests are run

    - by Sarah Vessels
    I'm having trouble with some MSTest unit tests that pass when I run them individually but fail when I run the entire unit test class. The tests test some code that SLaks helped me with earlier, and he warned me what I was doing wasn't thread-safe. However, now my code is more complicated and I don't know how to go about making it thread-safe. Here's what I have: public static class DLLConfig { private static string _domain; public static string Domain { get { return _domain = AlwaysReadFromFile ? readCredentialFromFile(DOMAIN_TAG) : _domain ?? readCredentialFromFile(DOMAIN_TAG); } } } And my test is simple: string expected = "the value I know exists in the file"; string actual = DLLConfig.Domain; Assert.AreEqual(expected, actual); When I run this test by itself, it passes. When I run it alongside all the other tests in the test class (which perform similar checks on different properties), actual is null and the test fails. I note this is not a problem with a property whose type is a custom Enum type; maybe I'm having this problem with the Domain property because it is a string? Or maybe it's a multi-threaded issue with how MSTest works?

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >