Search Results

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

Page 23/1194 | < Previous Page | 19 20 21 22 23 24 25 26 27 28 29 30  | Next Page >

  • choppy sound with random popping 13.04

    - by Goddard
    I was hoping some one could help me figure out why my audio is popping randomly. I just got some new speakers and it was popping previously, but I was using monitor speakers so it wasn't really noticeable. Now I have some Bose speakers hooked up via an analog cable. It is not the speakers because my Android phone plays audio fine. When I open the sound settings window the popping happens at exactly the same time a third sound device is displayed very quickly and then disappears. This keeps happening at about 30 second intervals. Any help is appreciate. If you need more details just let me know how to get them.

    Read the article

  • Random MongoDb Syntax: Updates

    - by Liam McLennan
    I have a MongoDb collection called tweets. Each document has a property system_classification. If the value of system_classification is ‘+’ I want to change it to ‘positive’. For a regular relational database the query would be: update tweets set system_classification = 'positive' where system_classification = '+' the MongoDb equivalent is: db.tweets.update({system_classification: '+'}, {$set: {system_classification:'positive'}}, false, true) Parameter Description { system_classification: '+' } the first parameter identifies the documents to select { $set: { system_classification: 'positive' } } the second parameter is an operation ($set) and the parameter to that operation {system_classification: ‘positive’} false the third parameter indicates if this is a regular update or an upsert (true for upsert) true the final parameter indicates if the operation should be applied to all selected documents (or just the first)

    Read the article

  • Ubuntu stops letting wired or wireless mouse click through after random delay

    - by Jonathan Chan
    I have a very confusing problem that renders Ubuntu near unusable. Whenever I try to use any wired or wireless mouse with my Ubuntu 10.10 install, clicks stop going through - often times, this blockage of clicks happens in less than a minute. Sometimes no clicks are accepted, other times, clicks are accepted in certain windows and blocked in others. The end result is the same, and I am forced to resort to using the keyboard to navigate.

    Read the article

  • Libgdx 2D Game, Random generated World of random size, how to get mouse coordinates?

    - by Solom
    I'm a noob and English is not my mothertongue, so please bear with me! I'm generating a map for a Sidescroller out of a 2D-array. That is, the array holds different values and I create blocks based on that value. Now, my problem is to match mouse coordinates on screen with the actual block the mouse is pointing at. public class GameScreen implements Screen { private static final int WIDTH = 100; private static final int HEIGHT = 70; private OrthographicCamera camera; private Rectangle glViewport; private Spritebatch spriteBatch; private Map map; private Block block; ... @Override public void show() { camera = new OrthographicCamera(WIDTH, HEIGHT); camera.position.set(WIDTH/2, HEIGHT/2, 0); glViewport = new Rectangle(0, 0, WIDTH, HEIGHT); map = new Map(16384, 256); map.printTileMap(); // Debugging only spriteBatch = new SpriteBatch(); } @Override public void render(float delta) { // Clear previous frame Gdx.gl.glClearColor(1, 1, 1, 1 ); Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT); GL30 gl = Gdx.graphics.getGL30(); // gl.glViewport((int) glViewport.x, (int) glViewport.y, (int) glViewport.width, (int) glViewport.height); spriteBatch.setProjectionMatrix(camera.combined); camera.update(); spriteBatch.begin(); // Draw Map this.drawMap(); // spriteBatch.flush(); spriteBatch.end(); } private void drawMap() { for(int a = 0; a < map.getHeight(); a++) { // Bounds check (y) if(camera.position.y + camera.viewportHeight < a)// || camera.position.y - camera.viewportHeight > a) break; for(int b = 0; b < map.getWidth(); b++) { // Bounds check (x) if(camera.position.x + camera.viewportWidth < b)// || camera.position.x > b) break; // Dynamic rendering via BlockManager int id = map.getTileMap()[a][b]; Block block = BlockManager.map.get(id); if(block != null) // Check if Air { block.setPosition(b, a); spriteBatch.draw(block.getTexture(), b, a, 1 ,1); } } } } As you can see, I don't use the viewport anywhere. Not sure if I need it somewhere down the road. So, the map is 16384 blocks wide. One block is 16 pixels in size. One of my naive approaches was this: if(Gdx.input.isButtonPressed(Input.Buttons.LEFT)) { Vector3 mousePos = new Vector3(); mousePos.set(Gdx.input.getX(), Gdx.input.getY(), 0); camera.unproject(mousePos); System.out.println(Math.round(mousePos.x)); // *16); // Debugging // TODO: round // map.getTileMap()[mousePos.x][mousePos.y] = 2; // Draw at mouse position } I confused myself somewhere down the road I fear. What I want to do is, update the "block" (or rather the information in the Map/2D-Array) so that in the next render() there is another block. Basically drawing on the spriteBatch g So if anyone could point me in the right direction this would be highly appreciated. Thanks!

    Read the article

  • Can't type my username and password, random freeze at login

    - by rakesh
    My netbook runs a dual OS(Windows7 & Ubuntu 12.04). After Ubuntu login screen appears, that’s it, it gets hanged, can't even move my cursor nor type my user name. I had to turn off my system and boot again. Still its not sure that it won't freeze out at login screen again, but this is the temporary solution I have to get into Ubuntu. This freezing at login screen doesn't happen every time, it happens randomly. It seems like I had to enter into Ubuntu purely based on my luck, which is quite irritating. I found many other types of login problem in Ubuntu when I googled, which were quite different from my case. So any1 kindly help me out.

    Read the article

  • UFW blocking random packets on 443

    - by s2jcpete
    All, I have UFW setup to allow traffic on port 443. It works as expected, though I have a large amount of UFW Block log entries. To Action From -- ------ ---- 80 ALLOW Anywhere 443 ALLOW Anywhere 22222 ALLOW Anywhere 80 ALLOW Anywhere (v6) 443 ALLOW Anywhere (v6) 22222 ALLOW Anywhere (v6) However in my syslog file I see this: [UFW BLOCK] IN=eth0 OUT= MAC=XXX SRC=<foreignip> DST=<serverip> LEN=40 TOS=0x00 PREC=0x00 TTL=116 ID=22025 DF PROTO=TCP SPT=49622 DPT=443 WINDOW=0 RES=0x00 ACK RST URGP=0 About 30 or so seconds later pound (which I'm using for SSL decryption and port redirection) throws a connection timed out messsage. I'm assuming this is because UFW is blocking the packet. I'm at a loss as to an explination. Could the packet be malformed or something, is this normal? Edit - I have since changed the /etc/defaults/ufw and set ipv6=no, so the v6 rules are no longer in the mix. The server is still showing the block / connection timed out behavior though. The new ufw status output is: Status: active Logging: on (low) Default: deny (incoming), allow (outgoing) New profiles: skip To Action From -- ------ ---- 80 ALLOW IN Anywhere 443 ALLOW IN Anywhere 22222 ALLOW IN Anywhere

    Read the article

  • software to view random images

    - by Forward Mails
    Is there any software available where in if i give the url or website it should randomly or in whatever manner show only images from that website.For example if mention www.wallpaper.com in the application, it should randomly keep on showing images from that website, without having me to surf through the entire website.I know of website rippers but i dont wanna downlaod them, just view as slideshow.. Thanks

    Read the article

  • Random password generator: many, in columns, on command line, in Linux

    - by Adam Backstrom
    A while back, I came across a random password generator for the command line that displayed a grid of "memorable" passwords. Output was something like this: adam@host:~$ CantRememberThisCommand lkajsdf aksjdfl kqwrupo qwerpoi qwerklw zxlkelq The idea was that you could run this utility while someone was looking over your shoulder, and still pick a password with some level of secrecy due to the large number of choices. I cannot remember what this utility was called. Oh interwebs, can you help?

    Read the article

  • NUnit Random Module

    - by Tra5is
    I've noticed something curious. When I attach the VS2010 debugger to the nunit.exe running process I see a loaded module with no path and a randomly generated filename. I tried attaching WinDBG to the exact same instance of NUnit.exe and the module is NOT listed in the module list. I also can't find anything with Google so I'm hoping someone here could help out. Is this normal NUnit behavior or is something sneaky going on? Some examples of the module name: 1xmsg0gj x4max0ed koh9hmef

    Read the article

  • Random touchpad and keyboard freezes on new 10.10 installation

    - by ancaleth
    My touchpad and keyboard freeze up on my newly installed Ubuntu 10.10. I was using Ubuntu 10.4 via wubi before on this Laptop where this problem never occurred. (I did not migrate wubi or upgrade to 10.10, it's a fresh start. 64-bit on Dell Studio, plenty of RAM, plenty of free space on partition etc.) I can't say there is a pattern yet, once it happened during the download of packages with the Update Manager, once it was just using Firefox, no other program running. I was forced to shut down manually. In between these crashes the laptop was booted once, updates were installed etc., firefox was used and there weren't any problems. Both crashes should be in the attached kern.log and I noticed there were some error problems before the last crash (at the end, obviously). It seems the wireless was experiencing problems. This wasn't noticed on the user end, since the touchpad + keyboard were already frozen. kern.log: http://paste.ubuntu.com/552617/ How can the freezes be fixed?

    Read the article

  • Box2D random crash when adding joints

    - by user46624
    I'm currently working on a project which uses Box2D, when the player uses a certain key it should anchor to the ground. For that I use a weld joint, but when I add the joint the game will sometimes crash, it has a 1/10 change to crash. The error I recieve: Showing the controller Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 11 at org.jbox2d.dynamics.Island.add(Island.java:577) at org.jbox2d.dynamics.World.solve(World.java:1073) at org.jbox2d.dynamics.World.step(World.java:598) The code for adding the joints: WeldJointDef def = new WeldJointDef(); def.initialize(body, anchoredObject.body, body.getWorldCenter()); weldJoint = (WeldJoint) world.createJoint(def); I still get the error if I synchronize it

    Read the article

  • Avoid random disk names

    - by BarsMonster
    Hi! I have Ubuntu Server 10.04 1 system disk, and 5 disks in RAID-5 configuration. The problem is that names of these disks are changed from time to time, they are being randomly mixed from time to time (sda,b,c,d,e,f - so system disks might be sda, or sdc at different time for example).... is there any way to fix drive names, so that even if it's disconnected for example, no other drive can occupy this letter based on disk UUID or something?

    Read the article

  • Service Bus random thought for the day

    - by Michael Stephenson
    Its been really nice to see that over the last few weeks since we implemented our Dynamics CRM connecting via Azure Service Bus to backend line of business applications solution how much interest this has sparked within the rest of the organisation and other subsiduaries and how many people are coming up with ideas elsewhere on how they can leverage what we did and how simple it could be to connect their applications to the cloud. Im currently working with one of these companies and its refreshing to see how much interest can be spread by a good success story.

    Read the article

  • Wifi interface changes name seemingly at random

    - by ray_voelker
    I'm currently having some issues getting a wireless interface to work continuously under an install of Ubuntu 12.04.1 LTS. Some of the issues I'm experiencing include Connection will drop out after some time after it has initially worked. Interface will be a different name after a reboot. For example, wlan0 will become wlan4 when using the ifconfig -a command. Ubuntu will take a long time to boot, looking for network adapters. The purpose of this build is to function as a web kiosk in a library. The computer is supposed to boot up into a web browser, and allow for browsing of the catalog. For some reason this interface does not appear to be working as it should. Are there any explanations for some of these problems I'm having, and perhaps some solutions? The wireless card appears as this after doing an lspci ... Ralink corp. RT2561/RT61 802.11g PCI In the /etc/network/interfaces file I have the following configuration for the interface. auto wlan0 iface wlan0 inet dhcp wireless-essid UDwireless wireless-mode Managed Thanks in advance for help on this.

    Read the article

  • Random greyed unresponsive screen on netbook

    - by user643722
    I love my Asus Eee PC 1000 Ubuntu 12.04 netbook, but I have a little problem. As I use it, the screen will randomly turn grey and become unresponsive. I can then only wait, until perhaps 10-60 secs. later, when I can interact again. Only the bar at the top of my screen retains its colour throughout. I thought it might be Firefox, as I have a lot of tabs open. I installed Chromium, used it instead, and the problem remained. A while back I upgraded from 1 to 2 Gb RAM. So, I thought recently, maybe I should increase the swap-space. I have 738Mb of 7.2Gb free on root; and 2Gb of 28Gb free on my home drive. I bought a 32 Gb SD Card and assigned 4Gb to swap space. cat /proc/swaps reports that the partition is being used. Alas the problem remains. Does anyone know what's wrong with my machine? The SD Card has changed my machine somewhat, but the greying still happens. I ran free -m shortly after another episode, and received: total used free shared buffers cached Mem: 2004 1731 272 0 370 769 -/+ buffers/cache: 591 1412 Swap: 4073 0 4073 Update: Using 'top', I can see that compiz uses about 43% of the CPU (#1 position) when the greying occurs. After the greying, compiz drops back down to its usual 8% of CPU.

    Read the article

  • Debugging random reboots

    - by M132
    I'm running Ubuntu 14.04 with 3.16.1 kernel compiled from source, and when I leave my PC running for a long time, it always reboots after about 4-8 days. Nothing is displayed on the screen, everything just freezes for about 3 seconds (and if there was any sound playing, it keeps repeating over and over), and then reboots. This issue also affects kernels compiled by Canonical's build bots. I already tried to debug it with: rsyslog kexec-tools netconsole kernel module None of them seem to be working however. Are there any better methods to check, what exactly fails here? If there's an issue with RAM for example, shouldn't kernel report this in dmesg, or cause a kernel panic?

    Read the article

  • sound cuts out at random times

    - by jayb151
    Since I updated to 14.04, I have been having a problem with my sound. Every once in a while it "skips a beat." and when I say every once in a while, I mean 2-4 times a minute. It's literally that the sounds goes a way for about half a second. It doesn't pick up where it left off, but rather continues from where it should be...if that makes sense. So, if it cut in mid word, I wouldn't hear the end of the word. I didn't have this problem before I updated from 12.04. There is no popping or static, it just cuts for a fraction of a second. Any thoughts? Thanks!

    Read the article

  • Where does the version number come from?

    - by Robert Schneider
    I have a version control system (e.g. Subversion) and now I'd like to set up a build process. Now I have to create a version number and insert it into the system. But where does the version number come from and get into? Assume I want to use this common <major.<minor.<bugfix/revision scheme. Should I pass a number to the build script? Or should I pass arguments like increaseMajor, increaseMinor, increaseRevision? Or would you recommend to create a branch with the number which will be detected by the build script? I could imagine that the major and minor version number have to be put in manually somewhere. The revision number could be increased automaically. But still I don't know where I would place the major and minor number. In my case I have some php files that I would like to zip, but before I have to insert some version numbers into php file. I have edited this post to try to make my request clearer: I do not use Subversion, that was just an example. And I don't want to discuss the version number scheme. Imagine I want to create version 3.5.0 or 3.5.1. Would I pass this version number to a build script? Would the script create the branch in the repository with this number or would it expect that someone has already created this branch? Manually? Or would the build script look for name of the branch (e.g. '3.5.1) and use it for further things? And does the version number come from my brain or is it automatically created (I guess the major/minor number it comes from my little brain and revision number is created)? Or would you place the number into a file that may gets inserted into the repository? I guess if would use a release management tool I would insert the version number there. But I don't use one yet.

    Read the article

  • sampling integers uniformly efficiently in python using numpy/scipy

    - by user248237
    I have a problem where depending on the result of a random coin flip, I have to sample a random starting position from a string. If the sampling of this random position is uniform over the string, I thought of two approaches to do it: one using multinomial from numpy.random, the other using the simple randint function of Python standard lib. I tested this as follows: from numpy import * from numpy.random import multinomial from random import randint import time def use_multinomial(length, num_points): probs = ones(length)/float(length) for n in range(num_points): result = multinomial(1, probs) def use_rand(length, num_points): for n in range(num_points): rand(1, length) def main(): length = 1700 num_points = 50000 t1 = time.time() use_multinomial(length, num_points) t2 = time.time() print "Multinomial took: %s seconds" %(t2 - t1) t1 = time.time() use_rand(length, num_points) t2 = time.time() print "Rand took: %s seconds" %(t2 - t1) if __name__ == '__main__': main() The output is: Multinomial took: 6.58072400093 seconds Rand took: 2.35189199448 seconds it seems like randint is faster, but it still seems very slow to me. Is there a vectorized way to get this to be much faster, using numpy or scipy? thanks.

    Read the article

  • FreqTable with random values(#C)

    - by Sef
    Hello, I would like to make a frequency table with random numbers. So i have created a array that generates 11 random values between 0 and 9999. public void FillArrayRandom(int[] T) { Random Rndint = new Random(); for (int i=0; i < T.Length; i++) { T[i] = Rndint.Next(0, 9999); } }/*FillArrayRandom*/ The result i want is something alike this:(bar height up to 21) So this will be a constant. * * * * * * (the highest value will have the largest row/bar) * * * * 0 1 2 3 .....(index value's) 931 6669 10 8899 .... (up to 11 random values) My question is how do i exactly caculate the frequency between those 11 random values? The bars should have a relative relation with each other depending on there frequency. I would only like to use 1 single array in my program (for the generated values). F = (F * 21?) / ...? Really no clue how to obtain the proper results. If a frequency is =21 write * If a frequency is =20 write * If a frequency is =19 write * etc... Regards.

    Read the article

  • Is it possible to get a google voice number without already having a phone number?

    - by boost
    I'm sorry if this is the wrong place to post this, but I couldn't find a more suitable website in the stackexchange network. I currently have no phone number; I can make outgoing calls via the widget in gmail, but I cannot receive calls (as far as I know). I know that you can set up a google voice number to forward to google chat, and this is exactly what I want. The problem is, I can't get a google voice number in the first place, because it first requires that I have an existing phone number, even if I wouldn't use it. So, it is possible to skip providing an existing phone number, and just get a google voice number that forwards to google chat? Alternatively, is there any free phone service that can be used without a phone and lets you receive calls from any number? I realize I'm kind of asking for free candy, but, if it's out there, I'd be a fool

    Read the article

  • Unix: millionth number in the serie 2 3 4 6 9 13 19 28 42 63 ... ?

    - by HH
    It takes about minute to achieve 3000 in my comp but I need to know the millionth number in the serie. The definition is recursive so I cannot see any shortcuts except to calculate everything before the millionth number. How can you fast calculate millionth number in the serie? Serie Def n_{i+1} = \floor{ 3/2 * n_{i} } and n_{0}=2. Interestingly, only one site list the serie according to Goolge: this one. Too slow Bash code #!/bin/bash function serie { n=$( echo "3/2*$n" | bc -l | tr '\n' ' ' | sed -e 's@\\@@g' -e 's@ @@g' ); # bc gives \ at very large numbers, sed-tr for it n=$( echo $n/1 | bc ) #DUMMY FLOOR func } n=2 nth=1 while [ true ]; #$nth -lt 500 ]; do serie $n # n gets new value in the function throught global value echo $nth $n nth=$( echo $nth + 1 | bc ) #n++ done

    Read the article

  • Millionth number in the serie 2 3 4 6 9 13 19 28 42 63 ... ?

    - by HH
    It takes about minute to achieve 3000 in my comp but I need to know the millionth number in the serie. The definition is recursive so I cannot see any shortcuts except to calculate everything before the millionth number. How can you fast calculate millionth number in the serie? Serie Def n_{i+1} = \floor{ 3/2 * n_{i} } and n_{0}=2. Interestingly, only one site list the serie according to Goolge: this one. Too slow Bash code #!/bin/bash function serie { n=$( echo "3/2*$n" | bc -l | tr '\n' ' ' | sed -e 's@\\@@g' -e 's@ @@g' ); # bc gives \ at very large numbers, sed-tr for it n=$( echo $n/1 | bc ) #DUMMY FLOOR func } n=2 nth=1 while [ true ]; #$nth -lt 500 ]; do serie $n # n gets new value in the function throught global value echo $nth $n nth=$( echo $nth + 1 | bc ) #n++ done

    Read the article

  • Algorithm to increase odds of matching when randomly selecting

    - by Bryan
    I am building a mobile game loosely based on dual n-back http://brainworkshop.sourceforge.net/tutorial.html Now with the game I have 9 squares (numbered 1 through 9) and 9 letters (A through K) In the current code, I randomly select a square (e.g. 3) and a letter (e.g. C), then repeat the random selection for the next turn. For 1-back, I test whether either, neither or both match the previous turn. The problem with my current code is I get very few matches - I can go through many turns without having either match. How can I increase the match frequency, or alternatively decrease the randomness so a match is more likely? I am not looking for specific code (but pseudo-code would be fine) - just more an approach to increase match frequency.

    Read the article

< Previous Page | 19 20 21 22 23 24 25 26 27 28 29 30  | Next Page >