Search Results

Search found 7870 results on 315 pages for 'auto increment'.

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

  • Zipping increment file names using Zip Utils

    - by Peter
    Hello I've been using "Zip Utils" from http://www.codeproject.com/Articles/7530/Zip-Utils-clean-elegant-simple-C-Win32 to zip files and folders. the easy thing is if the file name is known i just need to do something like this HZIP hz; DWORD writ; hz = CreateZip(_T("filename\\image1.zip"),0); The problem is I get errors when trying to zip files by incrementing file names within a loop int i= 0; for(i=0; i<record; i++) { ZipAdd(hz,_T("doc"+i+1+".kml"), _T("filename\\doc"+i+1+".kml")); }

    Read the article

  • Rename files to increment filenumber using PowerShell?

    - by Frode Lillerud
    Hi, I've got a bunch of files named attachment.023940 attachment.024039 attachment.024041 attachment.024103 etc... I need to rename the files by incrementing the filenumber by a given number. (So that they match the right ID in a database) I guess I could write a C# application that uses RegEx to parse the filename, but I assume this is a task that could be accomplished in PowerShell as well? I've found several other threads on SO about using PowerShell to rename files, but none of them handled incrementing a filenumber. I'm on Win7, so PowerShell 2.0 is available.

    Read the article

  • post and pre increment in c

    - by jammkie same
    void main() { int a=2 , c; c=a++ + ++a + ++a + ++a; printf("%d",c); } prints 20, whereas void main() { int a=2; int c=a++ + ++a + ++a + ++a; printf("%d",c); } prints 17. Can someone explain the reason for this.

    Read the article

  • Catch Id (INT AUTO INCREMENT) of a Record after INSERT INTO Statement

    - by Johannes
    This is my first time I use MySQL as datastorage for my C# Application, as I've seen that there is no UNIQUEIDENTIFIER type as in SQL server I decieded to use INT with AUTO_INCREMENT, my problem is now if I execute a INSERT, how may I get the ID of the Record I just added. My quick and dirty solution has been to execute a SELECT MAX(ID) FROM table Statement. But this doesn't seem consistent. I belive there is a better solution something like mysql_insert_id() (PHP). Any Idea how to resolve this in C#?

    Read the article

  • SharePoint - Auto-increment dates in new records?

    - by ACal
    Hello, I have a list that's going to be updated with relatively static data weekly, and I wanted to create a workflow to do this automatically. The only field I'm having trouble with is Start Date. I want the new Start Date to be exactly one week after the previous week's (row's) Start Date, but I can't figure out how to capture this. I can't seem to find an easy way to get the value of the previous row. Now, theoretically, I could just have the workflow run once a week on a given day and use [Today] as the value for the field; however, a requirement is that the list can be populated a few weeks in advance if needed. Thanks in advance for any help you can provide!

    Read the article

  • Hibernate Auto-Increment not working

    - by dharga
    I have a column in my DB that is set with Identity(1,1) and I can't get hibernate annotations to work for it. I get errors when I try to create a new record. In my entity I have the following. @GeneratedValue(strategy=GenerationType.IDENTITY, generator="native") @Column(name="SeqNo", unique=true, nullable=false) BigDecimal seqNo; But when I try to add a new record I get the following error. Cannot insert explicit value for identity column in table 'MemberSelectedOptions' when IDENTITY_INSERT is set to OFF. I don't want to set IDENTIY_INSERT to ON because I want the identity column in the db to manage the values. The SQL that is run is the following; where you can clearly see the insert. insert into dbo.MemberSelectedOptions (OptionStatusCd, EffectiveDate, TermDate, SelectionStatusDate, SysLstUpdtUserId, SysLstTrxDtm, SourceApplication, GroupId, MemberId, OptionId, SeqNo) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) What am I missing?

    Read the article

  • Only assignment, call, increment, decrement, and new object expressions can be used as a statement : Messagebox

    - by Nuru Salihu
    This what i am trying to achieved if(this.BeginInvoke((Action)(() => MessageBox.Show("Test", MessageBoxButtons.YesNo) == DialogResult.No))) The above gives error. I try seperating the delegate to an outside method like delegate void test(string text); private void SetTest(string text) { if(MessageBox.Show(text,"", MessageBoxButtons.YesNo) == DialogResult.No) } But it breach the very reason why i need the delegate. I found out the first works for me but i don't know how to put it in an if/else statement. Pls any help in a better way i can achieve some thing like below would be appreciated. if(this.BeginInvoke((Action)(() => MessageBox.Show("Test", MessageBoxButtons.YesNo) == DialogResult.No)))

    Read the article

  • Array increment operator

    - by Stardust
    Could any one please tell me the meaning of "++" with array in the following code in Java: int [ ] arr = new int[ 4 ]; for(int i = 0; i < arr.length; i++){ arr[ i ] = i + 1; System.out.println(arr[ i ]++); } what is arr[ i ]++ meaning in above code, and why we can't do like: arr[ i ]++ = i + 1;

    Read the article

  • post increment operator java

    - by srandpersonia
    I can't make heads or tails of the following code from "java puzzlers" by joshua bloch. public class Test22{ public static void main(String args[]){ int j=0; for(int i=0;i<100;i++){ j=j++; } System.out.println(j); //prints 0 int a=0,b=0; a=b++; System.out.println(a); System.out.println(b); //prints 1 } } I can't get the part where j prints 0. According to the author, j=j++ is similar to temp=j; j=j+1; j=temp; But a=b++ makes b 1. So it should've evaluated like this, a=b b=b+1 By following the same logic, shouldn't j=j++ be evaluated as, j=j j=j+1 Where does the temp come into picture here? Any explanations would be much appreciated. << I'm breaking my head over this. ;) Thanks in advance.

    Read the article

  • Non-auto-increment rails/postgresql column

    - by Redian
    I'm trying to have a model/table with duplicate information in it. The reason for this is so that the same data can be written to the table under different users and found for each user. However, I want a quick easy way to identify which information is a duplicate of other information. I think the best way to do this would be to have an item_id of sorts that increments with each "set" of entries to the table. Is there a way to do this without including another table that stores the information without attributing it to users?

    Read the article

  • Increment the number of times an article has been read

    - by r.sendecky
    I have a situation where I need to increase the number of time article has been read. Once someone opens an article it should be reflected in the database by incrementing number of reads by one. Simple. Sending POST request to the server increments the number of reads by one. The article in question is supplied via URL parameter. Doing it manually by typing the URL in a browser works as expected. So server side is not at fault. My problems start with the javascript side of it or rather jquery. I hook the event to the article link. So every time a user clicks on the article link it increments the number of reads like so: $('#list-articles .article-link').click(function(e){ var oid = $(this).parent().parent().attr('data-oid').toString(); //Get the article id $.post( "/articles/viewed/" + oid ); }); Now this does not work! Number is not increased. I don't prevent default action since I need the link to actually open and display the article. Now if I put an alert right after the post like this: $('#list-articles .article-link').click(function(e){ var oid = $(this).parent().parent().attr('data-oid').toString(); //Get the article id $.post( "/articles/viewed/" + oid ); alert(oid); }); This variant works. After I dismiss the alert window, the number is incremented. Why is this so?? How can I fix this to actually work without the alert event present?

    Read the article

  • Increment number in string

    - by iform
    Hi, I am stumped... I am trying to get the following output until a certain condition is met. test_1.jpg test_2.jpg .. test_50.jpg The solution (if you could remotely call it that) that I have is fileCount = 0 while (os.path.exists(dstPath)): fileCount += 1 parts = os.path.splitext(dstPath) dstPath = "%s_%d%s" % (parts[0], fileCount, parts[1]) however...this produces the following output. test_1.jpg test_1_2.jpg test_1_2_3.jpg .....etc The Question: How do I get change the number in its current place (without appending numbers to the end)? Ps. I'm using this for a file renaming tool.

    Read the article

  • Java loop and increment problem

    - by user552961
    Can any one tell me what is the problem in my program? String a[],b[]; int c[] = new int[b.length]; for (int j = 0; j < a.length; j++) { for (int k = 0; k < b.length; k++) { if (b[k].equals(a[j])) { c[k]++; } else { c[k] = 0; } } } I have thousands of words stored in a HashMap. Now I want to check in every file that how many time one word occurred from allWords. Can you point out mistake in my program or give me your idea that how I can do it?

    Read the article

  • All FireFTP passwords gone after auto-update

    - by GitaarLAB
    For the last six months (since the Firefox madness started and they keep on taking control of my PC) I'm terrified to touch Firefox. Problem is however, I've been using it in my business (since once upon a time it was a trustworthy application with useful extensions like FireFTP) and that installation (and plugins) holds four years of information. So Firefox continually deletes my important data (by) messing up (or blocking/or worse: auto-updating) my plug-ins, even crashing my computer as a result. Today Firefox killed FireFTP by (again) autoupdating FireFTP without my permission, and I did my best to disable that nonsense in about:config). Result: none of the (over 100) FireFTP accounts can be logged on to, they suddenly all ask for a password. I do not have the time to to find all of the passwords and reconfigure FireFTP again. How can I undo the mess Firefox created once again? That is, where are the passwords, how do I downgrade? As a side-question, how can I make Firefox behave again? I'm the boss of my computer, not them! How can I once and for-all take back control and completely kill every kind of auto-update feature?

    Read the article

  • Login Screen returns to login screen

    - by AbeFM
    After many many reboots in a couple days while experimenting with BIOS settings effecting the speed Hardbrake runs at, today I find after a reboot that I have to type in password to log in - ordinarily I have this disabled. When I DO enter my password, it goes to a black screen for a bit, then returns. I can log in as guest, which does the same thing (minus the password) and if I use the wrong password, it complains instead of doing the same. Using the install disc, I see three partitions on my drive, a ~200 MB boot sector, and two 32 GB (one extended) which seem to share the rest of the SSD. Running FSCK seems to generate tons of errors. The odd bits: All my background stuff is running - I can access stuff served by Subsonic, and see network shares from my windows machines. I can log in in another terminal and do stuff... I just can't get into the GUI/OS proper. Sort of at a loss where to start. Would be happy to free drive of errors if I could (I've another machine, I could mount drive over USB and check it), but it seems everything else is working? edit: Screensaver also seems to kick on, even from fsck's run from the boot menu. i3-2100t, H67 chipset I believe, 12.10, everything's been working fine for the better part of a year. Seen several similar topics, but either they turn out to be something unrelated (fresh install or known graphics issues) or there are no answers. I'm happy to get any logs/info anyone want.

    Read the article

  • Linq To SQL: Behaviour for table field which is NotNull and having Default value or binding

    - by kaushalparik27
    I found this something interesting while wandering over community which I would like to share. The post is whole about: DBML is not considering the table field's "Default value or Binding" setting which is a NotNull. I mean the field which can not be null but having default value set needs to be set IsDbGenerated = true in DBML file explicitly.Consider this situation: There is a simple tblEmployee table with below structure: The fields are simple. EmployeeID is a Primary Key with Identity Specification = True with Identity Seed = 1 to autogenerate numeric value for this field. EmployeeName and their EmailAddress to store in rest of 2 fields. And the last one is "DateAdded" with DateTime datatype which doesn't allow NULL but having Default Value/Binding with "GetDate()". That means if we don't pass any value to this field then SQL will insert current date in "DateAdded" field.So, I start with a new website, add a DBML file and dropped the said table to generate LINQ To SQL context class. Finally, I write a simple code snippet to insert data into the tblEmployee table; BUT, I am not passing any value to "DateAdded" field. Because I am considering SQL Server's "Default Value or Binding (GetDate())" setting to this field and understand that SQL will insert current date to this field.        using (TestDatabaseDataContext context = new TestDatabaseDataContext())        {            tblEmployee tblEmpObjet = new tblEmployee();            tblEmpObjet.EmployeeName = "KaushaL";            tblEmpObjet.EmployeeEmailAddress = "[email protected]";            context.tblEmployees.InsertOnSubmit(tblEmpObjet);            context.SubmitChanges();        }Here comes the twist when application give me below error:  This is something not expecting! From the error it clearly depicts that LINQ is passing NULL value to "DateAdded" Field while according to my understanding it should respect Sql Server's "Default value or Binding" setting for this field. A bit googling and I found very interesting related to this problem.When we set Primary Key to any field with "Identity Specification" Property set to true; DBML set one important property "IsDbGenerated=true" for this field. BUT, when we set "Default Value or Biding" property for some field; we need to explicitly tell the DBML/LINQ to let it know that this field is having default binding at DB side that needs to be respected if I don't pass any value. So, the solution is: You need to explicitly set "IsDbGenerated=true" for such field to tell the LINQ that the field is having default value or binding at Sql Server side so, please don't worry if i don't pass any value for it.You can select the field and set this property from property window in DBML Designer file or write the property in DBML.Designer.cs file directly. I have attached a working example with required table script with this post here. I hope this would be helpful for someone hunting for the same. Happy Discovery!

    Read the article

  • How to make bash quit tab autocompleting hidden directories

    - by Kristopher Micinski
    Most of the time, I don't need autocompletes for my hidden directories. In fact, that's the point of them being hidden! However, annoyingly, bash takes these directories into account when considering tab autocompletion. This is particularly annoying when I have the following scenario: a .svn foler along with a single folder that I want to traverse into by simply pushing tab. (This typically comes up with deep Java packages...) Is there any way to change the default behavior? Worst case scenario I have to type '.' before tab, which seems like a no brainer for my usability.

    Read the article

  • How to configure permanent autologin?

    - by DanielGibbs
    I'm trying to set up an Ubuntu 12.04 machine as a kiosk and I would like it, on boot, to automatically log in as my kiosk user "kiosk", and start the appropriate display manager, in this case blackbox. I have configured /etc/lightdm/lightdm.conf as in this question and have an appropriate /usr/share/xsessions/blackbox.desktop to launch blackbox. I managed to get initial autologin by using the dbus-send method in this question, however if I right-click and select "Exit" from blackbox, then I am taken back to the login screen. How can I configure lightdm/ubuntu to always autologin as "kiosk" instead of displaying the login screen? Or, failing that, how can I configure blackbox to not display a menu when I right-click?

    Read the article

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