Search Results

Search found 17788 results on 712 pages for 'last'.

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

  • Stringbuilder ignores last space

    - by chead23
    I am initialising a StringBuilder as follows: StringBuilder builder = new StringBuilder("Symptoms are "); After this I loop through a list and add each string item to the end using foreach(var item in list) { builder.Append(item); } An example item would be something like "headache" but once i've appended it to "Symptoms are " and called builder.ToString() it shows: "Symptoms areHeadache...etc" as opposed to "Symptoms are Headache...etc" Why is it ignoring the space?

    Read the article

  • thrust::unique_by_key eating up last element

    - by Programmer
    Please consider the below simple code: thrust::device_vector<int> positions(6); thrust::sequence(positions.begin(), positions.end()); thrust::pair<thrust::device_vector<int>::iterator, thrust::device_vector<int>::iterator > end; //copyListOfNgramCounteachdoc contains: 0,1,1,1,1,3 end.first = copyListOfNgramCounteachdoc.begin(); end.second = positions.begin(); for(int i =0 ; i < numDocs; i++){ end= thrust::unique_by_key(end.first, end.first + 3,end.second); } int length = end.first - copyListOfNgramCounteachdoc.begin() ; cout<<"the value of end -s is: "<<length; for(int i =0 ; i< length ; i++){ cout<<copyListOfNgramCounteachdoc[i]; } I expected the output to be 0,1,1,3 of this code; however, the output is 0,1,1. Can anyone let me know what I am missing? Note: the contents of copyListOfNgramCounteachdoc is 0,1,1,1,1,3 . Also the type of copyListOfNgramCounteachdoc is thrust::device_vector<int>.

    Read the article

  • Git undo last commit.

    - by Justin
    I merged the wrong way between two branches. I then ran the following: git reset --hard HEAD^ I am now back at the previous commit (which is where I want to be). Was that the correct thing to do? The bad commit is still in the repository, is that okay or should I do something else to remove it from the repository? I have not pushed or committed anything else yet.

    Read the article

  • Combine First, Middle Initial, Last name and Suffix in T-SQL (No extra spaces)

    - by Paul
    I'm trying not to reinvent the wheel here...I have these four fields [tbl_Contacts].[FirstName], [tbl_Contacts].[MiddleInitial], [tbl_Contacts].[LastName], [tbl_Contacts].[Suffix] And I want to create a FullName field in a view, but I can't have extra spaces if fields are blank...So I can't do FirstName + ' ' + MiddleInitial + ' ' + LastName + ' ' + Suffix...Because if there is no middle initial or suffix I'd have 2 extra spaces in the field. I think I need a Case statement, but I thought someone would have a handy method for this...Also, the middleinitial and suffix may be null.

    Read the article

  • SQL select from last inserted

    - by arik-so
    Hello, in MySQL, I have table. One column has auto-increment. When I insert something mysql_query('INSERT INTO `table` SET `column` = "data";'); Now, what I want is, without further queries, to get the value of the auto-incrementing column, maybe like this: mysql_query('insertion = (INSERT INTO `table` SET `column` = "data"); SELECT `auto_incrementing_column` FROM `table`.insertion'); Please tell me how something like that is done. Thanks in advance!

    Read the article

  • Display database fields using first,1,2,..., last

    - by user195257
    Hello, Im trying to figure out how to achieve this: http://t-webdesign.co.uk/projects/geusa/industry_jobs.html Evenutually there will be lots of job postings under different industries, what would be the best way of implementing the 'page' links so i can display just 7 or 8 jobs at a time? Thank you

    Read the article

  • iphone - navigation controller - move to first view from last view without traversing all intermedia

    - by satyam
    i'm working on iphone app which will show 4 buttons in first view. on click of a button, it will load a new view with navigation controller. this navigation controller view allows to travel upto 11 sub views. in 11th sub view, i've a reset button. on click of reset button, i've to go back to navigation controllers first view without traversing all the 11 views? is it possible to achieve it? if yes how? if no, what can be the solution?

    Read the article

  • X11, how to detect I’m the last window/application on the display

    - by ts
    I have an x11 display with a windowmanager (sadly not a specific one, could be twm, dtwm, mwm, metacity …) , myApp and other applications with windows. I want to close the display if the other applications are closed and myApp is the only one with windows on the display. I do know the windows of myApp, but how do I distinguish between the windows of the windowmanger and of the other applications. I’m currently polling with xwininfo -tree -root -children and comparing this to what I’m expecting, but this only works in a ‘well defined’ environment. It seems that many of the above mentioned windowmanager don’t support EWMH.

    Read the article

  • printing only the last 8 entries in a .csv file

    - by user2341103
    I have an input csv file as below,I want to print only the most recent 8 entries..can anyone provide inputs on how to do this? INPUT:- trend.csv ['2013-06-25 20:01', '10'] ['2013-06-25 20:06', '9'] ['2013-06-25 20:06', '8'] ['2013-06-26 20:06', '7'] ['2013-06-26 20:06', '6'] ['2013-06-26 20:06', '5'] ['2013-06-26 20:06', '4'] ['2013-06-26 20:06', '3'] ['2013-06-26 20:06', '2'] ['2013-06-26 20:08', '1'] OUTPUT:- ['2013-06-25 20:06', '8'] ['2013-06-26 20:06', '7'] ['2013-06-26 20:06', '6'] ['2013-06-26 20:06', '5'] ['2013-06-26 20:06', '4'] ['2013-06-26 20:06', '3'] ['2013-06-26 20:06', '2'] ['2013-06-26 20:08', '1'] import csv #Now read the recent 8 entries and print cr = csv.reader(open("trend.csv","rb")) for row in cr: #print only the recent most 8 entries print row

    Read the article

  • How can I also add class to the last list for the second list block in IE?

    - by user244394
    Hi All I have 2 list and i want to add a class ="last" to the list item 5 for both. they seem to work fine on firefox. it add green to both list item 5. But in IE7 it adds only the first list item 5, not the second How can I also add class last it to the second list block as well for IE? .last{background-color: green} jQuery( document ).ready( function () { // Add first and last menu item classes $('ul.menu li:first-child').addClass( 'first_item' ); $('#menu li:last-child').addClass( 'last' ); }); list item 1 list item 2 list item 3 list item 4 list item 5 list item 1 list item 2 list item 3 list item 4 list item 5

    Read the article

  • How to act when you get the last warning? [closed]

    - by Cody
    I'm a software developer, currently working on web development. We are a small company a team with 2 persons, a developer and a designer and we have no-one to test our applications. From the last week I was somehow rushed to finish a task within a project programmed by someone else and I released it with a bug which I did not see. Today I got the last warning and if there is a release with a bug I will be fired. So is this fair enough to get fired because releases with bugs without any testers around or should I really improve my skills on testing?

    Read the article

  • How Can I Improve This Algorithm (LCS)

    - by superguay
    (define (lcs lst1 lst2) (define (except-last-pair list) (if (pair? (cdr list)) (cons (car list) (except-last-pair (cdr list))) '())) (define (car-last-pair list) (if (pair? (cdr list)) (car-last-pair (cdr list)) (car list))) (if (or (null? lst1) (null? lst2)) null (if (= (car-last-pair lst1) (car-last-pair lst2)) (append (lcs (except-last-pair lst1) (except-last-pair lst2)) (cons (car-last-pair lst1) '())) **(if (> (length (lcs lst1 (except-last-pair lst2))) (length (lcs lst2 (except-last-pair lst1)))) (lcs lst1 (except-last-pair lst2)) (lcs lst2 (except-last-pair lst1)))))) I dont want it to run over and over.. Regards, Superguay

    Read the article

  • How to find the last user logged onto a computer in Active Directory?

    - by hamstar
    I was wondering if there was a way in Active Directory to query a Computer object to find the last user who logged on. Poor asset tracking has left me with a couple of un-locatable machines and I would like to know who used them last. Thanks Edit: Just to clarify, I can't find the machines physically and it doesn't look like its been powered on for a while, that's why I want to know who had them last so I can query them.

    Read the article

  • That’s a wrap! Almost, there’s still one last chance to attend a SQL in the City event in 2012

    - by Red and the Community
    The communities team are back from the SQL in the City multi-city US Tour and we are delighted to have met so many happy SQL Server professionals and Red Gate customers. We set out to run a series of back-to-back events in order to meet, talk to and delight as many SQL Server and Red Gate enthusiasts as possible in 5 different cities in 11 days. We did it! The attendees had a good time too and 99% of them would attend another SQL in the City event in 2013 – so it seems we left an impression. There were a range of topics on the event agenda, ranging from ‘The Whys & Hows of Continuous Integration’, ‘Database Maintenance Essentials’, ‘Red Gate tools – The Complete Lifecycle’, ‘Automated Deployment: Application And Database Releases Without The Headache’, ‘The Ten Commandments of SQL Server Monitoring’ and many more. Videos and slides from the events will be posted to the event website in November, after our last event of 2012. SQL in the City Seattle – November 5 Join us for free and hear from some of the very best names in the SQL Server world. SQL Server MVPs such as; Steve Jones, Grant Fritchey, Brent Ozar, Gail Shaw and more will be presenting at the Bell Harbor conference center for one day only. We’re even taking on board some of the recent attendee-suggestions of how we can improve the events (feedback from the 65% of attendees who came to our US tour events), first off we’re extending the drinks celebration in the evening! Rather than just a 30 minute drink and run, attendees will have up to 2 hours to enjoy free drinks, relax and network in a fantastic environment amongst some really smart like-minded professionals. If you’re interested in expanding your SQL Server knowledge, would like to learn more about Red Gate tools, get yourself registered for the last SQL in the City event of 2012. It’s free, fun and we’re very friendly! I look forward to seeing you in Seattle on Monday November 5. Cheers, Annabel.

    Read the article

  • Why does my computer crash when I minimise the last window?

    - by TRiG
    I am runnung Ubuntu 12.04 LTS. If I have a few windows open (say four to six, not a large amount), and minimise all by pressing Ctrl+Super+D, they all minimise immediately with no problems. However, if I minimise them one at a time, by clicking the minimise button with my mouse, the last one often hangs. Usually it will appear as a ghost on the screen for a while, semi-minimised (in other words, shrunk toward the Unity launcher bar, half-size or smaller, and semi-transparent). Usually it will eventually clear; sometimes the computer just freezes and I have to restart it. It doesn’t seem to matter what the window actually is. Just now, I had to restart my computer with Skype* semi-minimised. I’ve seen it freeze before with the Terminal semi-minimised (and the Terminal wasn’t even doing anything at the time). The only pattern is that it’s always the last window minimised which freezes, and that minimising all windows together using the keyboard shortcut works fine. What on earth is going on, and how can I stop it? * I hate Skype, but I need it for work.

    Read the article

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