Daily Archives

Articles indexed Friday April 23 2010

Page 9/115 | < Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • passing table id

    - by soclose
    Hi In Android, I make a list view that describe the name fields from a table in SQLite. Clicking long-term on any List Item, context menu appears and then I wanna get the ID of that item (I mean in the table, there are ID and name fields) and pass this ID to next layout. Why I wanna pass this ID is to update this record in SQLite table. Here the next layout will be tablelayout. how to pass any value from one layout to another? how to code?

    Read the article

  • JQuery datePicker: start/end date should be within one year

    - by Abu Hamzah
    So if my start date is : 04/22/2010 then my end date selection can be up to 04/22/2011 and after 04/22/2011 are dates all disabled. Here is what I have for both selection start and end date: $(document).ready(function () { $('#endDate').datepicker({ showOn: 'button', buttonImage: '../images/Calendar.png', buttonImageOnly: true, onSelect: function () { }, onClose: function () { $(this).focus(); } }); $('#startDate').datepicker({ showOn: 'button', buttonImage: '../images/Calendar.png', buttonImageOnly: true, onSelect: function (dateText, inst) { $('#endDate').datepicker("option", 'minDate', new Date(dateText)); } , onClose: function () { $(this).focus(); } }); });

    Read the article

  • mod_rewrite and htaccess

    - by chris
    I have set up a few rules based on other questions but now my css breaks I did have the URL / /eshop/cart.php?products_id=bla and everything work fine. but now with my mod rewrite url- /product/product-title/ It loose the base directory. Is there an option to fix this? So i dont have to go back with the full url in all the img src tags and so on?

    Read the article

  • Working with arrays passed byref

    - by Jason
    I would like for someone to explain this to me: function myFunction(array){ array = $.grep(array, function(n,i){return n > 1 }); } var mainArray = [1,2,3]; myFunction(mainArray); document.write(mainArray) // 1,2,3, but i'm expecting 2,3 but if i do something like array[3] = 4; in place of the $.grep line, i get 1,2,3,4. Shouldn't mainArray become the new array created by $.grep?

    Read the article

  • Error trying to use rand from std library cstdlib with g++

    - by Matt
    I was trying to use the random function in Ubuntu compiling with g++ on a larger program and for some reason rand just gave weird compile errors. For testing purposes I made the simplest program I could and it still gives errors. Program: #include <iostream> using std::cout; using std::endl; #include <cstdlib> int main() { cout << "Random number " << rand(); return 0; } Error when compiling with the terminal sudo g++ chapter_3/tester.cpp ./test ./test: In function _start': /build/buildd/eglibc-2.10.1/csu/../sysdeps/i386/elf/start.S:65: multiple definition of_start' /usr/lib/gcc/i486-linux-gnu/4.4.1/../../../../lib/crt1.o:/build/buildd/eglibc-2.10.1/csu/../sysdeps/i386/elf/start.S:65: first defined here ./test:(.rodata+0x0): multiple definition of _fp_hw' /usr/lib/gcc/i486-linux-gnu/4.4.1/../../../../lib/crt1.o:(.rodata+0x0): first defined here ./test: In function_fini': (.fini+0x0): multiple definition of _fini' /usr/lib/gcc/i486-linux-gnu/4.4.1/../../../../lib/crti.o:(.fini+0x0): first defined here ./test:(.rodata+0x4): multiple definition of_IO_stdin_used' /usr/lib/gcc/i486-linux-gnu/4.4.1/../../../../lib/crt1.o:(.rodata.cst4+0x0): first defined here ./test: In function __data_start': (.data+0x0): multiple definition ofdata_start' /usr/lib/gcc/i486-linux-gnu/4.4.1/../../../../lib/crt1.o:(.data+0x0): first defined here ./test: In function __data_start': (.data+0x4): multiple definition of__dso_handle' /usr/lib/gcc/i486-linux-gnu/4.4.1/crtbegin.o:(.data+0x0): first defined here ./test: In function main': (.text+0xb4): multiple definition ofmain' /tmp/cceF0x0p.o:tester.cpp:(.text+0x0): first defined here ./test: In function _init': (.init+0x0): multiple definition ofinit' /usr/lib/gcc/i486-linux-gnu/4.4.1/../../../../lib/crti.o:(.init+0x0): first defined here /usr/lib/gcc/i486-linux-gnu/4.4.1/crtend.o:(.dtors+0x0): multiple definition of `_DTOR_END' ./test:(.dtors+0x4): first defined here /usr/bin/ld: error in ./test(.eh_frame); no .eh_frame_hdr table will be created. collect2: ld returned 1 exit status

    Read the article

  • Release Process Improvements

    - by wallismark
    The process of creating a new build and releasing it to production is a critical step in the SDLC but it is often left as an afterthought and varies greatly from one company to the next. I'm hoping people will share improvements they have made to this process in their organisation so we can all takes steps to 'reduce the pain'. So the question is, specify one painful/time consuming part of your release process and what did you do to improve it? My example: at a previous employer all developers made database changes on one common development database. Then when it came to release time, we used Redgate's SQL Compare to generate a huge script from the differences between the Dev and QA databases. This works reasonably well but the problems with this approach are:- ALL changes in the Dev database are included, some of which may still be 'works in progress'. Sometimes developers made conflicting changes (that were not noticed until the release was in production) It was a time consuming and manual process to create and validate the script (by validate I mean, try to weed out issues like problem 1 and 2). When there were problems with the script (eg the order in which things were run such as creating a record which relies on a foreign key record which is in the script but not yet run) it took time to 'tweak' it so it ran smoothly. It's not an ideal scenario for Continuous Integration. So the solution was:- Enforce a policy of all changes to the database must be scripted. A naming convention was important for ensuring the correct running order of the scripts. Create/Use a tool to run the scripts at release time. Developers had their own copy of the database do develop against (so there was no more 'stepping on each others toes') The next release after we started this process was much faster with fewer problems, indeed the only problems found were due to people 'breaking the rules', eg not creating a script. Once the issues with releasing to QA were fixed, when it came time to release to production it was very smooth. We applied a few other changes (like introducing CI) but this was the most significant, overall we reduced release time from around 3 hours down to a max of 10-15 minutes.

    Read the article

  • CSS ul userlist formatting

    - by Titan
    Hi, I am trying to break away from using tables in my formatting, and am trying out using userlist html tags <ul> Say I have a panel with 10 controls, and I want a 3 columns display, therefore 3 controls in each row, and a total of 4 rows for 10 controls. Should I use 4 different <ul> or should I just stack them inside one <ul> Please tell me the advantages and disadvantages Thanks

    Read the article

  • Facebook: Social Widgets versus Share

    - by just_wes
    Hello all, I am interested in people's thoughts on Facebook's new social widgets thing. Most notably the new "Like" button. The concept I am struggling with is the difference between "Like" and "Share". I have an existing Connect application. This application has its own fan page on Facebook. People can become "Fans" of the page and register to receive email updates and the like. The application is currently programmed to update its own fan page any time content is added to the site. Enter Social Widgets and "Like". People who visit our site can currently "share" our content on Facebook. With "Share" they can post a full item to their wall with a comment or send the content item as a message to another Facebook user. "Like" seems to do the same thing minus the message part. However "Like" automatically subscribes people to the fan page. My question is simply, should I add "Like" to my existing Connect site? Is "Like" different than what I already have? Are Social Widgets the future of Connect? Thanks!

    Read the article

  • iPhone SDK in C++?

    - by seed
    This might be a really silly question, but is the iPhone SDK available in C++? Since I heard C++ is an officially supported language, is their any SDK avaliable for it?

    Read the article

  • Tools for website development

    - by sharkin
    Hi! I can't find any other post which addresses this topic on a purely general level. I'm very unexperienced in developing full scale websites. I get around using HTML and PHP for simple tasks. Now I'm looking at developing a more elaborate site and want to get hold of a good tool which doesn't eat my wallet to the bones. I guess I should add more intelligent text here about what I expect it to be capable of, but I really don't know so much. I guess the code/design/preview style in dreamweaver appealed to me, and I'm definetely going to use scripting like PHP or ASP.NET, some database work etc. I guess pretty much the standard (?) website development tasks. So, are there good tools out there I should be looking at?

    Read the article

  • Be Careful When Referencing SPList.Items

    - by Brian Jackett
    Be very careful how you reference your SPListItem objects through the SharePoint API.  I’ll say it again.  Be very careful how you reference your SPListItem objects through the SharePoint API.  Ok, now that you get the point that this will be a “learn from my mistakes and don’t do unsmart things like I did” post, let’s dig into what it was that I did poorly. Scenario     For the past year I’ve been building custom .Net applications that are hosted through SharePoint.  These application involve a number of SharePoint lists, external databases, custom web parts, and other SharePoint elements to provide functionality.  About two weeks ago I received a message from one of our end users that a custom application was performing slowly.  Specifically performance was slow when users were performing actions that interacted with the primary SharePoint list storing data for that app. The Problem     I took a copy of the production site into a dev environment to investigate the code that was executing.  After attaching the debugger and running through the code I quickly found pieces of code referencing SPListItem objects (like below) that were performing very poorly: SPListItem myItem = SPContext.Current.Web.Lists["List Name"].Items.GetItemById(value); // do updates on SPListItem retrieved     As it turns out the SPList I was referencing was fairly large at ~1000 items and weighing in over 150 MB.  You see the problem with my above code is that I retrieved the SPListItem by first (unnecessarily) going through the Items member of the list.  As I understand it, when doing so the executing code will attempt to resolve that entity and pull it from the database and into RAM (all 150 MB.)  This causes the equivalent of a 50 car pile up in terms of performance with a single update taking more than 15 seconds. The Solution     The solution is actually quite simple and I wish I had realized this during development.  Instead of going through the Items member it is possible to call GetItemById(…) directly on the SPList as in the example below: SPListItem myItem = SPContext.Current.Web.Lists["List Name"].GetItemById(value); // do updates on SPListItem retrieved     After making this simple change performance skyrocketed and updates were back to less than a second.   Conclusion     When given the option between two solutions, usually the simplest is the best solution.  In my scenario I was adding extra complexity going through the API the long way around to get to the objects I needed and it ended up hurting performance greatly.  Luckily we were able to find and resolve the performance issue in a relatively short amount of time.  Like I said at the beginning of the post, learn from my mistakes and hope it helps you.         -Frog Out   Image linked from http://www.freespirit.com/files/IMAGE/COVER/LARGE/BeCarefulSafe.jpg

    Read the article

  • Why do I get Access Denied when using WinRM?

    - by Kev
    Following on from this question: Why does my PowerShell script hang when called in PSEXEC via a batch (.cmd) file? I took the advice from Jim B and installed WinRM. To recap I have two servers: HMon01 - runs Windows 2003 Standard SP2 Web1928 - runs Windows 2008 Standard SP2 Both servers are standalone. I installed WinRM for Windows 2003 from here and configured WinRM as follows on both machines: Client NetworkDelayms = 5000 URLPrefix = wsman AllowUnencrypted = false Auth Basic = true Digest = true Kerberos = true Negotiate = true Certificate = true DefaultPorts HTTP = 80 HTTPS = 443 TrustedHosts = * The problem I have is that if I remotely execute commands using the remote machine's built in Administrator account then all is well. However I have an account on the remote machine named remoteexec which is a member of the Administrators group (we disable our Administrator accounts). If I use this account then I get Access Denied errors. I've done all the usual things such as checking passwords and the like. Why would this be?

    Read the article

  • Virtual machine not starting at Ubuntu Startup

    - by Mirage
    I have read this tutorial to and added this command in the file vmrun start /media/VM/WindowXP/Windows XP Professional.vmx I have also added one more line echo "hello" >> /home/abc/test.txt to check if script is runinng or not. When i restart the ubuntu , then virtual machine does not start. But there are two "hello" in that text file I don't know why two hellos but vm is not starting

    Read the article

  • How do I run a batch file async using PSExec?

    - by Paul Mrozowski
    I have a batch file I run that, among other things, reset's the NICs in the machine. I have some watchdog software running on another machine that monitors the first one. I'd like to run this batch file using PSExec when it detects certain types of failures. The problem I'm having is that since the batch file reset's the NIC's it kills the connection PSExec has (I'm OK with that). The real issue is that when PSExec dies the batch file stops running (leaving the NIC's disabled). I've tried using the -i option with PSExec with no luck. Any ideas about basically just fire off the batch file and NOT have it stop when PSExec is disconnected?

    Read the article

  • Compiler #defines for g++ and cl

    - by DHamrick
    I am writing a program that is cross platform. There are a few spots where I have to specify an operating system dependent call. #ifdef WINDOWS ..do windows only stuff #endif #ifdef LINUX ..do linux only stuff #endif Are there any preprocesser directives that get defined by the compiler so I don't have to explicitly define them when I use the command line compiler. ie. cl -DWINDOWS program.cpp or g++ -DLINUX program.cpp I realize I could easily write a makefile or have a shell/batch script that will do this automatically. But I would prefer to use the same ones as the compiler (if they exist) by default.

    Read the article

  • Getting a connection from a Sybase datasource in WAS 6.1 fails with message "User name property miss

    - by Abel Morelos
    I have a standalone application that needs to connect to a Sybase database via a datasource, I'm trying to connect using getConnection() and get the connection from this Sybase datasource which is hosted in WAS 6.1, sadly I'm getting an error JZ004 - Sybase(R) jConnect for JDBC(TM) Programmer's Reference: SQL Exception and Warning Messages JZ004 error message is: User name property missing in DriverManager.getConnection(..., Properties) Action: Provide the required user property. As you can see, this is not a connectivity (so we can discard JNDI or lookup problems), but rather a configuration problem. For my Sybase datasource in WAS 6.1 I have set up the proper authentication alias (Component-managed Authentication Alias), and I know the credentials are alright, "Test Connection" is successful for this datasource. Somebody had a similar problem and was because of the authentication alias- http://forum.springsource.org/showthread.php?t=39915 Next, I tried calling getConnection() but now I provided the credentials like getConnection(user, password)... and this time it worked!!! So I suspect that somehow WAS 6.1 is not picking or taking the authentication info I set in the datasource as mentioned before. If you think that maybe getConnection(user, password) should be OK for my case, well, that's not the case since I have a requirement to keep the credentials in the server, the standalone application only needs to know the JNDI information to lookup the datasource. Please let me know if have faced a similar problem, or what would you suggest me to do. Thanks.

    Read the article

  • Is it possible to generate dynamic proxy for static class or static method in C#?

    - by Jeffrey
    I am trying to come up with a way that (either static or instance) method calls can be intercepted by dynamic proxy. I want to implement it as c# extension methods but stuck on how to generate dynamic proxy for static methods. Some usages: Repository.GetAll<T>().CacheForMinutes(10); Repository.GetAll<T>().LogWhenErrorOccurs(); //or var repo = new Repository(); repo.GetAll<T>().CacheForMinutes(10); repo.GetAll<T>().LogWhenErrorOccurs(); I am open to any library (linfu, castle.dynamic proxy 2 or etc). Thanks!

    Read the article

  • jquery load method

    - by cognos79
    I am using mscaptcha image and trying to only reload the captcha image on button click. Seems like the captcha image is being loaded twice sometimes. <script type="text/javascript"> $(document).ready(function() { $('#btnSubmit').click(function() { $('#dvCaptcha').load('default.aspx #dvCaptcha'); }); }); </script> <div id="btnDiv"> <asp:Button ID="btnSubmit" runat="server" Text="Submit" /> </div> <div id="dvCaptcha"> <cc1:CaptchaControl ID="ccJoin" runat="server" CaptchaBackgroundNoise="none" CaptchaLength="5" CaptchaHeight="60" CaptchaWidth="200" CaptchaLineNoise="None" CaptchaMinTimeout="5" CaptchaMaxTimeout="240" /> </div> Any ideas?

    Read the article

< Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >