Search Results

Search found 1238 results on 50 pages for 'sam bivins'.

Page 34/50 | < Previous Page | 30 31 32 33 34 35 36 37 38 39 40 41  | Next Page >

  • List to Columns in LINQ

    - by Sam Saffron
    Given an IEnumerable<T> and row count, I would like to convert it to an IEnumerable<IEnumerable<T>> like so: Input: Row Count: 3 List: [1,2,3,4,5,6,7] Output [ [1,4,7] [2,5] [3,6] ] How can I do this using LINQ?

    Read the article

  • How to display Bitmap Image in image control on WPF using C#

    - by Sam
    I want that when I double click on a row in Listview, it should display the image corresponding to that row. This row also contains the path of the image. I tried the following but it displays the same image for all rows because I have given the path for a specific image: private void ListViewEmployeeDetails_MouseDoubleClick(object sender, MouseButtonEventArgs e) { ImageSource imageSource = new BitmapImage(new Uri(@"C:\northwindimages\king.bmp")); image1.Source = imageSource; } Please suggest

    Read the article

  • Copy recordset data into multiple sheets to avoid problem of maximum rows limit in Excel VBA

    - by Sam
    I am developing reporting application in Excel/vba 2003. VBA code sends search query to database and gets the data through recordset. It will then be copied to one of excel sheet. The rertrieved data looks like as shown below. ProductID--|---DateProcessed--|----State----- 1................|.. 1/1/2010..............|.....Picked Up 1................|.. 1/1/2010..............|.....Forward To Approver 1................|.. 1/2/2010..............|.....Approver Picked Up 1................|.. 1/3/2010..............|.....Approval Completed 2................|.. 1/1/2010..............|.....Picked Up 3................|.. 1/2/2010..............|.....Picked Up 3................|.. 1/2/2010..............|.....Forward To Approver The problem is data retrieved from search query is so huge that it goes above the excel row limit (65536 rows in excel 2003). So I want to split this data into two excel sheets. While spliting the data I want to ensure that the data for same product shoud remain in one sheet. For example, if the last record in the above result set is 65537th record then I also want to move all records for product 3 into new sheet. So sheet1 will contain records for product id 1 and 2 with total records = 65534. Sheet 2 will cotain records for product id 3 - with total records = 2. How can I acheive this in vba? If it is not possible, is there any alternative solution ? Thanks in Advance !

    Read the article

  • WPF: How to bind RadioButtons to an enum?

    - by Sam
    I've got an enum like this: public enum MyLovelyEnum { FirstSelection, TheOtherSelection, YetAnotherOne }; I got a property in my DataContext: public MyLovelyEnum VeryLovelyEnum { get; set; } And I got three RadioButtons in my WPF client. <RadioButton Margin="3">First Selection</RadioButton> <RadioButton Margin="3">The Other Selection</RadioButton> <RadioButton Margin="3">Yet Another one</RadioButton> Now how do I bind the RadioButtons to the property for proper two-way-binding?

    Read the article

  • Writing a simple batch file to setup a variable?

    - by Sam
    I want to write a simple batch file where i want to setup a environment variable based on the machine architecture. It is as below: set ARCH=%PROCESSOR_ARCHITECTURE% echo %ARCH% if %ARCH%==x86 ( set JAVA_ROOT=C:\Progra~1\Java\j2re1.4.2_13 ) else ( set JAVA_ROOT=C:\Progra~2\Java\j2re1.4.2_13 ) echo JAVA_ROOT is %JAVA_ROOT% On 64-bit machine where the architecture is 'AMD64' the JAVA_ROOT will be displayed as 'C:\Progra~2\Java\j2re1.4.2_13' at the echo statement. But when i run an application that uses this file, the first value of JAVA_ROOT would be picked up 'C:\Progra~1\Java\j2re1.4.2_13'. I don't have any idea why it goes in the 'if' part even though i am running this on 64-bit Windows7. When i echoed the

    Read the article

  • Can a flex app (or a portion of a flex app) be made transparent to mouse clicks?

    - by Sam Jones
    I need to superimpose my Flex app above a plain HTML control on a web page, and be able to click through the Flex app to interact with the HTML control. Is there any way to do this? No permutation of mouseEnabled="false" or mouseChildren="false" seems to have the desired effect. Context: trying to integrate Google Earth API (JavaScript/HTML) with my flex app. I am leaving a portion of the flex app transparent and empty, and positioning the Google Earth widget just below that point in the z-index. Google Earth has to be behind flex, because there are some Flex controls periodically displayed in that space.

    Read the article

  • PHP: How to automate building a 100 <UL>/<LI> menuitems, while keeping the Menu Structure File Flat / Simply Managable?

    - by Sam
    Above: current "stupid" menu. (entire ul/li menu for javascript menu system) + (some li lines as page-specific submenu) Hi folks! With passion for automation and elegancy, but limited knowledge/knowhow, im stuck with "my hands in my hair" as we Dutch say, for my current menu system works perfectly, but is a pain in the a*s to update! So, i would appreciate it greatly, if you can suggest how to automate this in php: how to let the php generate the html menu code basing on a flat menu input file with TABS indented. OLD SITUATION <ul> <!-- about 100 of these <li>....</li> lines --> <li><a href="carrot.php"><p class="mnu" style="background-position:0 -820px"><? echo __("carrot juice") ?></p></a></li> <!-- lots of data, with only little bit thats really the menu itself--> </ul a javascript file reads a ul/li structure as input to build menu of format in that ul/li, the items with a hyperlink and sprite-bg position represent webpages, (inside LI) while items without hyperlink and sprite-bg are just headers of that menusection, (inside H6) to highlight the current page in the menu, the javascript menumaker uses an id number. this number corresponds to the consequtive li that is a webpage, skips h6 headers correctly. these h6 headers are only there for when importing sections of the same menu as submenu. non-li headers are not shown in menu, nore counted by the javascript menu for their ID. to know which page should be shown, i have to count from ID 0, the li items till finding the current webpage in the li structure and then manually put it in each webpage! BUT: changing an item in li order, means stupidly re-counting their entire li again! each webpage has an icon (= sprite bg-position numer), which is also used in the webpage. INTENDED RESULT I dream of, once setting what the current webpage is (e.g carrot.php) the menu system automatically "finds" and "counts" the li's and returns the id nr (for proper highlight of main menu); generates the entire menu html, and depending on which headings are set for submenu, (e.g. meals, drinks) generates those submenu (entire section below each given header); ginally adds h5 highlight inside the li of that submenu item. For the menu, i wish an easily readable, simple plain txt menu that is indented with tabs, (each tab is one depth for example) and further tabs follow for url and sprite position of icon. MY DREAM MENU-MANAGEMENT FILE |>TAB SEPARATED/INDENTED FLATMENU FILE |MUST BE CALCULATED BY PHP: |>MENUTEXT============URL=============SPRITE=====|ID===TAG================== |>about "#" -520 |00 li |> INFORMATION |—— h6 |> physical state "physical.php" -920 |01 li |> mental health "mental.php" -10 |02 li |> |>apetite "#" -1290 |03 li |> meals "#" -600 |04 li |> COLD MEAL |—— h6 |> egg salade "salad.php" -1040 |05 li |> salmon fish "salmon.php" -540 |06 li |> HOT MEAL |—— h6 |> spare ribs "spareribs.php" -120 |07 li |> di macaroni "macaroni.php" -870 |08 li |> |> drinks "#" -230 |09 li |> JUCY DRINK |—— h6 |> carrot juice "carrot.php" -820 |10 li |> mango hive "mango.php" -270 |11 li DESIRED CHRONOLOGY php outputs the entire ul/li html so the javascript can show the menu: webpage items go inside li tags, and header items go inside h6 tags, e.g. <h6>JUCY DRINK</h6> Each website page has a url filename [eg: salad.php]. Based on this given fact, the php menu generator detects the pagename, gives the IDnr of the position of that page according to the li-item nr and sets variable for javascript to highlight current menu item. the menu items below the specified headers are loaded as submenu in which the current page.php is wrapped inside h5 to highlight current page in submenu: e.g. (<li><h5><a href="carrot.php"><p>..etc..</p></h5></li> Question Which methods / steps / (chronological)ways are there for doing this? I am no good in php programming, but am learning it so please dont write any code without a line of comment why I should use that method etc. Where do I start? If I am unclear in my question, please ask. Thanks. Much appreciated!! Concrete Task List from the provided Comments/Answers, sofar: (RobertB) First, get some PHP code working that can read through a tab-delimited file and put the data into an appropriate data structure. NOW WORKING AT THIS

    Read the article

  • Need an Overview of Possibilities for multicolumn programming

    - by Sam
    Hi folks, From source1 and source2 i gather that IE9 will NOT support multi-column css3!! Since it is still the most popular browser (another thing i cannot understand), i am left but no other choice than to use Programming Power to make multi-columns work. Now, I use three divs that float to left, and which are manually filled with text. Please don't laugh i know its stupid! But I would wish to not to have to worry about the columns and just have a one piece of (un-interrupted) text which all goes into only 1 div, and then have a program smart enough to split it up into X equally wide columns. Question: before i start reinvent the wheel, what methods of programming power have you known that tackle this elegantly? Please suggest your best working multi-column layout sources so I can evaluate which option is the best (I will update the below table). Exploring all possibilities 2011 and further, to enable multi column text user experience: Language Author SourceCodeUsage WorksOnAllMajorBrowser? ================================================================================= html manual labour put text manually in separate left-floating divs "Y" // Upside: control! Downside: few changes necessitates to reflow 3 divs manually! CSS3 w3c css3.info/preview/multi-column-layout/ "N" // {-moz-column-count: 3; -webkit-column-count: 3; } Thats all! javascript a list apart will add url soon ? // php ? ? ? //

    Read the article

  • Use a styleshhet when NOT IE

    - by Sam Gregory
    When i use this code <!--[if IE 6]> <link rel="stylesheet" href="ie6.css" type="text/css" /> <![endif]--> <!--[if !IE]> <link rel="stylesheet" href="not_ie.css" type="text/css" /> <![endif]--> IE 6 does correctly use the specified stylesheet but all other browsers ignore both when they should be using the one that basically states, use this stylesheet if you are not IE. Any ideas?

    Read the article

  • NSInvocation: object does not implement methodSignatureForSelector

    - by Sam V
    I have this weird crash that only happens when running the app on the device (doesn't happen in the Simulator). It seems like the problem surfaces out of nowhere, as I haven't changed anything on that particular class. I had the very same issue a few days ago, and I ended up fixing it by duplicating the class, renaming it, and changing the referenced class — I haven't changed a single bit of code. So I'm trying to understand why it's doing this. I've read somewhere that usually you get this console error when the object isn't a subclass of NSObject (but it is!). Here's the exact console error message: *** NSInvocation: warning: object 0x679e0 of class 'FFProximityPickerView' does not implement methodSignatureForSelector: -- trouble ahead *** NSInvocation: warning: object 0x679e0 of class 'FFProximityPickerView' does not implement doesNotRecognizeSelector: -- abort And then it crashes. I'd be very thankful for anyone who can help me on this.

    Read the article

  • How do you delete a core data entry from the detail view?

    - by Sam
    I am working with an app similar to apple's core data recipes sample code. I want to be able to delete the entry from the detail view, much like apple's contacts app. The code below is deleting the 1st entry and not the selected entry. Not sure what I am doing wrong. NSIndexPath *indexPath = [myTableView indexPathForSelectedRow]; NSManagedObjectContext *context = [fetchedResultsController managedObjectContext]; [context deleteObject:[fetchedResultsController objectAtIndexPath:indexPath]]; [myTableView reloadData];

    Read the article

  • Not receiving touchesEnded/Moved/Cancelled after adding subView

    - by Sam
    Title more or less says it all. In response to a touchesBegan event, my UIViewController recolours itself and adds some subviews. It never receives the touchesEnded. I guess because the added subviews are somehow intercepting the event. I tried calling resignFirstResponder on the subviews to no avail. The code works fine when I don't add the child views and the touch events are called as normal. Any ideas? Thanks

    Read the article

  • C#: How to detect . in string and insert a space after it/How to insert space after n chars?

    - by Sam Gentile
    Suppose I have a long string like "4600airportburlingame150anzablvd.burlingamecalifornia94010". My code is breaking on this string. This is UNUSUAL. 99% of entries will NOT have a period. The CSS in the browser wraps IF there are spaces in the string and there isn't any here. How do I detect the period (".") and insert a space directly after it? Remember 99% of strings will NOT have a period in them. The code has to detect if it has a period and if so, do the insertion, otherwise not. If I determine a maximum string length, how do I insert a space at some length? Thanks

    Read the article

  • Google App Engine Application Error 5

    - by Sam
    I frequently get this Application error. What does this mean ? File "/base/data/home/apps/0xxopdp/10.347467753731922836/matrices.py", line 215, in insert_into_db obj.put() File "/base/python_runtime/python_lib/versions/1/google/appengine/ext/db/__init__.py", line 895, in put return datastore.Put(self._entity, config=config) File "/base/python_runtime/python_lib/versions/1/google/appengine/api/datastore.py", line 404, in Put return _GetConnection().async_put(config, entities, extra_hook).get_result() File "/base/python_runtime/python_lib/versions/1/google/appengine/datastore/datastore_rpc.py", line 601, in get_result self.check_success() File "/base/python_runtime/python_lib/versions/1/google/appengine/datastore/datastore_rpc.py", line 572, in check_success rpc.check_success() File "/base/python_runtime/python_lib/versions/1/google/appengine/api/apiproxy_stub_map.py", line 502, in check_success self.__rpc.CheckSuccess() File "/base/python_runtime/python_lib/versions/1/google/appengine/api/apiproxy_rpc.py", line 126, in CheckSuccess raise self.exception ApplicationError: ApplicationError: 5 I do make many calls to the datastore. What caused this problem ?

    Read the article

  • CompareValidator works in listview's editItemTemplate but not in insertitemtemplate

    - by Sam
    Hi, I have a validation problem I have a listview, in the edit item template I have two composite controls with a textbox inside I put a comparevalidator on it <asp:CompareValidator ID="myCompareValidator" runat="server" ControlToValidate="mycompositecontrol1" ControlToCompare="mycompositecontrol2" Operator="GreaterThanEqual" Type="Date" Display="Dynamic" ErrorMessage="there is an error !" Text="!" ValidationGroup="myValidationGroup" /> It works great ! so I do exactly the same operation in the InserItemTemplate (It's a copy/paste) but this time, it doesn't work, I have no error message in my validationsummary and near my control to validate! If you know that problem, help me please thanks in advance

    Read the article

  • How can you use jQuery to make sIFR-replaced elements fade in?

    - by Sam Goldman
    This is what I currently have: // #content is visibility=hidden sIFR.replace(mix_bold, { selector: '#content p', onReplacement: function(fi) { $('#content').fadeIn("slow"); } }); The fade in happens, but for a split second the replaced flash movie appears before being hidden. Has anyone gotten this to work? I am using jQuery 1.2.6 and sIFR 3 r436. Tested in Safari 4 and FF 3. Thanks!

    Read the article

  • Rails find :conditions

    - by Sam
    I have a Reservation model that I'm searching for with three fields. The container_id must always be self.id but as confirmed and auto_confirmed only one needs to be true. I have the following but it doesn't preform what I need: Reservation.find(:all, :conditions => ['container_id = ? AND confirmed = ? OR auto_confirm = ?', self.id, true, true,]) How should I change this?

    Read the article

  • How to check if an SQL query executed without error in ASP?

    - by Sam
    Here's my code: if Request.Form("authorize") <> "" and request.form("delete") <> "true" then post_ids = Request.form("authorize") ids = split(post_ids, ",") For i = LBound(ids) to UBound(ids) sql = "update tbl_comments set authorized = 'true' where comment_id = " & ids(i) pageDB.execute(sql) Next message = "<div id=""succeed""><strong>Updated</strong>: Your comments have been approved.</div>" end if Instead of just setting "message" to the success message i'd like to do something along the lines of... if(pageDB.execute(sql) was succesful) then message = "<div id=""succeed""><strong>Updated</strong>: Your comments have been approved.</div>" else message = "<div id=""error""><strong>Error</strong>: Your comments have not been approved.</div>" end if

    Read the article

  • Insert XML node before specific node using c#

    - by sam
    This is my XML file <employee> <name ref="a1" type="xxx"></name> <name ref="a2" type="yyy"></name> <name ref="a3" type="zzz"></name> </employee> Using C#, I need to insert this node <name ref="b2" type="aaa"></name> between the "a2" and "a3" nodes. Any pointer how to sort this out?

    Read the article

  • Sorting Objects in NSArray

    - by Sam Budda
    I have an NSArray with 3 objects in it. Each object is made up of 5 values. How can I sort by Date with in the objects? result: ( gg, "2012-10-28 01:34:00 +0000", "Church Bells", "pin_red", 1 )( iu, "2008-09-22 17:32:00 +0000", "Birthday Song", "pin_red", 1 )( "my birthday woo hoo", "2012-09-04 19:27:00 +0000", "Birthday Song", "pin_blue", 1 ) The results I am looking for - Sorted Array should look like this. ( iu, "2008-09-22 17:32:00 +0000", "Birthday Song", "pin_red", 1 ) ( "my birthday woo hoo", "2012-09-04 19:27:00 +0000", "Birthday Song", "pin_blue", 1 ) ( gg, "2012-10-28 01:34:00 +0000", "Church Bells", "pin_red", 1 ) I am getting this array from my nsdictionary object. dictionary = [[NSMutableDictionary alloc] initWithContentsOfFile:stringsPlistPath]; stringsMutableArray = [[NSMutableArray alloc] initWithObjects:nil]; for (id key in dictionary) { [stringsMutableArray addObject:[dictionary objectForKey:key]]; }

    Read the article

  • HOWTO: implement a jQuery version of ASP.Net MVC "Strongly Typed Partial Views"

    - by Sam Carleton
    I am working on a multi-page assessment form where the questions/responses are database driven. Currently I the basic system working with Html.BeginForm via standard ASP.Net MVC. At this point in time, the key to the whole system is the 'Strongly Typed Partial Views'. When the question/response is read from the database, the response type determines which derived model is created and added to the collection. The main view it iterates through the collection and uses the 'Strongly Typed Partial Views' system of ASP.Net MVC to determine which view to render the correct type of response (radio button, drop down, or text box). I would like to change this process from a Html.BeginForm to Ajax.BeginForm. The problem is I don't have a clue as to how to implement the dynamic creation of the question/response in the JavaScript/jQuery world. Any thoughts and/or suggestions? Here is the current code to generate the dynamic form: @using (Html.BeginForm(new { mdsId = @Model.MdsId, sectionId = @Model.SectionId })) { <div class="SectionTitle"> <span>Section @Model.SectionName - @Model.SectionDescription</span> <span style="float: right">@Html.CheckBoxFor(x => x.ShowUnansweredQuestions) Show only unaswered questions</span> </div> @Html.HiddenFor(x => x.PrevSectionId) @Html.HiddenFor(x => x.NextSectionId) for (var i = 0; i < Model.answers.Count(); i++) { @Html.EditorFor(m => m.answers[i]); } }

    Read the article

  • TextMate/Macfusion combo for mounting projects over SSH

    - by Sam Lee
    Here is my workflow: I use Macfusion to mount a server over SSH, and then edit the root directory of the project in TextMate (using mate /Volumes/server/projectdir). I have a plug in installed that disables refreshing on refresh. This works ALMOST perfectly--the only thing I have problems with is "Find in Project": it's REALLY slow. Has anyone run into this problem before and been able to find any solutions? Currently I go to terminal when I have to do a search, but it would be great to be able to do it in TextMate. Thanks!

    Read the article

< Previous Page | 30 31 32 33 34 35 36 37 38 39 40 41  | Next Page >