Random number issue
I'm making a mobile game and I can't seem to generate a random number successfully
Game.java:
import javax.microedition.lcdui.*;
import javax.microedition.midlet.*;
public class Game extends MIDlet implements CommandListener {
private Display theDisplay;
private GameCanvas canvas;
private Player p1;
private Block[] Grid;
static final Command exitCommand = new Command("Exit", Command.STOP, 1);
class Player {
public int x, y;
public int width=60, height=15;
public Player(int curX, int curY) {
x = curX;
y = curY;
public Game() {
setupGrid(5, 8, 5);
p1 = new Player(90, 250);
theDisplay = Display.getDisplay(this);
private void setupGrid(int rows, int cols, int cellspacing) {
Grid = new Block[200];
int ind = 0;
int posX = 10;
int posY = 20;
int colPosY;
int colPosX;
colPosY = posY;
colPosX = posX;
for(int x = 0; x < rows; x++) {
Grid[ind] = new Block(posX, posY);
colPosY = posY;
for(int y = 0; y < cols; y++) {
ind++;
colPosX += 20+cellspacing;
colPosY = posY;
Grid[ind] = new Block(colPosX, colPosY);
colPosX = posX;
posY += 15+cellspacing;
ind++;
class Block {
public int x, y;
public int Health;
public int r = 0, g = 0, b = 0;
public Block(int curX, int curY) {
x = curX;
y = curY;
double rand = Math.random()*5;
if(rand > 0 && rand < 2) {
g = 255;
r = 0;
b = 0;
if(rand > 2 && rand < 4) {
r = 255;
g = 0;
b = 0;
if(rand > 3 && rand < 5) {
b = 255;
g = 0;
r = 0;
class GameCanvas extends Canvas {
private int width;
private int height;
GameCanvas() {
width = getWidth();
height = getHeight();
public void paint(Graphics g) {
g.setColor(0, 0, 0);
g.fillRect(0, 0, width, height);
g.setColor(100, 100, 100);
g.fillRect(p1.x, p1.y, p1.width, p1.height);
for(int x = 0; x < Grid.length; x++) {
if(Grid[x] != null) {
g.setColor(Grid[x].r, Grid[x].g, Grid[x].b);
g.fillRect(Grid[x].x, Grid[x].y, 20, 10);
public void keyPressed(int keyCode) {
int key = getGameAction(keyCode);
if(key == LEFT && p1.x > 0) {
p1.x-=4;
else if(key == RIGHT && p1.x < canvas.width-p1.width) {
p1.x+=4;
repaint();
protected void startApp() throws MIDletStateChangeException {
canvas = new GameCanvas();
canvas.addCommand(exitCommand);
canvas.setCommandListener(this);
theDisplay.setCurrent(canvas);
public void pauseApp() { }
public void destroyApp(boolean unconditional) { }
public void commandAction(Command c, Displayable d) {
if(c == exitCommand) {
destroyApp(false);
notifyDestroyed();
}Game.java:58: cannot find symbol
symbol : method random()
location: class java.lang.Math
double rand = Math.random()*5;
^
1 error
Line 58:
double rand = Math.random()*5;
b1nary wrote:
Unfortunately, no - it won't work. Prior to posting this thread I researched different ways to generate random numbers but, apparently, the WTK only allows certain packages to be recognized.You can always write your own generator. For portability I use
* Uniform random number generator.
* <p>
* Based on
* <blockquote>
* <pre>
* Efficient and Portable Combined Random Number Generators
* <a href="http://www.iro.umontreal.ca/~lecuyer">Pierre L'Ecuyer</a>
* Communications of the ACM
* June 1988 Volume 31 Number 6
* </pre>
* </blockquote>
* @author Sabre
public class Ecuyer
* Constructs the generator based on two starting seeds.
* <p>
* Two generators using the same pair of seeds will produce
* exactly the same sequence of pseudo random numbers.
* @param seed1 the starting seed.
* @param seed2 the second starting seed.
public Ecuyer(int seed1, int seed2)
s1 = (seed1 > 0) ? seed1 : 1;
s2 = (seed2 > 0) ? seed2 : 1;
* Constructs the generator based on a starting seed.
* <p>
* Two generators using the same seeds will produce
* exactly the same sequence of pseudo random numbers.
* @param seed the starting seed.
public Ecuyer(long seed)
this((int) ((seed >> 32) & 0x7fffffff), (int) (seed & 0x7fffffff));
* Constructs a generator using the current time as seed.
public Ecuyer()
this(System.currentTimeMillis());
* Returns the next random number
* @return the next random number
public double nextValue()
// m = 2147483563, a = 40014
int k = s1 / q1;
s1 = a1 * (s1 - k * q1) - k * r1;
if (s1 < 0)
s1 += m1;
// m = 2147483399, a = 40692
int k = s2 / q2;
s2 = a2 * (s2 - k * q2) - k * r2;
if (s2 < 0)
s2 += m2;
int z = s1 - s2;
if (z < 0)
z += m1;
return z * 4.656613e-10;
static final int m1 = 2147483563;
static final int a1 = 40014;
static final int q1 = 53668;
static final int r1 = 12211;
static final int m2 = 2147483399;
static final int a2 = 40692;
static final int q2 = 52774;
static final int r2 = 3791;
private int s1;
private int s2;
}Make sure you test it thoroughly before committing to it.
Similar Messages
-
Random Number Generator issues
Ok so I have an issue. I'm supposed to create a GUI app that has a frame that contains both a button and a textfield. When the button is pressed then a random number between 1 and 10 should appear in the textfield. I've got an illegal start of expression on line 49 which is the last private void...
So what have I done wrong?
* randomnumber.java
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.util.Random;
public class randomnumber extends JFrame
Random randomObject = new Random();
// declare controls used
static JButton startButton = new JButton();
static JTextField startTextField = new JTextField();
public static void main(String args[])
new randomnumber().show();
public randomnumber()
// frame constructor
setTitle("Random Number Generator");
getContentPane().setLayout(new GridBagLayout());
// add controls
GridBagConstraints gridConstraints = new GridBagConstraints();
startButton.setText("Generate a Number");
gridConstraints.gridx = 0;
gridConstraints.gridy = 0;
getContentPane().add(startButton, gridConstraints);
startButton.addActionListener(new ActionListener()
public void actionPerformed(ActionEvent e)
startButtonActionPerformed(e);
startTextField.setText("");
startTextField.setColumns(15);
gridConstraints.gridx = 2;
gridConstraints.gridy = 0;
getContentPane().add(startTextField, new GridBagConstraints());
private void startButtonActionPerformed(ActionEvent e)
myInt = randomObject.nextInt(11);
startTextField.setText(String.valueOf(myInt));
}Edited by: Hessmix on Oct 17, 2007 6:15 PMpublic randomnumber()
// frame constructor
setTitle("Random Number Generator");
getContentPane().setLayout(new GridBagLayout());
// add controls
GridBagConstraints gridConstraints = new GridBagConstraints();
startButton.setText("Generate a Number");
gridConstraints.gridx = 0;
gridConstraints.gridy = 0;
getContentPane().add(startButton, gridConstraints);
startButton.addActionListener(new ActionListener()
public void actionPerformed(ActionEvent e)
startButtonActionPerformed(e);
startTextField.setText("");
startTextField.setColumns(15);
gridConstraints.gridx = 2;
gridConstraints.gridy = 0;
getContentPane().add(startTextField, new GridBagConstraints());
}//<< Add a brace here
private void startButtonActionPerformed(ActionEvent e)
myInt = randomObject.nextInt(11);
startTextField.setText(String.valueOf(myInt));
}Did you add that brace? -
Another Mavericks Random Restart issue...
I've seen lots of discussions about these issues, but nothing definitive that will simply fix our problems. For the last month I've been trying the various suggestions offered on these forums: turning off the Energy Saver stuff, auto logging in, etc, but still having intermittent random restart issues.
I called Apple this morning and went through these trouble shooting steps with their tech:
1) Reboot to Recovery Mode (cmd-r)
2) Disk First Aid to repair (success)
3) Disk First Aid to Verify Disk (no trouble found. Verified)
30 minutes after hanging up the phone, BAM. Random restart again. Seems like I'm always pressing a keyboard key or mouse clicking when this happens. No matter if it's the trackpad, the wireless Apple Mouse, a USB mouse, the built in keyboard, or my external Matias keyboard.
My next step is to appeal to the gear heads here for any assistance they can offer. Thanks in advance for any input you can provide. Here's my EtreCheck report and latest panic report:
Fri Mar 14 13:47:54 2014
panic(cpu 1 caller 0xffffff7f8626ffb0): "GPU Panic: [<None>] 5 3 7f 0 0 0 0 3 : NVRM[0/1:0:0]: Read Error 0x00000100: CFG 0xffffffff 0xffffffff 0xffffffff, BAR0 0xd2000000 0xffffff80fc329000 0x0a5480a2, D0, P3/4\n"@/SourceCache/AppleGraphicsControl/AppleGraphicsControl-3.4.35/src/Apple MuxControl/kext/GPUPanic.cpp:127
Backtrace (CPU 1), Frame : Return Address
0xffffff80f42b2d50 : 0xffffff8003e22fa9
0xffffff80f42b2dd0 : 0xffffff7f8626ffb0
0xffffff80f42b2ea0 : 0xffffff7f84aadeab
0xffffff80f42b2f60 : 0xffffff7f84b7749a
0xffffff80f42b2fa0 : 0xffffff7f84b7750a
0xffffff80f42b3010 : 0xffffff7f84df6056
0xffffff80f42b3140 : 0xffffff7f84b9ab39
0xffffff80f42b3160 : 0xffffff7f84ab48fd
0xffffff80f42b3210 : 0xffffff7f84ab2408
0xffffff80f42b3410 : 0xffffff7f84ab3d57
0xffffff80f42b34e0 : 0xffffff7f85903e1d
0xffffff80f42b3660 : 0xffffff7f85903823
0xffffff80f42b3670 : 0xffffff7f858c8af0
0xffffff80f42b3680 : 0xffffff7f858c8b65
0xffffff80f42b3690 : 0xffffff7f858aa931
0xffffff80f42b36d0 : 0xffffff7f858acea5
0xffffff80f42b3700 : 0xffffff7f858fd970
0xffffff80f42b3780 : 0xffffff7f858e5ae0
0xffffff80f42b37e0 : 0xffffff7f858e63da
0xffffff80f42b3830 : 0xffffff7f858e68c0
0xffffff80f42b38a0 : 0xffffff7f858e6fc8
0xffffff80f42b38e0 : 0xffffff7f858b3fea
0xffffff80f42b3a60 : 0xffffff7f858e3940
0xffffff80f42b3b20 : 0xffffff7f858b2ad9
0xffffff80f42b3b70 : 0xffffff80042cc7b6
0xffffff80f42b3b90 : 0xffffff80042cddb1
0xffffff80f42b3bf0 : 0xffffff80042cb81f
0xffffff80f42b3d40 : 0xffffff8003eb6558
0xffffff80f42b3e50 : 0xffffff8003e26bf1
0xffffff80f42b3e80 : 0xffffff8003e139f5
0xffffff80f42b3ef0 : 0xffffff8003e1e043
0xffffff80f42b3f70 : 0xffffff8003ec976d
0xffffff80f42b3fb0 : 0xffffff8003ef3b46
Kernel Extensions in backtrace:
com.apple.nvidia.classic.NVDAResmanTesla(8.2.4)[80472F2E-D31D-32C4-88BA-2EB3D63 C159F]@0xffffff7f84a5e000->0xffffff7f84cc6fff
dependency: com.apple.iokit.IOPCIFamily(2.9)[EDA75271-4E9D-34E7-A2C5-14F0C8817D37]@0xffffff 7f844bb000
dependency: com.apple.iokit.IONDRVSupport(2.4.1)[999E29DA-D513-3544-89D1-9885B728A098]@0xff ffff7f84a4e000
dependency: com.apple.iokit.IOGraphicsFamily(2.4.1)[4421462D-2B1F-3540-8EEA-9DFCB0565E39]@0 xffffff7f84a0b000
com.apple.driver.AppleMuxControl(3.4.35)[1BFF66C1-65E4-3BB3-9DEE-B61C3137019B]@ 0xffffff7f86262000->0xffffff7f86274fff
dependency: com.apple.driver.AppleGraphicsControl(3.4.35)[09897896-ACBD-36B5-B1D4-0CCC4000E 3B3]@0xffffff7f8625a000
dependency: com.apple.iokit.IOACPIFamily(1.4)[045D5D6F-AD1E-36DB-A249-A346E2B48E54]@0xfffff f7f84809000
dependency: com.apple.iokit.IOPCIFamily(2.9)[EDA75271-4E9D-34E7-A2C5-14F0C8817D37]@0xffffff 7f844bb000
dependency: com.apple.iokit.IOGraphicsFamily(2.4.1)[4421462D-2B1F-3540-8EEA-9DFCB0565E39]@0 xffffff7f84a0b000
dependency: com.apple.driver.AppleBacklightExpert(1.0.4)[E04639C5-D734-3AB3-A682-FE66694C66 53]@0xffffff7f8625d000
com.apple.nvidia.classic.NVDANV50HalTesla(8.2.4)[B0E6AAA7-E970-3D81-8B43-145D56 A3A4AC]@0xffffff7f84cd1000->0xffffff7f84f7afff
dependency: com.apple.nvidia.classic.NVDAResmanTesla(8.2.4)[80472F2E-D31D-32C4-88BA-2EB3D63 C159F]@0xffffff7f84a5e000
dependency: com.apple.iokit.IOPCIFamily(2.9)[EDA75271-4E9D-34E7-A2C5-14F0C8817D37]@0xffffff 7f844bb000
com.apple.GeForceTesla(8.2.4)[B6C71E9A-E304-354B-80AD-C69C9032D367]@0xffffff7f8 58a1000->0xffffff7f8596bfff
dependency: com.apple.iokit.IOPCIFamily(2.9)[EDA75271-4E9D-34E7-A2C5-14F0C8817D37]@0xffffff 7f844bb000
dependency: com.apple.iokit.IONDRVSupport(2.4.1)[999E29DA-D513-3544-89D1-9885B728A098]@0xff ffff7f84a4e000
dependency: com.apple.iokit.IOGraphicsFamily(2.4.1)[4421462D-2B1F-3540-8EEA-9DFCB0565E39]@0 xffffff7f84a0b000
dependency: com.apple.nvidia.classic.NVDAResmanTesla(8.2.4)[80472F2E-D31D-32C4-88BA-2EB3D63 C159F]@0xffffff7f84a5e000
BSD process name corresponding to current thread: WindowServer
Mac OS version:
13C64
Kernel version:
Darwin Kernel Version 13.1.0: Thu Jan 16 19:40:37 PST 2014; root:xnu-2422.90.20~2/RELEASE_X86_64
Kernel UUID: 9FEA8EDC-B629-3ED2-A1A3-6521A1885953
Kernel slide: 0x0000000003c00000
Kernel text base: 0xffffff8003e00000
System model name: MacBookPro6,2 (Mac-F22586C8)
System uptime in nanoseconds: 6346914490186
last loaded kext at 2093957006128: com.apple.driver.AppleIntelMCEReporter 104 (addr 0xffffff7f86379000, size 49152)
last unloaded kext at 2198032337307: com.apple.driver.AppleIntelMCEReporter 104 (addr 0xffffff7f86379000, size 32768)
loaded kexts:
com.quark.driver.Tether64 1.1.0d3
com.iospirit.driver.rbiokithelper 1.24
com.logmein.driver.LogMeInSoundDriver 1.0.3
com.honestech.htvad 1
com.squirrels.driver.AirParrotSpeakers 1.8
at.obdev.nke.LittleSnitch 4052
com.oxsemi.driver.OxsemiDeviceType00 1.28.13
com.apple.driver.AppleHWSensor 1.9.5d0
com.apple.driver.AppleBluetoothMultitouch 80.14
com.apple.driver.AGPM 100.14.15
com.apple.driver.AudioAUUC 1.60
com.apple.filesystems.autofs 3.0
com.apple.iokit.IOBluetoothSerialManager 4.2.3f10
com.apple.driver.AppleMikeyHIDDriver 124
com.apple.driver.AppleMikeyDriver 2.6.0f1
com.apple.driver.AppleHDA 2.6.0f1
com.apple.driver.AppleIRController 4000
com.apple.GeForceTesla 8.2.4
com.apple.driver.AppleSMCPDRC 1.0.0
com.apple.driver.AppleSMCLMU 2.0.4d1
com.apple.driver.AppleLPC 1.7.0
com.apple.driver.AppleIntelHDGraphics 8.2.4
com.apple.driver.AppleIntelHDGraphicsFB 8.2.4
com.apple.iokit.IOUserEthernet 1.0.0d1
com.apple.Dont_Steal_Mac_OS_X 7.0.0
com.apple.driver.AppleHWAccess 1
com.apple.driver.AppleMuxControl 3.4.35
com.apple.driver.AppleUpstreamUserClient 3.5.13
com.apple.driver.AppleMCCSControl 1.1.12
com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport 4.2.3f10
com.apple.driver.ACPI_SMC_PlatformPlugin 1.0.0
com.apple.driver.SMCMotionSensor 3.0.4d1
com.apple.driver.AppleUSBTCButtons 240.2
com.apple.driver.AppleUSBTCKeyboard 240.2
com.apple.driver.AppleUSBCardReader 3.4.1
com.apple.AppleFSCompression.AppleFSCompressionTypeDataless 1.0.0d1
com.apple.AppleFSCompression.AppleFSCompressionTypeZlib 1.0.0d1
com.apple.BootCache 35
com.apple.iokit.SCSITaskUserClient 3.6.6
com.apple.driver.XsanFilter 404
com.apple.iokit.IOAHCIBlockStorage 2.5.1
com.apple.driver.AppleUSBHub 666.4.0
com.apple.driver.AirPort.Brcm4331 700.20.22
com.apple.iokit.AppleBCM5701Ethernet 3.8.1b2
com.apple.driver.AppleAHCIPort 3.0.0
com.apple.driver.AppleFWOHCI 4.9.9
com.apple.driver.AppleUSBEHCI 660.4.0
com.apple.driver.AppleSmartBatteryManager 161.0.0
com.apple.driver.AppleACPIButtons 2.0
com.apple.driver.AppleRTC 2.0
com.apple.driver.AppleHPET 1.8
com.apple.driver.AppleSMBIOS 2.1
com.apple.driver.AppleACPIEC 2.0
com.apple.driver.AppleAPIC 1.7
com.apple.driver.AppleIntelCPUPowerManagementClient 216.0.0
com.apple.nke.applicationfirewall 153
com.apple.security.quarantine 3
com.apple.driver.AppleIntelCPUPowerManagement 216.0.0
com.apple.driver.IOBluetoothHIDDriver 4.2.3f10
com.apple.driver.AppleMultitouchDriver 245.13
com.apple.AppleGraphicsDeviceControl 3.4.35
com.apple.kext.triggers 1.0
com.apple.iokit.IOSerialFamily 10.0.7
com.apple.driver.DspFuncLib 2.6.0f1
com.apple.vecLib.kext 1.0.0
com.apple.nvidia.classic.NVDANV50HalTesla 8.2.4
com.apple.iokit.IOFireWireIP 2.2.6
com.apple.driver.AppleSMBusPCI 1.0.12d1
com.apple.iokit.IOSurface 91
com.apple.iokit.IOBluetoothFamily 4.2.3f10
com.apple.iokit.IOAudioFamily 1.9.5fc2
com.apple.kext.OSvKernDSPLib 1.14
com.apple.driver.AppleGraphicsControl 3.4.35
com.apple.driver.AppleBacklightExpert 1.0.4
com.apple.driver.AppleSMBusController 1.0.11d1
com.apple.nvidia.classic.NVDAResmanTesla 8.2.4
com.apple.iokit.IONDRVSupport 2.4.1
com.apple.iokit.IOBluetoothHostControllerUSBTransport 4.2.3f10
com.apple.driver.AppleHDAController 2.6.0f1
com.apple.iokit.IOGraphicsFamily 2.4.1
com.apple.iokit.IOHDAFamily 2.6.0f1
com.apple.driver.IOPlatformPluginLegacy 1.0.0
com.apple.driver.IOPlatformPluginFamily 5.7.0d10
com.apple.driver.AppleSMC 3.1.8
com.apple.driver.AppleUSBMultitouch 240.9
com.apple.iokit.IOUSBHIDDriver 660.4.0
com.apple.iokit.IOUSBMassStorageClass 3.6.0
com.apple.driver.AppleUSBMergeNub 650.4.0
com.apple.driver.AppleUSBComposite 656.4.1
com.apple.iokit.IOSCSIMultimediaCommandsDevice 3.6.6
com.apple.iokit.IOBDStorageFamily 1.7
com.apple.iokit.IODVDStorageFamily 1.7.1
com.apple.iokit.IOCDStorageFamily 1.7.1
com.apple.iokit.IOSCSIBlockCommandsDevice 3.6.6
com.apple.iokit.IOAHCISerialATAPI 2.6.1
com.apple.iokit.IOSCSIArchitectureModelFamily 3.6.6
com.apple.iokit.IO80211Family 630.35
com.apple.iokit.IOUSBUserClient 660.4.2
com.apple.iokit.IOEthernetAVBController 1.0.3b4
com.apple.driver.mDNSOffloadUserClient 1.0.1b5
com.apple.iokit.IONetworkingFamily 3.2
com.apple.iokit.IOAHCIFamily 2.6.5
com.apple.iokit.IOFireWireFamily 4.5.5
com.apple.iokit.IOUSBFamily 675.4.0
com.apple.driver.AppleEFINVRAM 2.0
com.apple.driver.AppleEFIRuntime 2.0
com.apple.iokit.IOHIDFamily 2.0.0
com.apple.iokit.IOSMBusFamily 1.1
com.apple.security.sandbox 278.11
com.apple.kext.AppleMatch 1.0.0d1
com.apple.security.TMSafetyNet 7
com.apple.driver.AppleKeyStore 2
com.apple.driver.DiskImages 371.1
com.apple.iokit.IOStorageFamily 1.9
com.apple.iokit.IOReportFamily 23
com.apple.driver.AppleFDEKeyStore 28.30
com.apple.driver.AppleACPIPlatform 2.0
com.apple.iokit.IOPCIFamily 2.9
com.apple.iokit.IOACPIFamily 1.4
com.apple.kec.pthread 1
com.apple.kec.corecrypto 1.0
=========================
Hardware Information:
MacBook Pro (15-inch, Mid 2010)
MacBook Pro - model: MacBookPro6,2
1 2.53 GHz Intel Core i5 CPU: 2 cores
8 GB RAM
Video Information:
Intel HD Graphics - VRAM: 288 MB
NVIDIA GeForce GT 330M - VRAM: 256 MB
System Software:
OS X 10.9.2 (13C64) - Uptime: 0 days 0:13:4
Disk Information:
Hitachi HTS541010A9E680 disk0 : (1 TB)
EFI (disk0s1) <not mounted>: 209.7 MB
1TBHD (disk0s2) / [Startup]: 999.35 GB (124.43 GB free)
Recovery HD (disk0s3) <not mounted>: 650 MB
MATSHITADVD-R UJ-898
USB Information:
Apple Internal Memory Card Reader
Apple Inc. BRCM2070 Hub
Apple Inc. Bluetooth USB Host Controller
Apple Inc. Apple Internal Keyboard / Trackpad
Apple Computer, Inc. IR Receiver
Apple Inc. Built-in iSight
FireWire Information:
Thunderbolt Information:
Configuration files:
/etc/hosts - Count: 60
Kernel Extensions:
com.oxsemi.driver.OxsemiDeviceType00 (1.28.13 - SDK 10.5)
at.obdev.nke.LittleSnitch (4052 - SDK 10.8)
com.iospirit.driver.rbiokithelper (1.24 - SDK 10.6)
com.squirrels.driver.AirParrotSpeakers (1.8 - SDK 10.8)
com.honestech.htvad (1 - SDK 10.6)
com.logmein.driver.LogMeInSoundDriver (1.0.3 - SDK 10.5)
com.quark.driver.Tether64 (1.1.0d3 - SDK 10.6)
Startup Items:
APCTrackerServer: Path: /Library/StartupItems/APCTrackerServer
DynDNSUpdater: Path: /Library/StartupItems/DynDNSUpdater
Squeezebox: Path: /Library/StartupItems/Squeezebox
Launch Daemons:
[System] at.obdev.littlesnitchd.plist 3rd-Party support link
[System] com.adobe.fpsaud.plist 3rd-Party support link
[System] com.adobe.SwitchBoard.plist 3rd-Party support link
[System] com.adobe.versioncueCS4.plist 3rd-Party support link
[System] com.barebones.bbedit.plist 3rd-Party support link
[System] com.bombich.ccc.plist 3rd-Party support link
[System] com.caphyon.awrserver.plist 3rd-Party support link
[invalid] com.dymo.pnpd.plist
[System] com.google.keystone.daemon.plist 3rd-Party support link
[System] com.hidden.daemon.plist 3rd-Party support link
[System] com.iospirit.candelair.daemon.plist 3rd-Party support link
[System] com.iospirit.candelair.sync.plist 3rd-Party support link
[System] com.lacie.desktopmanager.service.plist 3rd-Party support link
[System] com.logmein.logmeinblanker.plist 3rd-Party support link
[System] com.logmein.logmeinserver.plist 3rd-Party support link
[System] com.logmein.raupdate.plist 3rd-Party support link
[System] com.oracle.java.Helper-Tool.plist 3rd-Party support link
[System] com.rogueamoeba.hermes.plist 3rd-Party support link
[System] com.tether.plist 3rd-Party support link
Launch Agents:
[System] at.obdev.LittleSnitchUIAgent.plist 3rd-Party support link
[System] com.adobe.AAM.Updater-1.0.plist 3rd-Party support link
[System] com.adobe.AdobeCreativeCloud.plist 3rd-Party support link
[System] com.adobe.CS4ServiceManager.plist 3rd-Party support link
[System] com.adobe.CS5ServiceManager.plist 3rd-Party support link
[System] com.extensis.FMCore.plist 3rd-Party support link
[System] com.google.keystone.agent.plist 3rd-Party support link
[System] com.lacie.eventsactions.launcher.agent.plist 3rd-Party support link
[System] com.logmein.logmeingui.plist 3rd-Party support link
[System] com.logmein.logmeinguiagent.plist 3rd-Party support link
[System] com.logmein.logmeinguiagentatlogin.plist 3rd-Party support link
[System] com.oracle.java.Java-Updater.plist 3rd-Party support link
User Launch Agents:
[not loaded] com.adobe.AAM.Updater-1.0.plist 3rd-Party support link
[not loaded] com.adobe.ARM.[...].plist 3rd-Party support link
[not loaded] com.c-command.SpamSieve.LaunchAgent.plist 3rd-Party support link
[not loaded] com.cnet.ttengine.plist 3rd-Party support link
[not loaded] com.facebook.videochat.[redacted].plist 3rd-Party support link
[not loaded] com.spotify.webhelper.plist 3rd-Party support link
[not loaded] ws.agile.1PasswordAgent.plist 3rd-Party support link
User Login Items:
Default Folder X Helper
Dropbox
FastScripts
Fantastical
Creative Cloud
Internet Plug-ins:
JavaPlugin2_NPAPI: Version: 14.9.0 - SDK 10.7
AdobePDFViewerNPAPI: Version: 11.0.04 - SDK 10.6 3rd-Party support link
Flash Player: Version: 12.0.0.77 - SDK 10.6 3rd-Party support link
AdobePDFViewer: Version: 9.3.0 3rd-Party support link
LogMeInSafari32: Version: 1.0.961 - SDK 10.7 3rd-Party support link
Photo Center Plugin: Version: Photo Center Plugin 1.1.2.2 3rd-Party support link
googletalkbrowserplugin: Version: 5.1.7.17873 3rd-Party support link
iPhotoPhotocast: Version: 7.0
DYMO Safari Addin: Version: (null) - SDK 10.4 3rd-Party support link
DirectorShockwave: Version: 11.5.2r602 3rd-Party support link
Yahoo! Installer 3: Version: 1.0.128 3rd-Party support link
FlashPlayer-10.6: Version: 12.0.0.77 - SDK 10.6 3rd-Party support link
AdobeAAMDetect: Version: AdobeAAMDetect 2.0.0.0 - SDK 10.7 3rd-Party support link
AmazonMP3DownloaderPlugin: Version: AmazonMP3DownloaderPlugin 1.0.17 3rd-Party support link
QuickTime Plugin: Version: 7.7.3
AmazonMP3DownloaderPlugin1017277: Version: AmazonMP3DownloaderPlugin 1.0.17 3rd-Party support link
Silverlight: Version: 5.1.10411.0 - SDK 10.6 3rd-Party support link
npgtpo3dautoplugin: Version: 0.1.44.29 - SDK 10.5 3rd-Party support link
LogMeIn: Version: 1.0.961 - SDK 10.7 3rd-Party support link
Google Earth Web Plug-in: Version: 5.2 3rd-Party support link
Default Browser: Version: 537 - SDK 10.9
DYMO NPAPI Addin: Version: 1.0 - SDK 10.4 3rd-Party support link
Flip4Mac WMV Plugin: Version: 3.0.0.126 - SDK 10.8 3rd-Party support link
o1dbrowserplugin: Version: 5.1.7.17873 3rd-Party support link
JavaAppletPlugin: Version: Java 7 Update 45 Outdated! Update
OfficeLiveBrowserPlugin: Version: 12.3.2 3rd-Party support link
Safari Extensions:
FastestTube: Version: 2.2.1.4
Web Snapper: Version: 3.2
AddThis: Version: 1.7
Ultimate Status Bar: Version: 1.2.5
1Password: Version: 4.1.0
Make It Short: Version: 1.5
Twitter for Safari: Version: 1.02
Add To Amazon Wish List: Version: 1.4
Audio Plug-ins:
BluetoothAudioPlugIn: Version: 1.0 - SDK 10.9
AirPlay: Version: 2.0 - SDK 10.9
AppleAVBAudio: Version: 203.2 - SDK 10.9
InstantOn: Version: 7.1.2 - SDK 10.8 3rd-Party support link
iSightAudio: Version: 7.7.3 - SDK 10.9
iTunes Plug-ins:
Quartz Composer Visualizer: Version: 1.4 - SDK 10.9
User Internet Plug-ins:
CitrixOnlineWebDeploymentPlugin: Version: 1.0.105 3rd-Party support link
3rd Party Preference Panes:
Adobe Version Cue CS4 3rd-Party support link
Aqueiss 3rd-Party support link
TechTracker 3rd-Party support link
Default Folder X 3rd-Party support link
Flash Player 3rd-Party support link
FlexCal 3rd-Party support link
Flip4Mac WMV 3rd-Party support link
Growl 3rd-Party support link
Java 3rd-Party support link
Logitech Control Center 3rd-Party support link
MacFUSE 3rd-Party support link
Perian 3rd-Party support link
RemoteTap 3rd-Party support link
Secrets 3rd-Party support link
SneakPeek Pro 3rd-Party support link
SynergyKM 3rd-Party support link
Old Applications:
Aimersoft DVD Ripper: Version: 2.6.1 - SDK 10.5 3rd-Party support link
RockMelt: Version: 0.9.50.549 - SDK 10.5 3rd-Party support link
Tether: Version: 2.1.0.3 - SDK 10.4 3rd-Party support link
Capster: Version: 1.6.5 - SDK 10.0 3rd-Party support link
Screenium: Version: 2.1.8 - SDK 10.5 3rd-Party support link
DYMO Label: Version: 8.4.1.1803 - SDK 10.4 3rd-Party support link
Dialectic: Version: 1.8.1 - SDK 10.5 3rd-Party support link
Transmit: Version: 4.1.7 - SDK 10.5 3rd-Party support link
SuperDuper 264: Version: 2.6.4 - SDK 10.4 3rd-Party support link
SuperDuper!: Version: 2.7.1 - SDK 10.4 3rd-Party support link
Remote Buddy: Version: 1.24.3 - SDK 10.4 3rd-Party support link
/Applications/Remote Buddy F/Remote Buddy.app
/Library/Frameworks/DYMO/DLS8/Addins
DYMO Excel Addin: Version: 8.4.1.1803 - SDK 10.4 3rd-Party support link
DYMO Word Addin: Version: 8.4.1.1803 - SDK 10.4 3rd-Party support link
SLLauncher: Version: 1.0 - SDK 10.5 3rd-Party support link
/Library/Application Support/Microsoft/Silverlight/OutOfBrowser/SLLauncher.app
Endicia: Version: 2.13.4 - SDK 10.5 3rd-Party support link
/Applications/Endicia/Endicia.app
Microsoft AutoUpdate: Version: 2.3.3 - SDK 10.4 3rd-Party support link
/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app
Aimersoft Helper Compact: Version: 2.2.5.6 - SDK 10.5 3rd-Party support link
/Users/[redacted]/Library/Application Support/Helper/Aimersoft Helper Compact.app
/Applications/iWork '09
Time Machine:
Skip System Files: NO
Mobile backups: ON
Auto backup: YES
Volumes being backed up:
1TBHD: Disk size: 930.71 GB Disk used: 814.83 GB
Destinations:
LaCie [Local]
Total size: 931.19 GB
Total number of backups: 21
Oldest backup: 2014-02-03 06:44:05 +0000
Last backup: 2014-03-13 14:14:06 +0000
Size of backup disk: Too small
Backup size 931.19 GB < (Disk used 814.83 GB X 3)
OWC 4TB HD [Local] (Last used)
Total size: 4
Total number of backups: 40
Oldest backup: 2013-05-29 23:16:35 +0000
Last backup: 2014-03-13 21:43:22 +0000
Size of backup disk: Excellent
Backup size 4 > (Disk size 930.71 GB X 3)
Time Machine details may not be accurate.
All volumes being backed up may not be listed.
Top Processes by CPU:
92% Dropbox
5% WindowServer
1% EtreCheck
1% Little Snitch Agent
0% Creative Cloud
Top Processes by Memory:
369 MB Safari
147 MB soagent
147 MB Dock
139 MB Finder
123 MB mds_stores
Virtual Memory Information:
2.66 GB Free RAM
3.49 GB Active RAM
762 MB Inactive RAM
1.11 GB Wired RAM
507 MB Page-ins
0 B Page-outsYou have a lot of 3rd party software installed which could be the problem. The below show in the crash report. Try uninstalling them using the developer's uninstall instructions.
com.quark.driver.Tether64 1.1.0d3
com.iospirit.driver.rbiokithelper 1.24
com.logmein.driver.LogMeInSoundDriver 1.0.3
com.honestech.htvad 1
com.squirrels.driver.AirParrotSpeakers 1.8
at.obdev.nke.LittleSnitch 4052
com.oxsemi.driver.OxsemiDeviceType00 -
In the I tunes library next to a random number of songs there is a circle with an exclamation point. The songs won't play and how do I get rid of this and what does it mean?
Hi rjs317,
Welcome to Apple Support Communities.
It sounds like there are some songs that iTunes isn't able to locate, the songs may have been moved to another folder or disk. The article linked below provides more information about the exclamation point symbol and provides suggestions that will resolve most missing media issues.
iTunes: Finding lost media and downloads
http://support.apple.com/kb/TS1408
I hope this helps.
-Jason -
Somehow a random number (white font on black square) appeared on the bottom of all my slides on keynote… it is always the same number regardless of the slide number I am… how can I remove it??
Sorry! I hope I didn't waste anybody's time. I should have looked first for previous posts and I would have seen other people having the same issue and how they solved it. Problem solved. Thanks
-
Random Number being changed to the same number for all rows
hello all,
first of all I want to mention that this problem start happening after 2.14 instalation of Power Query.
I'm creating new column in my query and setting all values to random numbers. The problem is that next step (doesn't matter what it do itself) somehow changes all those random numbers to the same random number for all lines.
here's code sample:
InsertedCustom = Table.AddColumn(RemovedColumns3, "Random Number", each Number.Random()),
InsertedCustom2 = Table.AddColumn(InsertedCustom, "Analyst Full Name", each [Analyst First Name]&" "&[Analyst Last Name]),
when I'm checking step by step, InsertedCustom creates new column and all values are being set randomly for all lines BUT when going to the next step (InsertedCustom2) all values in the column "Random Number" are being changed to the
same number (no matter that InsertedCustom2 itself should not be doing anything to column named "Random Number") . I even tried moving InsertedCustom step to the bottom of my code but it didn't help and still facing this issue.
p.s. updated my PQ to 2.15 - didn't helpThis is a known issue. Power Query assumes that functions are idempotent (given the same arguments, they produce the same result), which isn't true for Number.Random. Our optimization pipeline is turning Number.Random() into a constant in the scenario you
encountered, which results in all rows having the same value.
There's been some discussion of how to fix this, but that won't help you in the near term. Can you describe a bit more about your scenario and what you're trying to accomplish? Perhaps we can help you find a workaround.
Ehren -
Random NUMBER generator help..
Hi all,
i'm having issues with my random number generator i'm trying to fill my array with random numbers but i keep getting it filled with zeros.... can any one tell me what i'm doing wrong i can;t figure it out..
for (int i =0; i < 100; i++){
int x=(int) (Math.random());
data[i] = x;
}From the API "Returns a double value with a positive sign, greater than or equal to 0.0 and less than 1.0."
So casting the value to int is always going to result in a zero value.
You need to multiply by a value that is one larger than the value you want to be your maximum. For example:
int x = (int)(Math.random() * 100);
should create a random number from 0 to 99 -
Ideas on generating seeds for random number generators?
Does anyone here have any ideas or know of any good links to articles that discuss how to generate good seeds for random number generators?
I am aware that I could always probably call SecureRandom.generateSeed as one technique.
The major problem that I have with the above is that I have no idea how any given implementation of SecureRandom works, and whether or not it is any good. (For instance, Sun seems to hide their implementation outside of the normal JDK source tree; must be in one of their semi-proprietary sun packages...)
I thought about the problem a little, and I -think- that the implementation below ought to be OK. The javadocs describe the requirements that I am looking for as well as the implementation. The only issue that still bugs me is that maybe the hash function that I use is not 1-1, and so may not guarantee uniqueness, so I would especially like feedback on that.
Here's the code fragments:
* A seed value generating function for Random should satisfy these goals:
* <ol>
* <li>be unique per each call of this method</li>
* <li>be different each time the JVM is run</li>
* <li>be uniformly spread around the range of all possible long values</li>
* </ol>
* This method <i>attempts</i> to satisfy all of these goals:
* <ol>
* <li>
* an internal serial id field is incremented upon each call, so each call is guaranteed a different value;
* this field determines the high order bits of the result
* </li>
* <li>
* each call uses the result of {@link System#nanoTime System.nanoTime}
* to determine the low order bits of the result,
* which should be different each time the JVM is run (assuming that the system time is different)
* </li>
* <li>a hash algorithm is applied to the above numbers before putting them into the high and low order parts of the result</li>
* </ol>
* <b>Warning:</b> the uniqueness goals cannot be guaranteed because the hash algorithm, while it is of high quality,
* is not guaranteed to be a 1-1 function (i.e. 2 different input ints might get mapped to the same output int).
public static long makeSeed() {
long bitsHigh = ((long) HashUtil.enhance( ++serialNumber )) << 32;
long bitsLow = HashUtil.hash( System.nanoTime() );
return bitsHigh | bitsLow;
}and, in a class called HashUtil:
* Does various bit level manipulations of h which should thoroughly scramble its bits,
* which enhances its hash effectiveness, before returning it.
* This method is needed if h is initially a poor quality hash.
* A prime example: {@link Integer#hashCode Integer.hashCode} simply returns the int value,
* which is an extremely bad hash.
public static final int enhance(int h) {
// +++ the code below was taken from java.util.HashMap.hash
// is this a published known algorithm? is there a better one? research...
h += ~(h << 9);
h ^= (h >>> 14);
h += (h << 4);
h ^= (h >>> 10);
return h;
/** Returns a high quality hash for the long arg l. */
public static final int hash(long l) {
return enhance(
(int) (l ^ (l >>> 32)) // the algorithm on this line is the same as that used in Long.hashCode
}Correct me if I'm incorrect, but doesn't SecureRandom just access hardware sources entropy? Sources like /dev/random?What do you mean by hardware sources of entropy?
What you really want is some physical source of noise, like voltage fluctuations across a diode, or Johnson noise, or certain radioactive decay processes; see, for example
http://www.robertnz.net/true_rng.html
http://ietfreport.isoc.org/idref/draft-eastlake-randomness2/
this 2nd paper is terrific; see for example this section: http://ietfreport.isoc.org/idref/draft-eastlake-randomness2/#page-9
But is /dev/random equivalent to the above? Of course, this totally depends on how it is implemented; the 2nd paper cited above gives some more discussion:
http://ietfreport.isoc.org/idref/draft-eastlake-randomness2/#page-34
I am not sure if using inputs like keyboard, mouse, and disk events is quite as secure as, say, using Johnson noise; if my skimming of that paper is correct, he concludes that you need as many different partially random sources as possible, and even then "A hardware based random source is still preferable" (p. 13). But he appears to say that you can still do pretty good with these these sources if you take care and do things like deskew them. For instance, the common linix implementation of /dev/random at least takes those events and does some sophisticated math and hashing to try to further scramble the bits, which is what I am trying to simulate with my hashing in my makeSeed method.
I don't think Java can actually do any better than the time without using JNI. But I always like to be enlightened; is there a way for the JVM to generate some quality entropy?Well, the JVM probably cannot beat some "true" hardware device like diode noise, but maybe it can be as good as /dev/random: if /dev/random is relying on partially random events like keyboard, mouse, and disk events, maybe there are similar events inside the JVM that it could tap into.
Obviously, if you have a gui, you can with java tap into the same mouse and keyboard events as /dev/random does.
Garbage collection events would probably NOT be the best candidate, since they should be somewhat deterministic. (However, note that that paper cited above gives you techniques for taking even very low entropy sources and getting good randomness out of them; you just have to be very careful and know what you are doing.)
Maybe one source of partial randomness is the thread scheduler. Imagine that have one or more threads sleep, and when they wake up put that precise time of wakeup as an input into an entropy pool similar to the /dev/random pool. Each thread would then be put back to sleep after waking up, where its sleep time would also be a random number drawn from the pool. Here, you are hoping that the precise time of thread wakeup is equivalent in its randomness to keyboard, mouse, and disk events.
I wish that I had time to pursue this... -
A simple question on random number generation?
Hi,
This is a rather simple question and shows my newbieness quite blatantly!
I'm trying to generate a random number in a part of a test I have.
So, I have a little method which looks like this:
public int getRandomNumber(int number){
Random random = new Random(number);
return random.nextInt(number);
}And in my code I do int random = getRandomNumber(blah)...where blah is always the same number.
My problem is it always returns the same number. What am I missing here. I was under the impression that nextint(int n) was supposed to generate the number randomly!! Obviously I'm doing something wrong or not using the correct thing. Someone please point out my stupidity and point me in the right direction? TaI think the idea is that Random will generate the same pseudo-random sequence over and over if you don't supply a seed value. (The better to debug with, my dear.) When you're ready to put an app into production, the seed value should be the current system time in milliseconds to guarantee a new sequence with each run.
Do indeed move Random outside the loop. Think of it like a number factory - instantiate it once and let it pump out the random values for you as needed. -
How do I assign images to grid cells based on their random number value?
Hello everyone!
I need a good point (or shove) in the correct direction.
Background
I've created (with previous help from this forum) a 12 x 9 random number grid which cycles through the numbers 1 to 9 a total of twelve times each. I've then created a button which shuffles the current grid's cells each time it is clicked. I now want to use 9 images that I have imported as individual symbols into the library (I have given them each their own class titled "skin1," "skin2," ... "skin9") as cell labels or the equivalent. I have also set the images up as individual movie clips (using the .Sprite class as the extended base class but keeping the actual image class names in line with their object name, i.e. the "skin1" image is the "skin1.as" class).
Question
How do I assign these images to the grid cells based on their respective values (ranging from 1 to 9) and have them populate the grid each time I click the "shuffle" button? So for example, in my grid the numbers 1 through 9 randomly appear 12 times each. Every time the number 4 appears in a cell, I want it to be assigned to the image "skin4" (which is just a graphic that looks like a button and has a fancy number "4" printed on it). Below is a chunk of the code I am using to draw the grid cells with:
// Creates a grid cell when called by generateGrid().
private funciton drawCell(_numeral:int):Sprite
This is the code I am currently implementing to populate the grids with (although I
don't want to use text labels as I want to fill each grid with an image according
to its numerical value (1 to 9).
var _label:TextField = new TextField();
_label.multiline = _label.wordWrap = false;
_label.autoSize = "center";
_label.text = String(_numeral);
// Add numerical label to cell array.
cellLabels.push(_label);
var _s:Sprite = new Sprite();
_s.graphics.lineStyle(2, 0x019000);
_s.graphics.drawRect(30, 0, cellW, CellH);
_s.addChild(_label);
return _s;
While the following isn't working code, it will hopefully demonstrate what I want to achieve inside this function so I don't have to use the above snippet for text labels:
//This will "hopefully" create an array of all 9 images by calling their classes. var _imageArray:Array = [skin1, skin2, skin3, skin4, skin5 , skin6, skin7, skin8, skin9]; // This is what I want to happen for each cell using the above image array: for (i = 0; i < cells; i++) { if (_numeral == 1) { // Insert skin1 image for each instance of #1 in the grid. } if (_numeral == 2) { // Insert skin2 image for each instance of #2 in the grid. } ... if (_numeral == 9) { // Insert skin9 image for each instance of #9 in the grid. } }
Again, I don't want to use text labels. I have a custom skin graphic that I want to go over each number on the grid based on its numerical value (1 to 9). Any help with this is much appreciated!kglad,
Thank you for your help with this one. Using the code below, I have successfully populated my grid cells with the desired corresponding graphics. I noticed one thing though regarding my use of the shuffle button with this particular implementation: even though the numerical values residing in each cell get shuffled, the original images remain in the grid rather than being replaced by new ones. The first code snippet below is the revised cell drawing function including your help; the second snippet shows you my simple shuffle button function (where the problem lies, I think).
Snippet #1:
// Creates a grid cell when called by generateGrid().
private function drawCell(_numeral:int):Sprite
var _label:TextField = new TextField();
_label.multiline = _label.wordWrap = false;
_label.autoSize = "center";
// Creates a label that represents the numerical value of the cell.
cellLabels.push(_label);
var _s:Sprite = new Sprite();
_s.graphics.lineStyle(2, 0x019000);
_s.graphics.drawRect(30, 0, cellW, cellH);
// Physically adds the labels to the grid.
_s.addChild(_label);
// Assigns a graphic class to a cell based on its numerical value.
var _classRef:Class = Class(getDefinitionByName("skin" + _numeral));
// Undefined variable for holding graphic classes.
var _image:* = new _classRef();
// Lines the images up with the grid cells.
_image.x = 30;
// Physically adds a graphic on top of a cell label.
_s.addChild(_image);
return _s;
So far so good (although I question needing text labels at all if they are just going to remain invisible underneath the images, but enough about that for now). This next part is the reason that the images won't shuffle with the cell values, I think.
Snippet #2:
// When shuffleButton is clicked, this event shuffles
// the number array and fills the cellLabels with the new values.
private function onButtonShuffleClick(e:MouseEvent):void
// Shuffles the number array.
shuffle(numbers);
// Verifies the array has been shuffled.
trace("After shuffle:", numbers);
// Loop replaces old cellLabels with new number array values.
for (var i:int = 0; i < cells; i++)
cellLabels[i].text = String(numbers[i]);
As you can see, it never replaces the original images that populate the grid. I tried using the _s.removeChild(image) function but that didn't work, nor would copying/pasting some of the code from snippet #1 directly into this function as it would cause another instance of the images to be placed over top of the existing ones rather than actually swapping them out. Any continued help here is greatly appreciated!
PS Is there a quicker method for posting code into these forums without having to type it all out by hand again (i.e. copy/paste or drag/drop from my .fla or Notepad file directly into this thread)? -
What algorithm does Excel 2010 use for Pseudo Random Number Generation (MT19937?)
Does Excel 2010+ use the Mersenne Twister (MT19937) algorithm for Pseudo Random Number Generation (PRNG), implemented by the RAND() function?
This has been a nagging question for some time now, with "hints" that it indeed does. However, a relatively thorough search turns up no definitive documentation. The most direct indication is perhaps given by Guy Melard [Ref 9] where
he tests Excel 2010's RAND() function using the Crush battery of tests in TestU01 by L'Ecuyer & Simard. Melard references a "semi-official" indication that Microsoft did indeed implement MT19937 for the RAND() function in
Excel 2010, but this reference no longer seems to be available. http://office.microsoft.com/enus/excel-help/about-solver-HP005198368.aspx?pid=CH010004571033.
The other references below [Ref 1-10] document the history of the statistical suitability of the PRNG and probability distributions in various versions of Excel. This includes the Wichmann-Hill PRNG implementations supposedly (arguably) used in
Excel 2003 & 2007 for random number generation. But still, we have no answer as to which PRNG algorithm is used in
Excel 2010 (and 2013 for that matter).
Microsoft indicates that RAND() has been improved in Excel 2010; Microsoft states, "...and the RAND function now uses a new random number algorithm." (see https://support.office.com/en-ca/article/Whats-New-Changes-made-to-Excel-functions-355d08c8-8358-4ecb-b6eb-e2e443e98aac).
But no details are given on the actual algorithm. This is critical for Monte Carlo methods and many other applications.
Any help would be much appreciated. Thanks.
[Ref 1] B. McCullough, B. Wilson. On the Accuracy of Statistical Procedures in Microsoft Excel 97.
Computational Statistics & Data Analysis. Vol. 31 No. 1, pp 27-37. July 1999.
http://users.df.uba.ar/cobelli/LaboratoriosBasicos/excel97.pdf
[Ref 2]L. Knüsel. On the accuracy of the statistical distributions in Microsoft Excel 97. Computational Statistics & Data Analysis. Vol. 26 No. 3, pp 375-377. January 1998.
http://www.sciencedirect.com/science/article/pii/S0167947397817562
[Ref 3]B. McCullough, B. Wilson. On the Accuracy of Statistical Procedures in Microsoft Excel 2000 and Excel XP.
Computational Statistics & Data Analysis. Vol.40 No. 4, pp 713-721. October 2002.
https://www.researchgate.net/publication/222672996_On_the_accuracy_of_statistical_procedures_in_Microsoft_Excel_2000_and_Excel_XP/links/00b4951c314aac4702000000.pdf
[Ref 4] B. McCullough, B. Wilson. On the Accuracy of Statistical Procedures in Microsoft Excel 2003.
Computational Statistics & Data Analysis. Vol.49. No. 4, pp 1244-1252. June 2005.
http://www.pucrs.br/famat/viali/tic_literatura/artigos/planilhas/msexcel.pdf
[Ref 5] L. Knüsel. On the accuracy of statistical distributions in Microsoft Excel 2003. Computational Statistics & Data Analysis, Vol. 48, No. 3, pp 445-449. March 2005.
http://www.sciencedirect.com/science/article/pii/S0167947304000337
[Ref 6]B. McCullough, D.Heiser. On the Accuracy of Statistical Procedures in Microsoft Excel 2007.
Computational Statistics & Data Analysis. Vol.52. No. 10, pp 4570-4578. June 2008.
http://users.df.uba.ar/mricci/F1ByG2013/excel2007.pdf
[Ref 7] A. Yalta. The Accuracy of Statistical Distributions in Microsoft<sup>®</sup> Excel 2007. Computational Statistics & Data Anlaysis. Vol. 52 No. 10, pp 4579 – 4586. June 2008.
http://www.sciencedirect.com/science/article/pii/S0167947308001618
[Ref 8] B. McCullough. Microsoft Excel’s ‘Not The Wichmann-Hill’ Random Number Generators. Computational Statistics and Data Analysis. Vol.52. No. 10, pp 4587-4593. June 2008.
http://www.sciencedirect.com/science/article/pii/S016794730800162X
[Ref 9] G. Melard. On the Accuracy of Statistical Procedures in Microsoft Excel 2010. Computational Statistics. Vol.29 No. 5, pp 1095-1128. October 2014.
http://homepages.ulb.ac.be/~gmelard/rech/gmelard_csda23.pdf
[Ref 10] L. Knüsel. On the Accuracy of Statistical Distributions in Microsoft Excel 2010. Department of Statistics - University of Munich, Germany.
http://www.csdassn.org/software_reports/excel2011.pdfI found the same KB article:
https://support.microsoft.com/en-us/kb/828795
This was introduced (according to the article) in Excel 2003. Perhaps the references in notes 2 and 3 might help.
The article describes combining the results of 3 generators, each similar to a Multiply With Carry (MWC) generator, but with zero carry. MWC generators do very well on the Diehard battery of randomness tests (mentioned in your references), and have
very long periods. But using zero carry makes no sense to me.
Combining the three generators only helps if the periods of the 3 are relatively prime (despite what the article implies). Then the period of the result will be the product of the 3 periods. But without knowing the theory behind these generators, I have
no idea what the periods would be. The formulas for MWC generators fail here.
Richard Mueller - MVP Directory Services -
How to get a random number in a range?
as title
how to get a random number in a range?
like 2000~3000 thks :)int between 10 and 20 with the method Math.random():
public class Rnd
// Test
public static void main(String[] args)
int start=10, end = 30;
for (int i = 0; i < 10; i++)
int n = (int)(start + Math.random() * (end-start));
System.out.println(n);
}best regards. -
Creation of random number through system fields
Hi ,
I like to create a random number generation program.(apart form system time) .
I have noticed that system response time differs (minimal variation in terms of milliseconds) every time
when we execute a program .
In that case could i know how to get the system response time and interpretation time from system fields in program !
Note : I like to know the table in which these values can be retrieved (like TRDIR for other system fields)use these function modules.
QF05_RANDOM
RANDOM_AMOUNT. -
How to define "leading" random number in Infoset fpr parallel processing
Hello,
in Bankanalyzer we use an Infoset which consists of a selection across 4 ODS tables to gather data.
No matter which PACKNO fields we check or uncheck in the infoset definition screen (TA RSISET), the parallel frameworks always selects the same PACKNO field from one ODS table.
Unfortunately, the table that is selected by the framework is not suitable, because our
"leading" ODS table which holds most of our selection criteria is another one.
How to "convince" the parallel framework to select our leading table for the specification
of the PACKNO in addition (this would be times 20 faster due to better select options).
We even tried to assign "alternate characteristics" to the packnos we do not liek to use,
but it seems that note 999101 just fixes this for non-system-fields.
But for the random number a diffrent form routine is used in /BA1/LF3_OBJ_INDEX_READF01
fill_range_random instead of fill_range.
Has anyone managed to assign the PACKNO of his choice to the infoset selection?
How?
Thanks in advance
VolkerWell, it is a bit more complicated
ODS one, that the parallel framework selects for being the one to deliver the PACKNO
is about equal in size (~120GB each) to ODS two which has two significant field which cuts down the
amount of data to be retreived.
Currently we execute the generated SQL in the best possible manner (by faking some stats )
The problem is, that I'd like to have a Statement that has the PACKNO in the very same table.
PACKNO is a generated random number esp. to be used for parallel processing.
The job starts about 100 slaves
Each slave gets a packet to be processed from the framework, which is internaly represented
by a BETWEEN clause on this PACKNO. This is joined against ODS2 and then the selective fields
can be compared resultin in 90% of the already fetched rowes can be discarded.
Basicly it goes like
select ...
from
ods1 T_00,
ods2 T_01,
ods3 T_02,
ods4 T_03
where
... some key equivalence join-conditions ...
AND T_00.PACKNO BETWEEN '000000' and '000050' -- very selective on T_00
AND T_01.TYPE = '202' -- selective Value 10% on second table
I'd trying to change this to
AND T_01.PACKNO BETWEEN '000000' and '000050'
AND T_01.TYPE = '202' -- selective Value 10%
so I can use a combined Index on T_01 (TYPE;PACKNO)
This would be times 10 more selective on the driving table and due to the fact,
that T_00 would be joined for just the rows I need, about a calculated time 20-30 faster.
It really boosts when I do this in sqlplus
Hope this clearyfies a bit.
Problem is, that I can not change the code either for doing the
build of the packets or the one that executes the application.
I need to change the Inofset, so that the framework decides to build
proper SQL with T_01.PACKNO instead of T_00.PACKNO.
Thanks a lot
Volker -
[JS CS3] Check the pattern of a random number given a specific data ?
Hi all,
I succeed getting a random number of this look : d.dd (8.73 for ex)
I use Math.random()*(max-min)+min;
I want to check that this number respect a specific given increment.
To be clear :
If I set min to 0 and max to 10 for example.
The script returns a number like 8.56
Now, I have a increment like 0.2
I want the script to give me a number that can be d,d.2,d.4,d.6,d.8
BUT NOT d.78 or d.1
I guess I may use a while command but have no idea of the checking operation.
Any idea ?
Thanks in advance.
LoicMath to the rescue. You want a random integer div 5.
Math.floor(5*(Math.random()*(max-min)+min))/5 should do it.
Maybe you are looking for
-
Hello, I am trying to schedule a Webi report with Prompts through the .NET sdk. I get the report, set the prompts and then schedule the report. Unfortunately when i look at the report in InfoView it is not filtered by the parameters. They show up
-
Mac mini EFI Firmware Update 1.7 Not supported on system.
I am attempting to install the Mac mini EFI Firmware Update 1.7 on my 2012 Mac Mini (just purchased) to solve my flickering display problem. When trying to install the update, it states that the software is not supported on my system. I am connecte
-
Aspect Ratio - Black Bars Left and Right on Widescreen TV
Hi - I have downloaded a couple of TV series to my laptop PC using ITunes. These playback on my laptop screen filling the screen. I got an Apple TV yesterday, synced it with my Laptop ITunes library and there are black bars on either side of my 1080
-
I saved a pdf with a password to prevent printing. When I open the pdf with Adobe Reader, I want print the document with automatic. is this possible?? I used a many kinds method, all the scripts were refused because security level. please give me a a
-
Wierd Album Ordering With The New Artwork
With the Artwork view (the middle one of the three)... When im playing music on shuffle, when the song skips to a particular song, it moves that song up to the top of the list of the songs for that album. So instead of having the tracks sorted by Alb