Search Results

Search found 14236 results on 570 pages for 'times square'.

Page 83/570 | < Previous Page | 79 80 81 82 83 84 85 86 87 88 89 90  | Next Page >

  • Custom UITableViewCell rounded corners (grouped style)

    - by Urizen
    When creating a custom UITableViewCell I notice that it looks as expected in 'plain' style but that the corners of the cells are not rounded if the table view is displayed in 'grouped' style: i.e. the corners are square. I have searched but cannot find any real explanation of why this happens and, more importantly, how to remedy this effect.

    Read the article

  • How to get image to pulse with opacity with JQuery

    - by Alex
    I am trying to get an image to change opacity smoothly over a duration of time. Here's the code I have for it. <script type="text/javascript"> pulsem(elementid){ var element = document.getElementById(elementid) jquery(element).pulse({opacity: [0,1]}, { duration: 100, // duration of EACH individual animation times: 3, // Will go three times through the pulse array [0,1] easing: 'linear', // easing function for each individual animation complete: function() { alert("I'm done pulsing!"); } }) </script> <a href="city.htm"><img src="waterloo.png" onmouseover="javascript:pulsem("waterloo")" border="0" class="env" id="waterloo"/></a> Also, is there a way for this to happen automatically without the need of a mouseover? Thanks.

    Read the article

  • iPhone SDK "White Flash" transition

    - by Extremely frustrated
    I want to make a button; when you press it the screen fades to a "flash of white" and back like in those powerpoint transitions. I'm thinking maybe dynamically changing the opacity of a white square or something? What do you think? Is there something like this that already exists like part of Catransitions or something? Thanks guys.

    Read the article

  • My computer freezes irregularly

    - by Manhim
    My computer started to freeze at irregular times for 3 weeks now. Please note that this question change with each things that i try. (For additional details) What happens My computer freezes, the video stops. (No graphic glitches, it just stops) Sound keeps playing up to some time (Usually 10-30 seconds) then stops playing. Sometimes, randomly, the screen on my G-15 keyboard flickers and I see caracters not at the right places. Usually happens for about 1-2 seconds and a bit before my computer freezes. I have to keep the power button pressed for 4 seconds to shut my computer down. I still hear my hard drives and fans working. Sometimes it works with no problems for a full day, some other times it just keeps freezing each time I restart my computer and I have to leave it for the rest of the day. Sometimes my mouse freezes for a fraction of a second (Like 0.01 to 0.2 seconds) quite randomly, usually before it freezes. No errors spotted by the "Action center" unlike when I had problems with my last video card on this system (Driver errors). My G-15 LCD screen also freezes. Sometimes my G-15 LCD screen flickers and caracters gets caried around temporary under heavy load. Now, most of the times, the BIOS hard disks boot order gets reversed for some reason and I have to put it to the right one and save each times I boot. (Might be unrelated, not sure, but it first started yesterday) Sometimes the BIOS doesn't detect my 750GB hard drive plugged in SATA1. What I did so far I have had similar problems in the past and I had changed my hard drive (It was faulty), so I tested my software RAID-0 array and it was faulty so I changed it. (I reinstalled Windows 7 with this part). I also tested with unplugging my secondary hard drive. My CPU was running at about 100 degree Celsius, I removed the dust between the fans and the heatsink and it's now between 45-55. I ran a CPU stress-test and it didn't freeze during the tests (using Prime95 on all cores) Ran a memory test (using memtest86+) for a single pass and there were no errors. Ran a GPU stress test with ati-tools and furmark and it didn't freeze during the tests. (No artefacts either) I had troubles with my graphic card when I got it, but I think that it got fixed with a driver update. I checked the voltages in my BIOS setup and they all seemed ok (±0.2 I think). I have ran on the computer without problems with Fedora 15 on an external hard drive (Appart that it couldn't load Gnome 3 and was reverting to Gnome 2, didn't want to install drivers since I use it on multiple computers) I used it to backup my files from the raid array to my 1TB hard drive for the reinstallation of Windows. (So the crashes only happenned on Windows) [The external hard drive is plugged directly on a SATA port] I contacted EVGA (My graphic card vendor) and pointed them on this question, I'm looking for an answer. Ran sensors on Fedora 15 and got this output: http://pastebin.com/0BHJnAvu Ran 6 short different CPU stress test on Fedora 15 (Haven't found any complete stress testers for Linux) and it didn't crash. Changed the thermal paste to some Artic Silver 5 for my CPU and stress tested the CPU, temperature was at 50 idle, then 64 highest and slowly went down to 62 during the test. Ran some stress testing with a temporary graphic card and it went ok. Ran furmark stress test with my original graphic card and it freezed again. GPU had a temp of 74C, a CPU temp of 58C and a mobo temp of 40C or 45C (Dunno which one it is from SpeedFan). Ran a furmark stress test and a CPU stress test at the same time, results: http://pastebin.com/2t6PLpdJ I have been using my computer without stressing it for about 2 hours now and no crashes yet. I also have disabled the AMD Cool'n'quiet function on the BIOS for a more regular power to the CPU. When I ran Furmark without C'n'q my computer didn't freeze but I had a "Driver Kernel Error" that have recovered (And Furmark crashed) all that while running a CPU stress test. The computer eventually frozed without me being at it, but this time my screen just went on sleep and I couldn't wake it. Using the stability tester in nTune my computer freezed again (In the same manner as before). I notived that Speedfan gives me a -12V of -16.97V and a -5V of -8.78V. I wonder if these numbers are reliable and if they are good or bad. I have swapped my G-15 with another basic USB keyboard (HP) and I have ran furmark for about 10 minutes with a CPU stability test running each 60 seconds for 30 seconds and my computer haven't crashed yet. Ran some more extended tests without my G-15 and it freezed like it usually do. Removed the nForce Hard disk controler. Disabled command queuing in the NVIDIA nForce SATA Controller for both port 0 and port 1 (Errors from the logs) Used CPUID HwMonitor, here are the voltages: http://pastebin.com/dfM7p4jV Changed some configurations in the motherboard BIOS: Disabled PEG Link Mode, Changed AI Tuning to Standard, Disabled the 1394 Controller, Disabled HD Audio, Disabled JMicron RAID controller and Disabled SATA Raid. When it happens When I play video games (Mostly) When I play flash games (Second most) When I'm looking at my desktop background (It rarely happens when I have a window open, but it does, sometimes) When my Graphic card and my CPU are stressed. Sometimes when my Graphic card is stressed. Never happenned while stressing only the CPU. Sometimes when my CPU is stressed. Specs Windows Seven x64 Home Premium Motherboard: M2N-SLI Deluxe CPU: AMD Phenom 9950 x2 @ 2.6GHz Memory: Kingston 4x2GB Dual Channel (Pretty basic memory sticks) Hard drives: Was 2x250GB (Western digital caviar) in raid-0 + 1TB (WD caviar black), I replaced the raid array with a 750GB (WD caviar black) [Yes I removed the array from the raid configurations] 750W Power supply No overcloking. Ever. There have been some power-downs like 4-5 weeks ago, but the problem didn't start immediately after. (I wasn't home, so my computer got shut-down) Event logs (Warnings, errors and critical errors) for the last 24 hours: http://pastebin.com/Bvvk31T7 My current to-try list Reinstall the drivers and software 1 by 1 and do extensive stress testing between each. Update the BIOS firmware to the most recent stable one. Change my motherboard. Status updates Keeping only the last 3 (28/06 04pm) More stress testing and still pass the tests. (28/06 03pm) Been stress testing for 10 minute straight now and 5 minutes with both CPU and GPU being stressed at the same time. (28/06 03pm) Stress-testing right now, so far no problems. A little hope Tests with Furmark and Prime95. Testing Windows bare-bone: 30 Minutes stress, no freeze. Installing an Anti-virus and some software, restarting computer. Testing with Anti-virus and some software (No drivers installed): 30 Minutes stress, no freeze. Installing audio drivers, restarting computer. Testing with the audio drivers: 30 Minutes stress, no freeze. Installing the latest graphic drivers from EVGA's website (without 3d vision since I don't use it), restarting computer. Testing with the graphic drivers: 30 Minutes stress, no freeze. Configuring Windows to my liking and installing more softwares. In this situation, how can I successfully pin-point the current hardware problem? (If it's a hardware problem) Because I don't really have the budget to just forget and replace everything. I also don't really have hardware to test-replace current hardware.

    Read the article

  • What are the worst working conditions you have written code in?

    - by Saurabh Sawant
    There are good times and there are worst times. I recently had to write code in a hot room with temperatures near 107°F (42°C); nothing to sit on; 64 Kbps inconsistent internet connection; warm water for drinking and a lot of distractions and interruptions. I am sure many people have been in similar situations and I would like to know your experiences. More experiences at HackerNews about the same topic. Even more experiences at Slashdot about the same subject.

    Read the article

  • Use sed to replace first 8 and last 4 pipes on every line in a file

    - by Dan Watling
    Here's the situation, I have a text file that is pipe-delimited and one of fields contains pipe characters. I already have a sed script that will change it to be tab-delimited, but the problem is it's terribly slow. It will replace the first occurrence of a pipe 8 times, then replace the last occurrence of a pipe 4 times. I'm hoping there's a quicker way to do what I need. Any thoughts would be appreciated. Here's my current sed script: sed 's/|\(.*\)/\t/;s/|\(.*\)/\t/;s/|\(.*\)/\t/;s/|\(.*\)/\t/;s/|\(.*\)/\t/;s/|\(.*\)/\t/;s/|\(.*\)/\t/;s/|\(.*\)/\t/;s/|\(.*\)/\t/;s/\(.*\)|/\t/;s/\(.*\)|/\t/;s/\(.*\)|/\t/;s/\(.*\)|/\t/' $1 > $1.tab Thanks, -Dan

    Read the article

  • Is this fix to "PostSharp complains about CA1800:DoNotCastUnnecessarily" the best one?

    - by cad
    This question is about "is" and "as" in casting and about CA1800 PostSharp rule. I want to know if the solution I thought is the best one possible or if it have any problem that I can't see. I have this code (named OriginaL Code and reduced to the minimum relevant). The function ValidateSubscriptionLicenceProducts try to validate a SubscriptionLicence (that could be of 3 types: Standard,Credit and TimeLimited ) by casting it and checking later some stuff (in //Do Whatever). PostSharp complains about CA1800:DoNotCastUnnecessarily. The reason is that I am casting two times the same object to the same type. This code in best case will cast 2 times (if it is a StandardLicence) and in worst case 4 times (If it is a TimeLimited Licence). I know is possible to invalidate rule (it was my first approach), as there is no big impact in performance here, but I am trying a best approach. //Version Original Code //Min 2 casts, max 4 casts //PostSharp Complains about CA1800:DoNotCastUnnecessarily private void ValidateSubscriptionLicenceProducts(SubscriptionLicence licence) { if (licence is StandardSubscriptionLicence) { // All products must have the same products purchased List<StandardSubscriptionLicenceProduct> standardProducts = ((StandardSubscriptionLicence)licence).SubscribedProducts; //Do whatever } else if (licence is CreditSubscriptionLicence) { // All products must have a valid Credit entitlement & Credit interval List<CreditSubscriptionLicenceProduct> creditProducts = ((CreditSubscriptionLicence)licence).SubscribedProducts; //Do whatever } else if (licence is TimeLimitedSubscriptionLicence) { // All products must have a valid Time entitlement // All products must have a valid Credit entitlement & Credit interval List<TimeLimitedSubscriptionLicenceProduct> creditProducts = ((TimeLimitedSubscriptionLicence)licence).SubscribedProducts; //Do whatever } else throw new InvalidSubscriptionLicenceException("Invalid Licence type"); //More code... } This is Improved1 version using "as". Do not complain about CA1800 but the problem is that it will cast always 3 times (if in the future we have 30 or 40 types of licences it could perform bad) //Version Improve 1 //Minimum 3 casts, maximum 3 casts private void ValidateSubscriptionLicenceProducts(SubscriptionLicence licence) { StandardSubscriptionLicence standardLicence = Slicence as StandardSubscriptionLicence; CreditSubscriptionLicence creditLicence = Clicence as CreditSubscriptionLicence; TimeLimitedSubscriptionLicence timeLicence = Tlicence as TimeLimitedSubscriptionLicence; if (Slicence == null) { // All products must have the same products purchased List<StandardSubscriptionLicenceProduct> standardProducts = Slicence.SubscribedProducts; //Do whatever } else if (Clicence == null) { // All products must have a valid Credit entitlement & Credit interval List<CreditSubscriptionLicenceProduct> creditProducts = Clicence.SubscribedProducts; //Do whatever } else if (Tlicence == null) { // All products must have a valid Time entitlement // All products must have a valid Credit entitlement & Credit interval List<TimeLimitedSubscriptionLicenceProduct> creditProducts = Tlicence.SubscribedProducts; //Do whatever } else throw new InvalidSubscriptionLicenceException("Invalid Licence type"); //More code... } But later I thought in a best one. This is the final version I am using. //Version Improve 2 // Min 1 cast, Max 3 Casts // Do not complain about CA1800:DoNotCastUnnecessarily private void ValidateSubscriptionLicenceProducts(SubscriptionLicence licence) { StandardSubscriptionLicence standardLicence = null; CreditSubscriptionLicence creditLicence = null; TimeLimitedSubscriptionLicence timeLicence = null; if (StandardSubscriptionLicence.TryParse(licence, out standardLicence)) { // All products must have the same products purchased List<StandardSubscriptionLicenceProduct> standardProducts = standardLicence.SubscribedProducts; //Do whatever } else if (CreditSubscriptionLicence.TryParse(licence, out creditLicence)) { // All products must have a valid Credit entitlement & Credit interval List<CreditSubscriptionLicenceProduct> creditProducts = creditLicence.SubscribedProducts; //Do whatever } else if (TimeLimitedSubscriptionLicence.TryParse(licence, out timeLicence)) { // All products must have a valid Time entitlement List<TimeLimitedSubscriptionLicenceProduct> timeProducts = timeLicence.SubscribedProducts; //Do whatever } else throw new InvalidSubscriptionLicenceException("Invalid Licence type"); //More code... } //Example of TryParse in CreditSubscriptionLicence public static bool TryParse(SubscriptionLicence baseLicence, out CreditSubscriptionLicence creditLicence) { creditLicence = baseLicence as CreditSubscriptionLicence; if (creditLicence != null) return true; else return false; } It requires a change in the classes StandardSubscriptionLicence, CreditSubscriptionLicence and TimeLimitedSubscriptionLicence to have a "tryparse" method (copied below in the code). This version I think it will cast as minimum only once and as maximum three. What do you think about improve 2? Is there a best way of doing it?

    Read the article

  • Speed improvements for Perl's chameneos-redux in the Computer Language Benchmarks Game

    - by Robert P
    Ever looked at the Computer Language Benchmarks Game (formerly known as the Great Language Shootout)? Perl has some pretty healthy competition there at the moment. It also occurs to me that there's probably some places that Perl's scores could be improved. The biggest one is in the chameneos-redux script right now—the Perl version runs the worst out of any language: 1,626 times slower than the C baseline solution! There are some restrictions on how the programs can be made and optimized, and there is Perl's interpreted runtime penalty, but 1,626 times? There's got to be something that can get the runtime of this program way down. Taking a look at the source code and the challenge, how can the speed be improved?

    Read the article

  • UIView shadow drawing wrong

    - by dc
    Trying to draw a shadow using code from this question: http://stackoverflow.com/questions/805872/how-do-i-draw-a-shadow-under-a-uiview I implement it in a UIView subclass as discussed, but when I try and use it using UIView *shadow = [[ShadowView alloc]initWithFrame:CGRectMake(100,100,100,100)]; I get only a black square, rather than something resembling shadow. Am I missing something here?

    Read the article

  • Quick question regarding CSS sprites and memory usage

    - by Andy E
    Well, it's more to do with images and memory in general. If I use the same image multiple times on a page, will each image be consolidated in memory? Or will each image use a seperate amount of memory? I'm concerned about this because I'm building a skinning system for a Windows Desktop Gadget, and I'm looking at spriting the images in the default skin so that I can keep the file system looking clean. At the same time I want to try and keep the memory footprint to a minimum. If I end up with a single file containing 100 images and re-use that image 100 times across the gadget I don't want to have performance issues. Cheers.

    Read the article

  • GWT Query fails second time -only.

    - by Koran
    HI, I have a visualization function in GWT which calls for two instances of the same panels - two queries. Now, suppose one url is A and the other url is B. Here, I am facing an issue in that if A is called first, then both A and B works. If B is called first, then only B works, A - times out. If I call both times A, only the first time A works, second time it times out. If I call B twice, it works both times without a hitch. Even though the error comes at timed out, it actually is not timing out - in FF status bar, it shows till - transferring data from A, and then it gets stuck. This doesnt even show up in the first time query. The only difference between A and B is that B returns very fast, while A returns comparitively slow. The sample code is given below: public Panel(){ Runnable onLoadCallback = new Runnable() { public void run() { Query query = Query.create(dataUrl); query.setTimeout(60); query.send(new Callback() { public void onResponse(QueryResponse response) { if (response.isError()){ Window.alert(response.getMessage()); } } } } VisualizationUtils.loadVisualizationApi(onLoadCallback, PieChart.PACKAGE); } What could be the reason for this? I cannot think of any reason why this should happen? Why is this happening only for A and not for B? EDIT: More research. The query which works all the time (i.e. B is the example URL given in GWT visualization site: see comment [1]). So, I tried in my app engine to reproduce it - the following way s = "google.visualization.Query.setResponse({version:'0.6',status:'ok',sig:'106459472',table:{cols:[{id:'A',label:'Source',type:'string',pattern:''},{id:'B',label:'Percent',type:'number',pattern:'#0.01%'}],rows:[{c:[{v:'Oil'},{v:0.37,f:'37.00%'}]},{c:[{v:'Coal'},{v:0.25,f:'25.00%'}]},{c:[{v:'Natural Gas'},{v:0.23,f:'23.00%'}]},{c:[{v:'Nuclear'},{v:0.06,f:'6.00%'}]},{c:[{v:'Biomass'},{v:0.04,f:'4.00%'}]},{c:[{v:'Hydro'},{v:0.03,f:'3.00%'}]},{c:[{v:'Solar Heat'},{v:0.005,f:'0.50%'}]},{c:[{v:'Wind'},{v:0.003,f:'0.30%'}]},{c:[{v:'Geothermal'},{v:0.002,f:'0.20%'}]},{c:[{v:'Biofuels'},{v:0.002,f:'0.20%'}]},{c:[{v:'Solar photovoltaic'},{v:4.0E-4,f:'0.04%'}]}]}});"; response = HttpResponse(s, content_type="text/plain; charset=utf-8") response['Expires'] = time.strftime('%a, %d %b %Y %H:%M:%S GMT', time.gmtime()) return response Where s is the data when we run the query for B. I tried to add Expires etc too, since that seems to be the only header which has the difference, but now, the query fails all the time. For more info - I am now sending the difference between my server response vs the working server response. They seems to be pretty similar. HTTP/1.0 200 OK Content-Type: text/plain Date: Wed, 16 Jun 2010 11:07:12 GMT Server: Google Frontend Cache-Control: private, x-gzip-ok="" google.visualization.Query.setResponse({version:'0.6',status:'ok',sig:'106459472',table:{cols:[{id:'A',label:'Source',type:'string',pattern:''},{id:'B',label:'Percent',type:'number',pattern:'#0.01%'}],rows:[{c:[{v:'Oil'},{v:0.37,f:'37.00%'}]},{c:[{v:'Coal'},{v:0.25,f:'25.00%'}]},{c:[{v:'Natural Gas'},{v:0.23,f:'23.00%'}]},{c:[{v:'Nuclear'},{v:0.06,f:'6.00%'}]},{c:[{v:'Biomass'},{v:0.04,f:'4.00%'}]},{c:[{v:'Hydro'},{v:0.03,f:'3.00%'}]},{c:[{v:'Solar Heat'},{v:0.005,f:'0.50%'}]},{c:[{v:'Wind'},{v:0.003,f:'0.30%'}]},{c:[{v:'Geothermal'},{v:0.002,f:'0.20%'}]},{c:[{v:'Biofuels'},{v:0.002,f:'0.20%'}]},{c:[{v:'Solar photovoltaic'},{v:4.0E-4,f:'0.04%'}]}]}});Connection closed by foreign host. Mac$ telnet spreadsheets.google.com 80 Trying 209.85.231.100... Connected to spreadsheets.l.google.com. Escape character is '^]'. GET http://spreadsheets.google.com/tq?key=pWiorx-0l9mwIuwX5CbEALA&range=A1:B12&gid=0&headers=-1 HTTP/1.0 200 OK Content-Type: text/plain; charset=UTF-8 Date: Wed, 16 Jun 2010 11:07:58 GMT Expires: Wed, 16 Jun 2010 11:07:58 GMT Cache-Control: private, max-age=0 X-Content-Type-Options: nosniff X-XSS-Protection: 1; mode=block Server: GSE google.visualization.Query.setResponse({version:'0.6',status:'ok',sig:'106459472',table:{cols:[{id:'A',label:'Source',type:'string',pattern:''},{id:'B',label:'Percent',type:'number',pattern:'#0.01%'}],rows:[{c:[{v:'Oil'},{v:0.37,f:'37.00%'}]},{c:[{v:'Coal'},{v:0.25,f:'25.00%'}]},{c:[{v:'Natural Gas'},{v:0.23,f:'23.00%'}]},{c:[{v:'Nuclear'},{v:0.06,f:'6.00%'}]},{c:[{v:'Biomass'},{v:0.04,f:'4.00%'}]},{c:[{v:'Hydro'},{v:0.03,f:'3.00%'}]},{c:[{v:'Solar Heat'},{v:0.005,f:'0.50%'}]},{c:[{v:'Wind'},{v:0.003,f:'0.30%'}]},{c:[{v:'Geothermal'},{v:0.002,f:'0.20%'}]},{c:[{v:'Biofuels'},{v:0.002,f:'0.20%'}]},{c:[{v:'Solar photovoltaic'},{v:4.0E-4,f:'0.04%'}]}]}});Connection closed by foreign host. Also, please note that App engine did not allow the Expires header to go through - can that be the reason? But if that is the reason, then it should not fail if B is sent first and then A. Comment [1] : http://spreadsheets.google.com/tq?key=pWiorx-0l9mwIuwX5CbEALA&range=A1:B12&gid=0&headers=-1

    Read the article

  • 2D packing with obstacles

    - by cime
    Anybody know of an efficient algorithm for moving rectangles in a square which contains obstacles? Rectangles: can rotate can move must not collide with obstacles (black squares) Obstacles: can't be moved can be added anywhere Goal: move rectangles until you can

    Read the article

  • Explanation of Pingdom Results

    - by Computer Guru
    Hi, I'm trying to optimize my page load times, and I'm using Pingdom to test the site response times. However, I'm not exactly sure what the various components of the "time bar" mean. Example link: http://tools.pingdom.com/fpt/?url=http://neosmart.net/forums//&id=2230361 According to them, the portion of the bar that is yellow is the time between "start" and "connect" and the portion of the bar that is green is the time between "connect" and "first byte" with the blue section being the actual transfer time (time between "first byte" and "last byte"). If I'm trying to the first two (which take very long in my case), what's the recommended course of action? Thanks.

    Read the article

  • Speed improvements for Perl's chameneos-redux script in the Computer Language Benchmarks Game

    - by Robert P
    Ever looked at the Computer Language Benchmarks Game, (formerly known as the Great Language Shootout)? Perl has some pretty healthy competition there at the moment. It also occurs to me that there's probably some places that Perl's scores could be improved. The biggest one is in the chameneos-redux script right now - the Perl version runs the worst out of any language : 1,626 times slower than the C baseline solution! There are some restrictions on how the programs can be made and optimized, and there is Perl's interpreted runtime penalty, but 1,626 times? There's got to be something that can get the runtime of this program way down. Taking a look at the source code and the challenge, what do you think could be done to reduce this runtime speed?

    Read the article

  • Why don't purely functional languages use reference counting?

    - by Zifre
    In purely functional languages, data is immutable. With reference counting, creating a reference cycle requires changing already created data. It seems like purely functional languages could use reference counting without worrying about the possibility of cycles. Am is right? If so, why don't they? I understand that reference counting is slower than GC in many cases, but at least it reduces pause times. It would be nice to have the option to use reference counting in cases where pause times are bad.

    Read the article

  • Best Data Structure For Time Series Data

    - by TriParkinson
    Hi all, I wonder if someone could take a minute out of their day to give their two cents on my problem. I would like some suggestions on what would be the best data structure for representing, on disk, a large data set of time series data. The main priority is speed of insertion, with other priorities in decreasing order; speed of retrieval, size on disk, size in memory, speed of removal. I have seen that B+ trees are often used in database because of their fast search times, but how about for fast insertion times? Is a linked list really the way to go? Thanks in advance for your time, Tri

    Read the article

  • WCF Error - The operation has timed out

    - by Charlie.Barker
    We have created a WCF service hosted in a windows service that handles Authentication requests. The only behavior is : ServiceMetadataBehavior smb = new ServiceMetadataBehavior(); smb.HttpGetEnabled = true; selfHost.Description.Behaviors.Add(smb); Our clients are able to authenticate succesfully 10 times then we get the error The operation has timed out When we increase the MaxConcurrentSessions = 50 then our clients can authenticate 50 times before we see the error. Clearly sessions are not being closed after the authentication call is made can anyone tell why this might be happening?

    Read the article

  • SQL COUNT of COUNT

    - by cryptic-star
    I have some data I am querying. The table is composed of two columns - a unique ID, and a value. I would like to count the number of times each unique value appears (which can easily be done with a COUNT and GROUP BY), but I then want to be able to count that. So, I would like to see how many items appear twice, three times, etc. So for the following data (ID, val)... 1, 2 2, 2 3, 1 4, 2 5, 1 6, 7 7, 1 The intermediate step would be (val, count)... 1, 3 2, 3 7, 1 And I would like to have(count_from_above, new_count)... 3, 2 -- since three appears twice in the previous table 1, 1 -- since one appears once in the previous table Is there any query which can do that? If it helps, I'm working with Postgres. Thanks!

    Read the article

  • Check if thread is EDT is necessary?

    - by YuppieNetworking
    Hello, I have an UI implemented with Swing. One component does some work that may take some time, so I use SwingUtilities.invokeLater. However, I was reading some old code and found this in an ActionListener: if (!SwingUtilities.isEventDispatchThread()) { SwingUtilities.invokeLater(new Runnable() { public void run() { // code X } }); } else { // code X } I thought that it made sense since it separates code X from the EDT. However, I found it error-prone since I have used it a couple of times and both times I forgot the else part. The question is: is the SwingUtilities.isEventDispatchThread() checking necessary? Or could I assume that I am not in the EDT and always use invokeLater? Thanks a lot.

    Read the article

  • OpenCart Service Scheduling

    - by Jason Palmer
    I am looking to develop an extension to OpenCart which will allow me to both sell products and sell scheduled services. For the scheduled services, I would like to have the storefront interface change so the customer sees a calendar. It would be Nirvana for the calendar to show only available dates/times, but at the very least they should see a calendar. Then, on the administrative side, there should be a place where there is a list of desired dates/times for scheduled services. I'm wondering if anyone is aware of community-developed extensions which do this, or come close? If not, any recommendations for how to accomplish this properly are welcome. Thanks in advance.

    Read the article

  • How to find minimum of nonlinear, multivariate function using Newton's method (code not linear algeb

    - by Norman Ramsey
    I'm trying to do some parameter estimation and want to choose parameter estimates that minimize the square error in a predicted equation over about 30 variables. If the equation were linear, I would just compute the 30 partial derivatives, set them all to zero, and use a linear-equation solver. But unfortunately the equation is nonlinear and so are its derivatives. If the equation were over a single variable, I would just use Newton's method (also known as Newton-Raphson). The Web is rich in examples and code to implement Newton's method for functions of a single variable. Given that I have about 30 variables, how can I program a numeric solution to this problem using Newton's method? I have the equation in closed form and can compute the first and second derivatives, but I don't know quite how to proceed from there. I have found a large number of treatments on the web, but they quickly get into heavy matrix notation. I've found something moderately helpful on Wikipedia, but I'm having trouble translating it into code. Where I'm worried about breaking down is in the matrix algebra and matrix inversions. I can invert a matrix with a linear-equation solver but I'm worried about getting the right rows and columns, avoiding transposition errors, and so on. To be quite concrete: I want to work with tables mapping variables to their values. I can write a function of such a table that returns the square error given such a table as argument. I can also create functions that return a partial derivative with respect to any given variable. I have a reasonable starting estimate for the values in the table, so I'm not worried about convergence. I'm not sure how to write the loop that uses an estimate (table of value for each variable), the function, and a table of partial-derivative functions to produce a new estimate. That last is what I'd like help with. Any direct help or pointers to good sources will be warmly appreciated. Edit: Since I have the first and second derivatives in closed form, I would like to take advantage of them and avoid more slowly converging methods like simplex searches.

    Read the article

  • How to the view count of a question in momery?

    - by Freewind
    My website is like stackoverflow, there are many questions. I want to record how many times a question has been visited. I have a column called "view_count" in the question table to save it. When a user visited a question many times, the view_count should be increased only 1. So I have to record which user has visited which question, and I think it is too much expensive to save them in the database, because the records will be huge. So I want to keep them in the memory, and persistent the number to database every 10 minutes. I have searched about "cache" of rails, but I haven't found an example. I need an simple sample of how to do this, thanks for help~

    Read the article

  • PBKDF2-HMAC-SHA1

    - by Jason
    To generate a valid pairwise master key for a WPA2 network a router uses the PBKDF2-HMAC-SHA1 algorithm. I understand that the sha1 function is performed 4096 times to derive the PMK, however I have two questions about the process. Excuse the pseudo code. 1) How is the input to the first instance of the SHA1 function formatted? SHA1("network_name"+"network_name_length"+"network_password") Is it formatted in that order, is it the hex value of the network name, length and password or straight ASCII? Then from what I gather the 160 bit digest received is fed straight into another round of hashing without any additional salting. Like this: SHA1("160bit digest from last round of hashing") Rise and repeat. 2) Once this occurs 4096 times 256 bits of the output is used as the pairwise master key. What I don't understand is that if SHA1 produces 160bit output, how does the algorithm arrive at the 256bits required for a key? Thanks for the help.

    Read the article

  • NSTask or NSThread?

    - by Ben Packard
    I have some code that is attached to an NSTimer. Around 5 times every second, it interacts with another application (by emulating keystrokes) and when appropriate spits out an NSNotification, that is handled by another piece of code. While the timer code is running, the UI is unresponsive, so I can't include a 'stop' button that halts the timer. How should I handle this? A separate process (NSTask right?) or thread? Remember that at unpredictable times, the timer code will need to send some info back for processing. Thanks.

    Read the article

< Previous Page | 79 80 81 82 83 84 85 86 87 88 89 90  | Next Page >