Daily Archives

Articles indexed Saturday April 24 2010

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

  • Boost and XML (c++)

    - by Nuno
    Hi, Is there any good way (and a simple way too) using boost to read and write xml files? I can't seem to find any simple sample to read xml files using boost? (can you point me some simple sample that use boost for reading and writing xml files) If not boost, is out there any good and simple library to read and write xml files that you can recommend? (it must be a c++ library) Thanks Nuno

    Read the article

  • Semantic Diff Utilities

    - by rubancache
    I'm trying to find some good examples of semantic diff/merge utilities. The traditional paradigm of comparing source code files works by comparing lines and characters.. but are there any utilities out there (for any language) that actually consider the structure of code when comparing files? For example, existing diff programs will report "difference found at character 2 of line 125. File x contains v-o-i-d, where file y contains b-o-o-l". A specialized tool should be able to report "Return type of method doSomething() changed from void to bool". I would argue that this type of semantic information is actually what the user is looking for when comparing code, and should be the goal of next-generation progamming tools. Are there any examples of this in available tools?

    Read the article

  • ProgressDialog does not display until after AsyncTask completes

    - by tedwards
    I am trying to display an indefinite ProgressDialog, while an AsyncTask binds to a RemoteService. The RemoteService builds a list of the users contacts when the service is first created. For a long list of contacts this may take 5~10 seconds. The problem I am having, is that the ProgressDialog does not display until after the RemoteService has built it's list of contacts. I even tried putting a Thread.sleep in to give the ProgressDialog time to show up. With the sleep statement the ProgressDialog loads and starts spinning, but then locks up as soon as the RemoteService starts doing it's work. If I just turn the AsyncTask into dummy code, and just let it sleep for a while, everything works fine. But when the task has to do actual work, it is like the UI just sits and waits. Any ideas on what Im doing wrong ? @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Log.d(IM,"Start Me UP!!"); setContentView(R.layout.main); Log.d(IM, "Building List View for Contacts"); restoreMe(); if (myContacts==null){ myContacts = new ArrayList<Contact>(); this.contactAdapter = new ContactAdapter(this, R.layout.contactlist, myContacts); setListAdapter(this.contactAdapter); new BindAsync().execute(); } else{ this.contactAdapter = new ContactAdapter(this, R.layout.contactlist, myContacts); setListAdapter(this.contactAdapter); } } private class BindAsync extends AsyncTask<Void, Void, RemoteServiceConnection>{ @Override protected void onPreExecute(){ super.onPreExecute(); Log.d(IM,"Showing Dialog"); showDialog(DIALOG_CONTACTS); } @Override protected RemoteServiceConnection doInBackground(Void... v) { Log.d(IM,"Binding to service in BindAsync"); try{ Thread.sleep(2000); } catch (InterruptedException e){ } RemoteServiceConnection myCon; myCon = new RemoteServiceConnection(); Intent i = new Intent(imandroid.this,MyRemoteService.class); bindService(i, myCon, Context.BIND_AUTO_CREATE); startService(i); Log.d(IM,"Bound to remote service"); return myCon; } @Override protected void onPostExecute(RemoteServiceConnection newConn){ super.onPostExecute(newConn); Log.d(IM,"Storing remote connection"); conn=newConn; } };

    Read the article

  • How to send messages between c++ .dll and C# app using named pipe?

    - by Gal
    I'm making an injected .dll written in C++, and I want to communicate with a C# app using named pipes. Now, I am using the built in System.IO.Pipe .net classes in the C# app, and I'm using the regular functions in C++. I don't have much experience in C++ (Read: This is my first C++ code..), tho I'm experienced in C#. It seems that the connection with the server and the client is working, the only problem is the messaged aren't being send. I tried making the .dll the server, the C# app the server, making the pipe direction InOut (duplex) but none seems to work. When I tried to make the .dll the server, which sends messages to the C# app, the code I used was like this: DWORD ServerCreate() // function to create the server and wait till it successfully creates it to return. { hPipe = CreateNamedPipe(pipename,//The unique pipe name. This string must have the following form: \\.\pipe\pipename PIPE_ACCESS_DUPLEX, PIPE_TYPE_MESSAGE | PIPE_READMODE_MESSAGE | PIPE_NOWAIT, //write and read and return right away PIPE_UNLIMITED_INSTANCES,//The maximum number of instances that can be created for this pipe 4096 , // output time-out 4096 , // input time-out 0,//client time-out NULL); if(hPipe== INVALID_HANDLE_VALUE) { return 1;//failed } else return 0;//success } void SendMsg(string msg) { DWORD cbWritten; WriteFile(hPipe,msg.c_str(), msg.length()+1, &cbWritten,NULL); } void ProccesingPipeInstance() { while(ServerCreate() == 1)//if failed { Sleep(1000); } //if created success, wait to connect ConnectNamedPipe(hPipe, NULL); for(;;) { SendMsg("HI!"); if( ConnectNamedPipe(hPipe, NULL)==0) if(GetLastError()==ERROR_NO_DATA) { DebugPrintA("previous closed,ERROR_NO_DATA"); DisconnectNamedPipe(hPipe); ConnectNamedPipe(hPipe, NULL); } Sleep(1000); } And the C# cliend like this: static void Main(string[] args) { Console.WriteLine("Hello!"); using (var pipe = new NamedPipeClientStream(".", "HyprPipe", PipeDirection.In)) { Console.WriteLine("Created Client!"); Console.Write("Connecting to pipe server in the .dll ..."); pipe.Connect(); Console.WriteLine("DONE!"); using (var pr = new StreamReader(pipe)) { string t; while ((t = pr.ReadLine()) != null) { Console.WriteLine("Message: {0}",t); } } } } I see that the C# client connected to the .dll, but it won't receive any message.. I tried doing it the other way around, as I said before, and trying to make the C# send messages to the .dll, which would show them in a message box. The .dll was injected and connected to the C# server, but when It received a message it just crashed the application it was injected to. Please help me, or guide me on how to use named pipes between C++ and C# app

    Read the article

  • TechDays 2010 Portugal - The Day After

    - by Ricardo Peres
    Well, TechDays 2010 Portugal is over, time for a balance. I really enjoyed being a speaker, although my presentation took a lot more time than it should, it was gratifying to see so many people staying until the end. Lots of subjects were left behind, though. My presentation is available at my SkyDrive, here. Soon I will place there the source code, too. I would like to know if you've been there, and, if so, what do you think of my presentation! Feel free to send your thoughts, whatever they are. On the other hand, I saw some really interesting presentations, to name a few, from Nuno Antunes, Nuno Godinho, Filipe Prezado, Nuno Silva and my friend André Lage. I also had the chance to finally meet Caio Proiete and Pedro Perfeito. Perhaps we'll meet again at TechDays Remix, who knows.

    Read the article

  • Citrix Performance monitoring

    - by Dr I
    Hi people, I has a strange thing which appears on my Citrix Farm today. My users are equiped with a Thin client Axel Model 80F, and today, one of them sustained a problem on it. He opened a citrix's Publish Desktop session (Host by a farm of Windows 2003 R2 SP2 Servers), he loaded Lotus Notes and a mail who contained an PDF attached file. Once he has opened his PDF File, his session has freezed. We've just reboot the Thin Client, and log in again on the session (which hasn't been closed during the process). Once we have log in again, we try to read the pdf and once again afer half a page the session freeze again (I can see the mouse moving on the screen but can make anything). Then I close the session, reboot correctly the thin client, and "Tada" with the same manipulationsn averything is correct and we don't facing any freeze. Well Now my question is: Is that bug came from the thin client or the server about you? I've checked on my farm and I don't have any alert from the Citrix's Monitoring console logs. According to me it's due to the Thin Client BUT I ddon't have enought monitoring tools to be sure of that. So do you have some quite godd monitoring tools or method? My config: Windows 2003 R2 SP2 Citrix Xenapp 5.0

    Read the article

  • Facility setting for syslog 'client'

    - by Carl Summers
    What are the things one should consider when setting the facility for a syslog client? In particular is there a difference between "4 security/authorization messages" and "10 security/authorization messages"? I'm configuring a DataPower XS40 appliance.

    Read the article

  • Cross-domain structure of the site

    - by Coreal
    I have a web site on which I wish to enable instant messaging via IRC. Now I am about to buy VPS to host the ircd on. So, I will have two servers: one is for the web site and the other is for the ircd. The question is how to use the web site's domain name for the ircd?

    Read the article

  • How to install audio drivers for Acer Revo nettop?

    - by CT
    I have a Acer Revo nettop. I wiped the XP Home install that came on the machine and put XP Pro on. Acer's support website would lead you to believe that this product does not exist. I know it has a NVIDIA ION LE chipset so I headed over to nvidia.com to download drivers. Ive downloaded and installed the Chipset drivers, Graphics Drivers, and HDMI audio drivers. I have no sound. Under Device Manager there is an unknown Audio Device on High Definition Audio Bus. I do not have an HDMI cable to test hdmi audio. I would just like the standard audio mini-jack output to work. Anyone know of the correct driver or a generic driver that would work? Thanks

    Read the article

  • Messenger for voice calls

    - by Rogue
    I have been using Skype for a very long time, but lately I have been facing a lot of issues with the voice clarity. What messenger or VOIP clients that you know out of experience that are better than Skype for voice communication ?

    Read the article

  • How do you clean your laptop?

    - by penyaskito
    I work in the countryside gathering requirements, so my laptop often gets a lot of dust, and I cannot dedicate too much time for cleaning it, nor opening it. I'd like to hear what solutions do you use for cleaning it, specially the screen and keyboard. I prefer home-made solution before special products, that I cannot buy at work. Thanks in advance.

    Read the article

  • The same class file in multiple .jar files. How bad is this?

    - by Kannan Goundan
    I have a library that writes data in either a text or binary format. It has the following three components: common data structures text writer (depends on 1) binary writer (depends on 1) The obvious way to distribute this is as 3 .jar files, so that users can include only what they need. However, the "common data structures" component is really just two small classes so I'm considering creating only two .jar files and including the common .class files in both. My question: What are the potential problems with doing this?

    Read the article

  • Section of website to be protected by a login

    - by shane
    I have a section of my website where I will have forms. I only want people who have registered with the site to be able to use these forms so that I only have serious customers using them. So what i want to have is a way that people can register on the site and once registered the area with the forms will be available to them and I will know who has sent me a form etc.

    Read the article

  • PostgreSQL compare databases tool or generating migration script util

    - by opedge
    In our development we use two servers with PostgreSQL 8.4 - development and production. So, after changes were made on development server we would like to automatically generate SQL migration scripts. I found that EMS DB Comparer for PostgreSQL can do it, but it is only for Windows (our development team use Ubuntu for developing). Do you now alternative tools to do this?

    Read the article

  • Google Chrome + Ajax

    - by teehoo
    Im writing an ajax web app that uses Comet/Long Polling to keep the webpage up to date, and I noticed in Chrome, it treats the page as if its always loading (icon for the tab keeps spinning). I thought this was normal for Google Chrome + Ajax because even Google Wave had this behaviour. Well today I noticed that Google Wave no longer keeps the loading icon spinning, anyone know how they fixed this? Here's my ajax call code var xmlHttpReq = false; // Mozilla/Safari if (window.XMLHttpRequest) { xmlHttpReq = new XMLHttpRequest(); } // IE else if (window.ActiveXObject) { xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP"); } xmlHttpReq.open('GET', myURL, true); xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); xmlHttpReq.onreadystatechange = function() { if (xmlHttpReq.readyState == 4) { updatePage(xmlHttpReq.responseText); } } xmlHttpReq.send(null);

    Read the article

  • Display empty textbox using Html.TextBoxFor on a not-null property in an EF entity.

    - by hungster
    I am using Entity Framework (v4) entities. I have an entity called Car with a Year property of type integer. The Year property does not allow NULL. I have the following in my Create view: <%= Html.TextBoxFor(model => model.Year) %> I am required to return a new Car object (due to other requirements) in my HttpGet Create action in the CarController. Currently, a zero is displayed in the Year textbox because the Year property does not allow NULL. I would like to display an empty textbox in the Create view. How do I do this?

    Read the article

  • open program once with multiple files as arguments from explorer

    - by Jonathan
    I have a program that works when, a file is opened with it using the right click menu in explorer. But if I select multiple files and then right click and open with my program then it opens multiple instances of my program, instead of just passing the multiple files as arguments to a single instance. The program is written in vb.net but is not a windows form, it is just a module, so I can to tick the Single instance option in the properties in Visual Studio. So how do I open multiple files from explorer context menu in a single instance.

    Read the article

  • How to use Delegate in C# for Dictionary<int, List<string>>

    - by Emanuel
    The code: private delegate void ThreadStatusCallback(ReceiveMessageAction action, Dictionary<int, List<string>> message); ... Dictionary<int, List<string>> messagesForNotification = new Dictionary<int, List<string>>(); ... Invoke(new ThreadStatusCallback(ReceivesMessagesStatus), ReceiveMessageAction.Notification , messagesForNotification ); ... private void ReceivesMessagesStatus(ReceiveMessageAction action, object value) { ... } How can I send the two variable of type ReceiveMessageAction respectively Dictionary<int, List<string>> to the ReceivesMessagesStatus method. Thanks.

    Read the article

  • Flash as3 smooth threshold

    - by arkzai
    hello, I'm building a flash app that pulls images from flickr and removes the white background I'm dong this using threshold and i get a really ragged outcome is there any way to get a better and smoother color key? thanks photoNumber = Math.floor(Math.random() * (photos.length)); loader.load(new URLRequest(photos[photoNumber].path)); loader.contentLoaderInfo.addEventListener(Event.COMPLETE,draw); trace ( "trying to load photo " + photoNumber ); function draw(e:Event) { trace ("show photo " + photoNumber) var W:int=e.target.content.width; var H:int=e.target.content.height; bitmapdata=new BitmapData(W,H); bitmap=new Bitmap(bitmapdata); bitmapdata.draw(e.target.content); var threshold:uint = 0xF9F8F800; var color:uint = 0x00000000; var maskColor:uint = 0x00FF0000; bitmapdata.threshold(bitmapdata,new Rectangle(0,0,W,H),new Point(0,0),">", threshold, color, maskColor, true); bitmap.smoothing = true; //bitmap.scaleX = bitmap.scaleY = 0.99; // <---- imgHolder.addChild(bitmap); } }

    Read the article

  • Android multiple spinners

    - by DixieFlatline
    Hello! I have 3 spinners (dropdown menus). I would like the user to select item from the first one and that would determine the options(different string array) on the second and on the third spinner. E.g. user selects the country in the first spinner and then gets popular music groups in that country on the second spinner and popular dishes on the third. What is the easiest way to do this?

    Read the article

  • Implementation of MVC with SQLite and NSURLConnection, use cases?

    - by user324723
    I'm interested in knowing how others have implemented/designed database & web services in their iphone app and how they simplified it for the entire application. My application is dependent on these services and I can't figure out a efficient way to use them together due to the (semi)complexity of my requirements. My past attempts on combining them haven't been completely successful or at least optimal in my mind. I'm building a database driven iphone app that uses a relational database in sqlite and consumes web services based on missing content or user interaction. Like this hasn't been done before...right? Since I am using a relational database - any web services consumed requires normalization, parsing the result and persisting it to the database before it can be displayed in a table view controller. The applications UI consists of nested(nav controller) table views where a user can select a cell and be taken to the next table view where it attempts to populate the table views data source from the database. If nothing exists in the database then it will send a request via web services to download its content, thus download - parse - persist - query - display. Since the user has the ability to request a refresh of this data it still requires the same process. Quickly describing what I've implemented and tried to run with - 1st attempt - Used a singleton web service class that handled sending web service requests, parsing the result and returning it to the table view controller via delegate protocols. Once the controller received that data it would then be responsible for persisting it to the database and re-returning the result. I didn't like the idea of only preventing the case where the app delegate selector doesn't exists(released) causing the app to crash. 2nd attempt - Used NSNotificationCenter for easy access to both database and web services but later realized it was more complex due to adding and removing observers per view(which isn't advised anyways).

    Read the article

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