Wednesday, 17 January 2007
|
| NEED INTERVIEW QUS IN C Reka Rabri 14:25:41 |
| | [-- Ever heard of Google? --mod PN]
HI everybody i need some interview questions for C could any of u help me thanks in adv
__________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
To unsubscribe, send a blank message to <mailto:c-prog-unsubscribe-hHKSG33TihhbjbujkaE4pw@public.gmane.org>. Yahoo! Groups Links
<*> To visit your group on the web, go to: http://groups.yahoo.com/group/c-prog/
<*> Your email settings: Individual Email | Traditional
<*> To change settings online go to: http://groups.yahoo.com/group/c-prog/join (Yahoo! ID required)
<*> To change settings via email: mailto:c-prog-digest-hHKSG33TihhbjbujkaE4pw@public.gmane.org mailto:c-prog-fullfeatured-hHKSG33TihhbjbujkaE4pw@public.gmane.org
<*> To unsubscribe from this group, send an email to: c-prog-unsubscribe-hHKSG33TihhbjbujkaE4pw@public.gmane.org
<*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
|
| | 2 answer | Add comment |
|
| [ROOT] reading a TTree with a different TTree X. Lu 12:30:31 |
| | Dear Rene,
I have a problem concerning about reading a TTree with a slightly different TTree.
Let me just simplify the problem as below: 1. I have 2 TTree, namely tA and tB. They are different just because tB have some additional variables. 2. I have a data file using tA to stroe my data. 3. I use tB to read the data file.
My question is : Will there be any mistakes happening? I am worring about the TBranch::SetAddress( ) will be misfunctioning because of the additional variables.
Thanks a lot!
Best Regards, Xianguo
-- Take flight into the sky, beyond the moon, beyond my mind.
Xianguo LU Physics Department, Peking University Beijing, China Tel: 0086-10-62753888(o)
|
| | 1 answer | Add comment |
|
| [ROOT] Re: [Fwd: python hangs] Rene Brun 10:52:29 |
| | Looking at the recent mails about ROOT with Qt, PyRoot, I would like to make some remarks:
-We will continue to support the Qt interfaces if the people outside the ROOT team who have supported these interfaces so far continue to do so. However, we strongly recommend the direct use of the ROOT GUI instead with no external dependencies. We are convinced that this will pay in the medium/long term. None of the GUIS made with Qt that we have seen so far are superior to pure ROOT GUIs, and they have generated more problems/questions than initially anticipated.
-When reporting problems combining the 3 systems ROOT, Qt and PyRoot, it would be nice if the problem could be reduced to 2 systems only, eg ROOT GUI and PyRoot or ROOT/Qt with CINT/C++ only.
-The PyRoot interface has been consolidated across successive versions (thanks Wim). It would be nice if people reporting problems could make the effort to run the test with more recent versions.
Rene Brun
WLavrijsen@lbl.gov wrote:> Valeri,>
could be: the Qt3 event dispatcher is not re-entrant (this is fixed in Qt4),> and in those cases the thread can cause issues.> Herb, do you happen to be running Qt3 (set through .rootrc)? It doesn't (in> my mind) explain all the issues that you describe, in particular:> "ROOT.gSystem.Exit(0) hangs"> would be rather unexpected, b/c the python GIL prevents mixing of individual> thread calls during a call through the PyROOT layer (i.e. once the above call> is initiated, PyROOT no longer sends any gSystem.ProcessEvents() calls).> Best regards,> Wim> --> Wim.Lavrijsen@cern. ch -- WLavrijsen@lbl.gov -- www.lavrijsen.net> "Stop making excuses for your software." --first step towards quality> "GIGO is not a valid design pattern." --corollary>
|
| | Add comment |
|
| [ROOT] TChain & Symbol chain is not defined in current scope Nevzat Guler 07:36:19 |
| | Hello, I wrote the short program below to chain many root files together. In the root session I link the program: root [25] .L myChain.C
Then I run the program as: root [26] myChain(28074, 28080);
it does not complain about anything. So i assume it chained all the root files in the list. Then I try to draw saomething from the chain by saying: root [27] chain.Draw("IPLOTS.ECT_el:IPLOTS.ECin_el >> h2","","colz");
it says: Error: Symbol chain is not defined in current scope (tmpfile):1: Error: Failed to evaluate chain.Draw("IPLOTS.ECT_el:IPLOTS.ECin_el >> h2","","colz")Possible candidates are... filename line:size busy function type and name *** Interpreter error recovered ***
Program myChain.C is printed below:
P.S. In this program I also tried to pass root file name quoted as "28074.root" by creating the file name accordingly. But it also did not work. I concluded it is not issue with " sign. In the version below I dont have " sign attached to the ends of root file name..
Thank you very much with your inputs..
Nevzat Guler
#include <stdlib.h> #include <vector> #include <iostream> #include <fstream> #include <stdio.h> #include <stdarg.h> #include <string.h> #include "TCanvas.h" #include "TVirtualPad.h" #include "TPostScript.h" #include "TLegend.h" #include "TChain.h" using namespace std; #include "/u/home/nguler/inc/utils.h"
void myChain(int minrun, int maxrun) {
TChain chain("T"); for (int run=minrun; run<=maxrun; run++) {
string filepathName = "/p/clas-disk1/nevzat/trees/group/"; string runstring; runstring = IntToString( run ); string file(runstring); file.append(".root");
filepathName.append(file); int fileExist = 0; fileExist = pathExists( filepathName.c_str() );
if ( fileExist == 1 ) { cout << "Adding " << file << endl; chain.Add( file.c_str() ); }
}
}
|
| | 2 answer | Add comment |
|
| [ROOT] ROOT Gui with pyRoot Johan Bregeon 06:34:35 |
| | Hello all, our purpose is to build a ROOT application with a ROOT Gui using pyRoot within ROOT v5.14.00. here is a simple piece of code, that tries to reproduce the example of Chapter 2 of root documentation : ftp://root.cern.ch/root/doc/chapter26.pdf
Our main problems are : 1) the application hangs up when closing the gui window clicking on the 'cross' : it looks like the overriding of the "CloseWindow" methode is not taken into account. 2)Is "app = ROOT.gApplication" the right way of getting the current application instanced by pyRoot ? 3) it's not stable : the 'external X11 window' is displayed quite 'randomly'. You run the code once, it's there. You run it twice, it's not there anymore. 4) the Connect methode on the button widget gives nice crash, complaining that on of the argument is not of a pointer type (very likely need to use sip here ?)
Thanks for any comments, Best Regards, Johan
------------------------------------------------------------ #!/bin/env python import sys import os import ROOT
class gMainFrame(ROOT.TGMainFrame):
def __init__(self, parent, width, height): ROOT.TGMainFrame.__init__(self, parent, width, height)
def CloseWindow(self): print "closing" ROOT.gApplication.Terminate(0)
class gMainWindow():
def __init__(self, parent, width, height, app): self.Application = app self.MainFrame = gMainFrame(parent, width, height) self.Canvas = ROOT.TRootEmbeddedCanvas("Canvas",\ self.MainFrame, 200, 200) self.MainFrame.AddFrame(self.Canvas, ROOT.TGLayoutHints()) self.ButtonsFrame = ROOT.TGHorizontalFrame(self.MainFrame, 200, 40) self.DrawButton = ROOT.TGTextButton(self.ButtonsFrame, '&Draw')
# Following line give a seg. fault #self.DrawButton.Connect('clicked()', 'gMainWindow', self, 'draw()') self.ButtonsFrame.AddFrame(self.DrawButton, ROOT.TGLayoutHints()) self.ExitButton = ROOT.TGTextButton(self.ButtonsFrame, '&Exit') self.ButtonsFrame.AddFrame(self.ExitButton, ROOT.TGLayoutHints()) self.MainFrame.AddFrame(self.ButtonsFrame, ROOT.TGLayoutHints()) self.MainFrame.SetWindowName('My first GUI') self.MainFrame.MapSubwindows() self.MainFrame.Resize(self.MainFrame.GetDefaultSize()) self.MainFrame.MapWindow() def __del__(self): self.MainFrame.Cleanup() self.Application.Terminate(0)
if __name__ == '__main__': ROOT.gROOT.Reset() app = ROOT.gApplication window = gMainWindow(ROOT.gClient.GetRoot(), 200, 200, app) print "Is gApplication running ? %d" % app.IsRunning() app.Run() ------------------------------------------------------------
|
| | 1 answer | Add comment |
|
| 3.1 linker options George Wyche 06:12:24 |
| | Where can I find a description of options to the Turbo C++ 3.1 linker?
The IDE has lots of options but I do not know what those resolve to when the compiler and linker are run.
I have a command line example that compiles to working code that I have not been able to duplicate through the IDE.
gw@citasystems.com
|
| | 7 answers | Add comment |
|
| [ROOT] gfortran vs g77 Roger Mason 00:44:55 |
| | Hello,
I recently upgraded my systems, which now use gcc 4.1.1 vs 3.x.y. I noticed when configuring root 5.14 that g77 was not found (which is expected) but then gfortran was not found either.
I could not find any references to gfortran in the docs or in a search of the root web-site.
How do I enable gfortran?
Thanks,
Roger
|
| | 2 answer | Add comment |
Tuesday, 16 January 2007
|
| [ROOT] Checking user-entered expressions for validity Tom Roberts 19:02:05 |
| | In my Root application the user can enter several arbitrary expressions using any C functions and operators, and the branch names of a selected TNtuple (all names are valid C identifiers). It then creates a function scan() that will scan the TNtuple using these expressions, writing it to the file ".scan.C", and does: Int_t err=TInterpreter::kNoError; gROOT->ProcessLineSync(".L .scan.C",&err); if(err != TInterpreter::kNoError) { new TGMsgBox(gClient->GetRoot(),window,"Error", "Invalid Expression(s)"); return false; } scan(); // call the generated function
This works fine as long as the expressions are valid. Unfortunately, if any expression is invalid, Cint prints an error message to stderr and never returns from ProcessLineSync(). To the user this is disconcerting, as no sensible error message is presented (the user probably won't watch stderr, which may not be visible in a graphical environment).
How can I get Cint to return to the program when there is an error loading the file?
Alternatively, how can I test the individual expressions for validity? -- all my attempts have failed, either Cint does not return an error for an invalid expression (!), or it does not return from ProcessLineSync(), or it goes crazy: When I tried this Cint got into a strange state that could not write any files or do anything useful: Int_t err=-99; char *str = "{\nfloat x,y;\n.p x+y;\n}\n"; gROOT->ProcessLineSync(str,&err); Omitting the braces makes it merely not return when an invalid expression is given.
Do I need to follow Rube Goldberg and: set a timer for 500 ms in the future call ProcessLineSync() clear the timer if it returns success ... display an error MsgBox if the timer fires
Note this is always done in response to a GUI button push, and the fact that ProcessLineSync() does not return does not seem to bother the application.
This is Root version 5.12/00.
Tom Roberts
|
| | 3 answer | Add comment |
|
| Required help for painting in MFC/Win32! Gopi Krishna Komanduri 15:32:10 |
| | Hi , I have written a basic win32 application which will draw a rectangle once we click a button. But whenever we resize or Minimizs/Maximize the window , it is being painted by background. I don't understand which event I need to handle. I was suggested to use WM_PAINT/WM_SIZE , but while handling this event , when we don't know how many rectangles etc were drawn on client surface how can we restore them once we resized . My code is: #include<afxwin.h> #define btnmsg WM_USER+10 class paintfrm ublic CFrameWnd { CButton *btn; public: paintfrm() { btn=new CButton(); Create(NULL,"Paint"); btn->C reate("Abcd",WS_CHILD|WS_VISIBLE|BS_PUSHBUTTON,CRect(0,0,50,50),this,btnmsg);
} void onpush() { CClientDC dc(this); POINT pnt; pnt.x=50; pnt.y=50; dc.MoveTo(pnt); RECT r; r.left=r.top=50; r.right=r.bottom=100;
dc.Rectangle(&r); } DECLARE_MESSAGE_MAP() }; BEGIN_MESSAGE_MAP(paintfrm,CFrameWnd) ON_COMMAND(btnmsg,onpush) END_MESSAGE_MAP() class myapp ublic CWinApp { public: BOOL InitInstance() & nbsp; { m_pMainWnd=new paintfrm(); m_pMainWnd->ShowWindow(1); m_pMainWnd->UpdateWindow(); return 1; } }; myapp app;
Thanks&Regards, Gopi.k
---------------------------------------------------------------------
Access over 1 million songs - Yahoo! Music Unlimited. [http://pa.yahoo.com/*http://us.rd.yahoo.com/evt=36035/*http://music.yahoo.com/unlimited/] __._,_.___
To unsubscribe, send a blank message to <mailto:c-prog-unsubscribe-hHKSG33TihhbjbujkaE4pw@public.gmane.org>.
[IMAGE]
SPONSORED LINKS
C and c++ [http://groups.yahoo.com/gads;_ylc=X3oDMTJjOHJjOWhjBF9TAzk3NDc2NTkwBF9wAzEEZ3JwSWQDMTAxMzEzOQRncnBzcElkAzE3MDUwMDY3ODgEc2VjA3NsbW9kBHN0aW1lAzExNjg5NTA3MzQ-?t=ms&k=C+and+c++&w1=C+and+c++&w2=Computer+programming+languages&w3=Java+programming+language&w4=Basic+programming+language&w5=Programming+languages&c=5&s=141&g=0&.sig=rSEcR7B64_R_zU_FQFo8Yw]
Computer programming languages [http://groups.yahoo.com/gads;_ylc=X3oDMTJjM2IyazgzBF9TAzk3NDc2NTkwBF9wAzIEZ3JwSWQDMTAxMzEzOQRncnBzcElkAzE3MDUwMDY3ODgEc2VjA3NsbW9kBHN0aW1lAzExNjg5NTA3MzQ-?t=ms&k=Computer+programming+languages&w1=C+and+c++&w2=Computer+programming+languages&w3=Java+programming+language&w4=Basic+programming+language&w5=Programming+languages&c=5&s=141&g=0&.sig=Vd_u-m2YOwh3rQSMWegmwA]
Java programming language [http://groups.yahoo.com/gads;_ylc=X3oDMTJjYm91cnJhBF9TAzk3NDc2NTkwBF9wAzMEZ3JwSWQDMTAxMzEzOQRncnBzcElkAzE3MDUwMDY3ODgEc2VjA3NsbW9kBHN0aW1lAzExNjg5NTA3MzQ-?t=ms&k=Java+programming+language&w1=C+and+c++&w2=Computer+programming+languages&w3=Java+programming+language&w4=Basic+programming+language&w5=Programming+languages&c=5&s=141&g=0&.sig=f1DTT2uu_E_QAECbDXxOfg]
Basic programming language [http://groups.yahoo.com/gads;_ylc=X3oDMTJjcHJuZnZtBF9TAzk3NDc2NTkwBF9wAzQEZ3JwSWQDMTAxMzEzOQRncnBzcElkAzE3MDUwMDY3ODgEc2VjA3NsbW9kBHN0aW1lAzExNjg5NTA3MzQ-?t=ms&k=Basic+programming+language&w1=C+and+c++&w2=Computer+programming+languages&w3=Java+programming+language&w4=Basic+programming+language&w5=Programming+languages&c=5&s=141&g=0&.sig=mV-_2bL0rNwDv9i32NUkQw]
Programming languages [http://groups.yahoo.com/gads;_ylc=X3oDMTJjb2VlYTE0BF9TAzk3NDc2NTkwBF9wAzUEZ3JwSWQDMTAxMzEzOQRncnBzcElkAzE3MDUwMDY3ODgEc2VjA3NsbW9kBHN0aW1lAzExNjg5NTA3MzQ-?t=ms&k=Programming+languages&w1=C+and+c++&w2=Computer+programming+languages&w3=Java+programming+language&w4=Basic+programming+language&w5=Programming+languages&c=5&s=141&g=0&.sig=JIolLBEyTuBhWnCNFXDJug]
Your email settings: Individual Email|Traditional Change settings via the Web [http://groups.yahoo.com/group/c-prog/join;_ylc=X3oDMTJmN21oZzhkBF9TAzk3NDc2NTkwBGdycElkAzEwMTMxMzkEZ3Jwc3BJZAMxNzA1MDA2Nzg4BHNlYwNmdHIEc2xrA3N0bmdzBHN0aW1lAzExNjg5NTA3MzQ-] (Yahoo! ID required) Change settings via email: Switch delivery to Daily Digest [mailto:c-prog-digest-hHKSG33TihhbjbujkaE4pw@public.gmane.org?subject=Email Delivery: Digest] | Switch to Fully Featured [mailto:c-prog-fullfeatured-hHKSG33TihhbjbujkaE4pw@public.gmane.org?subject=Change Delivery Format: Fully Featured] Visit Your Group [http://groups.yahoo.com/group/c-prog;_ylc=X3oDMTJkMzQycTJxBF9TAzk3NDc2NTkwBGdycElkAzEwMTMxMzkEZ3Jwc3BJZAMxNzA1MDA2Nzg4BHNlYwNmdHIEc2xrA2hwZgRzdGltZQMxMTY4OTUwNzM0] | Yahoo! Groups Terms of Use [http://docs.yahoo.com/info/terms/] | Unsubscribe [mailto:c-prog-unsubscribe-hHKSG33TihhbjbujkaE4pw@public.gmane.org?subject=Unsubscribe]
__,_._,___
|
| | Add comment |
|
| public 'std::swap...) in module 'xxx' clashes with prior module 'yyy' Jeff Kish 00:29:01 |
| | Hi.
I'm noticing this warning when creating a library with borland 5.02:
public 'std::swap...) in module 'xxx' clashes with prior module 'yyy'
I'm ot sure of the significance of this or how to fix it. I can take a guess but am looking for some guidance/recoomendations.
thanks Jeff Kish
|
| | 2 answer | Add comment |
Monday, 15 January 2007
|
| [ROOT] How to install Root under Windows OS? Guest 17:21:37 |
| | Dear Rooters,
I want to install Root packages under Windows OS and work with VC++ (dot.net). I downloaded the libraries and specified the path in the VC++ (include) and after the compilation , link errors were ocurred. The problem, that VC++ was unable to find the Root libraries. For example, I used TMath:: class but after the compilation, VC++ did not find this library, although I specified it in the beginning of the program.
What should I do, in order to install the Root package with the VC++ ?
Thanks.
-- Sincerely,
Andrey K.
************************************************************* * Andrey Kormilitsin * * * * * * Department of * * * Particle Physics * * * School of Physics * Tel: ++ 972- 3 - 640 7954 (o) * * Tel Aviv University * * * Ramat Aviv,Tel Aviv * E-mail: andreyk1@post.tau.ac.il * * 69978, ISRAEL * * * * * *************************************************************
---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program.
|
| | 1 answer | Add comment |
|
| [ROOT] TDSet::Process(TSelector * selector) missing Antonio Bulgheroni 17:07:05 |
| | Dear ROOTers, apologies for bothering you with another question about PROOF, but the more I (try to) use it, the more I like.
So far, I have prepare a brand new custom selector inheriting from TSelector and I've filled in all the automatically generated methods and I've added my personal methods and data members. To work properly, this TAnalsysSelector needs to be set up before executed. I mean, I have to set few variables before calling tree->Process(mySelector). While this is possible when working w/o PROOF, I can't find a way when working w/ PROOF because TDSet::Process(TSelector*) is missing and the only available method is TDSet::Process(const char*). In my case this is going to fail, because I have no more chance to set up the TAnalysisSelector.
What's wrong? Is there another way out? Is it possible to have TDSet::Process(TSelector*)?
Thanks a lot,
Antonio
-- Antonio Bulgheroni, PhD
Win98 error 001: Unexpected condition: booted without crashing.
|
| | 6 answers | Add comment |
|
| Problem with code generation for local vars and setjmp/longjmp exception handling Oliver Keil 16:39:34 |
| | I ran into a problem with an exception handler using setjmp/longjmp in the cleanup portion of a function.
The function initializes a local pointer variable to NULL before calling some other functions that may "trigger" the exception handler. When an error occurs, those functions "return" with a longjmp into the function and execute some cleanup code, (for example release memory).
Short summary of the problem: Before calling any of the functions that could trigger the exception handler, the local pointer is initialized to NULL. Then later in the code the pointer may become non NULL if memory is allocated. In the cleanup portion it is checked if the pointer is non NULL, if so, memory is referenced. BOOM!
I found that, allthough I explicitely set the pointer to NULL before calling the function that triggers the exception, it is NOT NULL when the cleanup code is executed.
p = NULL; funcThatTriggersExceptionHandler();
p = otherFunction(); ... ... return
exceptionHandler: if (p != NULL) { p->IsUsed = FALSE;//>> crash }
I compiled the same code with other compilers (MS, WATCOM) and could not reproduce the problem.
Then after running BCC compile to generate Assembly output, I found that the Bcc generated code is the problem.
The problem is that the local variable p is NOT written back into the stack before calling the function. (it is held in register ecx)
As it is referenced few lines below with p = other..., probably BCC does not see necessary to generate code to write the variable.
I found out that I could force writing by inserting some additional statement like this: (This code does NOT crash, when the exceptionHandler is triggered p is NULL):
p = NULL; p = p; funcThatTriggersExceptionHandler(...);
p = otherFunction(...); ...
Also, if I initialize the local variables very early on top of the function, the code is generated correctly to write the NULL value into the stack: (So I know the variable is at epb-12)
xor eax, eax move dword ptr [ebp-12], eax
==>> This worries me a bit, because that means if BCC does not correctly generate code to save the value of local vars, I cannot be sure of the value of those vars whenever an exception handler is triggered and the current value is checked for some cleanup action.
Can this be seen as a Bug in BCC?? (maybe known already?)
The only workaround I see would be to go through all the code with exceptionHandlers that checks local vars and make sure those vars have a (stupid looking) self assignment before any function is called that may trigger code that does longjmp to an exception handler.
Any other suggestions?
|
| | 3 answer | Add comment |
|
| [ROOT] TGFileDialog's NewFolder ignores changed directory Fred L Youhanaie 15:27:30 |
| | Hi,
I don't know if this is a feature or a bug.
In TGFileDialog the "Create New Folder" button always creates the new folder in the directory where root is running, rather than where the TGFileDialog has navigated to.
Here is an example where we attempt to create a new folder, dir1, and another one, dir2, inside dir1.
root [1] new TCanvas - hit ctrl-S, File Dialog comes up - click on new folder button - enter dir1 as new directory name - dir1 is created - double click on dir1 (the view should show an empty directory) - click on new folder button - enter dir2 as new directory name - dir2 is created, but at the same level as dir1 instead of inside dir1.
This is on root 5.14, built from source on FC2.
thanks and regards f.
|
| | 4 answer | Add comment |
Sunday, 14 January 2007
|
| C++ templates N/A 19:47:03 |
| | Hi,
I am trying to write a generic template class that uses a generic map data member over the parametrized types, so it looks like this:
template <class A, class C> class MyClass{
public: typedef map<A,A,C> myMapType; //keys and values of type A, comparator of type C.
void myMethod() { };
private: myMapType _myMapInstance; }
Now I would like myMethod() to iterate over the data _myMapInstace, so I need an iterator of type myMapType::iterator.
Suppose I declare : typename myMapType::iterator myIterator; within the class definition,
and declare myMethod as: void myMethod() { myIterator iter = _myMapInstance.begin(); compiler errors: -warning: statement has no effect &nbs p; -error: expected `;' before "iter"
// some more code...
}
the compiler won't compile my code and I get the blue error messages. Putting the typename definition just before the creation of the iterator yields the same result.
What am I doing wrong? How can I define an iterator over _myMapInstance, when the exact type of myMapType is dependent on the parametrized values A, C.
Thanks a lot!
Eden. __._,_.___
To unsubscribe, send a blank message to <mailto:c-prog-unsubscribe-hHKSG33TihhbjbujkaE4pw@public.gmane.org>.
[IMAGE]
SPONSORED LINKS
C and c++ [http://groups.yahoo.com/gads;_ylc=X3oDMTJjZTU3MXVtBF9TAzk3NDc2NTkwBF9wAzEEZ3JwSWQDMTAxMzEzOQRncnBzcElkAzE3MDUwMDY3ODgEc2VjA3NsbW9kBHN0aW1lAzExNjg2MDY0MzA-?t=ms&k=C+and+c++&w1=C+and+c++&w2=Computer+programming+languages&w3=Java+programming+language&w4=Basic+programming+language&w5=Programming+languages&c=5&s=141&g=0&.sig=rSEcR7B64_R_zU_FQFo8Yw]
Computer programming languages [http://groups.yahoo.com/gads;_ylc=X3oDMTJjajJnbGdiBF9TAzk3NDc2NTkwBF9wAzIEZ3JwSWQDMTAxMzEzOQRncnBzcElkAzE3MDUwMDY3ODgEc2VjA3NsbW9kBHN0aW1lAzExNjg2MDY0MzA-?t=ms&k=Computer+programming+languages&w1=C+and+c++&w2=Computer+programming+languages&w3=Java+programming+language&w4=Basic+programming+language&w5=Programming+languages&c=5&s=141&g=0&.sig=Vd_u-m2YOwh3rQSMWegmwA]
Java programming language [http://groups.yahoo.com/gads;_ylc=X3oDMTJjYWE3ZmRkBF9TAzk3NDc2NTkwBF9wAzMEZ3JwSWQDMTAxMzEzOQRncnBzcElkAzE3MDUwMDY3ODgEc2VjA3NsbW9kBHN0aW1lAzExNjg2MDY0MzA-?t=ms&k=Java+programming+language&w1=C+and+c++&w2=Computer+programming+languages&w3=Java+programming+language&w4=Basic+programming+language&w5=Programming+languages&c=5&s=141&g=0&.sig=f1DTT2uu_E_QAECbDXxOfg]
Basic programming language [http://groups.yahoo.com/gads;_ylc=X3oDMTJjMW5ydmUzBF9TAzk3NDc2NTkwBF9wAzQEZ3JwSWQDMTAxMzEzOQRncnBzcElkAzE3MDUwMDY3ODgEc2VjA3NsbW9kBHN0aW1lAzExNjg2MDY0MzA-?t=ms&k=Basic+programming+language&w1=C+and+c++&w2=Computer+programming+languages&w3=Java+programming+language&w4=Basic+programming+language&w5=Programming+languages&c=5&s=141&g=0&.sig=mV-_2bL0rNwDv9i32NUkQw]
Programming languages [http://groups.yahoo.com/gads;_ylc=X3oDMTJjMThnN201BF9TAzk3NDc2NTkwBF9wAzUEZ3JwSWQDMTAxMzEzOQRncnBzcElkAzE3MDUwMDY3ODgEc2VjA3NsbW9kBHN0aW1lAzExNjg2MDY0MzA-?t=ms&k=Programming+languages&w1=C+and+c++&w2=Computer+programming+languages&w3=Java+programming+language&w4=Basic+programming+language&w5=Programming+languages&c=5&s=141&g=0&.sig=JIolLBEyTuBhWnCNFXDJug]
Your email settings: Individual Email|Traditional Change settings via the Web [http://groups.yahoo.com/group/c-prog/join;_ylc=X3oDMTJmdmQ4djdtBF9TAzk3NDc2NTkwBGdycElkAzEwMTMxMzkEZ3Jwc3BJZAMxNzA1MDA2Nzg4BHNlYwNmdHIEc2xrA3N0bmdzBHN0aW1lAzExNjg2MDY0MzA-] (Yahoo! ID required) Change settings via email: Switch delivery to Daily Digest [mailto:c-prog-digest-hHKSG33TihhbjbujkaE4pw@public.gmane.org?subject=Email Delivery: Digest] | Switch to Fully Featured [mailto:c-prog-fullfeatured-hHKSG33TihhbjbujkaE4pw@public.gmane.org?subject=Change Delivery Format: Fully Featured] Visit Your Group [http://groups.yahoo.com/group/c-prog;_ylc=X3oDMTJkbzQ0b2MwBF9TAzk3NDc2NTkwBGdycElkAzEwMTMxMzkEZ3Jwc3BJZAMxNzA1MDA2Nzg4BHNlYwNmdHIEc2xrA2hwZgRzdGltZQMxMTY4NjA2NDMw] | Yahoo! Groups Terms of Use [http://docs.yahoo.com/info/terms/] | Unsubscribe [mailto:c-prog-unsubscribe-hHKSG33TihhbjbujkaE4pw@public.gmane.org?subject=Unsubscribe]
__,_._,___
|
| | 3 answer | Add comment |
|
| regarding binary and text files Murali Krishna M 17:04:59 |
| | Hello Everyone,
I would like to know why there is difference in size of empty binary file and empty text file ? Please post reply as early as possible.
Thank you, Murali
To unsubscribe, send a blank message to <mailto:c-prog-unsubscribe-hHKSG33TihhbjbujkaE4pw@public.gmane.org>. Yahoo! Groups Links
<*> To visit your group on the web, go to: http://groups.yahoo.com/group/c-prog/
<*> Your email settings: Individual Email | Traditional
<*> To change settings online go to: http://groups.yahoo.com/group/c-prog/join (Yahoo! ID required)
<*> To change settings via email: mailto:c-prog-digest-hHKSG33TihhbjbujkaE4pw@public.gmane.org mailto:c-prog-fullfeatured-hHKSG33TihhbjbujkaE4pw@public.gmane.org
<*> To unsubscribe from this group, send an email to: c-prog-unsubscribe-hHKSG33TihhbjbujkaE4pw@public.gmane.org
<*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
|
| | 3 answer | Add comment |
|
| Multiple threads plus ring buffer. Luis_mikkle 07:25:55 |
| | Dear all,
My program scenario is as follows.
Three threads (thread 1-3) will fetch values from the ring buffer. E.g. after one thread gets one value from ring buffer of which length is 100, the outputIndex of ring buffer will be decreased by one, per time.
Meanwhile, there is anther thread (thread 4), which has the functionality of re-filling the ringbuffer. E.g. when OutputIndex of ringbuffer equals to 0, the thread will start to re-fill the ringbuffer. Otherwise, it will be blocked / suspended.
My question is that how shall I play this scenario. I am newbie in thread, and there are not so many discriptive and simple thread programs. I wrote a snippet of code as follows. For my code, Although ringbuffer.outputIndex equals to 0, it is never initialized by thread 4. Is there anyone can help me a little, and some improvements of my code?
DWORD WINAPI init_ringbuffer() { // ring buffer initialization. ... }
void createThread_4(void) { HANDLE Handle_Of_Thread_4; Handle_Of_Thread_4 = CreateThread( NULL, 0, init_ringbuffer, NULL, CREATE_SUSPENDED, NULL); if (ringbuffer.outputIndex == 0) { ResumeThread( Handle_Of_Thread_4 ); } else { //Keep thread blocked. } }
int main() { // Declaration of ring buffer.
createThread123(); createThread_4();
// Wait for all the threads terminate, and close them. ...
}
To unsubscribe, send a blank message to <mailto:c-prog-unsubscribe-hHKSG33TihhbjbujkaE4pw@public.gmane.org>. Yahoo! Groups Links
<*> To visit your group on the web, go to: http://groups.yahoo.com/group/c-prog/
<*> Your email settings: Individual Email | Traditional
<*> To change settings online go to: http://groups.yahoo.com/group/c-prog/join (Yahoo! ID required)
<*> To change settings via email: mailto:c-prog-digest-hHKSG33TihhbjbujkaE4pw@public.gmane.org mailto:c-prog-fullfeatured-hHKSG33TihhbjbujkaE4pw@public.gmane.org
<*> To unsubscribe from this group, send an email to: c-prog-unsubscribe-hHKSG33TihhbjbujkaE4pw@public.gmane.org
<*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
|
| | Add comment |
Saturday, 13 January 2007
Friday, 12 January 2007
|
| Domain error. Lars Finsen 23:55:09 |
| | Hm, I wonder how the sqrt function can give a DOMAIN error. The call occurs in a pretty straightforward statement: if(nmon<15) c /= sqrt (15-nmon);
Possibly I could have violated the address of nmon earlier or that sort of thing...
LEF
To unsubscribe, send a blank message to <mailto:c-prog-unsubscribe-hHKSG33TihhbjbujkaE4pw@public.gmane.org>. Yahoo! Groups Links
<*> To visit your group on the web, go to: http://groups.yahoo.com/group/c-prog/
<*> Your email settings: Individual Email | Traditional
<*> To change settings online go to: http://groups.yahoo.com/group/c-prog/join (Yahoo! ID required)
<*> To change settings via email: mailto:c-prog-digest-hHKSG33TihhbjbujkaE4pw@public.gmane.org mailto:c-prog-fullfeatured-hHKSG33TihhbjbujkaE4pw@public.gmane.org
<*> To unsubscribe from this group, send an email to: c-prog-unsubscribe-hHKSG33TihhbjbujkaE4pw@public.gmane.org
<*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
|
| | 3 answer | Add comment |
|