[Solved] cpp linked list program:error in display [closed]

You never assign an initial node. This is the kind of problem that a sheet of paper, a pencil, and two minutes of drawing arrows and boxes should solve, and until you’re fluent in dynamic allocation get used to doing a lot of that. This: if(start==NULL) { p->next=NULL; p->prev=NULL; // NOTE: start is still NULL … Read more

[Solved] Converting string to Percent with 2 decimal points [closed]

Use this would help: string value = “24.7%”.Trim(); Value = value.Replace(“%”, “”); decimal Value = decimal.Parse(value); string decimalValue = Value.ToString(“0.00″); string actualValue=decimalValue +”%”; solved Converting string to Percent with 2 decimal points [closed]

[Solved] Slower if temp variable is used for indexing?

I am interpreting the following to constitute your question. If writing a speed-intensive app that involves lots of calculations as such, should I rely on the optimization by compiler or on register? If multi-thread, will register cause any problem? First of all, if you are aiming for (and trying to measure) efficiency of a program, … Read more

[Solved] Sql Data Summery [closed]

use a recursive cte that starts with elements whose frompoint matches no topoint in a self join so as to identify the starting points. then eleminate the intermediate results by joining again and use only those data whose topoint match no frompoint in another self join. with cte as ( select r.name, r.frompoint, r.topoint from … Read more

[Solved] How to use Element Selector with Class Selector in Jquery [closed]

There is no need to iterate, jQuery will do this for you very conveniently. It’s not very clear from the question what exactly you want to do, but you can: Switch .plus to .minus with $(“.plus”).toggleClass(“plus minus”) Toggle .plus and .minus on all elements that have either with $(“.plus, .minus”).toggleClass(“plus minus”) 1 solved How to … Read more

[Solved] T-SQL query on dynamic field with pivot

Maybe something like this: Test data: CREATE TABLE #PhoneBook(ID INT,Name VARCHAR(100)) INSERT INTO #PhoneBook VALUES(1,’Reza’),(2,’Ali’) CREATE TABLE #DynamicField(ID INT,Caption VARCHAR(100)) INSERT INTO #DynamicField VALUES(1,’Job’),(2,’Level’) CREATE TABLE #PhoneBook_DynamicField_Rel(ID INT,PhoneBookID INT, DynamicFieldID INT,Value VARCHAR(100)) INSERT INTO #PhoneBook_DynamicField_Rel VALUES(1,1,1,’Emp’),(2,1,2,’1′),(3,2,1,’SomeJob’) Getting the colums DECLARE @cols VARCHAR(MAX) SELECT @cols=STUFF ( ( SELECT ‘,’ +QUOTENAME(tbl.Caption) FROM #DynamicField AS tbl FOR XML … Read more

[Solved] Android show one time page [closed]

It’s easy. Use a Button with an onClickListener. Onec its clicked write a simple var to the sharedpreferences like in this sample: SharedPreferences preferences = getSharedPreferences(PREFS_NAME,Context.MODE_PRIVATE); SharedPreferences.Editor editor = preferences.edit(); editor.putBoolean(“terms_accepted”, true); editor.commit(); As soon as your Main Activity starts check in onCreate if the terms has been accepted by validating the sharedpferences. Show it … Read more

[Solved] How to keep two For Each loops at the same level [closed]

you may use a for loop for one and an array incremented manually for the other like so: Provided both these collections(or arrays) have the same number of elements: Dim strSQLCommand As String Dim intProductIdIndex as integer=0 For Each productQtys In productQty strSQLCommand = “INSERT INTO Orders(SessionID, productID, qty, orderDate) ” & _ “Values (‘” … Read more

[Solved] ExecuteReader: Connection property has not been initialized. Browser Game [closed]

You didn’t connect your SqlConnection and SqlCommand. Just define your connection as a second parameter like; SqlCommand CheckExp = new SqlCommand(“SELECT Experience FROM Player WHERE UserID=@uid”, connection); Or you can assing your SqlCommand.Connection property like; CheckExp.Connection = connection; 4 solved ExecuteReader: Connection property has not been initialized. Browser Game [closed]

[Solved] Aligning child div to bottom of parent [closed]

I’ve made a Demo as per the image. —-Below is the CSS Code—- #main{background:url(“http://lorempixel.com/500/500”); width:500px; height:500px; position:relative; } #main:after{ content: “12.49 EURO”; z-index:1; position:absolute; bottom:0; height:50px; width:100%; font-size:2em; color:#000000; background-color:rgba(255, 255, 255, 0.5) } —HTML code look like —- <div id=”main”> </div> Here is the Working Demo. http://jsbin.com/duhicoqo/1/ 2 solved Aligning child div to bottom … Read more