Daily Archives

Articles indexed Friday January 7 2011

Page 19/34 | < Previous Page | 15 16 17 18 19 20 21 22 23 24 25 26  | Next Page >

  • How do you author code

    - by garbagecollector
    This is something I was never taught. I have seen alot of different types of authoring styles. I code primarily in Java and Python. I was wondering if there was a standard authoring style or if everything is freestyle. Also if you answer would you mind attaching the style you use to author files that your create at home or at work. I usually just go @author garbagecollector @company garbage inc.

    Read the article

  • How should I approach learning programming languages?

    - by gcc
    I am a student of computer engineering. I have never done any programming before, and as you can understand, I don't know how to study it or how to make my own programs. My English is weak [edited for clarity - ed], and so if you don't like the choices I list, please feel free to provide others. How should I study? How should I learn programming languages? Study completely from a book. Don't study from a book, just try writing code. A mix of the two; study from a book, then try writing code. Study half the book, then write the code by hand on paper. Listed to the teacher, then try to solve general problems (those not from any specific chapter). I have send that question to stackoverflow before when I am at first year. Now, I want to construct webpage to guide fresh students by giving advise of yours and mines.Maybe, you wonder Why I want to construct webpage , I just want help the other student. I am giving a link to that question < http://stackoverflow.com/questions/3389465/how-should-i-study-programming-languagess If you have other advice, feel free. EDIT: This web cite, I think , is constructed to share member's life experience and also I know these experiences is valuable . So I have no right to want your opinion, But I want your opinion / experience even if you think it is not so helpful to other

    Read the article

  • Do you feel that you, as a programmer, make a difference?

    - by gablin
    When I graduate from uni my desire is to land a job where I feel that what I do as a programmer makes a difference and contribute to the project. My code, no matter how small, is useful to the project, is being used by the project, and takes it forward. My work matters and thus I feel that I make a difference. In contrast, one of my fears is that my work just doesn't matter. Either it is just meaningless to the project but you're told to do it anyway, or your code is useful but not used in the project, or you feel that the project as a whole is just pointless, for whatever reason. Is this something that you've experienced, or are experiencing? Do you feel that you, as a programmer, make a difference, or do you feel that what you do just doesn't matter?

    Read the article

  • Would you recommend to install libcupsys2_1.3.9-17ubuntu3.9_all.deb?

    - by NES
    Would you recommend to install libcupsys2_1.3.9-17ubuntu3.9_all.deb in Ubuntu 10.10? For getting my printer to work with Ubuntu 10.10 i've read many threads about a suggested workaround. there it's suggested to install libcupsys2_1.3.9-17ubuntu3.9_all.deb so that the canon driver should again do it's work with ubuntu. But i can't figure out what this package exactly is and like to understand what i do before i install it. in some thread they call it a dummy package, in others it's called a transitional package. However there should have been a reason why the ubuntu developers had deprecated libcupsys. So would you recommend it?

    Read the article

  • ~/.xsession-errors is 2.7gb big (and growing), on fresh install, caused by gnome-settings-daemon errors

    - by Alex Black
    I've just installed Ubuntu 10.10 x64, activated the recommended Nvidia drivers, and I noticed my hard disk space is disappearing, I narrowed the culprit down to this: alex@alex-home:~$ ls -la .x* -rw------- 1 alex alex 4436076400 2010-11-19 22:35 .xsession-errors -rw------- 1 alex alex 10495 2010-11-19 21:46 .xsession-errors.old Any idea what this file is, why its so big, and why its growing? A few seconds later: alex@alex-home:~$ ls -la .x* -rw------- 1 alex alex 5143604317 2010-11-19 22:36 .xsession-errors -rw------- 1 alex alex 10495 2010-11-19 21:46 .xsession-errors.old tailing it: alex@alex-home:~$ tail .xsession-errors (gnome-settings-daemon:1514): GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed (gnome-settings-daemon:1514): GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed (gnome-settings-daemon:1514): GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed (gnome-settings-daemon:1514): GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed (gnome-settings-daemon:1514): GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed Also, the process "gnome-settings" seems to be using 100% cpu: PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 1514 alex 20 0 268m 10m 7044 R 100 0.1 7:06.10 gnome-settings-

    Read the article

  • Service and/or tool to monitor performance?

    - by chris
    I am seeing wildly different performance from a clients web site, and would like to set up some sort of monitoring. What I'm looking for is a service that will issue requests to a couple of URLs, and report on the time it took to process the page - TTFB and time to download the entire page - that means I need something that will process javascript & css. Are there services like this? I've seen a few that monitor uptime, but they don't seem to report on the overall page performance.

    Read the article

  • OpenGL vs DirectX?

    - by Harold
    I saw the articles that were going on about OpenGL being better than DirectX and that Microsoft are really just trying to get everyone to use DirectX even though it's inferior so that gaming is almost exclusively for Windows and XBox, but since the article was written in 2006 is it still relevant today? Also I know plenty of games are written in DirectX but does anyone have any examples of popular games written in OpenGL? Thanks

    Read the article

  • Date exception when trying to use date method

    - by Simon Andi
    Hi, I have defined a object model where one of the array elements is a string public static String[] columnNames6 = {"Total Shares", "Total Calls", "Call Strike", "Call Premium", "Call Expiry" }; public static Object[][] data6 = { { new Double(0), new Double(0), new Double(0), new Double(0),"dd/mm/yyyy"}, }; I then use the following code to get the date so that I can use the data method but having no joy - Can someone please tell me why it is throwing an exception after I do this String ExpiryDate = (String)GV.data6[0][4]; System.out.println("DATE STRING IS: " + ExpiryDate); Date EndOptionDate = new Date(ExpiryDate); // SOMETHING WRONG HERE even though it compiles okay //Get Todays's Date Date TodaysDate = new Date(); //Calculate Days Option Expiry long DaysDifference = EndOptionDate.getTime() - TodaysDate.getTime(); Would really appreciate some help as really stuck not sure how I should code the line in bold - new to java, so please excuses my lack of knowledge looked at tutorials can't seem to move forward. Thanks Simon

    Read the article

  • PHP object parent/child recursion

    - by Damien
    I've got a parent-child OO relationship. Parent obejcts has many child objects and every child object knows about it's parent by reference. The parent can be a child too (basically its a tree). When i do a var_dump() on the root object it says ["parent"]=RECURSION many times and the generated description will be really long. I'm wondering if i do something wrong. If yes, i'm interested in the "best practice". Thanks for the help!

    Read the article

  • SQL query, select from 2 tables random

    - by klaus
    Hello all i have a problem that i just CANT get to work like i what it.. i want to show news and reviews (2 tables) and i want to have random output and not the same output here is my query i really hope some one can explain me what i do wrong SELECT anmeldelser.billed_sti , anmeldelser.overskrift , anmeldelser.indhold , anmeldelser.id , anmeldelser.godkendt FROM anmeldelser LIMIT 0,6 UNION ALL SELECT nyheder.id , nyheder.billed_sti , nyheder.overskrift , nyheder.indhold , nyheder.godkendt FROM nyheder ORDER BY rand() LIMIT 0,6

    Read the article

  • SMO restore of SQL database doesn't overwrite

    - by Tom H.
    I'm trying to restore a database from a backup file using SMO. If the database does not already exist then it works fine. However, if the database already exists then I get no errors, but the database is not overwritten. The "restore" process still takes just as long, so it looks like it's working and doing a restore, but in the end the database has not changed. I'm doing this in Powershell using SMO. The code is a bit long, but I've included it below. You'll notice that I do set $restore.ReplaceDatabase = $true. Also, I use a try-catch block and report on any errors (I hope), but none are returned. Any obvious mistakes? Is it possible that I'm not reporting some error and it's being hidden from me? Thanks for any help or advice that you can give! function Invoke-SqlRestore { param( [string]$backup_file_name, [string]$server_name, [string]$database_name, [switch]$norecovery=$false ) # Get a new connection to the server [Microsoft.SqlServer.Management.Smo.Server]$server = New-SMOconnection -server_name $server_name Write-Host "Starting restore to $database_name on $server_name." Try { $backup_device = New-Object("Microsoft.SqlServer.Management.Smo.BackupDeviceItem") ($backup_file_name, "File") # Get local paths to the Database and Log file locations If ($server.Settings.DefaultFile.Length -eq 0) {$database_path = $server.Information.MasterDBPath } Else { $database_path = $server.Settings.DefaultFile} If ($server.Settings.DefaultLog.Length -eq 0 ) {$database_log_path = $server.Information.MasterDBLogPath } Else { $database_log_path = $server.Settings.DefaultLog} # Load up the Restore object settings $restore = New-Object Microsoft.SqlServer.Management.Smo.Restore $restore.Action = 'Database' $restore.Database = $database_name $restore.ReplaceDatabase = $true if ($norecovery.IsPresent) { $restore.NoRecovery = $true } Else { $restore.Norecovery = $false } $restore.Devices.Add($backup_device) # Get information from the backup file $restore_details = $restore.ReadBackupHeader($server) $data_files = $restore.ReadFileList($server) # Restore all backup files ForEach ($data_row in $data_files) { $logical_name = $data_row.LogicalName $physical_name = Get-FileName -path $data_row.PhysicalName $restore_data = New-Object("Microsoft.SqlServer.Management.Smo.RelocateFile") $restore_data.LogicalFileName = $logical_name if ($data_row.Type -eq "D") { # Restore Data file $restore_data.PhysicalFileName = $database_path + "\" + $physical_name } Else { # Restore Log file $restore_data.PhysicalFileName = $database_log_path + "\" + $physical_name } [Void]$restore.RelocateFiles.Add($restore_data) } $restore.SqlRestore($server) # If there are two files, assume the next is a Log if ($restore_details.Rows.Count -gt 1) { $restore.Action = [Microsoft.SqlServer.Management.Smo.RestoreActionType]::Log $restore.FileNumber = 2 $restore.SqlRestore($server) } } Catch { $ex = $_.Exception Write-Output $ex.message $ex = $ex.InnerException while ($ex.InnerException) { Write-Output $ex.InnerException.message $ex = $ex.InnerException } Throw $ex } Finally { $server.ConnectionContext.Disconnect() } Write-Host "Restore ended without any errors." }

    Read the article

  • Word frequency tally script is too slow

    - by Dave Jarvis
    Background Created a script to count the frequency of words in a plain text file. The script performs the following steps: Count the frequency of words from a corpus. Retain each word in the corpus found in a dictionary. Create a comma-separated file of the frequencies. The script is at: http://pastebin.com/VAZdeKXs Problem The following lines continually cycle through the dictionary to match words: for i in $(awk '{if( $2 ) print $2}' frequency.txt); do grep -m 1 ^$i\$ dictionary.txt >> corpus-lexicon.txt; done It works, but it is slow because it is scanning the words it found to remove any that are not in the dictionary. The code performs this task by scanning the dictionary for every single word. (The -m 1 parameter stops the scan when the match is found.) Question How would you optimize the script so that the dictionary is not scanned from start to finish for every single word? The majority of the words will not be in the dictionary. Thank you!

    Read the article

  • How to properly set JavaMail timeout setting

    - by user286149
    I am using JavaMail to connect to a POP3 server. Further, I set the following properties, so that JavaMail won't wait to long if an email server doesn't respond: props.setProperty("mail.pop3.connectionpooltimeout", "3000"); props.setProperty("mail.pop3.connectiontimeout", "3000"); props.setProperty("mail.pop3.timeout", "3000"); However, in some cases the timeout works properly but sometimes JavaMail freezes for minutes(!) with the following debug message: DEBUG POP3: connecting to host "pop3.yahoo.com", port 110, isSSL false Changing ports or protocols (SSL, TLS..) has no effect. I assume that the host simply doesn't exist. For example, if I poll pop3.yahoo.com instead of pop.mail.yahoo.com (which would be the right host name), I have to wait very long til a timeout exception occurs. After several minutes, I get the following exception and the application continues to run: java.net.ConnectException: Operation timed out pop3.yahoo.com seems to exist but won't respond: localhost:~ me$ ping pop3.yahoo.com PING pop3.yahoo.com (206.190.46.10): 56 data bytes Request timeout for icmp_seq 0 Request timeout for icmp_seq 1 Request timeout for icmp_seq 2 Request timeout for icmp_seq 3 ^C You might be asking why I use pop3.yahoo.com instead of pop.mail.yahoo.com. Well, I simply wanted to test what happens if the user of my application inserts a wrong host name. I believe that this issue is related to this report http://www.opensubscriber.com/message/[email protected]/180946.html where the poster claims that the problem occurs if the email server closes the connection. JavaMail then seems to wait very long (don't know why). Since the issue wasn't resolved in the link I posted: Does somebody know how to fix or at least debug this? Any help would be really appreciated!

    Read the article

  • update a column in input file by taking value from Database in perl.

    - by Rahul Singh
    input file: 1,a,USA,, 2,b,UK,, 3,c,USA,, i want to update the 4th column in the input file from taking values from one of the table. my code looks like this: my $customer_dbh = DBI-connect("DBI:Oracle:$INST", $USER, $PASS ) or die "Couldn't connect to datbase $INST"; my $cust_smh; print "connected \n "; open FILE , "+$input_file" or die "can't open the input file"; print "echo \n"; while(my $line=) { my @line_a=split(/\,/,$line); my $customer_id=$line_a[3]; print "$customer_id\n"; $cust_smh = $customer_dbh-prepare("SELECT phone_no from book where number = $line_a[0]"); $cust_smh-execute() or die "Couldn't execute stmt, error : $DBI::errstr"; my $number = $cust_smh-fetchrow_array(); $line_a[3]=$number; }

    Read the article

  • how to number t-rows ,when table generated using nested forloop in django templates

    - by stackover
    Hi, This part is from views.py results=[(A,[stuObj1,stuObj2,stuObj3]),(B,[stuObj4,stuObj5,stuObj6]),(C,[stuObj7,stuObj8])] for tup in results: total = tot+len(tup[1]) render_to_response(url,{'results':res , 'total':str(tot),}) this is template code: <th class="name">Name</th> <th class="id">Student ID</th> <th class="grade">Grade</th> {% for tup in results %} {% for student in tup|last %} {% with forloop.parentloop.counter as parentid%} {% with forloop.counter as centerid%} <tbody class="results-body"> <tr> <td>{{student.fname|lower|capfirst}} {{student.lname|lower|capfirst}}</td> <td>{{student.id}}</td> <td>{{tup|first}}</td> </tr> {% endfor %} {% endfor %} Now the problems am having are 1. numbering the rows. Here my problem is am not sure if i can do things like total=total-1 in the templates to get the numbered rows like <td>{{total}}</td> 2.applying css to tr:ever or odd. Whats happening in this case is everytime the loop is running the odd/even ordering is lost. these seems related problems. Any ideas would be great :)

    Read the article

  • Highlighting a custom UIButton

    - by Dan Ray
    The app I'm building has LOTS of custom UIButtons laying over top of fairly precisely laid out images. Buttonish, controllish images and labels and what have you, but with a clear custom-style UIButton sitting over top of it to handle the tap. My client yesterday says, "I want that to highlight when you tap it". Never mind that it immediately pushes on a new uinavigationcontroller view... it didn't blink, and so he's confused. Oy. Here's what I've done to address it. I don't like it, but it's what I've done: I subclassed UIButton (naming it FlashingUIButton). For some reason I couldn't just configure it with a background image on control mode highlighted. It never seemed to hit the state "highlighted". Don't know why that is. So instead I wrote: -(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { [self setBackgroundImage:[UIImage imageNamed:@"grey_screen"] forState:UIControlStateNormal]; [self performSelector:@selector(resetImage) withObject:nil afterDelay:0.2]; [super touchesBegan:touches withEvent:event]; } -(void)resetImage { [self setBackgroundImage:nil forState:UIControlStateNormal]; } This happily lays my grey_screen.png (a 30% opaque black box) over the button when it's tapped and replaces it with happy emptyness .2 of a second later. This is fine, but it means I have to go through all my many nibs and change all my buttons from UIButtons to FlashingUIButtons. Which isn't the end of the world, but I'd really hoped to address this as a UIButton category, and hit all birds with one stone. Any suggestions for a better approach than this one?

    Read the article

  • Significance in R

    - by Gemsie
    Ok, this is quite hard to explain, but I'm at a complete loss what to do. I'm a relative newcomer to R and although I can completely admire how powerful it is, I'm not too good at actually using it.... Basically, I have some very contrived data that I need to analyse (it wasn't me who chose this, I can assure you!). I have the right and left hand lengths of lots of people, as well as some numeric data that shows their sociability. Now I would like to know if people who have significantly different lengths of hand are more or less sociable than those who have the same (leading into the research that 'symmetrical' people are more sociable and intelligent, etc. I have got as far as loading the data into R, then I have no idea where to go from there. How on Earth do I start to separate those who are close to symmetrical to those who aren't to then start to do the analysis? Ok, using Sasha's great advice, I did the cor.test and got the following: Pearson's product-moment correlation data: measurements$l.hand - measurements$r.hand and measurements$sociable t = 0.2148, df = 150, p-value = 0.8302 alternative hypothesis: true correlation is not equal to 0 95 percent confidence interval: -0.1420623 0.1762437 sample estimates: cor 0.01753501 I have never used this test before, so am unsure how to intepret it...you wouldn't think I was on my fourth Scientific degree would you?! :(

    Read the article

  • Jquery Hover Flickering issue

    - by Muhammad Faisal
    Hi, Hope u people will be fine. Here is my basic code: http://jsfiddle.net/kr9pY/7/ in this demo you can see when we hover on div with id="container", a div with class="nav" fades in. But the problem is that after doing this if i hover on div with class="nav" the div fades out and in again, and if i mover cursor slightly within .nav div, it repeats this behavior repeatedly. I don't want to this behaviour when we hover on .nav div or mover cursor within this div. Thank, and sorry for my bad english.

    Read the article

  • Java Hardware Acceleration

    - by Freezerburn
    I have been spending some time looking into the hardware acceleration features of Java, and I am still a bit confused as none of the sites that I found online directly and clearly answered some of the questions I have. So here are the questions I have for hardware acceleration in Java: 1) In Eclipse version 3.6.0, with the most recent Java update for Mac OS X (1.6u10 I think), is hardware acceleration enabled by default? I read somewhere that someCanvas.getGraphicsConfiguration().getBufferCapabilities().isPageFlipping() is supposed to give an indication of whether or not hardware acceleration is enabled, and my program reports back true when that is run on my main Canvas instance for drawing to. If my hardware acceleration is not enabled now, or by default, what would I have to do to enable it? 2) I have seen a couple articles here and there about the difference between a BufferedImage and VolatileImage, mainly saying that VolatileImage is the hardware accelerated image and is stored in VRAM for fast copy-from operations. However, I have also found some instances where BufferedImage is said to be hardware accelerated as well. Is BufferedImage hardware accelerated as well in my environment? What would be the advantage of using a VolatileImage if both types are hardware accelerated? My main assumption for the advantage of having a VolatileImage in the case of both having acceleration is that VolatileImage is able to detect when its VRAM has been dumped. But if BufferedImage also support acceleration now, would it not have the same kind of detection built into it as well, just hidden from the user, in case that the memory is dumped? 3) Is there any advantage to using someGraphicsConfiguration.getCompatibleImage/getCompatibleVolatileImage() as opposed to ImageIO.read() In a tutorial I have been reading for some general concepts about setting up the rendering window properly (tutorial) it uses the getCompatibleImage method, which I believe returns a BufferedImage, to get their "hardware accelerated" images for fast drawing, which ties into question 2 about if it is hardware accelerated. 4) This is less hardware acceleration, but it is something I have been curious about: do I need to order which graphics get drawn? I know that when using OpenGL via C/C++ it is best to make sure that the same graphic is drawn in all the locations it needs to be drawn at once to reduce the number of times the current texture needs to be switch. From what I have read, it seems as if Java will take care of this for me and make sure things are drawn in the most optimal fashion, but again, nothing has ever said anything like this clearly. 5) What AWT/Swing classes support hardware acceleration, and which ones should be used? I am currently using a class that extends JFrame to create a window, and adding a Canvas to it from which I create a BufferStrategy. Is this good practice, or is there some other type of way I should be implementing this? Thank you very much for your time, and I hope I provided clear questions and enough information for you to answer my several questions.

    Read the article

  • Set class property at runtime.

    - by Lambo
    I have a problem with my code, I cannot get it the 'test' to get the values im trying to assign to it. rec = new Record(account, actual, commitment, costCentre, internalCostCentre); webservicename.singleSummary test = new webservicename.singleSummary(); test.account = rec.Account; test.actual = recc.Actual; test.commitment = rec.Commitment; test.costCentre = rec.CostCentre; test.internalCostCentre = rec.InternalCostCentre; webservicename.Feed CallWebService = new webservicename.Feed(); I am trying to get this to pop up in a dialog box to show that it is working, with something like test.account getting showed in the message box, not sure quite what the problem is. My overall problem is I am trying to set the class porpert at runtime. Any help is appreciated.

    Read the article

  • Optimizing PHP code (trying to determine min/max/between case)

    - by Swizzh
    I know this code-bit does not conform very much to best coding practices, and was looking to improve it, any ideas? if ($query['date_min'] != _get_date_today()) $mode_min = true; if ($query['date_max'] != _get_date_today()) $mode_max = true; if ($mode_max && $mode_min) $mode = "between"; elseif ($mode_max && !$mode_min) $mode = "max"; elseif (!$mode_max && $mode_min) $mode = "min"; else return; if ($mode == "min" || $mode == "between") { $command_min = "A"; } if ($mode == "max" || $mode == "between") { $command_max = "B"; } if ($mode == "between") { $command = $command_min . " AND " . $command_max; } else { if ($mode == "min") $command = $command_min; if ($mode == "max") $command = $command_max; } echo $command;

    Read the article

  • Modify Wordpress SQL Query to pull from within a category

    - by Levi
    Hi I am using a wordpress plugin called "kf most read" which stores a count of how many times a post was read, and lets you output a list of most read posts. This works well. The issue is, I am trying to pull the most read posts, but only the most read posts within the current category you are viewing. I am close to clueless when it comes to sql. Here us what the plugin is currently using to pull the most read posts: $sql = "SELECT count(mr.post_ID) as totHits, p.ID, p.post_title from $wpdb-posts p JOIN {$wpdb-prefix}kf_most_read mr on mr.post_ID = p.ID where mr.hit_ts = '".(time() - ( 86400 * $period))."' GROUP BY mr.post_ID order by totHits desc, ID ASC LIMIT $limit"; How could I incorporate the below query which pulls from a specific category into the above? $sql .= "LEFT JOIN $wpdb-term_taxonomy ON($wpdb-term_relationships.term_taxonomy_id = $wpdb-term_taxonomy.term_taxonomy_id)" ; $sql .= "WHERE $wpdb-term_taxonomy.term_id IN ($currentcat)" ; $sql .= "AND $wpdb-term_taxonomy.taxonomy = 'category'" ; Any Help on this would be much appreciated.

    Read the article

  • Random begining index iterator for HashSet

    - by funktku
    I use HashSet for add(); remove(); clear(); iterator(); methods. So far everything worked like a charm. However, now I need to fulfill a different requirement. I'd like to be able to start iterating from a certain index. For example, I'd like the following two programs to have same output. Program 1 Iterator it=map.iterator(); for(int i=0;i<100;i++) { it.next(); } while (it.hasNext()) { doSomethingWith(it.next()); } Program 2 Iterator it=map.iterator(100); while (it.hasNext()) { doSomethingWith(it.next()); } The reason I don't want to use the Program 1 is that it creates un-neccesary overhead. From my researchs, I couldn't not find a practical way of creating an iterator with begining index. So, my question is, what would be a good way to achieve my goal while minimizing the overheads? Thank you.

    Read the article

  • Creating new image in a loop using OpenCV

    - by user565415
    I am programing some image conversion code with OpenCV and I don't know how can I create image memory buffer to load image on every iteration. I have number of iteration (maxImNumber) and I have an input image. In every loop program must create image that is resized and modified input image. Here is some basic code (concept). for (int imageIndex = 0; imageIndex < maxImNumber; imageIndex++){ cvCopy(inputImage, images[imageIndex], 0); cvReleaseImage(&inputImage); images[imageIndex+1] = cvCreateImage(cvSize((image[imageIndex]->width)/2, image[imageIndex]->height), IPL_DEPTH_8U, 1); for (i=1; i < image[imageIndex]->height; i++) { index = 0; // for(j=0; j < image[imageIndex]->width ; j=j+2){ // doing some basic matematical operation on image content and store it to new image images[imageIndex+1][i][index] = (image[imageIndex][i][j] + image[imageIndex][i][j+2])/2; index++ } } inputImage = cvCreateImage(cvSize((image[imageIndex+1]->width), image[imageIndex]->height), IPL_DEPTH_8U, 1); cvCopy(images[imageIndex+1], inputImage, 0); } Can somebody, please, explain how can I create this image buffer (images[]) and allocate memory for it. Also how can I access any image in this buffer? Thank you very much in advance!

    Read the article

  • msbuild conversion tool to VS2010

    - by prosseek
    I got vcproj file from QMake (qmake -tp vc win32.pro), and when I run it with msbuild (msbuild for VS 2010), I get the following error. MSBUILD : error MSB4192: The project file ".\win32.vcproj" is in the ".vcproj" or ".dsp" file format , which MSBuild cannot build directly. Please convert the project by opening it in the Visual Studio IDE or running the conversion tool, or, for ".vcproj", use MSBuild to build the solution file conta ining the project instead. I'd like to run the conversion tool for getting VS2010 project file. What's the tool for it?

    Read the article

< Previous Page | 15 16 17 18 19 20 21 22 23 24 25 26  | Next Page >