The following (see the full code below) successfully adds a page in a section in Onenote. What I don't seem to be able to do is to get the lastly created page on top of the section. Here's the code that is puzzling me. onenoteApp.GetHierarchy(sectionId, OneNote.HierarchyScope.hsPages, out string xmlPages); var docPages = XDocument.Parse(xmlPages); var lastNode = docPages.LastNode; lastNode.Remove(); docPages.AddFirst(lastNode); GetHIerachy() just loads xml into xmlPages. The problem is stricly XML, I don't think OneNote is a problem (at this stage), as docPage.document (the xml string) is in the same state at the end as when docPages was Parsed. using System; …

Member Avatar
Member Avatar
+0 forum 4

I was just thinking about all of the unsolved threads, the ones that actually are solved, and I was thinking, maybe @Dani could add a 'Please Mark as Solved' button that users could click to notify the owner of the thread that they should mark it as solved. Obviously, this could be abused, but if we put specific limitations on it, lets say, only let the user click it once, or limit its use to Moderators only, then maybe we could all help clean up the "unsolved" threads. Just an idea.

Member Avatar
Member Avatar
+4 forum 3

I just begin studying Java programming language and I want to solve cubic equation, but I do not know how to solve it and count the cubic root in java. Could you help and guide for me, please?? Thank you so much!

Member Avatar
Member Avatar
+0 forum 3

I just begin studying Java programming language and I want to solve cubic equation, but I do not know how to solve it and count the cubic root in java. Could you help and guide for me, please?? Thank you so much!

Member Avatar
Member Avatar
+0 forum 1

Hello all. I made a forum post and the helpful community solved the problem I was having. DaniWeb states "Please remember to mark the post solved if your question is answered Thank You" at the bottom of the post. How do I mark the post as solved? Thank you for your help.

Member Avatar
Member Avatar
+0 forum 3

# "toNumbers(strList) is a list of things,each of which represents a number.Modifies each entry in the list by converting it to a number." # Here is my code and it won't work,please help,thank you! import string def toNumbers(strList): nums = [] for i in strList: nums = nums.append(int(i)) return nums def main(): m = ["1","2"] print toNumbers(m) main()

Member Avatar
Member Avatar
+0 forum 4

Using format NOW will just show the current time but the time will not run. Is it possible to make it to make the time keep running??

Member Avatar
Member Avatar
+0 forum 3

Hi everybody, I am learning C at the University, and I want to study by myself to avoid difficulties there, I am doing some exercises from a pdf that I got, and it asks me to write a program to invert a string using only what was explained in the pdf, here is my code: [CODE] #include <stdio.h> int main () { int i, j; char string1[50]; char stringInvertida[50]; printf("Digite uma frase: "); gets(string1); for (i=0; string1[i] != '\0'; i++) { if (i>0) { for (j=i; j>0; j--) { stringInvertida[j] = stringInvertida[j - 1]; } stringInvertida[0] = string1[i]; } else …

Member Avatar
Member Avatar
+0 forum 2

im wrote a program to determine weather a triangle is scalene, isosceles or equilateral based on the given side lengths...its not working properly..i.e its giving isoceles when i enter data for an equilateral...etc etc... i fugured it was my logic in writing the program that was missing something....could anyone tell me how to tighten this up so that it works properly? [CODE]#include <stdio.h> main () { double side1, side2, side3 ; int abc; printf ("enter first side : "); scanf ("%lf", &side1); printf ("enter second side : "); scanf ("%lf", &side2); printf ("enter third side : "); scanf ("%lf", &side2); …

Member Avatar
Member Avatar
+0 forum 4

Hello currently I have started a project for my school. The project is a program that can factor a trinomial. So far I have it set up to take the users inputs. then it multiplies two of the inputs to get a new number. My problem is that i need it to factor that new number and list it out. Once I have an idea of how to do that I know how I want to go about the rest. Example of how it should factor the trinomail: Trinomial- [COLOR="Red"]5[/COLOR]x^2+[COLOR="Red"]16[/COLOR]x+[COLOR="Red"]12[/COLOR] Multiplication- 5*12 New number- 60 Factors [1,2,3,4,5,6,10,12,15,20,30,60] The factors that …

Member Avatar
Member Avatar
+1 forum 5

Hi everybody, I have a project to do for the college, which has to insert, read, delete and modify records in a binary file (a address book or something else). I don't know yet how I'll do to alter the records. Let's suppose the I have the program below: program teste; uses CRT; type reg = record id:integer; nome:string[30]; end; var arquivo: file of reg; dados:reg; begin end. The user will enter the id he wants to alter, i have done it this way, but it truncate the file at the current position: [CODE] while not eof(arquivo) do begin read(arquivo,dados); …

Member Avatar
Member Avatar
+0 forum 4

Hi, i have a problem in displaying the added value of two numbers. I know how to convert the input number into decimal. So after converting it, i added those value and got it stored in a register. My problem is how can I display if the sum is like 10, 11 , 12 ,13 ...onwards. It will display like ?,@,A,B. Can someone help me on how to display the right number?

Member Avatar
Member Avatar
+0 forum 10

So this is probably going to seem like an obviously simple question. I'm working on a basic project involving linked lists. I have a single link linked-list, within this linked list I have a pointer to an dynamically allocated Object I'd like to be printed, currently I keep getting rubbish data values, I've tested the overloaded insertion stream operator with my objectData class, and it works fine. this small bit is in a printAll function, within the list class I have, I'm assuming this bit is my main problem [CODE] void objectData::printAll(){ if(head==0){ return; } Linknode *temp=head; while(temp){ std::cout << …

Member Avatar
Member Avatar
+0 forum 3

Wanted to share this with the group (though it may not be news for you all); this morning I ran into an issue I didn't even consider possible until now. We found that a particular .jpg image would render in FF, Chrome, etc, but NOT in IE. As it turns out, the problem was due to the images being saved with a CMYK color space, and not RGB. IE of course doesn't know what to do with CMYK, so it shows a broken image. Changing the color space on the image to RGB did the trick. The part that was …

Member Avatar
+1 forum 0

Ok, so I have to write a program for school that will read data from a text file, split the data (comma delimited) into the correct type, pass that information on to a class, store the class object into an array. This is what I have so far: [CODE]import java.io.*; public class BankTest{ public static void main(String [] args)throws IOException{ /* ******************************************************** * * This was the first exercise to send data to the * BankAccount class. * BankAccount ba1 = new BankAccount(); BankAccount ba2 = new BankAccount(135687, "chris servin", 100.0,false); System.out.println(ba1.getOwner()); System.out.println(ba1.getExperiation()); System.out.println(ba2.getOwner()); System.out.println(ba2.getExperiation()); System.out.println(ba2.getBalance()); ba2.deposit(200.0); System.out.println (ba2.getStatus()); System.out.println(ba2.getBalance()); …

Member Avatar
Member Avatar
+0 forum 8

Below is my code [code] string str2 = "1, 2, 3, 4, 5, 6, 7, 8"; string output; typedef std::tr1::sregex_token_iterator sti; const sti end; for(sti i(str2.begin(), str2.end(), regex(",\\s"), -1); i != end; ++i) { //output += "\"" + *i + "\", "; output += "\""; output += *i; output += "\", "; } cout<<output.substr(0, output.length() - 2)<<endl; [/code] the result is [b] "1", "2, 3, 4, 5, 6, 7, 8" [/b] But what I expected was [b] "1", "2", "3", "4", "5", "6", "7", "8" [/b] How could I solve the problems? Thanks a lot ps:i am using the <regex> …

Member Avatar
Member Avatar
+0 forum 5

Hello, What has happened the solved note besides posts? Its a bit annoying reading through a multipage discussion to find out it's already solved. Just me or are other people experiencing the same?

Member Avatar
Member Avatar
+0 forum 3

Hey all, I must say that I've had a lot of success with my questions here at DaniWeb, which is why (in my time of need), I'm back and seeking the help of the wise! Hopefully, someone can help me with this and has some basic knowledge of Pygame? Heh, anyway... let me keep it short: I am writing a Ant simulation-type program in which I have a file containing data (such as the ant number, the x and y coordinates of that ant, a timestamp (when the ant is moving/visible), and finally the orientation of the ant (the direction/angle …

Member Avatar
Member Avatar
+0 forum 2

I'm an extreme beginner with Python (this game is the first time I have ever seen it) so please bear with me. Creating a simple dice game. Place a bet. Three dice are rolled, if any are the same value you lose. If you win, you get double your bet. I've gotten the majority of the game programmed but I cannot figure out how to input the bet data from my xhtml form into the final results. [CODE]import cgi form = cgi.FieldStorage() nombre = form.getvalue("nombre") bet = form.getvalue("bet") # print HTTP/HTML headers print """Content-type: text/html <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML …

Member Avatar
Member Avatar
+0 forum 11

The End.