Daily Archives

Articles indexed Friday December 31 2010

Page 2/30 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Resolving type parameter values passed to ancester type using reflection

    - by Tom Tucker
    I've asked a similar question before, but this one is much more challenging. How do I find a value of a specific type parameter that is passed to an ancestor class or an interface implemented by one of its ancestor classes using reflection? I basically need to write a method that looks like this. // Return the value of the type parameter at the index passed to the parameterizedClass from the clazz. Object getParameterValue(Class<?> clazz, Class<?> parameterizedClass, int index) For the example below, getParameterValue(MyClass.class, Map.class, 1) would return String.class public class Foo<K, V> implements Map<K, V>{ } public class Bar<V> extends Foo<Integer, V> { } public class MyClass extends Bar<String> { } Thanks!

    Read the article

  • How to set CodeIgniter to ignore Wordpress folder?

    - by artmania
    Hi friends, I built a website with CodeIgniter last year www.example.com, and client wanted Wordpress Blog last week. I built the blog and uploaded to www.example.com/blog Now when I click any link on wordpress it gives error as below :/ http://www.example.com/blog/category/one-last-category/ An Error Was Encountered Unable to load your default controller. Please make sure the controller specified in your Routes.php file is valid. How can I set Codeigniter to ignore Wordpress folder? Appreciate helps!!!

    Read the article

  • ViewController doesn't get released

    - by ObjectiveFlash
    Every time I turn the page in my app, I am removing and releasing the previous viewController - but for some reason it is still in memory. I know this, because after using the app for a while, I get 47 memory warnings - one from each view controller - if I had opened 47 pages before the memory warning occurred. I get 60 memory warnings if I had opened 60 pages before the memory warning occurred. And so on... This is the code that runs from page to page: UIViewController *nextController; Class nextClass = [pageClasses objectAtIndex:(currentPageIndex - 1)]; nextController = [[nextClass alloc] initWithNibName:[pageNibs objectAtIndex:(currentPageIndex - 1)] bundle:nil]; [nextController performSelector:@selector(setDelegate:) withObject:self]; [currentPageController.view removeFromSuperview]; [self.view addSubview:nextController.view]; [currentPageController release]; currentPageController = nextController; [currentPageController retain]; [nextController release]; Can anybody point to any issues they see? Thanks so much!

    Read the article

  • How can I run .aggregate() on a field introduced using .extra(select={...}) in a Django Query?

    - by Jake
    I'm trying to get the count of the number of times a player played each week like this: player.game_objects.extra(select={'week': 'WEEK(`games_game`.`date`)'}).aggregate(count=Count('week')) But Django complains that FieldError: Cannot resolve keyword 'week' into field. Choices are: <lists model fields> I can do it in raw SQL like this SELECT WEEK(date) as week, COUNT(WEEK(date)) as count FROM games_game WHERE player_id = 3 GROUP BY week Is there a good way to do this without executing raw SQL in Django?

    Read the article

  • "Expected specifier-quantifier-list before b2Body" error in XCode

    - by Zeophlite
    I'm trying to derive class from CCSprite to store the sprites reference to its corresponding b2Body, but I've get the following errors (comments in Code) BoxSprite.h #import <Foundation/Foundation.h> #import "Box2D.h" #import "cocos2d.h" @interface BoxSprite : CCSprite { b2Body* bod; // Expected specifier-quantifier-list before b2Body } @property (nonatomic, retain) b2Body* bod; // Expected specifier-quantifier-list before b2Body @end // Property 'bod' with 'retain' attribute must be of object type BoxSprite.m #import "BoxSprite.h" @implementation BoxSprite @synthesize bod; // No declaration of property 'bod' found in the interface - (void) dealloc { [bod release]; // 'bod' undeclared [super dealloc]; } @end I was hoping to create the sprite and assign the body with: BoxSprite *sprite = [BoxSprite spriteWithBatchNode:batch rect:CGRectMake(32 * idx,32 * idy,32,32)]; ... sprite->bod = body; // Instance variable 'bod' is declared protected Then access the b2Body by: if ([node isKindOfClass:[BoxSprite class]]) { BoxSprite *spr = (BoxSprite*)node; b2Body *body = spr->bod; // Instance variable 'bod' is declared protected ... }

    Read the article

  • merging two small pieces of jquery codes

    - by Billa
    Following are two pieces of jquery code. First one prints a text message when clicked on a link, and the second slides down a div when click on a link. I want to merge second code into first one, so that when I click the link, it displays the message (as the first code does), and also slides down the #votebox (as done in second code, and show content in that. I will be very thankful for any help. $("a.vote_up").click(function(){ the_id = $(this).attr('id'); $("span#votes_count"+the_id).fadeOut("fast"); $.ajax({ type: "POST", data: "action=vote_up&id="+$(this).attr("id"), url: "votes.php", success: function(msg) { $("span#votes_up"+the_id).fadeOut(); $("span#votes_up"+the_id).html(msg); $("span#votes_up"+the_id).fadeIn(); //Here, I want to slide down the votebox and content div (from code below). } }); }); The following code slides down votebox div and displays content in it, I want to include that in the above code. $("a.vote_up").click(function(){ var id=$(this).attr("id"); var name=$(this).attr("name"); var dataString = 'id='+ id + '&name='+ name; //I want to include this votebox in above code. $("#votebox").slideDown("slow"); $("#flash").fadeIn("slow"); $.ajax({ type: "POST", url: "rating.php", data: dataString, cache: false, success: function(html){ $("#flash").fadeOut("slow"); //and want to use this div as well. $("#content").html(html); } }); }); Thanks for any help.

    Read the article

  • How to use a FolderBrowserDialog from a WPF application

    - by Craig Shearer
    I'm trying to use the FolderBrowserDialog from my WPF application - nothing fancy. I don't much care that it has the Windows Forms look to it. However, when I call ShowDialog, I want to pass the owner window which is an IWin32Window. How do I get this from my WPF control? Actually, does it matter? If I run this code and use the ShowDialog overload with no parameters it works fine. Under what circumstances do I need to pass the owner window? Thanks, Craig

    Read the article

  • [sqlalchemy] subquery in select statement

    - by webjunkie
    Hi guys, I have two tables (albums,pictures) in a one to many relationship and I want to display each albums details with one picture so I have the following query select albums.name,(select pictures.path from pictures where pictures.albumid=albums.id limit 1) as picture from albums where ... Now I'm struggling creating this on Pylons with sqlalchemy I tried to do the following picture = Session.query(model.Picture) sub_q = picture.filter_by(albumid = model.Album.id).limit(1).subquery() album_q = Session.query(model.Album, sub_q) result = album_q.all() but it creates the following statement displaying the incorrect picture beacuse the table albums is included in the subquery select albums.name,(select pictures.path from pictures,albums where pictures.albumid=albums.id) from albums where ... Am I doing it wrong?, is this even possible in sqlalchemy?.

    Read the article

  • How to reduce virtual memory by optimising my PHP code?

    - by iCeR
    My current code (see below) uses 147MB of virtual memory! My provider has allocated 100MB by default and the process is killed once run, causing an internal error. The code is utilising curl multi and must be able to loop with more than 150 iterations whilst still minimizing the virtual memory. The code below is only set at 150 iterations and still causes the internal server error. At 90 iterations the issue does not occur. How can I adjust my code to lower the resource use / virtual memory? Thanks! <?php function udate($format, $utimestamp = null) { if ($utimestamp === null) $utimestamp = microtime(true); $timestamp = floor($utimestamp); $milliseconds = round(($utimestamp - $timestamp) * 1000); return date(preg_replace('`(?<!\\\\)u`', $milliseconds, $format), $timestamp); } $url = 'https://www.testdomain.com/'; $curl_arr = array(); $master = curl_multi_init(); for($i=0; $i<150; $i++) { $curl_arr[$i] = curl_init(); curl_setopt($curl_arr[$i], CURLOPT_URL, $url); curl_setopt($curl_arr[$i], CURLOPT_RETURNTRANSFER, 1); curl_setopt($curl_arr[$i], CURLOPT_SSL_VERIFYHOST, FALSE); curl_setopt($curl_arr[$i], CURLOPT_SSL_VERIFYPEER, FALSE); curl_multi_add_handle($master, $curl_arr[$i]); } do { curl_multi_exec($master,$running); } while($running > 0); for($i=0; $i<150; $i++) { $results = curl_multi_getcontent ($curl_arr[$i]); $results = explode("<br>", $results); echo $results[0]; echo "<br>"; echo $results[1]; echo "<br>"; echo udate('H:i:s:u'); echo "<br><br>"; usleep(100000); } ?> Processor Information Total processors: 8 Processor #1 Vendor GenuineIntel Name Intel(R) Xeon(R) CPU E5405 @ 2.00GHz Speed 1995.120 MHz Cache 6144 KB Processor #2 Vendor GenuineIntel Name Intel(R) Xeon(R) CPU E5405 @ 2.00GHz Speed 1995.120 MHz Cache 6144 KB Processor #3 Vendor GenuineIntel Name Intel(R) Xeon(R) CPU E5405 @ 2.00GHz Speed 1995.120 MHz Cache 6144 KB Processor #4 Vendor GenuineIntel Name Intel(R) Xeon(R) CPU E5405 @ 2.00GHz Speed 1995.120 MHz Cache 6144 KB Processor #5 Vendor GenuineIntel Name Intel(R) Xeon(R) CPU E5405 @ 2.00GHz Speed 1995.120 MHz Cache 6144 KB Processor #6 Vendor GenuineIntel Name Intel(R) Xeon(R) CPU E5405 @ 2.00GHz Speed 1995.120 MHz Cache 6144 KB Processor #7 Vendor GenuineIntel Name Intel(R) Xeon(R) CPU E5405 @ 2.00GHz Speed 1995.120 MHz Cache 6144 KB Processor #8 Vendor GenuineIntel Name Intel(R) Xeon(R) CPU E5405 @ 2.00GHz Speed 1995.120 MHz Cache 6144 KB Memory Information Memory for crash kernel (0x0 to 0x0) notwithin permissible range Memory: 8302344k/9175040k available (2176k kernel code, 80272k reserved, 901k data, 228k init, 7466304k highmem) System Information Linux server3.server.com 2.6.18-194.17.1.el5PAE #1 SMP Wed Sep 29 13:31:51 EDT 2010 i686 i686 i386 GNU/Linux Physical Disks SCSI device sda: 1952448512 512-byte hdwr sectors (999654 MB) sda: Write Protect is off sda: Mode Sense: 03 00 00 08 SCSI device sda: drive cache: write back SCSI device sda: 1952448512 512-byte hdwr sectors (999654 MB) sda: Write Protect is off sda: Mode Sense: 03 00 00 08 SCSI device sda: drive cache: write back sd 0:1:0:0: Attached scsi disk sda sd 4:0:0:0: Attached scsi removable disk sdb sd 0:1:0:0: Attached scsi generic sg4 type 0 sd 4:0:0:0: Attached scsi generic sg7 type 0 Current Memory Usage total used free shared buffers cached Mem: 8306672 7847384 459288 0 487912 6444548 -/+ buffers/cache: 914924 7391748 Swap: 4095992 496 4095496 Total: 12402664 7847880 4554784 Current Disk Usage Filesystem Size Used Avail Use% Mounted on /dev/mapper/VolGroup00-LogVol00 898G 307G 546G 36% / /dev/sda1 99M 19M 76M 20% /boot none 4.0G 0 4.0G 0% /dev/shm /var/tmpMnt 4.0G 1.8G 2.0G 48% /tmp

    Read the article

  • using jQuery .live with .bind

    - by Aninemity
    okay, I understand the basics of jQuery, and I know that in some instances I've had to use .live('click',function(){...}); instead of .click(function(){...}); to get the method to fire correctly. the method I'm currently looking at is: $('#title').bind('keyup', function(){...}); This works great, except because it's in a bit of code that isn't called until another action is preformed, I'd need to use .live() as described above. Problem is, I don't know how to format this one to work using the .live() method instead of .bind() as shown above. Can someone please help? Thanks in advance!

    Read the article

  • subdomain/virtualhost problem on unix + apache

    - by Aaron
    Hello, I'm having a strangely difficult time setting up a subdomain (x.example.com). The main site works fine, but I get 404 errors attempting to hit x.example.com no matter how I set up the VirtualHost config. NameVirtualHost *:80 <VirtualHost *:80> ServerName www.example.com DocumentRoot /var/www/example.com/htdocs ServerAlias example.com </VirtualHost> <VirtualHost *:80> ServerName x.example.com ErrorLog /var/logs/x-error-log CustomLog /var/logs/x-access-log common DocumentRoot /var/www/x/htdocs </VirtualHost> As far as I can tell, this is a vanilla set up. Any suggestions would be appreciated.

    Read the article

  • I need a relatively cheap host, which will be able to handle sudden peaks in traffic?

    - by Morten K
    Hello, We're launching a product in a few months, which will obviously have a website. Judging from our current traffic, we believe that overall traffic will probably not be that much, but we are aiming at promoting the site heavily using social media. This has the typical problem, that IF we get suddenly get picked up by a large tech blog, we will see a sudden burst: A very heavy increase in traffic all of the sudden. If we use a cheap charlie host as our current host is (www.unoeuro.com) or something similar like GoDaddy, I'm afraid that the site will go down under the load. If that happens, then we might as well have thrown our social media marketing dollars out of the window. Our site will be relatively lightweight, all videos hosted at Youtube or Vimeo and other than that mainly just a standard webpage (ie nothing too heavy). I am hoping for recommendations for a good hosting company, which has some form of scalable hosting, so if / when a traffic surge hits, the site will not go down.

    Read the article

  • How to fix choppy video with VLC player?

    - by Brian Ojeda
    When playing most movies in VLC player, the video feed is choppy. Furthermore, the sound is near perfect. Another catch is, this video issue wasn't always an issue. I use to play movies with no problem with video or sound. I can not pin point what has changed between the it use to work fine and the time it started being choppy though. I have an ASUS G73JW-A1. This system should be more than enough to handle the demand of playing HD videos. Movies that are normally effected are HD videos. These video range from 4 to 9 gigs. In addition, the videos are in MKV, MP4 (or M4V), and AVCHD (or M2TS) formats. I get the same results when playing move directly off my hard drive or off an external. Finally, all the drivers have been recently checked and updated if needed.

    Read the article

  • How to run wireshark on the background without the GUI?

    - by user60968
    Hello everybody, I am trying to run Wireshark on Mac OS X, on the background. I did install the command line utilities, and so I am able to start wireshark and capture packet using the command line. The only thing I want now is to run it on the background, without even having the X11 icon on the task bar and see the window of wireshark. I believe it is possible but can't find anything on the doc of Wireshark. Maybe another way would be to find a trick to hide an icon on Mac OS X... If anybody already did that or have an idea... Thank you Please excuse my English which is not perfect at all

    Read the article

  • How to calculate RAM value on performance per dollar spent

    - by Stucko
    Hi, I'm trying to make decisions on buying a new PC. I have most specifications (processor/graphic card/hard disk) pin-downed except for RAM. I am wondering what is the best RAM configuration for the amount of money I'm spending. As the question of best is subjective, I'd like to know how would I calculate the value of RAM sticks sold. 1.(sample)The value of amount of memory: 1) CORSAIR PC1333 D3 2GB = costs $80 2) CORSAIR PC1333 D3 4GB = costs $190 would it be better to buy 2 of item 1) instead of 1 of item 2) ?? Although I would normally choose to have 1 of 2) as the difference is only (190-(80*2)) = 30 as I would save 1 DIMM slot, What I need is the value per amount: 1) 80/ 2 = $40 per 1GB 2) 190/ 4 = $47.5 per 1GB 2. The value of frequency: 1) CORSAIR PC1333 4GB = costs 190 2) CORSAIR PC1600C7 4GB = costs 325 Im not even sure of the denominator ... $ per 1 ghz speed? 3. The value of latency: 1) CORSAIR CMP1600C8 8-8-8-24 2GBx3 (triple channel) = costs 589 2) CORSAIR CMP1600C7D 7-7-7-20 2GBx3 (triple channel) = costs 880 Im not even sure of the denominator ... $ per 1 ghz speed? Just for your information i'd like to get the best out of the money im going to spend to put on a 6 DIMM slot i7core motherboard.

    Read the article

  • What RSS Reader can handle item-updating (JIRA search) feeds?

    - by Stephen
    Thunderbird is a good rss reader in terms of being able to connect successfully to jira authenticated search feeds (where evolution-rss and Liferea can't), but really sucks when it comes to updating. A Jira search feed will give a link id to http://jira/browse/[ticket no], and if that ticket/feed-item is updated, thunderbird refuses to update it - it already has it! (even though the item date does not match). Also, if you delete the ticket update, it will never show up again for that news account. Has anybody found an RSS reader that can work with JIRA/updating RSS items? Note: this is not the same as Jira activity feeds - those work great, as each update has a unique item id To replicate: Grab a search (any search) Get it into your rss reader Read an item, modify the linked ticket Update rss and see if the ticket bumps to most recent and unread or, generically: Get an rss feed (from your hard drive?) Modify an item in the middle changing the content, the date, and moving it to the top Update rss and see if the ticket bumps to most recent and unread

    Read the article

  • SQLAuthority News – Community Service and Public Speaking Engagements

    - by pinaldave
    Today is the last day of the year and I was going over my memories for year 2010. Almost all of them are good and I feel for sure better person in terms of knowledge, nature and overall human being. Looking back at the year, it is very satisfying as I was able to go out in public and help community out at various capacity. Thought, most of the time my contribution was as speaker, many times, I have reached out and helped organized event and worked at any capacity to get the event out. I have taken parts in many TechEds, PASS events, Virtual Tech Days, Various Community Events around the Globe and my contribution is not limited to my country only. Overall – I feel good to be part of this wonderful and supportive community. SQLAuthority News – A Successful Community TechDays at Ahmedabad – December 11, 2010 SQLAuthority News – A Successful Performance Tuning Seminar at Pune – Dec 4-5, 2010 SQL SERVER – A Successful Performance Tuning Seminar – Hyderabad – Nov 27-28, 2010 – Next Pune SQLAuthority News – SQLPASS Nov 8-11, 2010-Seattle – An Alternative Look at Experience SQLAuthority News – Statistics and Best Practices – Virtual Tech Days – Nov 22, 2010 SQLAuthority News – SQL Server Performance Optimizations Seminar – Grand Success – Colombo, Sri Lanka – Oct 4 – 5, 2010 SQL SERVER – Visiting Alma Mater – Delivering Session on Database Performance and Career – Nirma Institute of Technology SQLAuthority News – Feedback Received for Virtual Tech Days Sessions on Spatial Database SQLAuthority News – Community Tech Days, Ahmedabad – July 24, 2010 SQLAuthority News – SQL Data Camp, Chennai, July 17, 2010 – A Huge Success SQLAuthority News – 2 Sessions at TechInsight 2010 – June 29 – July 1, 2010 SQLAuthority News – Author Visit – SQL Server 2008 R2 Launch SQLAuthority News – Professional Development and Community SQLAuthority News – TechEd India – April 12-14, 2010 Bangalore – An Unforgettable Experience – An Opportunity of A Lifetime SQLAuthority News – Speaking Sessions at TechEd India – 3 Sessions – 1 Panel Discussion SQLAuthority News – Meeting with Allen Bailochan Tuladhar – An Unlimited Experience SQLAuthority News – Author Visit Review – TechMela Nepal – March 29-30, 2010 SQLAuthority News – Excellent Event – TechEd Sri Lanka – Feb 8, 2010 SQLAuthority News – Hyderabad Techies February Fever Feb 11, 2010 – Indexing for Performance SQLAuthority News – MUGH – Microsoft User Group Hyderabad – Feb 2, 2010 Session Review SQLAuthority News – Ahmedabad Community Tech Days – Jan 30, 2010 – Huge Success For earlier year’s contribution you can check my webpage over here. Reference: Pinal Dave (http://blog.SQLAuthority.com) Filed under: About Me, Pinal Dave, SQL, SQL Authority, SQL Query, SQL Server, SQL Tips and Tricks, SQLAuthority Book Review, SQLAuthority News, T SQL, Technology

    Read the article

  • Declarative programming vs. Imperative programming

    - by EpsilonVector
    I feel very comfortable with Imperative programming. I never have trouble expressing algorithmically what I want the computer to do once I figured out what is it that I want it to do. But when it comes to languages like SQL or Relational Algebra I often get stuck because my head is too used to Imperative programming. For example, suppose you have the relations band(bandName, bandCountry), venue(venueName, venueCountry), plays(bandName, venueName), and I want to write a query that says: all venueNames such that for every bandCountry there's a band from that country that plays in venue of that name. In my mind I immediately go "for each venueName iterate over all the bandCountries and for each bandCountry get the list of bands that come from it. If none of them play in venueName, go to next venueName. Else, at the end of the bandCountries iteration add venueName to the set of good venueNames". ...but you can't talk like that in SQL and I actually need to think about how to formulate this, with the intuitive Imperative solution constantly nagging in the back of my head. Did anybody else had this problem? How did you overcome this? Did you figured out a paradigm shift? Made a map from Imperative concepts to SQL concepts to translate Imperative solutions into Declarative ones? Read a good book? PS I'm not looking for a solution to the above query, I did solve it.

    Read the article

  • Emacs: methods for debugging python

    - by Tom Willis
    I use emacs for all my code edit needs. Typically, I will use M-x compile to run my test runner which I would say gets me about 70% of what I need to do to keep the code on track however lately I've been wondering how it might be possible to use M-x pdb on occasions where it would be nice to hit a breakpoint and inspect things. In my googling I've found some things that suggest that this is useful/possible. However I have not managed to get it working in a way that I fully understand. I don't know if it's the combination of buildout + appengine that might be making it more difficult but when I try to do something like M-x pdb Run pdb (like this): /Users/twillis/projects/hydrant/bin/python /Users/twillis/bin/pdb /Users/twillis/projects/hydrant/bin/devappserver /Users/twillis/projects/hydrant/parts/hydrant-app/ Where .../bin/python is the interpreter buildout makes with the path set for all the eggs. ~/bin/pdb is a simple script to call into pdb.main using the current python interpreter HellooKitty:hydrant twillis$ cat ~/bin/pdb #! /usr/bin/env python if __name__ == "__main__": import sys sys.version_info import pdb pdb.main() HellooKitty:hydrant twillis$ .../bin/devappserver is the dev_appserver script that the buildout recipe makes for gae project and .../parts/hydrant-app is the path to the app.yaml I am first presented with a prompt Current directory is /Users/twillis/bin/ C-c C-f Nothing happens but HellooKitty:hydrant twillis$ ps aux | grep pdb twillis 469 100.0 1.6 168488 67188 s002 Rs+ 1:03PM 0:52.19 /usr/local/bin/python2.5 /Users/twillis/projects/hydrant/bin/python /Users/twillis/bin/pdb /Users/twillis/projects/hydrant/bin/devappserver /Users/twillis/projects/hydrant/parts/hydrant-app/ twillis 477 0.0 0.0 2435120 420 s000 R+ 1:05PM 0:00.00 grep pdb HellooKitty:hydrant twillis$ something is happening C-x [space] will report that a breakpoint has been set. But I can't manage to get get things going. It feels like I am missing something obvious here. Am I? So, is interactive debugging in emacs worthwhile? is interactive debugging a google appengine app possible? Any suggestions on how I might get this working?

    Read the article

  • Alternative to pyGame ?

    - by stighy
    Hi, i'm learning something about game programming from a book about "pyGame". pyGame is simple, but... python is a little complex and different from my previous knoweledge about programming. I know "classical" language: C# (also C/C++), Java ... I know a lot of people love Python but for me is a little harder to learn! So i'm looking something like "pyGame" but for java or for c# ... A library with which i can do almost the same thing i can do with pygame (so .. do more with less code ... and headhace). Thank you Ps: excuse my "poor" english!

    Read the article

  • How to get readable classname and title from HWND handle? in WinApi c++

    - by Marko29
    I am using the following enumchild proc to get hwnd of each window, the problem is that i am unable to somehow detect any info from each hwnd so i can do what i want with the ones that are detected as the ones i need. For example, how could i get window class name and the title of each window in the enum bellow? I tried something like.. BOOL CALLBACK EnumChildProc(HWND hwnd, LPARAM lParam) { TCHAR className[MAX_PATH]; GetClassName(hwnd, cName, _countof(cName)); cout << cName; return TRUE; } It just returns the hexadec handle info and every single time it is same, shouldnt the GetClassName func change the cName into new handle each time? Also GetClassName function returns number of chars written to cName, i dont really see how this is useful to me? I need to get my cName in some readable format so i can do something like if(cName == TEXT("classnameiamlookingfor" && hwndtitle = TEXT("thetitlethatinterestsme") DOSOMETHINGWITHIT(); But all i get here is hexadec mess.

    Read the article

  • Checkbox gets reset in WPF Datagrid when sorting

    - by user464420
    I have a WPF application with DataGrid The DataGrid contains 4 columns with a checkbox template column on the first column the problem is when i check some of the checkbox on the items, the checkbox would got reset when i sort a certain column. For example i check the checkbox on the row 2 it gets unchecked when i sort the datagrid. been searching for similar case like this for a while but haven't seen one Thanks,

    Read the article

  • CSS div rounded corners

    - by Ulkmun
    I'm attempting to do the following... Here's what I've got right now.. but it's not rendering correctly. Does anyone have any idea as to how I'd fix this? CSS /* Curved Corners */ .bl { background: url(bl.gif) 0 100% no-repeat; /*background-color:#EFFBEF;*/ width: 700px; margin-left: auto ; margin-right: auto ;} .br { background: url(br.gif) 100% 100% no-repeat; } .tl { background: url(tl.gif) 0 0 no-repeat; } .tr { background: url(tr.gif) 100% 0 no-repeat; } .clear {font-size: 1px; height: 1px} HTML <div class="bl"><div class="br"><div class="tl"><div class="tr"> <div id="header"> </div> <div id="footer"> </div> </div></div></div></div>

    Read the article

  • pthread_create followed by pthread_detach still results in possibly lost error in Valgrind.

    - by alesplin
    I'm having a problem with Valgrind telling me I have some memory possible lost: ==23205== 544 bytes in 2 blocks are possibly lost in loss record 156 of 265 ==23205== at 0x6022879: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==23205== by 0x540E209: allocate_dtv (in /lib/ld-2.12.1.so) ==23205== by 0x540E91D: _dl_allocate_tls (in /lib/ld-2.12.1.so) ==23205== by 0x623068D: pthread_create@@GLIBC_2.2.5 (in /lib/libpthread-2.12.1.so) ==23205== by 0x758D66: MTPCreateThreadPool (MTP.c:290) ==23205== by 0x405787: main (MServer.c:317) The code that creates these threads (MTPCreateThreadPool) basically gets an index into a block of waiting pthread_t slots, and creates a thread with that. TI becomes a pointer to a struct that has a thread index and a pthread_t. (simplified/sanitized): for (tindex = 0; tindex < NumThreads; tindex++) { int rc; TI = &TP->ThreadInfo[tindex]; TI->ThreadID = tindex; rc = pthread_create(&TI->ThreadHandle,NULL,MTPHandleRequestsLoop,TI); /* check for non-success that I've omitted */ pthread_detach(&TI->ThreadHandle); } Then we have a function MTPDestroyThreadPool that loops through all the threads we created and cancels them (since the MTPHandleRequestsLoop doesn't exit). for (tindex = 0; tindex < NumThreads; tindex++) { pthread_cancel(TP->ThreadInfo[tindex].ThreadHandle); } I've read elsewhere (including other questions here on SO) that detaching a thread explicitly would prevent this possibly lost error, but it clearly isn't. Any thoughts?

    Read the article

  • Error in PHP with Mysql

    - by maltad
    Hello, Im starting to learn PHP. When I run the script it had an error that said: "Assigned Employee:resource(6) of type (mysql result)" . Please help me and sorry for my bad English Here is the code: include_once 'rnheader.php'; include_once 'rnfunctions.php'; echo ''; echo ' Assigned Employee:'; $query = "SELECT UserName FROM employee where Classification_ClassificationID = '2'"; $result = queryMysql($query); if (!queryMysql($query)) { echo "Query fail: $query" . mysql_error() . ""; } else { var_dump($result); exit; echo ''; // or name="toinsert[]" while ($row = mysqli_fetch_array($result)) { echo '' . htmlspecialchars($row['UserName']) . ''; } } echo ''; ?

    Read the article

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