Daily Archives

Articles indexed Thursday May 27 2010

Page 26/122 | < Previous Page | 22 23 24 25 26 27 28 29 30 31 32 33  | Next Page >

  • How do I create a MessageBox in C# ?

    - by Nick Stinemates
    I have just installed C# for the first time, and at first glance it appears to be very similar to VB6. I decided to start off by trying to make a 'Hello, World!' UI Edition. I started in the Form Designer and made a button named "Click Me!" proceeded to double-click it and typed in MessageBox("Hello, World!"); I received the following error: MessageBox is a 'type' but used as a 'variable' Fair enough, it seems in C# MessageBox is an Object. I tried the following MessageBox a = new MessageBox("Hello, World!"); I received the following error: MessageBox does not contain a constructor that takes '1' arguments Now I am stumped. Please help.

    Read the article

  • How to handle error on other thread?

    - by markattwood
    Hi, I'm trying to handle errors that have occurred on other threads the .NET CF program is like below: static void Main() { Thread t = new Thread(Start); t.Start(); ... } void Start() { ... Exception here } In my situation, putting try catch in the Start method is impossible. How can I handle it in the global code?

    Read the article

  • For each element A[i] of array A, find the closest j such that A[j] > A[i]

    - by SamH
    Hi everyone. Given : An array A[1..n] of real numbers. Goal : An array D[1..n] such that D[i] = min{ distance(i,j) : A[j] > A[i] } or some default value (like 0) when there is no higher-valued element. I would really like to use Euclidean distance here. Example : A = [-1.35, 3.03, 0.73, -0.06, 0.71, -0.21, -0.12, 1.49, 1.41, 1.42] D = [1, 0, 1, 1, 2, 1, 1, 6, 1, 2] Is there any way to beat the obvious O(n^2) solution? The only progress I've made so far is that D[i] = 1 whenever A[i] is not a local maxima. I've been thinking a lot and have come up with NOTHING. I hope to eventually extend this to 2D (so A and D are matrices).

    Read the article

  • SharePoint: You cannot grant limited access permission level

    - by chiccodoro
    In my team, we implemented some UI to set user access rights (assign/revoke permission levels) on a certain SharePoint list. The UI supplies a "undo" feature: If you change the rights over the UI, you can restore the rights the user had before by clicking "undo". Now there is a problem if the user had the "Limited Access" permission level: This permission level is removed when you do a change over the UI. When trying to Undo, the permission level should be added again, which leads to a You cannot grant a user the limited access permission level. I've read that SharePoint grants that right automatically when a user gets access to some entity beneath the site. Still I can revoke the right manually, but then I cannot re-grant it. Is there a proper way I could work around that? My thoughts: Did I get it right that this "limited access" is granted by SharePoint on the site level only? So, do all the lists beneath the site only contain that permission level "accidentally" because they inherit it? Does that permission level have any effect at all on a list, or does it only apply to the site itself? So, would it be save to just remove it from a list and do not add it anymore when the user clicks "undo", since it has no effect anyway? (My UI always works on list / list item level, never on the whole site/web).

    Read the article

  • how can i show multipoint toolbox

    - by mariam
    Hi all I am new to c# language and i need help from you, i downloaded the multipoint SDK when i saw the tutorial video i noticed that the multipoint toolbox doesn't appear in left of screen? how can i do it .... please i really need your help in this beacuse I am using it for my graducation project and i got really interseted in this software please help me and i really appreciate your help thanks in advance Mariam

    Read the article

  • Rails Habtm with a field

    - by moshimoshi
    Hello, Is that possible to have a field in a has and belongs to many table? Just like favorite: create_table :messages_users, :id => false, :force => true do |t| t.integer :message_id, :null => false t.integer :user_id, :null => false t.boolean :favorite, :null => false t.timestamps end I saw timestamps works well, thanks to ActiveRecord. But when I try to add favorite into the table and then I try: Message.first.users << User.first Then I get this error message: ActiveRecord::StatementInvalid: SQLite3::SQLException: messages_users.favorite may not be NULL: INSERT INTO "messages_users" ("created_at", "message_id", "updated_at", "user_id") VALUES ('''2010-05-27 06:07 :50.721512''', 1, '''2010-05-27 06:07:50.721512''', 1) I would like to use a habtm, I don't like has_many foo though bar association :) Is that possible? Thanks a lot.

    Read the article

  • Creating Tasks in Excel

    - by Ellen
    I am detailing the tasks that I have to do for a certain project (am the sole developer), so I do not have the luxury of MS Project etc., and it has to be in MS Excel. What I would like to do is the following - Create Tasks, Sub Tasks in a way that the SubTasks are hidden beneath the tasks with a "+" sign for the Tasks, which when expanded, shows the SubTasks. This is similar to Grouping. How do I do that?

    Read the article

  • The Stackoverflow alert box, How is it done?

    - by Scott
    Question says it all. Can someone point me to an example of how they do the alerts at the top when a new message arrives or someone posts to my answers or I just have a notification.. Thanks. P.s. I would love a JQUERY solution, but can work with just a js solution.

    Read the article

  • Inverted colours in tiff to PDF conversion

    - by spiderdijon
    I'm sure I'm making some kind of silly mistake here, but when converting a tiff file to PDF, the colours become reversed. I can't figure out why. Here's my code: PdfWriter writer = PdfWriter.GetInstance(document, new FileStream("Image.pdf", FileMode.Create)); System.Drawing.Bitmap bm = new System.Drawing.Bitmap(@"C:\Temp\338814-00.tif"); int total = bm.GetFrameCount(FrameDimension.Page); document.Open(); PdfContentByte cb = writer.DirectContent; for (int k = 0; k < total; ++k) { bm.SelectActiveFrame(FrameDimension.Page, k); MemoryStream ms = new MemoryStream(); bm.Save(ms, ImageFormat.Tiff); Image img = Image.GetInstance(ms.ToArray()); img.ScalePercent(72f / (float)img.DpiX * 100); img.SetAbsolutePosition(0, 0); cb.AddImage(img); document.NewPage(); } document.Close(); Thanks.

    Read the article

  • What is the best way to connect to an Oracle database to build my own IDE? [closed]

    - by rima
    before answer me plz thinking about the futures of these kind of program and answer me plz. I wanna get some data from oracle server like: 1-get all the function,package,procedure and etc for showing them or drop them & etc... 2-compile my *.sql files,get the result if they have problem & etc... becuz I was beginner in oracle first of all I for solve the second problem I try to connect to sqlPlus by RUN sqlplus and trace the output(I mean,I change the output stream of shell and trace what happend and handle the assigned message to customer. NOW THIS PART SUCCEED. just a little bit I have problem with get all result because the output is asynchronous.any way... [in this case I log in to oracle Server by send argument to the sqlplus by make a process in c#] after that I try to get all function,package or procedure name,but I have problem in speed!so I try to use oracle.DataAccess.dll to connect the database. now I m so confusing about: which way is correct way to build a program that work like Oracle Developer! I do not have any experience for like these program how work. If Your answer is I must use the second way follow this part plz: I search a little bit the Golden,PLedit (Benthic software),I have little bit problem how I must create the connection string?because I thinking about how I can find the host name or port number that oracle work on them?? am I need read the TNSNames.Ora file? IF your answer is I must use the first way follow this part plz: do u have any Idea for how I parse the output?because for example the result of a table is so confusing...[i can handle & program it but I really need someone experience,because the important things to me learn how such software work so nice and with quick response?] All of the has different style in output... If you are not sure Can u help me which book can help me in this way i become expert? becuz for example all the C# write just about how u can connect to DB and the DB books write how u can use this DB program,I looking for a book that give me some Idea how develop an interface for do transaction between these two.not simple send and receive data,for example how write a compiler for them. the language of book is not different for me i know C#,java,VB,sql,Oracle Thanks.

    Read the article

  • Time in "Upload Received"

    - by rpeck1682
    I uploaded an app to itunes connect yesterday afternoon. It has been in the "Upload Received" stage ever since then. I uploaded a different app today, it was in that stage for only five minutes. This is the first time I've submitted since the new, more detailed status updates were present. I'm just wondering if the app sitting there in that state for so long seems like something to be concerned about. I'm guessing by staying in that state that it isn't being put on the review queue. Anyways, has anyone else had a similar experience?

    Read the article

  • prevent other event keydown on change

    - by Nik
    Hi, on my textbox i have 2 events onchange and keydown(for enter) now i did validation on onchange event if any validation fail then i raise alert but when i press press enter button if validation failed then i dont want to execute keydown event any suggestion Thanks, Nik

    Read the article

  • custom UIButton with skewed area in iPhone

    - by sugar
    I want to have a button on a screen with this image. this image is transparent from its corners as you can see here. UIButton *btn=[UIButton buttonWithType:UIButtonTypeCustom]; [btn setFrame:CGRectMake(xCo, yCo, kImageSizeWidth, kImageSizeHeight)]; [btn setImage:[UIImage imageNamed:@"aboveImg.png"] forState:UIControlStateNormal]; [btn addTarget:self action:@selector(btnTapped:) forControlEvents:UIControlEventTouchDown]; But the button tap is recognized out side image & i don't want that kind of functionality. I mean tap must be recognized only when it is tapped within image not outside image. How is that possible ? Thanks in advance for sharing your great knowledge. Sagar.

    Read the article

  • What is the best way to render sprites using OpenGL?

    - by Sam152
    I have been digging around for the past couple of days for a good way to render small sprites using OpenGL and glut. I have tried different libraries including EasyBMP and a few others but all of them seem to have some sort of problem with them that I cannot solve. I want to be able to take image data (I don't care what format it is or what I have to do to it to get it to work) and under the context of games programming use it on the screen. What is the best way to achieve this? I seem to be running around in circles.

    Read the article

  • Storing and retrieving dynamically created pdf in sql

    - by mwright
    I have been playing around with creation of pdf documents for a project that I'm working on. I would like to store the generated pdf document in a SQL database and then later be able to retrieve this pdf as well. What are some suggestions for doing this? Can the document be stored in the database without physically creating the document on the server?

    Read the article

  • Tree View Control problem with render Control function

    - by vikas
    I am using TreeView Control in Asp.net. I have placed this control inside a panel. The tree control is completely binded (we don’t want populate on demand) with an Xmldatasource during a callback and then I call Panel.renderControl to return the response (HTML) to the client side callback handler. Problem: 1. The tree expand/collapse (on click of plus sign) is causing postback whereas when I normally bind a tree with xml during postback and without using renderControl of container control, the expand/collapse (on click of plus sign) is being handled at client side.

    Read the article

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