handling

Doubt in C++ file handling

Following code, when compiled and run with g++, prints '1' twice, whereas I expect '1' to be printed only once, since I am dumping a single structure to the file, but while reading back it seems to be reading two structures. Why? #include <iostream.h> #include <fstream.h> int main(){ struct student { int rollNo; }; ...

Transaction handling in web apps

I have noticed in most Web applications that whenever there is a transaction involved in a train of pages, the transaction handling happens in the database layer. In a web application where there could be numerous users running such transactions, handling all the transactions could be a critical thing. I agree that the database layer is ...

C++ code to find all ip address in a file

Hi, I need to write a program to scan a text file and retrieve all ip addresses (of the format 256.256.256.256) in the file. Can you please help me out? ...

Swaping UIIMageViews

Hello Friends facing this Problem:: Problem Definition:: I have to move the image sprites on the screen now when one of the image Sprite goes beyond limit i have to shuffle all of the UIImageView sprites. My Code: Basically Phase 1 that i'm doing is Shuffling:: that goes like this tmpview = mapSRightImgView; mapSRightImgView =...

Bounce Email handling with PHP??

I am really new to this (not new to php). Here is my scenario: I have 2 emails accounts. [email protected] and [email protected]. I want to send email to all my users with [email protected] but then "reply to" [email protected] (until here, my php script can handle it). When, the email cant be sent, it sent to [email protected], the er...

WPF handling RoutedEvent from UserControl

Hi, I have a UserControl, default one generated by VS, only TextBlock is added: <UserControl x:Class="MyNameSpace.Presentation.MyControl" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Name="myControl"> <Grid> <TextBlock x:Name="SomeTextBox" Text="So...

Javascript event handling and flow control

I'm attempting to build a webpage that loads depending on the input provided. I'm having some trouble wrapping my head around event handling in javascript, basically. Coming from python, if I wanted to wait for a specific keyboard input before moving on to the next object to display, I would create a while loop and put a key listener ins...

How to open a process for opening file in Android?

I have a doc file in my project located at /data/data/........./files/abc.doc I want to open this file like the Android built-in feature to open file. I want this through my Android application. Can anyone help me? It is urgent. ...

Basic Ruby string handling question

Does giving a idea = gets.reverse print idea If user inputted 'dog' it would come out 'dog' But if you did this code... idea = gets.reverse! print idea Then the string variable being returned would be 'god', right? ...

asm subroutine handling int and char from c++ file

how are an int and char handled in an asm subroutine after being linked with a c++ program? e.g. extern "C" void LCD_ byte (char byte, int cmd_ data); how does LCD_ byte handle the "byte" and "cmd_ data"? how do I access "byte" and "cmd_ data" in the assembly code? thanks ...

How to use device tokens in different ways in iphone?

Hi, In my application i am going to use pushNotification. So in that case how can i use device tokens in different ways? Let me elaborate more on this side. Whenever i run my application at that time Device token will be generated,if i go for running the application again and again in the same device than it will generate the same dev...

Java Hardware Interrupt Handling

I would like to know if it is possible to automatically invoke a Java method when a hardware interrupt is raised. ...

C# Custom Event Handler

Hi - I am a person learning c#, and I have a program with a Parent form and a Child form. I want the child form to raise an event so that the Parent form can do something. I copied some code, but I am not smart enough to see what is wrong. I don't know how to correctly code the event in the child form. The error is DatasourceUpdated is n...

c# waiting for event within a function

Hi, My goal: User should be able to get the html source of a page, when clicked on a button. This event opens a new form with a geckoWebBrowser component and navigates to a given url. Once this is done it fires a documentCompleted event. Then I can start loading the DOM. The problem: While the loading of the page needs time, I have to ...

XML parsing and usage

Hi, I'm building a conforming and validating XML parser in C++ and trying to make it light-weight for use in pocket pc. At the beginning I decided to add some "events" to my parser like SAX does, informing about elements, processing instructions, etc. This events are taken by a derived class that builds the DOM tree of the xml. My do...

java script on event handler and color contrasts

The radio buttons when selected work fine in terms of outputting a selected color via the radio buttons onto the page or screen. Each radio button represents a different color. I was wondering if it's possible with some java script to be able to manipulate the contrast of each selected color. For example by constantly clicking the Col...

Question about file handling.

Hey, I wanted to know if anyone can tell me what the difference between "file.file" and "./file.file" is. It seems to make quite a significant difference in my programs to call OpenFile("./file.file"); EDIT: My mistake, I thought my question was a generic one. This is in C++ using standard library functions. ...

Check if user closed the page in PHP?

I made a chat using PHP and JavaScript chat and there is a disconnect button which removes user from the chat removing him from user list first. But if the user closes browser then he will remain in the user list. How do I check if he left? This must be done without putting any handles on page closing in JS because if user kills the bro...

Google App Engine: Easy way to work with GET, POST and Cookies

When using webapp from Google App Engine, how can I distinguish POST and GET? Which one gets priority and how can I seprate them? A piece of code below shows the way to obtain a POST/GET field value: class AddWordHandler(webapp.RequestHandler): def post(self): theWord = str( self.request.get('theWord', default_value="no") ) ...

c# event handling problem

Hi, I have a class which provides a custom event: public delegate void ResultEvent(bool result); public class Service : INotifyPropertyChanged { public event ResultEvent Result; } Two other objects have a refernce to this like this: public partial class SomeRandomClass { private Service service; public SomeRandomClass(...