Search Results

Search found 29841 results on 1194 pages for 'random number generator'.

Page 106/1194 | < Previous Page | 102 103 104 105 106 107 108 109 110 111 112 113  | Next Page >

  • jQuery - After number of elements add html!

    - by Florescu Adrian
    Hello. I need to know if I can count the elements inside a div and after 3 elements to add an html object. <div id="wrapper"> <a href="#">1</a> <a href="#">1</a> <a href="#">1</a> //insert html with jQuery here <a href="#">1</a> <a href="#">1</a> <a href="#">1</a> //insert html with jQuery here <a href="#">1</a> <a href="#">1</a> <a href="#">1</a> //insert html with jQuery here </div>

    Read the article

  • adb doesn't get phone's device name/number

    - by Dona Hertel
    Okay, I have a strange problem I haven't seen listed anywhere. I'm developing an android app and I would like to run it on my Huawei Ascend. I have set up a file in /etc/udev/90-android.rules with the line: SUBSYSTEM=="usb", SYSFS{idVendor}=="12d1", MODE="0666" where '12d1' is the correct vendor ID for this phone (I verified this with 'lsusb' command). When I plug in the phone (it does have debugging on) and restart the adb server I get a connection but the name field does not get set. The output to 'adb devices' is: List of devices attached \n ???????????? device Plugging and unplugging the cable doesn't resolve this. Neither does restarting the adb server. Nor does a total reboot of both my computer or the phone. This is fine as I can get logs and a shell. The problem is that in the eclipse plugin, the device's name is list as "????????????" and so when it tries connect, it quits with an error message of 'device not found' even though the device is listed and 'online'. Is there something else I need to do? Do I need to set the name of the device somehow? cocofan P.S.: The app has 'debuggable' set to true in the manifest file.

    Read the article

  • Fast way to manually mod a number

    - by Nikolai Mushegian
    I need to be able to calculate (a^b) % c for very large values of a and b (which individually are pushing limit and which cause overflow errors when you try to calculate a^b). For small enough numbers, using the identity (a^b)%c = (a%c)^b%c works, but if c is too large this doesn't really help. I wrote a loop to do the mod operation manually, one a at a time: private static long no_Overflow_Mod(ulong num_base, ulong num_exponent, ulong mod) { long answer = 1; for (int x = 0; x < num_exponent; x++) { answer = (answer * num_base) % mod; } return answer; } but this takes a very long time. Is there any simple and fast way to do this operation without actually having to take a to the power of b AND without using time-consuming loops? If all else fails, I can make a bool array to represent a huge data type and figure out how to do this with bitwise operators, but there has to be a better way.

    Read the article

  • code to identify the number

    - by [email protected]
    Hi All, I got one problem while doing one TAPI application based project in C#. I'm using ITAPI3.dll My problem is.. i'm not getting incoming call information. To get the incoming call information, i'm using the getcallinfo function, but it is showing empty message.

    Read the article

  • Python calling class methods with the wrong number of parameters

    - by Hussain
    I'm just beginning to learn python. I wrote an example script to test OOP in python, but something very odd has happened. When I call a class method, Python is calling the function with one more parameter than given. Here is the code: 1. class Bar: 2. num1,num2 = 0,0 3. def __init__(num1,num2): 4. num1,num2 = num1,num2 5. def foo(): 6. if num1 num2: 7. print num1,'is greater than ',num2,'!' 8. elif num1 is num2: 9. print num1,' is equal to ',num2,'!' 10. else: 11. print num1,' is less than ',num2,'!' 12. a,b,t = 42,84,bar(a,b) 13. t.foo 14. 15. t.num1 = t.num1^t.num2 16. t.num2 = t.num2^t.num1 17. t.num1 = t.num1^t.num2 18. 19. t.foo 20. And the error message I get: python test.py Traceback (most recent call last): File "test.py", line 12, in a,b,t = 42,84,bar(a,b) NameError: name 'bar' is not defined Can anyone help? Thanks in advance

    Read the article

  • Dreamweaver regular expression substitution followed by number

    - by mark
    Hi. I'm using Dreamweaver to update copyright dates across my site. I want to preserve the existing spacing (or lack thereof) between years. Examples: © 2002-2008 should update to © 2002-2009 © 2003 - 2008 should update to © 2003 - 2009 This is the regular expression I'm using to accomplish this in Dreamweaver's find & replace function Find: ©\s*(\d{4}\s*-\s*)\d{3}[^9] Replace: © $1 2009 Here's the PROBLEM: This expression works, but has that that extra space between the hyphen and 2009. If I write the replace expression without the space, as © $12009 then dreamweaver looks for the 12,009th substitution in the find expression, and, not finding one, prints $12009. Any ideas?

    Read the article

  • SQL Server store procedure line number issue

    - by George2
    Hello everyone, I am using SQL Server 2008 Enterprise. I met with issue which says line 9 of store procedure foo is meeting with dead lock issue. My question is how to find exactly the 9th line of the store procedure? My confusion is because of coding format issue, how to locate 9th line correctly. thanks in advance, George

    Read the article

  • Minimum OS version number, iPhone app

    - by Michael Frost
    Hi all I've built an iPhone app which is live in the app-store. When originally submitting the app it showed up in App Store as requiring iPhone OS 3.1.3. When later updating the app I made sure my settings in Xcode for the target for the app store build had the Base SDK version set to 3.1.3 and the Deployment Target version set to 3.0, however it still shows up in app store as requiring 3.1.3. From what I've understood the Deployment Target version is the one setting the requirement in app store? Or is there any information concerning this that I should have updated in iTunes Connect when submitting the updated app? Thanks, Michael

    Read the article

  • TeamCity build number independent artifacts

    - by Stanislav Shevchenko
    Hello, My TeamCity's nightly build produces more than 130Mb java doc as Build Configuration artifact. I have to share these artifact for other teams(developers), but javadoc every time has another one URL(I know that it's possible to get it like .lastFinished), and get's new place on Build Machine. Is it possible on each build replace old artifact with new one because I don't need need previous versions? And have independent from build version URL for accessing.

    Read the article

  • Convert month number to month short name

    - by Roland
    I have a variable with the following value $month = 201002; the first 4 numbers represent the year, and the last 2 numbers represent the month. I need to get the last 2 numbers in the month string name eg. Feb My code looks like this <?php echo date('M',substr($month,4,6)); ?> I can I go about to obtain the month name

    Read the article

  • MySQL - Selecting rows with a minimum number of occurences

    - by RC
    Hi all, I have this query: SELECT DISTINCT brand_name FROM masterdata WHERE in_stock = '1' ORDER BY brand_name It works well, except that I get far too many results. How do I limit this such that rather than just looking for distinct entries, it will only give me distinct entries that exist a minimum of 3 times (for example)? Basically, if the column had this data... brand_name ========== apple banana apple apple orange banana orange orange ...my current query would return "apple, banana, orange". How do I get it such that it only returns "apple, orange" (ignoring banana because it has less than three occurrences)? I'm using PHP to build the query, if it matters. Thanks!

    Read the article

  • Drupal limit number of menu items in primary links

    - by ninusik
    Is there a way to set a limit on how many menu items users can add to Primary Links menu? I'm working on a Drupal site and I have a horizontal primary links nav bar. There is only room for no more than 7-8 links in the nav bar. I don't want the future maintainer of the site to add more than 8 items to the menu. Is there a way I can set a limit on that? Some module or override function? Thanks,

    Read the article

  • Need help with version number schemes

    - by Davy8
    I know the standard Major.Minor.Build.Revision but there's several considerations for us that are somewhat unique -We do internal releases almost daily, occasionally more than once a day. -Windows Installer doesn't check Revision so that's almost moot for our purposes. -Major and Minor numbers ideally are only updated for public releases and should be done manually. -That leaves the Build # that needs to be automatically updated. -We want internal releases to be able to be performed from any developer's machine so that leaves out using x.x.* in Visual Studio because different numbers could be generated from different machines and each build isn't guaranteed to be larger than the previous. -We have about 15 or so projects as part of the product so saving the version numbers in SVN isn't ideal since every release we'd have commit all those files. Given those criteria I can't really come up with a good versioning scheme. The last 2 criteria could be dropped but meeting all of those seems ideal. A date stamp is insufficient because we might do more than one a day, and given the max size of Uint32 (around 64000) (Actually using WiX it complains about numbers higher than Int32.MaxValue) a date/time won't fit.

    Read the article

  • android Convert phone number in International Format

    - by Arutha
    I'd like to know whether it's possible to have phone numbers converted into international format when a call is outgoing. For instance, if a french user (sorry it's the only format i know i won't make a mistake :-) try to call with the national format : 01.47.12.34.56 then a method will convert it into international format like this : +33.1.47.12.34.56 I've looked into the doc of the PhoneNumberUtils but i don't know if there is a method doing what i want.

    Read the article

  • How to activate revision info in line number view

    - by Joshua
    I know of an Eclipse feature to show revision information (gradual coloring, more info like revisionnumber, date and author on mouseover) for the last changes in a line in the linenumbers-view. Does anyone know how to activate this feature for a file, or even better, by default? I accidently hit some shortcut lately which made it show in one file, it does not show up in the others, though.

    Read the article

  • number of months between two dates - using boost's date

    - by MartinP
    I've used boost::gregorian::date a bit now. I can see that there are the related months & years & weeks duration types. I can see how to use known durations to advance a given date. Qu: But how can I get the difference between two dates in months (or years or weeks) ? I was hoping to find a function like: template<typename DURATION> DURATION date_diff<DURATION>(const date& d1,const date& d2); There would need to be some handling of rounding too.

    Read the article

  • in Python find number of same elements in 2 lists

    - by John
    Hi, In Python if I have 2 lists say: l1 = ['a', 'b', 'c', 'd'] l2 = ['c', 'd', 'e'] is there a way to find out how many elements they have the same. In the case about it would be 2 (c and d) I know I could just do a nested loop but is there not a built in function like in php with the array_intersect function Thanks

    Read the article

< Previous Page | 102 103 104 105 106 107 108 109 110 111 112 113  | Next Page >