Search Results

Search found 17788 results on 712 pages for 'last'.

Page 92/712 | < Previous Page | 88 89 90 91 92 93 94 95 96 97 98 99  | Next Page >

  • For improving the join of two wave files

    - by kaki
    i want to get the values of the last 30 frames of the first wav file and first thirty frames of the second wave file in integer format and stored in a list or array. i have written the code for joining but during this manupalation i am getting in byte format and tried to convert it to integer but couldn't. as told before i want to get the frame detail of 1st 30 and last 30 in integer format,and by performing other operations join can be more successful looking for your help in this,please... thanking you, import wave m=['C:/begpython/S0001_0002.wav', 'C:/begpython/S0001_0001.wav'] i=1 a=m[i] infiles = [a] outfile = "C:/begpython/S0001_00367.wav" data= [] data1=[] for infile in infiles: w = wave.open(infile, 'rb') data1=[w.getnframes] #print w.readframes(100) data.append( [w.getparams(), w.readframes(w.getnframes())] ) #print w.readframes(1) #data1 = [ord(character) for character in data1] #print data1 #data1 = ''.join(chr(character) for character in data1) w.close() print data output = wave.open(outfile, 'wb') output.setparams(data[0][0]) output.writeframes(data[0][1]) output.writeframes(data[1][1]) output.writeframes(data[2][1]) output.close()

    Read the article

  • 3 step validation with dataannotations

    - by molgan
    Hello I'm trying to build a "wizard-like" app that has 3 pages. First one you fill in some requests, then you select time and date, and last step is to fill in your name and address etc. How should the validation be taken care of, since I also need to validate all "3 steps" when pressing submit on the last step. Do I need to have 4 viewmodels there? like step1model, step2model...... and then validateallmodel? And must I use some session-like in between since it "redirect's" to next step if successful? /M

    Read the article

  • Split string into multiple lines

    - by RememberME
    I have a long string of comments that I'd like to split into multiple lines. It's currently displayed as <%= Html.Encode(item.important_notes) %> I've played with using .Substring to split it, but can't figure out how to prevent it from splitting in the middle of a word. Instead of characters 1-100 on line 1 and 101-200 on line 2, I'd like to do something like character 1 through the last space before character 100 on line one. That character through the last space before the next 100 characters on line 2, etc. What is the best way to do this? EDIT: using ASP.NET-MVC

    Read the article

  • How can I receive the "scroll box" type scroll events from a DataGridView?

    - by Simon
    I have a DataGridView, and I'm listening to its Scroll event. This gives me a ScrollEventArgs object whose Type member is supposed to tell me the type of scroll event that has occurred. On the MSDN documentation page it says I should be able to detect movement of the scroll box by listening for events with types ThumbPosition, ThumbTrack, First, Last and EndScroll. However, when I drag the scroll box, I only get events of type LargeDecrement and LargeIncrement. How do I get access to the ThumbPosition, ThumbTrack, First, Last and EndScroll events?

    Read the article

  • store data in asp.net pages (Not Sessions)

    - by ARB
    I am creating 4 asp.net pages. first three pages have 'CONTINUE' button and last page has 'SUBMIT' button. I am not allowed to use Sessions to store first three pages data. and i need to use 'BACK' button on last three pages. when i click 'BACK' button i need to maintain the previous page data entered by user. As my pages do some postbacks, i cannot use javascript.history function. My restrictions are: As the application is served from a web farm, a session object cannot be used. However, for the purpose of this excersise, consider session object as database-like persistent space where you can store your data. your code should show an easy way to switch to a different persistent space. What is databse like persistent space and how to write a code to switch to different persistent space?... Please give me some idea on how to proceed.... Thank you

    Read the article

  • iOS get user contacts excluding businesses

    - by Kyle Begeman
    I have an app that is loading all of a users contacts. I would like to exclude any business, but I can't seem to find a way to determine if a contact is a business. I initially considered check if the "company" field contains a value when the first and last name do not, but I can't find this property from the ABRecord. Here is how I am grabbing the first and last name: NSString *firstName = (__bridge_transfer NSString *)ABRecordCopyValue(contactPerson, kABPersonFirstNameProperty); NSString *lastName = (__bridge_transfer NSString *)ABRecordCopyValue(contactPerson, kABPersonLastNameProperty); Any ideas? Thanks!

    Read the article

  • How to archive old revisions from Apache SVN on linux server

    - by user1260729
    I have a site through which user can write their own Screenplays. This screenplays are saved in the form of revisions. Apache SVN has been installed. I want to save only the last 5 revisions for every user's document. But the problem is on the backend the all the revisions are stored in one folder called "Docsrepo" and its classified as 1000 revisions in 1 folder. and like this it has 234 folders. Meaning 234*1000 revisions. Now I want to archive all of this revision to keep only the last 5 revisions of each document. How do i do that?

    Read the article

  • c#.net id duplicate reported untruthfully

    - by tracer tong
    I am getting an error in visual studio that appears to be flat out wrong. Here it is: The tag contains duplicate 'ID' attributes. on the following line: Rica.Yoodul.MiniSites.BaseMiniSiteUserControl ucMaster = (Rica.Yoodul.MiniSites.BaseMiniSiteUserControl)Page.LoadControl("~/MiniSites/" + templateName + "/Master.ascx"); I have checked though both the master and child pages for repeats of the id I last added (the only one added since last successful test) and the ID is used once across both files. Other than controls (e.g ), is there anything this error refers to? Or is there a workaround? I have checked I am editing the right files. On the face of it this appears to be a visual studio bug, but I want to be sure.

    Read the article

  • append versus resize for numpy array

    - by Abruzzo Forte e Gentile
    Hi all I would like to append a value at the end of my numpy.array. I saw numpy.append function but this performs an exact copy of the original array adding at last my new value. I would like to avoid copies since my arrays are big. I am using resize method and then set the last index available to the new value. Can you confirm that resize is the best way to append a value at the end? Is it not moving memory around someway? Thanks AFG oldSize = myArray,shape(0) myArray.resize( oldSize + 1 ) myArray[oldSize] = newValue

    Read the article

  • How to get proper alignment when printing to file

    - by user1067334
    I have this Structure the elements of which that I need to write in a text file struct Stage3ADisplay { int nSlot; char *Item; char *Type; int nIndex; unsigned char attributesMD[17]; //the last character is \0 unsigned char contentsMD[17]; //only for regular files - //the last character is \0 }; buffer = malloc(sizeof(Stage3ADisplayVar[nIterator]->nSlot) + sizeof(Stage3ADisplayVar[nIterator]->Item) + sizeof(Stage3ADisplayVar[nIterator]->Type) + sizeof(Stage3ADisplayVar[nIterator]->nIndex) + sizeof(Stage3ADisplayVar[nIterator]->attributesMD) + sizeof(Stage3ADisplayVar[nIterator]->contentsMD) + 1); sprintf (buffer,"%d %s %s %d %x %x",Stage3ADisplayVar[nIterator]->nSlot, Stage3ADisplayVar[nIterator]->Item,Stage3ADisplayVar[nIterator]->Type,Stage3ADisplayVar[nIterator]->nIndex,Stage3ADisplayVar[nIterator]->attributesMD,Stage3ADisplayVar[nIterator]->contentsMD); How do I make sure the rows in the file are properly aligned. Thank you.

    Read the article

  • Alter Git prompt on Windows

    - by kko
    I'm using Git on Windows, installed through GitExtensions with MSysGit (latest) having selected "do not modify my Windows prompt" during installation. Now, I would like to be able to modify the default prompt (which by default shows just the branch name to also show me how much time, and how many local commits since I last pushed to origin (or specifically origin/master, whichever is easier). So say instead of: me@myPC /c/myRepo (master) I would see something along the lines of: me@myPC /c/myRepo (master) 5 | 10:20 meaning I have last pushed 10h 20min ago and I have made 5 local commits since. Before you mention it, I am aware there are ways of doing it with PowerShell, but I don't want to use it. I want my standard git bash we all know and love. I found a few solutions to that, with modifying PS1 variable in .bashrc file, but (excuse my poor Unix konwledge) they seem to be not working, (for example accepted answer to this question). So there you have it. Is this possible?

    Read the article

  • Ajax: Appending list-item at the top

    - by ptamzz
    I'm calling a php processing file using ajax an appending the returned HTML usign the code below $.ajax({ type: "POST", url: "proc/process.php", data: dataString, cache: false, success: function(html){ $("ul#lists").append(html); $("ul#lists li:last").fadeIn("slow"); $("#flash").hide(); } }); It appends a <li></li> item at the end of the ul#lists. I want the returned list-item <li></li> at the top of the lists instead of being appended at the last. How do I do that??

    Read the article

  • I've got to update a column in one SQL table with a counter stored in another table, and update that

    - by Bucket
    I'm using SQL server 2005 (for testing) & 2007 (for production). I have to add a unique record ID to all the records in my table, in an existing column, using a "last record ID" column from another table. So, I'm going to do some sort of UPDATE of my table, but I have to get the "last record ID" from the other table, increment it, update THAT table and then update my record. Can anyone give me an example of how to do this? Other users may be incrementing the counter also.

    Read the article

  • counting employee attendance

    - by jjj
    i am trying to write a statment for counting the employees attendance and execute thier id , name and the days that he has working on the last 3 months by counting the duplicate id on NewTimeAttendance for month 1 , 2 and 3 .. i tried to count : Select COUNT(employeeid) from NewTimeAttendance where employeeid=1 and (month=1 or month =2 or month = 3) This is absolutely working ,but just for one employee... the secound try: SELECT COUNT(NewEmployee.EmployeeID) FROM NewEmployee INNER JOIN NewTimeAttendance ON NewEmployee.EmployeeID = NewTimeAttendance.EmployeeID and (month=1 or month =2 or month = 3) This is working , but it counts all employees .. and i want it to execute each EmployeeId, EmployeeName and number of days as new record last try: (before you see the code ... it is wrong ..but i am trying) for i in 0..27 loop SELECT COUNT(NewEmployee.EmployeeID),NewEmployee.EmployeeId,EmployeeName FROM NewEmployee INNER JOIN NewTimeAttendance ON NewEmployee.EmployeeID(i) = NewTimeAttendance.EmployeeID and (month=1 or month =2 or month = 3) end loop i realy need help...thanks in advance

    Read the article

  • How to create string "Version 1.0" in C#

    - by Rohit
    I have to store versionName of a template. VersionName is autoincremented.If last versionName is "Version 1.0", next should be "version 2.0". First time when a template is created, I have to store "Version 1.0". I am using VersionName = "Version "+((LatestVersion+1).ToString()) LatestVersion holds the last version which is 0 in case added for first time. This seems to be a ugly workaround and doesnot even yield Version 1.0. it yields Version 1. I Tried with Version class as well,it does not work. How to accomplish this.Please suggest

    Read the article

  • Relocating html elements with jquery

    - by Steven
    Could someone help me with this code? I'm trying to rearrange figures in a certain div into two columns (a and b) in such a way the two columns are about the same height. I've got insane trying to find the problem in my code and not finding it. It doesn't work for a reason... <body onload="rearrangeImages();"> <div class="images"> <figure> <figcaption>This is the figcaption of this figure. An image is missing for this test.</figcaption> </figure> <figure> <figcaption>This is the figcaption of this figure.</figcaption> </figure> <figure> <figcaption>Another one.</figcaption> </figure> </div> <script> function rearrangeImages() { $('.images').each(function() { $(this).prepend('<div class="column_b"></div>'); $(this).prepend('<div class="column_a"></div>'); $(this).append('<div class="test_div"></div>'); $('figure', this).each(function() { var height_a = $(this).parent().$(".column_a").height(); var height_b = $(this).parent().$(".column_b").height(); if (height_a > height_b) { $(this).parent().$(".column_b").append(this); } else { $(this).parent().$(".column_a").append(this); } $(this).remove(); }); }); } </script> </body> Next I would like to be able to make the last figure not going in any of the columns in case it would make column_b higher than column_a. (pseudocode) if (this is last figure) { //place last figure in test_div to measure its height; if (height_a > height_b + height_of_last_image) { $(this).parent().$(".column_b").append(this); } else { $(this).parent().append(this); } } else { //do the normal stuff see higher }

    Read the article

  • Is SHA sufficient for checking file duplication? (sha1_file in PHP)

    - by wag2639
    Suppose you wanted to make a file hosting site for people to upload their files and send a link to their friends to retrieve it later and you want to insure files are duplicated where we store them, is PHP's sha1_file good enough for the task? Is there any reason to not use md5_file instead? For the frontend, it'll be obscured using the original file name store in a database but some additional concerns would be if this would reveal anything about the original poster. Does a file inherit any meta information with it like last modified or who posted it or is this stuff based in the file system? Also, is using a salt frivolous since security in regards of rainbow table attack mean nothing to this and the hash could later be used as a checksum? One last thing, scalability? initially, it's only going to be used for small files a couple of megs big but eventually... Edit 1: The point of the hash is primarily to avoid file duplication, not to create obscurity.

    Read the article

  • How to view a DataTable while debuging

    - by Eric
    I'm just getting started using ADO.NET and DataSets and DataTables. One problem I'm having is it seems pretty hard to tell what values are in the data table when trying to debug. What are some of the easiest ways of quickly seeing what values have been saved in a DataTable? Is there someway to see the contents in Visual Studio while debugging or is the only option to write the data out to a file? I've created a little utility function that will write a DataTable out to a CSV file. Yet the the resulting CSV file created was cut off. About 3 lines from what should have been the last line in the middle of writing out a System.Guid the file just stops. I can't tell if this is an issue with my CSV conversion method, or the original population of the DataTable. Update Forget the last part I just forgot to flush my stream writer.

    Read the article

  • How can I get all the checked items from a submitted form with sinatra's params?

    - by 102405176597896213397
    I'm running Sinatra 1.0 with HAML, my form has a number of checkboxes, for example books I like, and you would select all the books you want. The checkbox name is "books". In sinatra params['books'] there should be an array of all the books that were checked, but it only has the last item that was checked, not an array. How can I get all the checked items? HAML: %form{:action => "/test", :method => 'post'} %input{:name=>'check',:type=>'checkbox',:value=>'item1'} item 1 %input{:name=>'check',:type=>'checkbox',:value=>'item2'} item 2 %input{:name=>'check',:type=>'checkbox',:value=>'item3'} item 3 %input{:type => "submit", :value => "send", :class => "button"} Sinatra get method post '/test' do puts params['check'] #should be an array but is last item checked end

    Read the article

  • Monitoring Log Shipped Databases

    - by Registered User
    I need a consistent way to monitor databases that are read-only log shipped copies of production databases. In the past I have relied on the following methods: Set the job that restores logs to the database kick off another job as its last step. Set the job that restores logs to the database to insert a record in a control table as its last step. Query the msdb database to check the status of the job that restores logs to the database. Query a control table inside the database itself that gets a value immediately before transaction logs are backed up. Query MAX values from tables inside the database to see if it has recent changes. Although the above methods work, they can't be implemented for every log shipped database that I query for various reasons. What is the best method for monitoring the "data as of" date for a log shipped database?

    Read the article

  • .focus() doesn't work on an input while orher attributes works

    - by Sirber
    I have a classic table / thead / tbody structure, which I add a line at the end of the tbody. The line contains only an input element. The code works in Firefox 3.6 but not in Chrome v5 or IE8. I'm using jQuery 1.4.1. Does not work: $("#" + AJAX_ID).parent().find('tr:last > td:nth-child(2) > input').focus(); Does work: $("#" + AJAX_ID).parent().find('tr:last > td:nth-child(2) > input').css('background-color', 'red'); even setting an ID on the input, and using document.getElementBuId('id').focus() doesn't work. Thank you!

    Read the article

  • PHP export to text file - Only saving first line.

    - by wertz8090
    I'm trying to export some extracted $_POST information into a text file, however my code is only capturing the first variable and ignoring the rest. I'm saving the information to the text file in this manner: $values = "First Name: $fName\r\n"; $values .= "Last Name: $lName\r\n"; $values .= "Address: $address\r\n"; etc. This is the code I use to write to the text file: $fp = @fopen("person.data", "w") or die("Couldn't open person.data for writing!"); $numBytes = @fwrite($fp, $values) or die("Couldn't write values to file!"); @fclose($fp); Any ideas on why it would only save the first $values ($fName) variable but not the rest of them? It actually saves the first part of the $values string for all of them (so I see Last Name:, Address:, etc. on separate lines in the text file) but the called variables $lName and $address do not appear.

    Read the article

  • Split file with PHP and generate contents

    - by user201140
    How do I split the content below into separate files without the placeholder tags. I'd also like to take the text inside the placeholder tags and place them inside a new contents file. <div class='placeholder'>The First Chapter</div> This is some text. <div class='placeholder'>The Second Chapter</div> This is some more text. <div class='placeholder'>Last Chapter</div> The last chapter. Thanks.

    Read the article

  • Sorting related objects in the Django Admin form interface

    - by Carver
    I am looking to sort the related objects that show up when editing an object using the admin form. So for example, I would like to take the following object: class Person(models.Model): first_name = models.CharField( ... ) last_name = models.CharField( ... ) hero = models.ForeignKey( 'self', null=True, blank=True ) and edit the first name, last name and hero using the admin interface. I want to sort the objects as they show up in the drop down by last name, first name (ascending). How do I do that? Context I'm using Django v1.1. I started by looking for help in the django admin docs, but didn't find the solution As you can see in the example, the foreign key is pointing to itself, but I expect it would be the same as pointing to a different model object. Bonus points for being able to filter the related objects, too (eg~ only allow selecting a hero with the same first name)

    Read the article

< Previous Page | 88 89 90 91 92 93 94 95 96 97 98 99  | Next Page >