Search Results

Search found 28582 results on 1144 pages for 'message loop'.

Page 7/1144 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • CDO.Message problem on Windows Server 2008

    - by dcrowell@
    I have a Classic ASP page that creates a CDO.Message object to send email. The code works on Window Server 2003 but not 2008. On 2008 an "Access is denied" error gets thrown. Here is a simple test page I wrote to diagnose the problem. How can I get this to work on Windows Server 2008? dim myMail Set myMail=CreateObject("CDO.Message") If Err.Number < 0 Then Response.Write ("Error Occurred: ") Response.Write (Err.Description) Else Response.Write ("CDO.Message was created") myMail.Subject="Sending email with CDO" myMail.From="[email protected]" myMail.To="[email protected]" myMail.TextBody="This is a message." myMail.Send set myMail=nothing End If

    Read the article

  • Message pump in C# Windows service

    - by Pickles
    Hello, I have a Windows Service written in C# that handles all of our external hardware I/O for a kiosk application. One of our new devices is a USB device that comes with an API in a native DLL. I have a proper P/Invoke wrapper class created. However, this API must be initialized with an HWnd to a windows application because it uses the message pump to raise asynchronous events. Besides putting in a request to the hardware manufacturer to provide us with an API that does not depend on a Windows message pump, is there any way to manually instantiate a message pump in a new thread in my Windows Service that I can pass into this API? Do I actually have to create a full Application class, or is there a lower level .NET class that encapsulates a message pump? Thanks

    Read the article

  • Database Structure for vBulletin Message Board

    - by zen
    I am wondering if someone would be willing to post the database structure for a vBulletin message board? The SQL or screen shots would be nice. I am currently setting out a business plan for a website that will include a message forum, however, assessing the $195-$295 message board fee has me thinking about other possible solutions. I am brave.

    Read the article

  • Message pump in .NET Windows service

    - by Pickles
    I have a Windows Service written in C# that handles all of our external hardware I/O for a kiosk application. One of our new devices is a USB device that comes with an API in a native DLL. I have a proper P/Invoke wrapper class created. However, this API must be initialized with an HWnd to a windows application because it uses the message pump to raise asynchronous events. Besides putting in a request to the hardware manufacturer to provide us with an API that does not depend on a Windows message pump, is there any way to manually instantiate a message pump in a new thread in my Windows Service that I can pass into this API? Do I actually have to create a full Application class, or is there a lower level .NET class that encapsulates a message pump?

    Read the article

  • Using Message Queue on Windows Mobile 2003

    - by Fitzroy Wright
    Does anyone know where I can find the cab file that will allow me to use Microsoft Message Queues on a Windows Mobile 2003 device? I am writing application that needs to use Microsoft Message Queue on a Windows Mobile 2003 device. Apparently message queue was never installed on the device. I have scoured the web and can find no cab files for Msmq for windows mobile 2003. everything reffers to windows mobile 5 and when I try that the setup fails.

    Read the article

  • Netbean6.8: Cant deploy an webapp with Message Driven Bean

    - by Harry Pham
    I create an Enterprise Application CustomerApp that also generated two projects CustomerApp-ejb and CustomerApp-war. In the CustomerApp-ejb, I create a SessionBean call CustomerSessionBean.java as below. package com.customerapp.ejb; import javax.ejb.Stateless; import javax.ejb.LocalBean; import javax.persistence.EntityManager; import javax.persistence.PersistenceContext; @Stateless @LocalBean public class CustomerSessionBean { @PersistenceContext(unitName = "CustomerApp-ejbPU") private EntityManager em; public void persist(Object object) { em.persist(object); } } Now I can deploy CustomerApp-war just fine. But as soon as I create a Message Driven Bean, I cant deploy CustomerApp-war anymore. When I create NotificationBean.java (message driven bean), In the project destination option, I click add, and have NotificationQueue for the Destination Name and Destination Type is Queue. Below are the code package com.customerapp.mdb; import javax.ejb.ActivationConfigProperty; import javax.ejb.MessageDriven; import javax.jms.Message; import javax.jms.MessageListener; @MessageDriven(mappedName = "jms/NotificationQueue", activationConfig = { @ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge"), @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue") }) public class NotificationBean implements MessageListener { public NotificationBean() { } public void onMessage(Message message) { } } If I remove the @MessageDriven annotation, then I can deploy the project. Any idea why and how to fix it?

    Read the article

  • Netbean6.8: Cant deploy an app if I have Message Driven Bean

    - by Harry Pham
    I create an Enterprise Application CustomerApp that also generated two projects CustomerApp-ejb and CustomerApp-war. In the CustomerApp-ejb, I create a SessionBean call CustomerSessionBean.java as below. package com.customerapp.ejb; import javax.ejb.Stateless; import javax.ejb.LocalBean; import javax.persistence.EntityManager; import javax.persistence.PersistenceContext; @Stateless @LocalBean public class CustomerSessionBean { @PersistenceContext(unitName = "CustomerApp-ejbPU") private EntityManager em; public void persist(Object object) { em.persist(object); } } Now I can deploy CustomerApp-war just fine. But as soon as I create a Message Driven Bean, I cant deploy CustomerApp-war anymore. When I create NotificationBean.java (message driven bean), In the project destination option, I click add, and have NotificationQueue for the Destination Name and Destination Type is Queue. Below are the code package com.customerapp.mdb; import javax.ejb.ActivationConfigProperty; import javax.ejb.MessageDriven; import javax.jms.Message; import javax.jms.MessageListener; @MessageDriven(mappedName = "jms/NotificationQueue", activationConfig = { @ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge"), @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue") }) public class NotificationBean implements MessageListener { public NotificationBean() { } public void onMessage(Message message) { } } If I remove the @MessageDriven annotation, then I can deploy the project. Any idea why and how to fix it?

    Read the article

  • Java: Implement own message queue (threadsafe)

    - by derMax
    The task is to implement my own messagequeue that is thread safe. My approach: public class MessageQueue { /** * Number of strings (messages) that can be stored in the queue. */ private int capacity; /** * The queue itself, all incoming messages are stored in here. */ private Vector<String> queue = new Vector<String>(capacity); /** * Constructor, initializes the queue. * * @param capacity The number of messages allowed in the queue. */ public MessageQueue(int capacity) { this.capacity = capacity; } /** * Adds a new message to the queue. If the queue is full, it waits until a message is released. * * @param message */ public synchronized void send(String message) { //TODO check } /** * Receives a new message and removes it from the queue. * * @return */ public synchronized String receive() { //TODO check return "0"; } } If the queue is empty and I call remove(), I want to call wait() so that another thread can use the send() method. Respectively, I have to call notifyAll() after every iteration. Question: Is that possible? I mean does it work that when I say wait() in one method of an object, that I can then execute another method of the same object? And another question: Does that seem to be clever?

    Read the article

  • Message queue proxy in Python + Twisted

    - by gasper_k
    Hi, I want to implement a lightweight Message Queue proxy. It's job is to receive messages from a web application (PHP) and send them to the Message Queue server asynchronously. The reason for this proxy is that the MQ isn't always avaliable and is sometimes lagging, or even down, but I want to make sure the messages are delivered, and the web application returns immediately. So, PHP would send the message to the MQ proxy running on the same host. That proxy would save the messages to SQLite for persistence, in case of crashes. At the same time it would send the messages from SQLite to the MQ in batches when the connection is available, and delete them from SQLite. Now, the way I understand, there are these components in this service: message listener (listens to the messages from PHP and writes them to a Incoming Queue) DB flusher (reads messages from the Incoming Queue and saves them to a database; due to SQLite single-threadedness) MQ connection handler (keeps the connection to the MQ server online by reconnecting) message sender (collects messages from SQlite db and sends them to the MQ server, then removes them from db) I was thinking of using Twisted for #1 (TCPServer), but I'm having problem with integrating it with other points, which aren't event-driven. Intuition tells me that each of these points should be running in a separate thread, because all are IO-bound and independent of each other, but I could easily put them in a single thread. Even though, I couldn't find any good and clear (to me) examples on how to implement this worker thread aside of Twisted's main loop. The example I've started with is the chatserver.py, which uses service.Application and internet.TCPServer objects. If I start my own thread prior to creating TCPServer service, it runs a few times, but the it stops and never runs again. I'm not sure, why this is happening, but it's probably because I don't use threads with Twisted correctly. Any suggestions on how to implement a separate worker thread and keep Twisted? Do you have any alternative architectures in mind?

    Read the article

  • Windows Game Loop 50% CPU on Dual Core

    - by Dave18
    The game loop alone is using 50% of CPU Usage, I haven't done any rendering work yet. What i'm doing here? while(true) { if(PeekMessage(&msg,NULL,0,0,PM_REMOVE)) { if(msg.message == WM_QUIT || msg.message == WM_CLOSE || msg.message == WM_DESTROY) break; TranslateMessage(&msg); DispatchMessage(&msg); } else { //Run game code, break out of loop when the game is over } }

    Read the article

  • Red 5, First setup "ssl_error_rx_record_too_long" error message

    - by charles horvath
    I am using Windows 7 and I installed Red 5 0.9.1 just recently. After it installed I put 127.0.0.1 as the IP adress and 5080 as http port. After I start the service in windows I try to connect to the localhost in firefox (http://localhost:5080) and get this error An error occurred during a connection to localhost:5080. SSL received a record that exceeded the maximum permissible length. (Error code: ssl_error_rx_record_too_long) I checked my global flash settings and allowed localhost to pass along with the Red 5 folder in C/programfiles/red5. I currently have the up to date versions of JDK and JRE also. Any tips on what might be wrong?

    Read the article

  • How could I easily pack a directory to an ext4 loop partition image?

    - by Alvin Wong
    I would like to pack the content of a directory into an ext4 partition image easily, without mounting a loop device. Background: I am building a version of Android which will mount system partitions as a loop device for ARM. Though I can create those partition images by hand using loop devices, it is very troublesome. I want to use an sh script to automatically do the work, and without needing to loop mount the dd-created image and use cp -rp. The best is to directly pack the files into an image file. Question: Is there any simple command-line tools without needing loop mount and root permission that can pack files into an ext4 partition image?

    Read the article

  • Bring OS X Error Message window to the front

    - by Debilski
    In OS X, when an application crashes, a window with an error report will appear. That window is by default unreachable by Command+Tab nor does it appear in the Dock. Of course, if by error or on purpose one clicks another window, the error report will go to the background and hide behind the other windows. This is really annoying, because in order to see it, I will have to use Exposé and scan through 20+ Windows in order to find it. (Not to say, that I don’t like Exposé anymore since Snow Leopard made the window sizes all confusingly equal.) Any ideas on how to make the error reports Command+Tabbable?

    Read the article

  • Correct For Loop Design

    - by Yttrill
    What is the correct design for a for loop? Felix currently uses if len a > 0 do for var i in 0 upto len a - 1 do println a.[i]; done done which is inclusive of the upper bound. This is necessary to support the full range of values of a typical integer type. However the for loop shown does not support zero length arrays, hence the special test, nor will the subtraction of 1 work convincingly if the length of the array is equal to the number of integers. (I say convincingly because it may be that 0 - 1 = maxval: this is true in C for unsigned int, but are you sure it is true for unsigned char without thinking carefully about integral promotions?) The actual implementation of the for loop by my compiler does correctly handle 0 but this requires two tests to implement the loop: continue: if not (i <= bound) goto break body if i == bound goto break ++i goto continue break: Throw in the hand coded zero check in the array example and three tests are needed. If the loop were exclusive it would handle zero properly, avoiding the special test, but there'd be no way to express the upper bound of an array with maximum size. Note the C way of doing this: for(i=0; predicate(i); increment(i)) has the same problem. The predicate is tested after the increment, but the terminating increment is not universally valid! There is a general argument that a simple exclusive loop is enough: promote the index to a large type to prevent overflow, and assume no one will ever loop to the maximum value of this type.. but I'm not entirely convinced: if you promoted to C's size_t and looped from the second largest value to the largest you'd get an infinite loop!

    Read the article

  • Dimension Mismatch MatLab; cant figure out why it is mismatching

    - by Abid
    I think it may be a syntax issue, here is the code. load ([ 'C:\Users\Abid\Desktop\Inquiry Runs\dtS' ]) dtS((dtS==0))=nan; for j=2:9; maxS=max(dtS(j,:)); minS=min(dtS(j,:)); maxval(j,:)=dtS((dtS>(maxS-.1*maxS))); minval(j,:)=dtS((dtS<(minS+.1*minS))); avmax(j)=mean(maxval(j,:)); avmin(j)=mean(minval(j,:)); avs(j,:)=[avmax(j) avmin(j)] end So I know the the row matrices are different sizes every loop. For example maxval(j,:) will change depending one row it is looking through for certain values. I did this manually and I see that on the first loop the matrices are size (1,1), however, if I set the loop to run for only j=2, the row length is 13. Usually if a matrix is changing size on the loop, I only get a warning, but this time I think it is due to a reason I don't understand.

    Read the article

  • google maps api v3 - loop through overlays - overlayview methods

    - by user317005
    how can i loop through an array within the overlayview class? $(document).ready(function() { var overlay; var myLatlng = new google.maps.LatLng(51.501743,-0.140461); var myOptions = { zoom: 13, center: myLatlng, mapTypeId: google.maps.MapTypeId.ROADMAP } var map = new google.maps.Map(document.getElementById('map_canvas'), myOptions); OverlayTest.prototype = new google.maps.OverlayView(); var items = [ [51.501743,-0.140461], [51.506209,-0.146796], ]; for([loop])//loop through array { var latlng = new google.maps.LatLng(items[i][0], items[i][1]); var bounds = new google.maps.LatLngBounds(latlng); overlay = new OverlayTest(map, bounds); var element_id = 'map_' + i; function OverlayTest(map, bounds) { this.bounds_ = bounds; this.map_ = map; this.div_ = null; this.setMap(map); } OverlayTest.prototype.onAdd = function() { var div = ''; this.div_ = div; var panes = this.getPanes(); panes.mapPane.innerHTML = div; } OverlayTest.prototype.draw = function() { var overlayProjection = this.getProjection(); var sw = overlayProjection.fromLatLngToDivPixel(this.bounds_.getSouthWest()); var ne = overlayProjection.fromLatLngToDivPixel(this.bounds_.getNorthEast()); var div = document.getElementById(element_id); div.style.left = sw.x + 'px'; div.style.top = ne.y + 'px'; } } }); the above code doesn't work, but when i manually assign a lat/lng to the overlayview class it magically works (see below)?! $(document).ready(function() { var overlay; var myLatlng = new google.maps.LatLng(51.501743,-0.140461); var myOptions = { zoom: 13, center: myLatlng, mapTypeId: google.maps.MapTypeId.ROADMAP } var map = new google.maps.Map(document.getElementById('map_canvas'), myOptions); OverlayTest.prototype = new google.maps.OverlayView(); var items = [ [51.501743,-0.140461], [51.506209,-0.146796], ]; var latlng = new google.maps.LatLng(51.506209,-0.146796);//manually assign lat/lng var bounds = new google.maps.LatLngBounds(latlng); overlay = new OverlayTest(map, bounds); function OverlayTest(map, bounds) { this.bounds_ = bounds; this.map_ = map; this.div_ = null; this.setMap(map); } OverlayTest.prototype.onAdd = function() { var div = ''; this.div_ = div; var panes = this.getPanes(); panes.mapPane.innerHTML = div; } OverlayTest.prototype.draw = function() { var overlayProjection = this.getProjection(); var sw = overlayProjection.fromLatLngToDivPixel(this.bounds_.getSouthWest()); var ne = overlayProjection.fromLatLngToDivPixel(this.bounds_.getNorthEast()); var div = document.getElementById('map_1'); div.style.left = sw.x + 'px'; div.style.top = ne.y + 'px'; } });

    Read the article

  • App crashes often in a for-loop

    - by Flocked
    Hello, my app crashes often in this for-loop: for (int a = 0; a <= 20; a++) { int b = arc4random() % [newsStories count]; NSString * foo = [[NSString alloc]initWithString:[[newsStories objectAtIndex: arc4random() % b]objectForKey:@"title"]]; foo = [foo stringByReplacingOccurrencesOfString:@"’" withString:@""]; foo = [[foo componentsSeparatedByCharactersInSet:[[NSCharacterSet letterCharacterSet] invertedSet]] componentsJoinedByString:@" "]; foo = [foo stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]; textView.text = [textView.text stringByAppendingString:[NSString stringWithFormat:@"%@ ", foo]]; } The code changes a NSString from a NSDictionary and adds it into a textView. Sometimes it first crashes in the second time using the for-loop. What did I wrong?

    Read the article

  • Loop over DOMDocument

    - by Zoredache
    I am following the suggestion from this question Robust, Mature HTML Parser for PHP, about parsing html that may be malformed with DOMDocument. Is there any easy way to loop over the parsed document? So I would like to loop over html like this. $html='<ul> <li>value1</li> <li>value1</li> <li>value3</li> </ul> <p>hello world</p>'; $doc = new DOMDocument(); $doc->loadHTML($html); ??? foreach (??? as $node) { print $node->nodeName.':'.$node->nodeValue; } And get results somewhat like this. ul: li:value1 li:value2 li:value3 p:hello world

    Read the article

  • Add characters to month loop?

    - by JM4
    I currently have a php loop running exactly how I need it with proper validations (in both php and javascript) with one exception, if the month is less than 2 digits, (i.e. 1,2,3,4), I need for a '0' to appear before: 01 - January 02 - February ... 10 - October My code for the loop is currently: <select name="Month"> <option value="">Month</option> <?php for ($i=1; $i<=12; $i++) { echo "<option value='$i'"; if ($fields["Month"] == $i) echo " selected"; echo ">$i</option>"; } ?> </select> any ideas? Also note, this month date is being stored in session, not interested in printing to screen

    Read the article

  • How to Loop & rename MySQL table in Perl

    - by Nano HE
    Hi, Could you plesae teach me how to Loop & rename MySQL table in Perl. Thanks. my code snippet attached use strict; use warnings; use DBI; my $dbh = DBI->connect( 'DBI:mysql:database=dbdev;host=localhost', 'dbdev', 'dbdevpw', { RaiseError => 1, AutoCommit => 1 }, ); my $sql = RENAME TABLE old_table TO new_table; my $sth = $dbh->prepare($sql); while (<DATA>){ chomp; // How to implement the Rename all the old tables with the while loop. $sth->execute(); }

    Read the article

  • Good input validation loop using cin - C++

    - by Alex
    Hi there, I'm in my second OOP class, and my first class was taught in C#, so I'm new to C++ and currently I am practicing input validation using cin. So here's my question: Is this loop I constructed a pretty good way of validating input? Or is there a more common/accepted way of doing it? Thanks! Code: int taxableIncome; int error; // input validation loop do { error = 0; cout << "Please enter in your taxable income: "; cin >> taxableIncome; if (cin.fail()) { cout << "Please enter a valid integer" << endl; error = 1; cin.clear(); cin.ignore(80, '\n'); } }while(error == 1);

    Read the article

  • C - is it possible to decrement the max value of a for loop from within the for loop?

    - by hatorade
    for example: void decrement(int counter) { counter--; } int counter = 20; for (int i = 0; i < counter; i++) { for (int j = 0; j < counter, j++) { decrement(counter); } } ideally, what i'd like to see is the counter var being decremented every time the for loop is run, so that it runs fewer than 20 iterations. but gdb shows that within decrement() counter is decremented, but that going back to the for loop counter actually stays the same.

    Read the article

  • PHP - Loop thru recordset and fire event each n rows

    - by Luciano
    I'm looking for the right logic to loop thru a recordset and fire an event each n times. Searching on Google i've found some discussion on similar situations, but it seems that solutions don't fits my needs. Let's say i have a recordset of 22 rows. I want to loop thru each row and launch a function on the 4th, the 8th, the 12th and so on... Using the modulus operator as shown in this answer, if($i % 4 == 0), i get the event fired each 4 rows, but 22 its not a multiple of 4 so the event is fired till the 20th row and then nothing. Maybe i need to make a division counting rows in 'excess'? Since the recordset will be between 50 and 200 rows i think its not necessary run multiple query of 4 rows, am I wrong? Thanks in advance!

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >