Daily Archives

Articles indexed Sunday June 6 2010

Page 15/76 | < Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >

  • Is there a way to detect Layout or Display changes in WPF?

    Hello! I am trying to check how fast the Frame control can display a FixedPage object when it is assigned to Frame.Content property. I plan to check the tick count before and after the assignment to the Content property. Example: int starttime = Environment.TickCount; frame1.Content = fixedpage; int endtime = Environment.TickCount; The problem is that the assignment to the Content property might be asynchronous and returns immediately therefore i get a zero amount of time. The rendering of the FixedPage however visually has a lag time from assignment of the Content property up to the point where the FixedPage appears on screen. The Frame.ContentChanged() event is no good either because it gets triggered even before the FixedPage appears on screen so it's not accurate. I'm thinking of detecting the change on the window or control's display instead in order to get the time when the FixedPage is actually displayed on screen. Is there a way to do this in WPF? Thanks!

    Read the article

  • Help with copy and deepcopy in Python

    - by Az
    Hi there, I think I tried to ask for far too much in my previous question so apologies for that. Let me lay out my situation in as simple a manner as I can this time. Basically, I've got a bunch of dictionaries that reference my objects, which are in turn mapped using SQLAlchemy. All fine with me. However, I want to make iterative changes to the contents of those dictionaries. The problem is that doing so will change the objects they reference---and using copy.copy() does no good since it only copies the references contained within the dictionary. Thus even if copied something, when I try to, say print the contents of the dictionary, I'll only get the latest updated values for the object. This is why I wanted to use copy.deepcopy() but that does not work with SQLAlchemy. Now I'm in a dilemma since I need to copy certain attributes of my object before making said iterative changes. In summary, I need to use SQLAlchemy and at the same time make sure I can have a copy of my object attributes when making changes so I don't change the referenced object itself. Any advice, help, suggestions, etc.?

    Read the article

  • Are Large iPhone Ping Times Indicative of Application Latency?

    - by yar
    I am contemplating creating a realtime app where an iPod Touch/iPhone/iPad talks to a server-side component (which produces MIDI, and sends it onward within the host). When I ping my iPod Touch on Wifi I get huge latency (and a enormous variance, too): 64 bytes from 192.168.1.3: icmp_seq=9 ttl=64 time=38.616 ms 64 bytes from 192.168.1.3: icmp_seq=10 ttl=64 time=61.795 ms 64 bytes from 192.168.1.3: icmp_seq=11 ttl=64 time=85.162 ms 64 bytes from 192.168.1.3: icmp_seq=12 ttl=64 time=109.956 ms 64 bytes from 192.168.1.3: icmp_seq=13 ttl=64 time=31.452 ms 64 bytes from 192.168.1.3: icmp_seq=14 ttl=64 time=55.187 ms 64 bytes from 192.168.1.3: icmp_seq=15 ttl=64 time=78.531 ms 64 bytes from 192.168.1.3: icmp_seq=16 ttl=64 time=102.342 ms 64 bytes from 192.168.1.3: icmp_seq=17 ttl=64 time=25.249 ms Even if this is double what the iPhone-Host or Host-iPhone time would be, 15ms+ is too long for the app I'm considering. Is there any faster way around this (e.g., USB cable)? If not, would building the app on Android offer any other options? Traceroute reports more workable times: traceroute to 192.168.1.3 (192.168.1.3), 64 hops max, 52 byte packets 1 192.168.1.3 (192.168.1.3) 4.662 ms 3.182 ms 3.034 ms can anyone decipher this difference between ping and traceroute for me, and what they might mean for an application that needs to talk to (and from) a host?

    Read the article

  • Serial port data availability problem

    - by harry
    Hello Evryone. I am new to this type of programming..i just want some help...regarding what to do when u need to extract the data from the serial port..and how to check that tha data is available in the serial port..so that no data loss is there....

    Read the article

  • Using a function with variable argument strings

    - by wrongusername
    I was playing around a bit with functions with variable arguments, and decided to make a function to create vectors with the arguments. My function for creating an int vector worked... vector<int> makeIntVector(int numArgs, ...) { va_list listPointer; va_start(listPointer, numArgs); vector<int> made; for(int a = 0; a < numArgs; a++) made.push_back(va_arg(listPointer, int)); va_end(listPointer); return made; } but not my function for creating a string vector: vector<string> makeStringVector(int numArgs, string something, ...) { va_list listPointer; va_start(listPointer, something); vector<string> made; for(int a = 0; a < numArgs; a++) made.push_back(va_arg(listPointer, string)); va_end(listPointer); return made; } which crashes the program. What am I doing wrong?

    Read the article

  • Replicating SQL's 'Join' in Python

    - by Daniel Mathews
    I'm in the process of trying to switch from R to Python (mainly issues around general flexibility). With Numpy, matplotlib and ipython, I've am able to cover all my use cases save for merging 'datasets'. I would like to simulate SQL's join by clause (inner, outer, full) purely in python. R handles this with the 'merge' function. I've tried the numpy.lib.recfunctions join_by, but it critical issues with duplicates along the 'key': join_by(key, r1, r2, jointype='inner', r1postfix='1', r2postfix='2', defaults=None, usemask=True, asrecarray=False) Join arrays r1 and r2 on key key. The key should be either a string or a sequence of string corresponding to the fields used to join the array. An exception is raised if the key field cannot be found in the two input arrays. Neither r1 nor r2 should have any duplicates along key: the presence of duplicates will make the output quite unreliable. Note that duplicates are not looked for by the algorithm. source: http://presbrey.mit.edu:1234/numpy.lib.recfunctions.html Any pointers or help will be most appreciated!

    Read the article

  • Will this SQL screw up

    - by Joshua
    I'm sure everyone knows the joys of concurrency when it comes to threading. Imagine the following scenario on every page-load on a noobily set up MySQL db: UPDATE stats SET visits = (visits+1) If a thousand users load the page at same time, will the count screw up? is this that table locking/row locking crap? Which one mysql use.

    Read the article

  • JIT: How to specify source/sink for arcs?

    - by Rosarch
    I'm using JIT to render graphs. I'm using the RGraph feature. This JSON defines a graph: var json = [ { 'id': '1', 'name': 'CS 2110', 'adjacencies': ['0', '2'] }, { 'id': '1.5', 'name': 'INFO 2300', 'adjacencies': ['1'] }, { 'id': '0', 'name': 'CS 1110', 'adjacencies': ['1'] }, { 'id': '2', 'name': 'INFO 3300', 'adjacencies': ['1'] }, ] If I want a directed graph, how can I specify which nodes are sources and which are sinks?

    Read the article

  • Good authorize.net PHP libraries

    - by markwatson
    I'm working on a PHP project and am looking for a good authorize.net gateway. I want something with mature code that's tested. The goal is to avoid writing and testing the entire thing myself based on the authorize.net api docs. Does anyone know of any good PHP libraries for this? I've search Google to no avail.

    Read the article

  • Acer LCD says "no signal"

    - by Ken
    I have an Acer 24" LCD (model "AL2423WDR") that's about 3 years old. It worked perfectly for most of its lifetime so far. Recently it started giving problems. When I turn it on, it either says "no signal" on the display, or the power light goes yellow (as if in power-saving mode). This happens with both DVI and VGA (both of which worked fine before), and stranger still, the 4 buttons on the front, for accessing the on-screen menus, don't do anything. I've also tried different computer hardware and software (PC/Mac, Linux/MacOS), but nothing has worked. I've tried power-cycling it (with both the power button and the power switch), and also unplugging it entirely. The nonworking buttons suggest to me an issue with the firmware. I found a place on Acer's website that says I can send it in to have it fixed, at my expense, but I'll avoid that if I can. Is there a way to fully reset it manually? Or is there something else I can try?

    Read the article

  • Why use "DLLSelfRegister" in VB deployment package?

    - by Craig Johnston
    Why would you use DLLSelfRegister in a VB deployment package? I am trying to sort out possible conflict problems with a calendar control: msacal70.ocx. Apparently there is a conflict with newer Office calendar controls. I noticed the setup.lst for the VB deployment package uses DLLSelfRegister for this control. What are the effects of allowing a DLL to self-register and would removing DLLSelfRegister cause the ocx to register during installation of the package?

    Read the article

  • Is there a performance advantage in using a 64bit version of openCV+Emgu instead of 32bit?

    - by Jelly Amma
    Hello, I am developing an application that processes images captured in real time by a Point Grey camera (http://www.ptgrey.com/). The Point Grey SDK is a .net wrapper and can be either 32bit or 64bit. Then to process the captured images, I'm using a wrapper for openCV called Emgu CV (http://www.emgu.com/) that comes in both 32bit or 64bit flavors as well. Now, being on Vista64 I went for the 64bit versions of FlyCapture (Point Grey's SDK) and Emgu CV (which includes openCV in its install) hoping to maximize performance. Recently I've been wanting to call my FlyCapture+Emgu DLL code from XNA, which unfortunately only exists in 32bit, and I realize that I may have to reinstall all those components in 32bit as I don't really want to go through IPC, remoting, etc. Apart from the obvious limit to memory space inherent to 32bit, is there also a performance loss I should be expecting? How dramatic would that be and why ? Thanks in advance for any advice or explanation.

    Read the article

  • merge cells in one

    - by alkitbi
    $query1 = "select * from linkat_link where emailuser='$email2' or linkname='$domain_name2' ORDER BY date desc LIMIT $From,$PageNO"; now sample show : <table border="1" width="100%"> <tr> <td>linkid</td> <td>catid</td> <td>linkdes</td> <td>price</td> </tr> <tr> <td>1</td> <td>1</td> <td>&nbsp;domain name</td> <td>100</td> </tr> <tr> <td>2</td> <td>1</td> <td>&nbsp;hosting&nbsp; plan one</td> <td>40</td> </tr> <tr> <td>3</td> <td>2</td> <td>&nbsp;domain name</td> <td>20</td> </tr> </table> How do I merge two or more  When there are numbers of cells same on the Table in this way sample? <table border="1" width="100%"> <tr> <td>catid</td> <td>linkdes</td> <td>price</td> </tr> <tr> <td>1</td> <td>linkid(1)- domain namelinkid(2)- hosting&nbsp; plan one</td> <td>10040</td> </tr> <tr> <td>2</td> <td>&nbsp;domain name</td> <td>20</td> </tr> </table>

    Read the article

  • How to stop NpgsqlDataReader from blocking?

    - by Swingline Rage
    Running the following code against a large PostgreSQL table, the NpgsqlDataReader object blocks until all data is fetched. NpgsqlCommand cmd = new NpgsqlCommand(strQuery, _conn); NpgsqlDataReader reader = cmd.ExecuteReader(); // <-- takes 30 seconds How can I get it to behave such that it doesn't prefetch all the data? I want to step through the resultset row by row without having it fetch all 15 GB into memory at once. I know there were issues with this sort of thing in Npgsql 1.x but I'm on 2.0. This is against a PostgreSQL 8.3 database on XP/Vista/7. I also don't have any funky "force Npgsql to prefetch" stuff in my connection string. I'm at a complete loss for why this is happening.

    Read the article

  • Weird (?) issue with Exchange Forwarding

    - by abszero
    Hello everyone. Here is the long and short of it: the company I work for was purchased by another company who uses Gmail for domains as their email provider. We use an in house Exchange box. No big deal, I dropped into Active Directoy and created several Contact objects that represented our new email addresses at Gmail. I then went through each employees record and have their mail set to forward to this new address and not deliver locally. So I am forwarding email for me@domain1 to me@domain2 and this works great as long as I don't send an email from me@domain2 to me@domain1. If I log into my personal Gmail account and send an email to me@domain1 the email is properly forwarded to me@domain2. The mail coming from me@domain2 to me@domain1 seems to just get lost in the ether. Have I done something wrong or is this a quark with Exchange? Thanks!

    Read the article

  • GRUB reporting wrong partition type

    - by plok
    It all started when I had to replace one of the disks that the software RAID 1 on this machine currently uses. From that moment on I have not been able to boot to the Windows XP that is installed on the fourth hard drive, /dev/sdd. I am almost positive that the problem is related not to Windows but to GRUB, as if I unplug all the other hard drives so that the Windows XP disk is now /dev/sda it boots with no problem. The problem seems to be that GRUB detects a wrong partition type, which I understand suggest that something is really messed up. This is what I get when I try to follow the steps that until now had worked like a charm: grub> map (hd0) (hd3) grub> map (hd3) (hd0) grub> root (hd3,0) Filesystem type is ext2fs, partition type 0xfd 0xfd? That doesn't make sense. /dev/sdb and sdc are 0xfd (Linux raid), but not /dev/sdd: edel:~# fdisk -l [...] Disk /dev/sdd: 250.0 GB, 250059350016 bytes 255 heads, 63 sectors/track, 30401 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x00048d89 Device Boot Start End Blocks Id System /dev/sdd1 * 1 30400 244187968+ 7 HPFS/NTFS edel:/boot/grub# cat device.map (hd0) /dev/sda (hd1) /dev/sdb (hd2) /dev/sdc (hd3) /dev/sdd I have been trying to work this out for hours, to no avail. Can anyone point me in the right direction?

    Read the article

  • jQuery - ASPX Security libraries

    - by Jean Paul
    Hello. I would like to know if there's a combo like jCryption ([jCryption]) - PHP but for jQuery - ASPX. I mean, I have been searching for a combo to send data both ways (Client-server, server-client) with jQuery to ASPX. The best I found was jCryption that sends data from JavaScrpit to PHP. I need a combo to send data from JavaScrpit to ASPX. Any ideas?? PD: Please don't tell me to use HTTPS, it's not enough to ensure the data communication on a client - server application.

    Read the article

< Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >