text:
## jadefalcon Group Title Only two horizontal forces act on a 3.0 kg body that can move over a frictionless floor. One force is 9.0 N, acting due east, and the other is 8.0 N, acting 62° north of west. What is the magnitude of the body's acceleration? 2 years ago 2 years ago

1. Taufique

|dw:1332049690832:dw| the net force on the body =(9-8sin62)i^+(8cos62)j^ Apply vector method to find the magnitude of the net force. after it find the acceleration: acceleration=(magnitude of the net force)/mass of the body.

2. hosein

angle with normal or horizontal? if horizontal:$-8\cos62+90=ma$&$N+8\sin62=mg$

yeh if finding the xcoordinate use cos from what i know

4. hosein

ordinarily angle with horizontal|dw:1332050614025:dw|

i get 1.75m/s^2 but the answer is 2.9 m/s^2

6. Taufique

@hosein here Normal force will be equal to weight of the body.hence they will be cancel to each other.

i will try use pythagoras with vector notation

8. hosein

one the force has angle so it has component throgh normal

9. hosein

straight from the book...you don't consider gravity in this problem

11. hosein

why we use gravity !we have'nt got friction here so we don't use it

12. Taufique

@hosein,yes ,you can also do here but it is not necessary here

ah k i was just looking at your diagram...

14. hosein

2.9 m/s^2 and working is???

im still fiddling with angles to come up with an answer

ohh i see now

i think

19. hosein

i don't understand what are you saying

so 180deg mins 62degs =118degs so (9-8cos-118)/3=4.25 so (9-8sin118)/3=1.94 squareroot(4.25^2 + 1.94^2) = wrong answer arrrgh

21. Taufique

oh sorry the diagram is wrong , see true diagram here.|dw:1332051564007:dw| then net force =(9-8cos62)i^+(8sin62)j^ then follow same way for finding the acceleration. acceleration must be 2.9m/sec^2(about)


text:
COMPGROUPS.NET | Search | Post Question | Groups | Stream | About | Register

### Basic question about FFT and PSD

• Email
• Follow

Dear everyone,

I am sorry to bring such a basic question. I hope you don't mind to answer my questions below:

1. I have calculated the FFT for a sample signal and I got a spectrum with x-axis represented frequency and y-axis represented by amplitude. And the result is correct,, the amplitude and the frequency are correct. However, when I tried to calculate by using the PSD formula (Periodogram), I got a different result.

I understand that the PSD has x-axis in which represented by frequency and y-axis is represented by power/frequency. So my question is  " what's the different between these two methods, since both of them are used to obtain the frequency spectrum of signal?" In my opinion, the resulted frequency should be same.

2. Is it possible to transform my FFT spectrum directly to PSD spectrum? I mean may I simple by squared the amplitude (Y(f))^2 in FFT to obtain the PSD spectrum?

I am sorry for my understanding, and I am grateful for your answer.

Regards,

Agus

 0
Reply Agus 6/25/2010 11:02:04 AM

See related articles to this posting

"Agus Nugroho" <agus_nugroho01@yahoo.com> wrote in message <i022bc$nqs$1@fred.mathworks.com>...
> Dear everyone,
>
> I am sorry to bring such a basic question. I hope you don't mind to answer my questions below:
>
> 1. I have calculated the FFT for a sample signal and I got a spectrum with x-axis represented frequency and y-axis represented by amplitude. And the result is correct,, the amplitude and the frequency are correct. However, when I tried to calculate by using the PSD formula (Periodogram), I got a different result.
>
> I understand that the PSD has x-axis in which represented by frequency and y-axis is represented by power/frequency. So my question is  " what's the different between these two methods, since both of them are used to obtain the frequency spectrum of signal?" In my opinion, the resulted frequency should be same.
>
> 2. Is it possible to transform my FFT spectrum directly to PSD spectrum? I mean may I simple by squared the amplitude (Y(f))^2 in FFT to obtain the PSD spectrum?
>
> I am sorry for my understanding, and I am grateful for your answer.
>
> Regards,
>
> Agus

Hi Agus,
To compute the periodogram using fft(), you have to scale the absolute value squared DFT coefficients by (1/length(data))*(1/Fs) where Fs is the sampling frequency if your PSD estimate is in power/Hz, or (1/length(data))*(1/(2*pi)) if your PSD estimate is power/(radians/sample). If your PSD estimate is one-sided (say positive frequencies only, which is a very common thing to do), then you have an additional factor of 2 for all frequencies except zero (DC) and the Nyquist. Remember, the PSD estimates are scaled by the reciprocal of the length of the data (not the length of the data after any zero padding). I’ll try to explain with code, which we’ll check against spectrum.periodogram() and psd() in the Signal Processing Toolbox just to show you the result is consistent with the SPT routines.

Case 1:
Two-sided PSD estimate with sampling frequency.  PSD estimate in power/Hz (dB)
•	The scaling factor is: dt/N where dt is the sampling interval and N is the length of the input data ignoring any padding of course- dt/N is equivalent to 1/(N*Fs).  Since the PSD estimate is two-sided, there is no extra factor of two required.

reset(RandStream.getDefaultStream);
dt = 1/10000; %Fs=10000
t = 0:dt:.1024-dt; %time vector of length 1024
y = cos(2*pi*1000*t)+randn(size(t)); %1 kHz sinewave in noise—signal for all %examples.
h = spectrum.periodogram; %spectrum object (periodogram)
%two-sided PSD with sampling frequency specified
psd_est_2side=psd(h,y,'spectrumtype','twosided','Fs',10000);

%now let’s do it by brute force and check agreement
y_fft=abs(fft(y)).^2;
psd_y=(dt/length(y))*y_fft;
%plot the comparison between PSD estimates
plot(psd_est_2side.Frequencies./1000,10*log10(psd_y))
xlabel('kHz'); ylabel('Power/Hz (dB)'); grid on;
figure;
plot(psd_est_2side);

Case 2: One-sided PSD with sampling frequency—For real-valued data, the DFT is conjugate symmetric. Therefore,  most people only plot the positive frequencies. If you want Parseval’s relation to still hold you have to multiply all the positive frequencies which normally also occur as  negative frequencies by a factor of 2. This is because you’ve essentially “lost” half your power by omitting the negative frequencies.
•	The scaling factor for a one-sided PSD estimate with a known sampling frequency (Power/Hz) is:  (2*dt)/length(data)

Note: The zero frequency estimate (DC) and the Nyquist frequency estimates are NOT multiplied by 2. DC does not occur as a negative frequency. In a PSD estimate with the DC component centered, Matlab computes estimates over the semi-open interval (-Nyquist,Nyquist], therefore the Nyquist frequency also does not occur twice.

%onesided estimate
psd_est_1side=psd(h,y,'spectrumtype','onesided','Fs',10000);
y_fft=abs(fft(y)).^2;
Y_fft=y_fft(1:513); % we only keep the positive frequencies.
Y_fft=(dt/1024)*Y_fft;
Y_fft(2:end-1)=2*Y_fft(2:end-1);  %additional factor of two for all but DC and the %Nyquist

%compare
plot(psd_est_1side.Frequencies./1000,10*log10(Y_fft));
xlabel('kHz'); ylabel('Power/Hz (dB)'); grid on;
figure;
plot(psd_est_1side);

Case 3: PSD estimate for normalized frequency-- (Power (in dB)/rad/sample)
If normalized frequency is used, the scaling factors are:
•	1/length(data)*(1/(2*pi))  for a two-sided estimate
•	2/length(data)*(1/(2*pi)) for a one-sided estimate (again, see note concerning DC and the Nyquist!)

% doing the two-sided case -- not centering DC
psd_est_2side_normalized=psd(h,y,'spectrumtype','twosided');
y_fft=abs(fft(y)).^2;
Y_fft=(1/length(y))*(1/(2*pi))*y_fft;

plot(psd_est_2side_normalized.Frequencies./pi, 10*log10(Y_fft));
xlabel('Normalized Frequency (x \pi rad/sample)');
ylabel('Power/rad/sample (dB)'); grid on;
figure;
plot(psd_est_2side_normalized);

The one-sided case with normalized frequency requires the additional factor of two except at DC and the Nyquist.

Hope that helps,
Wayne

 0
Reply Wayne 6/25/2010 12:04:04 PM

Dear Dr. Wayne,

Thank you so much for your answer. Its really clear and detail. As soon, I will try to implement and test to my data.

Thank you very much for your kindness.

Regards,
Agus

 0
Reply Agus 6/25/2010 10:11:07 PM

2 Replies
745 Views

Similar Articles

12/6/2013 4:28:22 PM
[PageSpeed]

 Reply:

Similar Artilces:

format: plain


text:
## Calculus (3rd Edition)

The length: $s = 5\left( {{\rm{e}} - 1} \right)$
We have $x\left( t \right) = 3{{\rm{e}}^t} - 3$, ${\ \ }$ $x'\left( t \right) = 3{{\rm{e}}^t}$, $y\left( t \right) = 4{{\rm{e}}^t} + 7$, ${\ \ }$ $y'\left( t \right) = 4{{\rm{e}}^t}$. By Theorem 1 of Section 12.2, the length of the curve for $0 \le t \le 1$ is $s = \mathop \smallint \limits_0^1 \sqrt {{{\left( {3{{\rm{e}}^t}} \right)}^2} + {{\left( {4{{\rm{e}}^t}} \right)}^2}} {\rm{d}}t = \mathop \smallint \limits_0^1 \sqrt {9{{\rm{e}}^{2t}} + 16{{\rm{e}}^{2t}}} {\rm{d}}t$ $s = 5\mathop \smallint \limits_0^1 {{\rm{e}}^t}{\rm{d}}t = 5{{\rm{e}}^t}|_0^1 = 5\left( {{\rm{e}} - 1} \right)$


text:
# Introduction to artifacts and artifact detection¶

Since MNE supports the data of many different acquisition systems, the particular artifacts in your data might behave very differently from the artifacts you can observe in our tutorials and examples.

Therefore you should be aware of the different approaches and of the variability of artifact rejection (automatic/manual) procedures described onwards. At the end consider always to visually inspect your data after artifact rejection or correction.

## Background: what is an artifact?¶

Artifacts are signal interference that can be endogenous (biological) and exogenous (environmental). Typical biological artifacts are head movements, eye blinks or eye movements, heart beats. The most common environmental artifact is due to the power line, the so-called line noise.

## How to handle artifacts?¶

MNE deals with artifacts by first identifying them, and subsequently removing them. Detection of artifacts can be done visually, or using automatic routines (or a combination of both). After you know what the artifacts are, you need remove them. This can be done by:

• ignoring the piece of corrupted data
• fixing the corrupted data

For the artifact detection the functions MNE provides depend on whether your data is continuous (Raw) or epoch-based (Epochs) and depending on whether your data is stored on disk or already in memory.

Detecting the artifacts without reading the complete data into memory allows you to work with datasets that are too large to fit in memory all at once. Detecting the artifacts in continuous data allows you to apply filters (e.g. a band-pass filter to zoom in on the muscle artifacts on the temporal channels) without having to worry about edge effects due to the filter (i.e. filter ringing). Having the data in memory after segmenting/epoching is however a very efficient way of browsing through the data which helps in visualizing. So to conclude, there is not a single most optimal manner to detect the artifacts: it just depends on the data properties and your own preferences.

In this tutorial we show how to detect artifacts visually and automatically. For how to correct artifacts by rejection see Rejecting bad data (channels and segments). To discover how to correct certain artifacts by filtering see Filtering and resampling data and to learn how to correct artifacts with subspace methods like SSP and ICA see Artifact Correction with SSP and Artifact Correction with ICA.

## Artifacts Detection¶

This tutorial discusses a couple of major artifacts that most analyses have to deal with and demonstrates how to detect them.

import numpy as np

import mne
from mne.datasets import sample
from mne.preprocessing import create_ecg_epochs, create_eog_epochs

data_path = sample.data_path()
raw_fname = data_path + '/MEG/sample/sample_audvis_raw.fif'

Low frequency drifts and line noise

(raw.copy().pick_types(meg='mag')
.del_proj(0)
.plot(duration=60, n_channels=100, remove_dc=False))

we see high amplitude undulations in low frequencies, spanning across tens of seconds

raw.plot_psd(tmax=np.inf, fmax=250)

On MEG sensors we see narrow frequency peaks at 60, 120, 180, 240 Hz, related to line noise. But also some high amplitude signals between 25 and 32 Hz, hinting at other biological artifacts such as ECG. These can be most easily detected in the time domain using MNE helper functions

## ECG¶

finds ECG events, creates epochs, averages and plots

average_ecg = create_ecg_epochs(raw).average()
print('We found %i ECG events' % average_ecg.nave)
average_ecg.plot_joint()

Out:

We found 283 ECG events

we can see typical time courses and non dipolar topographies not the order of magnitude of the average artifact related signal and compare this to what you observe for brain signals

## EOG¶

average_eog = create_eog_epochs(raw).average()
print('We found %i EOG events' % average_eog.nave)
average_eog.plot_joint()

Out:

We found 46 EOG events

Knowing these artifact patterns is of paramount importance when judging about the quality of artifact removal techniques such as SSP or ICA. As a rule of thumb you need artifact amplitudes orders of magnitude higher than your signal of interest and you need a few of such events in order to find decompositions that allow you to estimate and remove patterns related to artifacts.

Consider the following tutorials for correcting this class of artifacts:

Total running time of the script: ( 0 minutes 15.779 seconds)

Gallery generated by Sphinx-Gallery


text:
## Posts Tagged 'test'

### Private Rocket Launch Tests Supersonic Parachute and Reusable Tech

A private spaceflight company, Armadillo Aerospace, is reviewing their test data from a rocket test in the New Mexico desert. The flight encountered problems while testing a new launch and balloon parachute technologies, but the company remains one of the leading private entities in the alt.space industry.

### NASA’s Toxic Test Chamber Allows Hellish Venus-Like Conditions on Earth

In an effort to learn how their technology will react to the hellish surface conditions on Venus, NASA engineers will put together a 12-ton toxic oven in Cleveland at the NASA Glenn Research Center. It will be operational in May 2012, and scorch anything that is put in it at 1,000 degrees Fahrenheit, as well as crush it at nearly 100 atmospheres, then choke it with carbon dioxide, sulfuric acid and other noxious fumes.

### LEGO Robot Helps Test iPad Apps, Promises Not to Make Any In-App Purchases

Developers, what do you do when you don’t feel like testing your apps yourself? You built a LEGO Mindstorms robot to do the job for you. That’s basically what researchers and developers at the Pheromone Lab did recently. Their LEGO robot helped them test an app by taking 10,000 photos with it.

### 2004 Yamaha Cygnus X 125cc

2004 Yamaha Cygnux X

I handed over Green Kelly last Thursday for the final tune-ups. She had started to grow on me over the last week, and except for a few tweaks here and there, she was fine.

The scooter shop owner handed over a 2004 Yamaha Cygnus 125cc as a loaner. I’m currently thinking about trading in Green Kelly for this scooter. When I first rode it, I was somewhat surprised. It’s got good early acceleration, but then it tapers off midway and only comes back in force once you hit max speed. This scooter weighs somewhat more than the Yamaha Forte, but it feels a lot stabler at mid to high speeds. It feels quite solid at higher speeds, and the bumps in the road seem less of an issue.

## Rational Numbers

In mathematics, a rational number is a number which can be expressed as a ratio of two integers. Non-integer rational numbers (commonly called fractions) are usually written as the vulgar fraction a / b, where b is not zero. a is called the numerator, and b the denominator.

Each rational number can be written in infinitely many forms, such as 3 / 6 = 2 / 4 = 1 / 2, but it is said to be in simplest form when a and b have no common divisors except 1 (i.e., they are coprime). Every non-zero rational number has exactly one simplest form of this type with a positive denominator. A fraction in this simplest form is said to be an irreducible fraction, or a fraction in reduced form.

The decimal expansion of a rational number is eventually periodic (in the case of a finite expansion the zeroes which implicitly follow it form the periodic part). The same is true for any other integral base above one, and is also true when rational numbers are considered to be p-adic numbers rather than real numbers. Conversely, if the expansion of a number for one base is periodic, it is periodic for all bases and the number is rational. A real number that is not a rational number is called an irrational number.

The set of all rational numbers, which constitutes a field, is denoted $\mathbb{Q}$. Using the set-builder notation, $\mathbb{Q}$ is defined as

$\mathbb{Q} = \left\{\frac{m}{n} : m \in \mathbb{Z}, n \in \mathbb{Z}, n \ne 0 \right\},$

where $\mathbb{Z}$ denotes the set of integers.

## Irrational Numbers

In mathematics, an irrational number is any real number that is not a rational number — that is, it is a number which cannot be expressed as a fraction m/n, where m and n are integers, with n non-zero. Informally, this means numbers that cannot be represented as simple fractions. It can be deduced that they also cannot be represented as terminating or repeating decimals, but the idea is more profound than that. While it may seem strange at first hearing, almost all real numbers are irrational, in a sense which is defined more precisely below. Perhaps[1][2] the most well known irrational numbers are π and $\scriptstyle\sqrt{2}$.

$\Bbb{R}$ \ $\mathbb{Q}$ denotes the irrational numbers.

Having read the above recap on rational and irrational numbers, try answering the following multiple choice question which I had in a test today:

Which of the following is the first false statement?

(a) Between two different rational numbers, we can always find another rational number.
(b) Between two different rational numbers, we can always find an irrational number.
(c) Between two different irrational numbers, we can always find a rational number.
(d) Between two different irrational numbers, we can always find another irrational number.
(e) 0 = 1.

### Analysis Test 1

Here is the first Analysis I test and its correction. It’s in French. (PDF)

## subscribe @ email

Join 1,689 other followers

## @djrange: my tweets

 San on Tea Withdrawal: The Dark Side… range on OEM Taiwanese Carbon Fiber Bik… to whitfield on OEM Taiwanese Carbon Fiber Bik… lubomira slaughter on VanDamm House on Mount Rushmor… James Hamilton on VanDamm House on Mount Rushmor…


text:
# 3rd Class Computers History of Computing Hardware Leibnitz Calculator

## Leibnitz Calculator

Category : 3rd Class

### Leibnitz Calculator

It was a digital mechanical calculator invented by German mathematician and philosopher Gottfried Wilhelm Leibnitz around 1672 and completed in 1694. Pascal developed the machine because he had to help his father with his work as tax receiver. This was an improvement over the Pascaline. This machine was also able to perform multiplication and division and all the mathematical calculations. Leibnitz's machine used a stepped cylinder. This machine was also called stepped calculator.

Leibnitz calculator was a calculating device. It was the improved form c which one of the following devices?

(A) Abacus

(B) Napier's bones

(C) Pascaline

(D) All of these

(E) None of these

Explanation

Correct Option:

(C) Leibnitz calculator was the improved form of pascaline.

Incorrect Options:

(A) Abacus: Was the first calculating device and not the improved form Pascaline. Therefore option (A) is Incorrect.

(B) Napier's bones: Was the calculating device and not the improved ton of Pascaline. Therefore option (B) is Incorrect.

(D) Option (D) is Incorrect.

(E) Option (E) is Incorrect.

Leibnitz's machine used a stepped cylinder. What was its other name?

(A) Stepped calculator

(B) Stepped computer

(C) Stepped device

(D) All of these

(E) None of these

Explanation

Correct Option:

(A) Leibnitz's machine was also known as stepped calculator.

Incorrect Options:

(B) Stepped computer- is an Incorrect Option.

(C) Stepped device- is an Incorrect Option.

(D) Option (D) is Incorrect.

(E) Option (E) is Incorrect.

You need to login to perform this action.
You will be redirected in 3 sec


text:
# Can dual vector spaces be thought of as linear coordinate functions?

Note: This question seems like it might have been asked before, but the poster deleted it and I don't have enough reputation to see it.

Let $V$ be a finite-dimensional real vector space. Such an object is, in a canonical way, a smooth manifold. Thus it makes sense to speak of smooth charts $(U,\varphi)$ for such a space (where $U \subseteq V$ is open of course). Let us restrict attention to those charts for which $U=V$.

Then if the chart function $\varphi: V \to \mathbb{R}^n$ is linear, each of its component functions (which I call coordinate functions, since each specifies a different coordinate of the chart) is a linear function $V \to \mathbb{R}$, thus an element of $V^*$.

(Obviously none of this works over arbitrary fields or for infinite-dimensional vector spaces, hence the restrictions I assume/gave above.)

Question: Thus, does it make sense to interpret or even define dual bases to be linear charts from $V$ to $\mathbb{R}^n$, and $V^*$ to be the space of all linear coordinate functions?

In particular, this would provide a ready explanation for why the components of a vector are written with the opposite index placement when using the Einstein summation convention. If $E = x^i E_i$ is a vector in $V$, then the components $x^i$ could be interpreted as short-hand for the evaluation of the linear coordinate functions (i.e. elements of $V^*$) evaluated at $E$ rather than just scalars, i.e. $$E = x^i(E) E_i \,.$$ Since the $x^i$ are elements of $V^*$, rather than scalars in $\mathbb{R}$, it becomes quite obvious why they should have the index placement they do.

Also components/linear coordinates transform the same way that dual vectors do under changes of basis (i.e. they are covariant), so thinking about vectors/dual spaces/tensors the way physicists do, interpreting components/linear coordinate functions as being the same thing as elements of $V^*$ seems to make a certain amount of sense. It might also make dual vector spaces easier to understand for those who tend to think physically or geometrically (e.g.).

However, I have not seen this practice mentioned in any texts on differential geometry or linear algebra which I have ever read, so I imagine that there are probably problems with it which I am not noticing or understanding yet.

• It's not the same question. Somewhat related, but different. But I'm curious, how did you know about the older question and get the link to it? – Daniel Fischer Jan 11 '17 at 12:57
• @DanielFischer Haha, I didn't know it at all, it came up on a google search. – Chill2Macht Jan 11 '17 at 13:32
• @William So Google has got more reputation than you do, what a shame! – Marc van Leeuwen Jan 11 '17 at 13:39

Given a finite-dimensional vector space $V$ over any field $k$, one may consider the dual space $V^*$ as the space of linear polynomial functions $V \to k$. Concretely, given a basis $e_1,\ldots,e_n$ for $V$, the dual elements $e_i^*$ corresponds to the coordinate functions $x_i : V \to k$. More generally however, the symmetric powers $Sym^d(V^*)$ corresponds to homogeneous polynomial functions of degree $d$. The symmetric algebra $Sym(V^*)$ is the ring of polynomial functions. Given a basis, one may identify it with $k[x_1,\ldots,x_n]$.


text:
Beta

# Slashdot: News for Nerds

top

### Does Relying On an IDE Make You a Bad Programmer?

I agree with most of this, but I still use emacs a lot.

Sometimes an IDE can become an impediment if it keeps you from looking at hard-to-find code, makes you in any way lazy about debugging, or helps you read through code too quickly (making happy assumptions). I'm currently working on an Android system and regularly have to jump between application code, Android internal services and components, various JNI or hardware abstraction layers, and kernel code. Sometimes I need to read through standard C library implementations too. So while I like doing some things in eclipse, most of the time eclipse is not configured to let me dig deeply enough or follow calls all the way through the framework. Similarly the interactive debugging utilities are often limited and I resort to reading code and adding print/logging statements. It feels old-fashioned sometimes but on the other hand I have no excuses or reluctance to work hard enough to get a deep understanding of the whole system.

So I'd judge an IDE by its ability to help you quickly navigate around a large and maybe unfamiliar code base. A good programmer's #1 job is probably reading code carefully and accurately. Features like auto-completion and live error checking are much less important. Also keep a tab on the amount of time it takes to keep your IDE configured correctly and able to compile independently from a more automated build system. Don't let it become a timesink, crutch or an excuse!

top

### Can Electric Current Make People Better At Math?

Math concepts unrelated to computation skill (112 comments)

I read "...and improve their understanding of math concepts" with a lot of skepticism. I think that schools love to teach computation skills because they are easy to teach and because success there is very easy to measure. But this skill is relatively unimportant compared with what I would consider "math concepts": How you apply mathematical abstractions to real-world situations (beyond making correct change at a cash register). How you break down a hard problem into less-hard pieces. How to visualize quantitative relationships, develop and use algebraic systems, and so on. These are rarely taught in schools because they are relatively difficult to teach and difficult to measure gains. So computation skills are taught instead, regardless of the fact that cheap computers are billions or trillions of times faster than any human.

Can electric current apply to this kind of conceptual learning? If so, it would have application to nearly all kinds of education, not just math.

top

### How Good Are Charter Schools For the Public School System?

I think one of the major problems with standardized testing is that the scores are over-used. Scores are used for evaluating students, teachers, and schools. Each group has incentives attached: scholarships and admissions for students, salaries and job opportunities for teachers, and higher funding levels for high-performing schools. If these incentive systems were decoupled instead somehow, then meaningful analyses of scores could be made.

I agree that assessment is important, but it's a very difficult problem that we have not solved. Is it better to use a broken approach than have no assessment at all? I personally think that testimonials and self-evaluations are currently more meaningful than test scores in general. Standardized tests usually measure only those outcomes that are easy to teach and test but are unimportant in real life.

Mathematics is an easy example of this. My 6th-grade daughter gets homework sheets that are mostly repetitive exercises to boost speed. A recent example was computing the circumferences and surface areas of circles. Calculators were allowed in this case, so it was an exercise in key punching. Then we went to a pizzeria a few days later and she was happy to compute the circumference of a pizza (without prompting -- her idea). So I asked her "about how many bites would it take to eat a whole pizza?" She didn't know how to work that out, thinking that she was not taught how to solve that kind of question. I wasn't giving her one of the needed inputs, the size of a bite. And also her understanding of surface area was not strong. The problem here is fairly universal: Math students are taught the abstract computation skills but not synthesis of this knowledge. It is very easy to test how quickly students can compute things and even how fast they can look up formulas that match the given knowns with the required unknown, but these are meaningless skills without also learning how to bridge from the abstract to the real, and how to form connections between the principles they learn. Students should be given harder problems that they have to puzzle over, even starting in grade school. It's okay if they don't get the right answer or if they get stumped, as long as they were able to begin to think productively about them. This builds genuinely-useful math skills and hopefully a certain discipline of thought that is not usually innate. This ability to apply math to real-world situations, and by algebra to think of math as a language, is much harder to assess than timed multiplication tests and so it is generally avoided. If a teacher were to spend time on this kind of development in place of the repetitive speed drills, their students would perform worse on standardized tests. The teacher's students would suffer, as would the teacher and their whole school to some degree.

So, is standardized testing better than nothing? I think that yes, it is, but on the other hand almost any other form of assessment would be better still even if it were not standardized.

top

### Simulations Back Up Theory That Universe Is a Hologram

Re:A projection of what? (433 comments)

Mathematics, especially in this context, is just a language for expressing ideas. So I think that in some sense it is possible that some particular string theory really does describe what's going on. I don't know if it's very likely, but the idea of a "final theory" is that it is, in some sense, a complete and accurate description of our universe's mechanics. (The holographic principle is nice because it states that two seemingly very different theories can actually be equivalent.)

I think there are two main caveats here. One is that you never really know when you're "done", and have a theory that is indeed final. We know now that we are not done today because of inconsistencies, but science also does not have even the capability of perfect validation. The other is that a microscopic, reductionist description of physics is not useful or even the correct language for describing more macroscopic effects since basically "more is different." Chemists don't use quantum field theory because it's just not helpful.

And while it's great (even important) to consider philosophical ramifications of theoretical work like this, we have to remember that it's all still conjecture and it will probably always be conjecture. The philosophical spin-offs, so to speak, should never be taken as a way of either supporting or condemning the theory.

I think I'm basically summarizing some of what Wienberg describes in his book Dreams of a Final Theory (1993). That seems old but I highly recommend it!

top

### Physicists Plan to Build a Bigger LHC

Re:WHY NOT IN THE FIRST PLACE !! (263 comments)

That depends on what you mean by "tangible benefits." One argument I've heard for practical, what's-in-it-for-me-today benefits is that the technology produces spin-offs such as techniques to mass-produce rare-earth magnets, the world-wide web, etc. But that's honestly a weak argument because there's a lot of research going on that has similar chances to produce spin-off tech.

For particle physics, the feeling is that we are on the verge of some kind of revolution! Admittedly it's been that way for a few decades now, but the current working theory (the standard model) has a number of deep problems (thanks wikipedia!). Most new theories, and there are a whole lot of them, predict new phenomena just at the edge of our experimental reach. Part of that is because well-meaning theorists prefer to propose theories that are either presently or soon-to-be testable. But part of it is because the experimental frontier has advanced to energies at roughly the electroweak unification point and lots of theories have interesting behavior to predict at this point, broadly speaking.

So it's not just a more-is-better kind of effort that won't stop until we build solar-system-sized accelerators. There really is a sense that a major shift, possibly even a philosophically-challenging development, is nearly within our grasp, within our lifetimes. This is not a "practical" argument for basic science, but only history can tell us what has had short and long-term practical benefits. History does tell us that this sort of pursuit has in the past been enormously beneficial. Maybe we are in a whole new era where new physics will be completely impractical, but that would honestly be surprising if true.

top

### Physicists Plan to Build a Bigger LHC

You hit numerical problems if you calculate it that way. Wikipedia gives a series expansion that works well for large values of gamma:

v (in units of c) = 1 - 1/2 \gamma^(-2)

v = c (1 - 1.8e-10), or 0.99999999982 c

top

### Physicists Plan to Build a Bigger LHC

I don't think in these cases you have multiple labs bidding for the job. You have multiple countries wanting to host the lab, but that's a different story.

The biggest problem for high energy physics is establishing multi-year funding. The US government cannot promise anything beyond a single year of funding. If say $8 B has been spent over 10 years and one year congress says "but I promised to cut spending", then that's the end of the road for that lab. This happened for the SSC in 1993, but also a lot of times since then on lower-profile, some$500 M experiments that were, yes, in construction already.

Now say 15 years later the $10B has been spent, but its not quite done, another$2B would let you finish the project. Do you really throw away \$10B to save 2B? There is no fraud, just a mis-estimation of the costs of building a beyond state-of-the-art machine and slightly larger technical problems than were expected.

Most of the cases I'm familiar with, including the SSC, were not actually budget overruns even though they were politicized that way. If you're a politician who wants to (a) publicly demonstrate how fiscally conservative you are and (b) not actually cut spending on items that might affect the bulk of your constituency, then you cut big science every time. Even if the budget grows on the whole, you've made a statement and some headlines.

top

### Physicists Plan to Build a Bigger LHC

Re:WHY NOT IN THE FIRST PLACE !! (263 comments)

I also wanted to mention the failed SSC in Texas, cancelled in 1993. That would have been running at double the LHC's energy about a decade earlier. In 1993 congress seats were won by senators promising budget cuts, and Big Science had a large target painted on its back. Killing the SSC was a big-profile way of appearing to reduce spending while at the same time not damaging something that many people understood or cared about.

Since that time, the US has proved time and time again that they are incapable of sustaining funding for a long-term science project. All of the high-energy accelerators in the US are operationally shut down, and almost no proposals in the past 20 years or so have survived all the way to producing results before getting scrapped by some budget shortfall in a particular fiscal year. The LHC survives because the US is not such a major (or critical) contributor.

top

### Physicists Plan to Build a Bigger LHC

Re:WHY NOT IN THE FIRST PLACE !! (263 comments)

Well, many of these tunnels, including the one the LHC uses, have been refurbished multiple times already. Cern's main ring was built to be somewhat future-proof, but that was a long time ago. A google search came up with The history of CERN, which dates the groundbreaking to 1954.

In accelerators you have two basic designs: linear and circular(ish). In linear accelerators each boosting element (RF cavity or whatnot) gets one chance to give the beam particles a kick, so the energy is limited to how hard you kick (limited by technology) and how many elements / how long (limited by budget).

In circular accelerators you are limited by synchrotron radiation. At some point the energy pumped into the beam matches the energy lost via synchrotron radiation. To move in a circle you have to accelerate inwardly, and an accelerating charged particle radiates light. At particle accelerator energies, this radiation is in the x-ray spectrum. You can reduce the loss by using a larger ring -- a smaller curvature requires less centripetal acceleration and hence less radiation loss. You can also of course build stronger boosting elements, but the radiation also heats the beamline and surrounding superconducting magnets, so it's not "that simple."

The other thing to vary is the kind of particle accelerated. Electrons have a very small mass and lose a larger fraction of their momentum to synchrotron radiation. SLAC and KEK are linear accelerators that use electrons. (Cornell's CESR is a ring that accelerates electrons too, but at lower energies compared to these others.) Protons are the other obvious choice, which is what Fermilab and CERN's LHC (after the upgrade) are accelerating. Being much more massive, the protons slough off less of their momentum to synchrotron radiation and can be accelerated to higher energies given the same size ring. The disadvantage of protons is that the energy of the proton is shared among its three quarks (and gluons I think) whereas the electron is truly singular as far as can be told.

I've been out of touch lately but as of at least 8 years ago three proposals were being discussed: VLHC -- big ring accelerating protons. Next Linear Collider (NLC) -- long linear accelerator for electrons. Muon collider -- a smaller ring (actually with straight sections like a track&field track) that produces and accelerates muons. Muons are just like electrons only 200 times more massive and is unstable with a half-life of 2 microseconds. The muon collider was thought to be an ideal Higgs factory, but with a lot of design challenges. One of the main challenges is to not only accelerate the muons before they decay, but also collimate, or "cool", the beam very fast as well so that you can create as many head-on collisions as possible.

So the news that the VLHC design is currently in favor is interesting, but this is hardly the first time the issue has been discussed and I doubt it will be the last. Several years ago the NLC design seemed most favorable, but this would, by its length, be limited to a specific design energy and probably be built to produce Higgs, Higgs, and more Higgs. It seems to me like a VLHC would have more discovery potential for more massive Higgs particles, signs of supersymmetry, or whatever else might exist.

top

### Head of Silk Road 2.0 Says It Will Be Back In Minutes If Shut Down

I hear there's petrol in Krokodil. That's pretty addictive and dangerous.

top

### Head of Silk Road 2.0 Says It Will Be Back In Minutes If Shut Down

Are you referring to nicotine and alcohol? I don't believe these are either the most addictive or the most dangerous on an individual usage basis. You may be right if you count aggregate effect (total number of people addicted to smoking or drinking) but this makes a good argument against legalization.

top

### Head of Silk Road 2.0 Says It Will Be Back In Minutes If Shut Down

It's hard to use absolute arguments on this kind of subject. Take your argument to one extreme and you get something like "The problem isn't having easily-available nuclear bombs, the problem is those people who would use them." This statement goes too far at least in one way, that while drugs use causes some collateral damage so to speak, not nearly as much as nukes.

Another problem with legalized (free market) drugs is that many are physically addictive, so users are quickly unable to make free choices regarding their use. Marijuana is less addictive than most, which allows room for debate on legalization. (I voted "yes" on legalization in CO, though I'm willing to admit that may have been a mistake. I'm not sure yet but it makes an interesting experiment in any case.)

I felt like some of DPR's arguments supporting his website were delusional. Particularly this: "Let us assume you have a son who is in his teenage years and you knew they were going to do drugs, what as a parent, would you do? Would you let them go to their friends’ friends’ dealer or would you help them buy from Silk Road ..." As a parent I would not even consider either option for an instant. As soon as I become aware of my teenage (or younger or older) child's drug use, I have a very difficult responsibility and it's not as an enabler or bystander.

top

### Does Software Need a Siskel and Ebert?

Re:Won't work with FOSS. (169 comments)

You also are bringing up a good point that an accurate review of any complex software requires an unreasonably large time commitment. What's the learning curve like? (This beats "intuitiveness".) How often are updates buggy or force re-learning on users? (Beats bugs-I-just-found reports.) How helpful is the community when it comes to resolving problems? What has the history of security flaws been like? How would you estimate the software's long-term viability and adoption by others? Does an experienced user find common tasks to be easy and fast, while unusual tasks are not too difficult? (Beats feature-list comparisons).

To review a movie you need (1) a decent understanding of ... I don't know maybe "filmography". Then you need to (2) watch the movie. After a couple hours you can write about it. None of the important questions about software can be answered after a couple hours' exposure. Combine this with the sheer quantity of software out there and you can see how software reviews aren't as prolific or celebrated as one might hope.

top

### Cable Lobbyist Tom Wheeler Confirmed As New FCC Chief

This claim (regulatory capture) would be possible to argue against if only internet access in the US were cheaper or as cheap as it is in other countries without subsidies. We know that's not true, therefore we have a market (and government) failure. Case closed.

top

### Toyota's Killer Firmware

FTA: "Vehicle tests confirmed that one particular dead task would result in loss of throttle control, and that the driver might have to fully remove their foot from the brake during an unintended acceleration event before being able to end the unwanted acceleration."

top

### Toyota's Killer Firmware

I was reading through comments hoping to find some general opinion of whether or not Barr's findings could have applied to practically any software stack. You usually don't have to work very hard when reading through code before you spot a bug or two. But in my experience most of these bugs are never (or rarely) exposed because they lie in corner cases. But in the case of Toyota's electronic throttle control system, you'd have higher expectations.

It sure sounds like Barr's group indeed found code of "unreasonable quality." I'm just not sure how to put that into proper context. One can always spend more time and money on code analysis and robustness improvements. Did Toyota really fall short of reasonable expectations? It sounds to me like they did, but I'm only hearing one side of the argument.

top

### First Experimental Evidence That Time Is an Emergent Quantum Phenomenon

What I can't yet understand is how this experiment helps validate the theory of time as an emergent quantum phenomenon. It seems more like a demonstration than an experiment to me. What alternative theory is their experiment excluding?

I'm a physicist but that doesn't mean I understand any of this QM stuff. I have a feeling this is a little like experimentally demonstrating Bell's inequality -- one can do experiments whose results are consistent with predictions of QM, and in ways that one might expect other general classes of theories to differ even though you don't have a specific alternative theory to exclude. Most experiments are like this really. But in the case of this time-entanglement experiment I really don't see room for alternative predictions. I think the paper's title acknowledges this: "Time from quantum entanglement: an experimental illustration" (my emphasis).

I'm not saying that the experiment is in any way unhelpful or bad. It's a great idea, but I would not go so far as to say that this is "experimental evidence."

top

### Wireshark Switches To Qt

Re:Props to all sticking it out and trying Qt out! (79 comments)

You're running Kubuntu 13.10? How is it so far?

I've long enjoyed KDE and pyqt programming. It's nice to see the underlying library move forward so successfully. I've found that, at least with pyqt, the QT libraries are rather large to ship around. I hope this doesn't increase the size of wireshark too much. It's nice to be able to easily install and run it on platforms like raspbian.

top

### Ask Slashdot: Best Language To Learn For Scientific Computing?

For numeric code, I find that stepwise debugging is rarely helpful and never necessary. Print statements are my primary tool for spot-checking numbers, data structures, and even for evaluating the general flow of the program. The next tool is to create histograms and other plots of the data you're getting at various stages or calculations. By varying the inputs and seeing the effects on plots (in vague terms), you have a very powerful and underrated diagnostic. The more work you put into analyzing your program's data, the better off you'll be.

I second the Python/C++ combination, and should add that you can do a lot with numpy and scipy so you may very well not need the C++ side of things.

I've also written a lot in Fortran years ago, but only because I was working with a ton of legacy code. Compared to C and C++, Fortran is actually more elegant for pure numerical computing. I'm not actually recommending it, mind you, but I also found the main weaknesses of Fortran could be mitigated by writing wrappers in Perl to get data in and out. Java is not actually bad for numerical code either, and it's arguably easier to learn than C++. I guess I'm saying this to point out that it doesn't actually matter much what language you use. Visual basic is a rare exception -- never use that for any reason. :-) And you have to be aware that high-level languages like Python are going to be slow if you have no consideration for what operations are time-consuming. Be particularly mindful of memory allocation / object creation.

top

# Journals

### TopherC has no journal entries.

Slashdot Account

Need an Account?

Don't worry, we never post anything without your permission.

# Submission Text Formatting Tips

We support a small subset of HTML, namely these tags:

• b
• i
• p
• br
• a
• ol
• ul
• li
• dl
• dt
• dd
• em
• strong
• tt
• blockquote
• div
• quote
• ecode

### "ecode" can be used for code snippets, for example:

<ecode>	while(1) { do_something(); } </ecode>
Create a Slashdot Account


text:
# Annihilator of the maximal ideal of a uniserial ring

Recently while reading a paper I encounter a problem, which has confused me for several days. So I hope that some one could help. Thanks for your attention. My problem is: let $R$ be a commutative uniserial ring(i.e., its set of ideals is totally ordered by inclusion), $m$ denotes its unique maximal ideal and Ann(m) denotes the annihilator of $m$. Then $Ann(m/Ann(m))=0$ when $m/Ann(m)$ is treated as the maximal ideal of $R/Ann(m)$.

-
Perhaps I'm confused. If $R = k[t]/(t^5)$, then the annihilator of the maximal ideal $(t)$ is $t^4$, but the annihlator of $(t)/(t^4)$ in $R/(t^4)$ is not zero. – Graham Leuschke Sep 18 '10 at 2:01
Thanks, Graham. Your example is correct. – TmobiusX Sep 19 '10 at 6:24


text:
# Exploratory Regression Shiny App

#### 2020-09-22

The Exploratory Regression Shiny App (ERSA) package consists of a collection of functions for displaying the results of a regression calculation, which are then packaged together as a shiny app function.

To use ERSA first do

library(ERSA)

Then construct a regression model of your choice.

f <- lm(Fertility ~ . , data = swiss)
exploreReg(f,swiss)

Here is a screen shot of the result:

## The summary or drop1 display

The app display consists of four panels. In the top left corner is a display of the model summary t-statistics, from

f <- lm(Fertility ~ . , data = swiss)
summary(f)
##
## Call:
## lm(formula = Fertility ~ ., data = swiss)
##
## Residuals:
##      Min       1Q   Median       3Q      Max
## -15.2743  -5.2617   0.5032   4.1198  15.3213
##
## Coefficients:
##                  Estimate Std. Error t value Pr(>|t|)
## (Intercept)      66.91518   10.70604   6.250 1.91e-07 ***
## Agriculture      -0.17211    0.07030  -2.448  0.01873 *
## Examination      -0.25801    0.25388  -1.016  0.31546
## Education        -0.87094    0.18303  -4.758 2.43e-05 ***
## Catholic          0.10412    0.03526   2.953  0.00519 **
## Infant.Mortality  1.07705    0.38172   2.822  0.00734 **
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 7.165 on 41 degrees of freedom
## Multiple R-squared:  0.7067, Adjusted R-squared:  0.671
## F-statistic: 19.76 on 5 and 41 DF,  p-value: 5.594e-10

This display (Plot1) shows the magnitude of each t-statistic. The red dashed line shows the 5% significance level. There are a few other options for this display. The display may be switched to “CI”, which shows parameter confidence intervals or “CI stdX” for confidence intervals in standard X units. If the model contains factors with more than two levels, then better choices are “F stat” or “Adj. SS”. These give the summaries from the Sum of Sq or F stat columns of the drop1 results:

drop1(f, test="F")
## Single term deletions
##
## Model:
## Fertility ~ Agriculture + Examination + Education + Catholic +
##     Infant.Mortality
##                  Df Sum of Sq    RSS    AIC F value    Pr(>F)
## <none>                        2105.0 190.69
## Agriculture       1    307.72 2412.8 195.10  5.9934  0.018727 *
## Examination       1     53.03 2158.1 189.86  1.0328  0.315462
## Education         1   1162.56 3267.6 209.36 22.6432 2.431e-05 ***
## Catholic          1    447.71 2552.8 197.75  8.7200  0.005190 **
## Infant.Mortality  1    408.75 2513.8 197.03  7.9612  0.007336 **
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Clicking on this display removes the closest predictor, clicking again adds it in. Once a predictor is added or dropped, this change is also reflected in the other ERSA displays.

When FixedScales box near Plot1 is ticked, the axes on Plot1 remain unchanged as predictors are added or dropped. Sometimes the extent on the x-axis is not large enough, or is too large, in this case untick the FixedScales box and the x-axis will vary to accomodate the included predictors.

## The anova display

The second panel in the top right shows the results of

anova(f)
## Analysis of Variance Table
##
## Response: Fertility
##                  Df  Sum Sq Mean Sq F value    Pr(>F)
## Agriculture       1  894.84  894.84 17.4288 0.0001515 ***
## Examination       1 2210.38 2210.38 43.0516 6.885e-08 ***
## Education         1  891.81  891.81 17.3699 0.0001549 ***
## Catholic          1  667.13  667.13 12.9937 0.0008387 ***
## Infant.Mortality  1  408.75  408.75  7.9612 0.0073357 **
## Residuals        41 2105.04   51.34
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

as Plot2. Each predictor of this output is represented by a coloured slice, whose height represents the sum of squares. These sums of squares depend on the order in which predictors were entered into the model fit. The second barchart (Plot3) represents the anova table obtained by reversing the predictor order. The dropdown menus give other choices. Forwards and backwards give the order of predictors as visited by the forwards and backwards selection algorithms. By choosing order “Random”, a user can click on a slice to move it up one position, or double click to move it down.

## The Parallel coordinates plot display

The lower part of the app has a parallel coordinate plot on the lower right, and a control panel on the left. The user can choose to show either (i) Variables (ii) Residuals, (iii) Hatvalues and (iv) CooksD. Each axis is assigned to a variable, using the order from Plot1, Plot2 and Plot3. The residuals and hatvalues are obtained by leaving out one predictor at a time, if the selected order is Plot1, or by adding predictors in sequence if the order is Plot2 or Plot3. When residuals are plotted, the Difference option when selected shows the difference

Specifically, let $$e$$ denote the vector of residuals from the full model and let $$e^{-j}$$ denote the residual vector from the fit using all predictors except the $$j$$th. When residuals are selected, using order from Plot1, the PCP shows $$e^{-j}$$ on the $$j$$th axis, or $$e^{-j} - e$$ when the Difference button is selected in Residual options. Let $$e^{j}$$ be the residuals from the model including the first $$j$$ predictors. When Residuals are selected, using order from Plot2 or Plot3, the PCP shows $$e^{j}$$ on the $$j$$th axis, or $$e^{j} - e^{j-1}$$ when the Difference button is selected in Residual options. For any of the Plot orders, when the Absolute button is selected, either absolute residuals or absolute residual differences are plotted.

Dragging a brush over the PCP axes will highlight cases and print information for the selected cases. Clicking on Remove Brushed will remove the highlighted cases from view. All regression models are recalculated and the displays are updated. Clicking the All Cases buttom will update all displays to use the complete dataset. Double clicking on the PCP itself will un-highlight all cases.

## Individual plots

There are functions to construct static plot versions of all the plots in the Exploratory Regression shiny app.

For the Plot1 displays use

plottStats(f)

cols <- termColours(f)
plottStats(f, cols)

or

plotCIStats(f,cols)
plotCIStats(f, cols,stdunits=TRUE)
plotAnovaStats(f, cols,type="F")
plotAnovaStats(f, cols,type="SS")

For the Plot2 displays use

fr <- revPredOrder(f, swiss)
plotSeqSS(list(f,fr), cols,legend=TRUE)

Other orders are

fselOrder(f)
bselOrder(f)
randomPredOrder(f)
regsubsetsOrder(f)

To plot the PCP display of the data use:

pcpPlot(swiss, f)

Cases are automatically coloured by the magnitude of the response.

To plot a PCP display of the residuals leaving out one predictor at a time use

pcpPlot(swiss, f, type="Residuals")

In residual, hatvalue and CooksD plots cases are automatically coloured by the magnitude of full model residuals. Using the option sequential=T gives the residuals adding model terms in sequence, as they appear in the supplied fit f.

Swapping “Residuals” with “Hatvalues” shows the fit hat values, similarly “CooksD”.

pcpPlot(swiss, f, type="Hatvalues", sequential=T)


text:
Archived

This topic is now archived and is closed to further replies.

Engine Framework

This topic is 5060 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

Recommended Posts

I am attempting to build a version of a basic engine. I am following the new LaMothe book and using direct draw 7. Unfortunately his code is all in C and he does not use classes etc. Hence I am trying to work his methods into my own framework. So far I have a simple windows app based on the SDK framework. I have a base class called Framework which holds the hWnd etc. I also have a derived class which is for the actual application, WinMain() is also in here. What I am trying to do is keep as much of tbe graphics code seperate as possible. So I think I have two options to choose from:- 1. Make a third file named Gamelib or something which will contain the DDraw code and a function for initialising DDraw. Then have this class inherit from the base class because DDraw initialisation requires some of the window initialisation code specifically the hWnd. 2. Intergrate the DDraw initialisation code into the base class with the windows code. Then create a seperate derived class from this for all the various engine functions I will develop. I have searched, read and looked at various engine design articles and code but still have this doubt about the best way of going about this project. Any help, advise would be appreciated.

Share on other sites
Anyone help with this?

Share on other sites
Why not keep your DDraw rendering in a DLL and have the Framework class call a static method in the DLL that creates the window for it with specific settings, etc...

That way, if you later want to switch to OGL rendering, you just create another DLL. If that method exists in the Init class in the DLL it could look like this:

Framework::CreateWindow(){// code here...        // Call internal method    Init::CreateWindow(hwnd, other variables needed here);// continue win32 code here...}

That way you get a implementation-independent window creation. Thus if you want a WinGDI rendering system, you just provide the WinGDI dll and have that implement the Init::CreateWindow in its own way.

Do you understand what I mean?

Share on other sites
I sort of understand I think I read something along thse lines on my travels, something about independant API. In terms of a graphics engine I suppose it is a fantastic thing to have.

With the LaMothe code he has a function which takes a width, height, windowed/screen and an hWnd handle as arguments. Then the function creates a DDraw initialised window. Ideally I would want such a function in a seperate class in a seperate file. However with the hWnd member being in the base class unless I have the graphics class inherit from the base class like the application class does then there is no other way of passing that hWnd handle variable to the CreateWindow() function in the Graphics class.

I am not up on DLL''s at all in all honestly and I am concerned perhaps it is a bit overkill for my issue. Or is this the most common way engines are built these days?

I am personally thinking I might create a new Graphics .cpp and .h file with a new class. Then have this class inherit from the base class. This way I can keep the graphics functions such as the DDraw initialisation seperate from the main application file and all the windows stuff. But I can still have access to that darn hWnd member needed by the CreateWindow() function to create a DDraw initialised window.

Does this seem a good solution?

Share on other sites
You could have the Graphics class take an HWND as an initialization parameter, and so avoid having to inherit from the base game class. Anyway, read up a bit about OOP and why it''s bad to have everything inherit from a god class, and just to inherit an HWND, no less.

And no, of course you don''t have to go with DLLs this early. You can ease into them later, when you understand a bit more.


text:
# Buying new eyepieces, need advice

#### fireballs619

##### Occam's Taser
Donator
I currently have two eyepieces to go with my Celestron Nexstar 130Slt (f/5), a 9 mm and a 25 mm. They provide decent viewing opportunities, but I'm thinking about buying some extra eyepieces to expand what I view. I really don't know much about eyepieces, so I'm a bit lost as to where I should start. I was thinking about buying this set:

#### fireballs619

##### Occam's Taser
Donator
Thanks all! Since it seems that the kit is of sufficient quality, I'll probably end up getting that. Again, thanks! :tiphat:

#### Spaced

##### New member
As for the filters, they're not just for astrophotography

Ah, nice one. I'll have to try them out again ASAP. With most objects I'm lucky if I can gather enough light for the higher power eyepieces without it all turning to a grey mulch. Filters compounded the problem, so I reckon that was why I never gave them much of a chance with my 4" newtonian.
I probably benefit from the Barlow more than you too. Although I must clarify to fireballs619, Mars's polar caps, although discernable at highest power using the Barlow, it required a heck of a lot of imagination too. The experience made me sympathise with Mr Lowell's canals.

Glad to hear you were smart enough to use the moon filter first time out agentgonzo. I was like a kid in a candy store desperate to try out my new toys and rushed things. I'd read all about the dangers of solar observing, but no one told me about the moon. Sir Patrick, why's that? I thought the moon was your thang and there's and there's not a sausage of its danger in your books. No wonder you wear a monocle.

I really must upgrade at some point. I started to get fed up viewing everything with averted vision. There's some things I still want to tick off my list and currently lack the ability. Uranus as more than a dull grey dot, Neptune, the Cassini division, difinitive views of Mar's caps, Phobos, granules on the sun and a healthy portion of Messier objects.
Still..... I've had grand views of Sinus Iridium at dawn, tracked sunspots, seen a satellite pass in front of the moon. A definite "WTF was that?!" moment. I also caught a glimpse of a gorgeous neighbour undressing, but that was an accident I assure you and being a gentleman I waited until the moon sank down and then continued my planned evening's observations.

Speaking to The Void, lol, I do that regularly offline....... Meade's the way to go is it? What makes you recommend them over the competition? I might have a few grand to chuck at a new scope in 6 months and the means to travel beyond London's "sickly orange barf glow". Hadn't thought too seriously about it until now.

Fireballs619 said:
Thanks all! I'll probably end up getting that.

I hope you get as much use and enjoyment from it as I have. :thumbup:

#### agentgonzo

##### Grounded since '09
Addon Developer
Ah, nice one. I'll have to try them out again ASAP. With most objects I'm lucky if I can gather enough light for the higher power eyepieces without it all turning to a grey mulch. Filters compounded the problem, so I reckon that was why I never gave them much of a chance with my 4" newtonian.
Ah, yes. With a 4" you will only get 1/4 of the light that I get in my 8" and so filters and high power mag will make things quite dim. Especially if you are viewing from light polluted areas and so you won't have really well adapted night vision

Glad to hear you were smart enough to use the moon filter first time out agentgonzo.
See above about me getting 4x as much light as you. Still blinding!

seen a satellite pass in front of the moon. A definite "WTF was that?!"
I had an airliner fly right through my FoV one time when viewing a messier object. Zipped across the FoV in about a tenth of a second being massive, partly grey with the tail light on and the red/green wingtip lights. Scared the living bejesus out of me!


text:
LLVM  6.0.0svn
llvm::TargetInstrInfo::MachineOutlinerInfo Struct Reference

Describes the number of instructions that it will take to call and construct a frame for a given outlining candidate. More...

#include "llvm/CodeGen/TargetInstrInfo.h"

Collaboration diagram for llvm::TargetInstrInfo::MachineOutlinerInfo:
[legend]

## Public Member Functions

MachineOutlinerInfo ()

## Public Attributes

Number of instructions to call an outlined function for this candidate. More...

Number of instructions to construct an outlined function frame for this candidate. More...

unsigned CallConstructionID
Represents the specific instructions that must be emitted to construct a call to this candidate. More...

unsigned FrameConstructionID
Represents the specific instructions that must be emitted to construct a frame for this candidate's outlined function. More...

## Detailed Description

Describes the number of instructions that it will take to call and construct a frame for a given outlining candidate.

Definition at line 1567 of file TargetInstrInfo.h.

## ◆ MachineOutlinerInfo() [1/2]

 llvm::TargetInstrInfo::MachineOutlinerInfo::MachineOutlinerInfo ( )
inline

Definition at line 1583 of file TargetInstrInfo.h.

## ◆ MachineOutlinerInfo() [2/2]

inline

Definition at line 1584 of file TargetInstrInfo.h.

## ◆ CallConstructionID

 unsigned llvm::TargetInstrInfo::MachineOutlinerInfo::CallConstructionID

Represents the specific instructions that must be emitted to construct a call to this candidate.

Definition at line 1577 of file TargetInstrInfo.h.

Number of instructions to call an outlined function for this candidate.

Definition at line 1569 of file TargetInstrInfo.h.

## ◆ FrameConstructionID

 unsigned llvm::TargetInstrInfo::MachineOutlinerInfo::FrameConstructionID

Represents the specific instructions that must be emitted to construct a frame for this candidate's outlined function.

Definition at line 1581 of file TargetInstrInfo.h.


text:
## Monday, November 20, 2006

### [TECH] DAG's and Dynamic Programming......

Directed Acyclic Graph (DAG), directly embeds into dynamic programming....as from Vazirani's notes, the useful property of the DAG is that its nodes can be linearized (topologically). So if we process these nodes in the topological order we have sub-problems solved and the solution can be used for the next level. In the simple example of shortest path, we need (u1,v) , (u2,v) are the edges adjacent on the node v. To solve the shortest path problem we need the shortest path to u1, u2 to get the shortest path to v. The wonderful property of the DAG's is that if we start with the topological SOURCE (may be hypothetical by adding 0 weight edges), we are sure that we solved u1,u2 before solving v (if we process the nodes in topological order)

Longest monotonic subsequence in a given sequence, suppose the given sequence is '5,2,8,6,3,6,9,7' (The longest monotonically increasing sequence) in this is 2,3,6,9. On the first look, it appears that it doesn't have sub-optimality inside it. In the sense take a subsequence '5,2,8' the longest monotonically increasing subsequence in this is is (5,8) or (2,8) but neither (5,8) and (2,8) is not in the overall longest monotonic subsequence, so the question is how dynamic programming works here??.....well people don't talk about the sub-optimality here......but still this can be solved by dynamic programming...
Let me restate the principle of optimality here...."If a optimization problem involves of sequences of decisions d1,d2,d3,d4...dn . The principle of suboptimality states that what ever decision you make initially the rest of the decisions should still optimize whats remaining after making decision d1...i.e would form a sequence of decisions to save a smaller optimization problem
Any way I wrote the following code segment , S[i] = length of the longest monotonic subseqence ending at index i, input is a array of integers A[i].

global_max_length=-INFINITY;
PATH[N];
for(i=0;i0;j--){
if(A[j] < A[i]){
if(S[j]+1 > S[i]){
S[i] = S[j]+1;
if(S[i] > global_max_length){
global_max_length = S[i];
PATH[N] = j;
}
PATH[i] = j;
}
}
}
}

void printSeqence(){

int j=N;
do{
print("%ld ",A[PATH[j]]);
j = PATH[j];
}while(j!=PATH[j])

}

global_max_length , returns the length of the longest monotonic increasing sequence, and also prints the sequence

Apart from this life has been very cold, man today was REALLY_ __FREEZING__ here, I have cold the damn cold, I cannot drink cool drinks, eat any cold stuff it sucks......Well , I'll be going to India soon meet swapna,chamu...just talked to chamu on the phone, hope to see her and swappy soon...............THE LIFE GOES ON ON ON...by the way the GYM is closed till 26th and its cold outside I cannot even jog its really HELL out here

With love ...............Vamsi...............


text:
constant:MagneticConstant

Type
Description

$$\textbf{Magentic Constant}$$, also known as $$\textit{Permeability of Vacuum}$$, is a scalar constant $$\mu_0$$ such that, in a vacuum the product with the magnetic field vector, $$\overrightarrow{H}$$ is equal to the magnetic flux density vector, $$\overrightarrow{B}$$.

Properties
magnetic-constant
$$\textbf{Magentic Constant}$$, also known as $$\textit{Permeability of Vacuum}$$, is a scalar constant $$\mu_0$$ such that, in a vacuum the product with the magnetic field vector, $$\overrightarrow{H}$$ is equal to the magnetic flux density vector, $$\overrightarrow{B}$$.
$$\mu_0 = \frac{\overrightarrow{B}}{\overrightarrow{H}}$$, where $$\overrightarrow{B}$$ is the B-Filed magnetic vector, and $$\overrightarrow{H}$$ is the H-Filed magnetic vector. The value of $$\mu_0$$ is $$\approx 1.256637e-6\,H/M$$.
$$\mu_0$$
Annotations
Magnetic Constant(en)

Generated 2021-09-16T16:35:05.302-07:00 by lmdoc version 1.1 with  TopBraid SPARQL Web Pages (SWP)


text:
Ask Your Question

how to set x-axis major grid intervals when scale is text

I have a line chart where the x-axis is taken from a column containing the name of each row of accounting-month data (ie. not strict calendar months). I want a major grid line every twelve accounting months, but because the scale format is "text" this does not seem to be an option. I have tried re-defining the scale as "date" but this only offers grid intervals based on a number of days, not periods.

My requirement must be very common and it isn't an issue in Excel, so I think I must be missing an obvious solution here.

In response to LeroyG, I am using version 6.4.4.2 and I am attaching a sample file (assuming my first attempt at this works)

New information: I have just discovered that the problem I am having disappears when I delete the final row of my spreadsheet (row 89 in the sample file). When I do this after following your instructions I can see monthly minor gridlines and yearly major gridlines exactly as I want them.

If it is any sort of clue as to what is going on, copy row 89 into a new row 90, and then delete 89 and this makes the chart work properly too, even though the data should be exactly the same. It is unfortunate that I tried to modify my chart immediately after both updating LibreOffice and also creating the new row in my spreadsheet, as I now have no idea which change gave rise to the issue.C:\fakepath\Sample chart for AskLibreOffice.ods

edit retag close merge delete

Comments

What's wrong with

• Select the x-axis
• Right click -> Insert Major Grid (this adds a grid line on each month)
• Right click -> Format Major Grid

?

( 2020-06-03 13:48:56 +0200 )edit

1 Answer

Sort by » oldest newest most voted

petertn6,

Right-click on X-axis, select Insert Major Grid and Insert Minor Grid.

Right-click on X-axis, select Format Axis…; in Scale tab, select Type as Date, Major interval as 12 Months.

If the answer solved your question, mark the circle to the left. Do not use Answer to comment. You could edit your question, or comment an answer.

EDIT: Content of cell A89 is in Text format, change to Date format, and retype the date.

more

Comments

I did what you suggested, using an existing chart and after first deleting the major & minor grids that were already there. I also changed the Resolution to Months and formatted the Major Gridlines to be thicker than the Minor ones. However the result I get is still a grid line on every month, not one every twelve, even after deleting the minor grid again.

When I go back to the Format X-axis Scale tab I can see why nothing has changed - the Major Interval and Minor Interval Automatic check boxes have both reverted to having check marks in them, the Major Interval is 1 month and the Minor Interval is 2 months (sic). I can repeat your instructions any number of times and the interval settings always reset themselves to these values. And before anyone asks, yes, I am clicking OK and not Cancel!

( 2020-06-03 17:02:17 +0200 )edit

Can you share the chart? Delete all sensible data, replace with neutral text. Edit your question and use the paperclip.

Wich version of LibreOffice are you using (menu Help - About LibreOffice).

( 2020-06-03 17:08:16 +0200 )edit

I have edited my original question and I think I have successfully uploaded a sample file. I can't see the file myself but I am not sure if I am supposed to. Please let me know if you can see it.

( 2020-06-03 18:49:15 +0200 )edit

There is no attachment to your question - may be lack of karma, which I've provided now.

( 2020-06-03 18:52:54 +0200 )edit

I've just tried to upload again. I can browse to the file and select it, see an upload name in the box but there is no evidence that anything is happening when I clcik OK. In case you hadn't guessed, thiis is the first time I've posted a question and I don't know what a question with an attahment would look like. I also didn't knw what a Karma was but I can see now that I've got one and it lets me do uploads.

( 2020-06-03 18:58:09 +0200 )edit

You will see an attachment some like C:\fakepath[a bunch of numbers].ods in blue.

( 2020-06-03 19:11:38 +0200 )edit

Looks like my upload has worked now.

( 2020-06-03 19:23:45 +0200 )edit

@petertn6 - as @LeroyG stated your "date" in A89 is not a real calc date but text. Use View -> Value [x] Highlighting to find these kind of problems (text is black, numbers are blue and formulas are green). Dates in calc are integers counting the number of days since 1899-12-30.

( 2020-06-03 19:50:27 +0200 )edit

Opaque, Thanks for that tip. I've only recently migrated this spreadsheet from Excel and the embedded Excel charts didn't move across very well at all. I deleted them and created them from scratch in Calc and they were OK apart from this one issue with gridlines. I also continued to create new spreadsheet rows by copying and pasting without checking that Calc handled this operation in the same way as Excel. Turns out that sometimes it doesn't, so I've learned something new and can finally think about not hanging on to Excel "just in case". Thanks again to both of you.

( 2020-06-03 20:25:41 +0200 )edit

Stats

Asked: 2020-06-03 13:25:56 +0200

Seen: 418 times

Last updated: Jun 03 '20


text:
# MathLib.Functn()

MathLib.Functn is MathLib's implementation of mathematical functions.

Unlike all other MathLib constructors `MathLib.Functn` is called without the `new` keyword, due to technical limitations in JavaScript. Most of the times however you probably don't need to call `MathLib.Functn` directly, since MathLib has very many predefined functions.

## Examples

Lets say we want to implement the Fermi rounding, which is used in Fermi estimates: $\mathrm{Fermi}\left(x\right)={10}^{\mathrm{round}\left({\mathrm{log}}_{10}x\right)}$ First we have to create the JavaScript function like this: ``` var fermi = function (x) { return Math.pow(10, Math.round(Math.log(x) / Math.LN10)) } ``` Next we decide what our bound variable should be. Lets choose `x` like in the formula above. ``` var args = [MathLib.Expression.variable('x')]; ``` Since MathLib also works with functions that have more then one variable we have to put the variable in an array. Now we can generate the mathematical expression which is describing the function. This is important when modifying the function later. ``` var expr = new MathLib.Expression({ subtype: 'functionDefinition', args: args, content: [new MathLib.Expression({ subtype: 'functionCall', content: args, value: 'Fermi' }) ] }) ``` Finally we can construct the Functn: ``` MathLib.Functn(fermi, { name: 'Fermi', expression: expr }); ```

## Properties

.constructor
The function MathLib.Functn
.type
The string "functn"

## Methods

.diff()
Numeric derivative at a given point.


text:
# Difficult Number System Solved QuestionAptitude Discussion

 Q. If $n = 1 + x$, where $x$ is a product of four consecutive positive integers, then which of the following is true? A. $n$ is odd B. $n$ is prime C. $n$ is a perfect square
 ✔ A. A and C only ✖ B. A and B only ✖ C. A only ✖ D. None of these

Solution:
Option(A) is correct

Since $x$ is the product of four consecutive integers, it is always divisible by 4, i,.e., it is always even. So, $1 + x$ is always odd.

$n=1+x$

\begin{align*} x&=(y-1)(y)(y+1)(y+2)\\ &=y(y^2-1)(y+2)\\ &=(y^3-y)(y+2)\\ &=y^4+2y^3-y^2-2y \end{align*}

\begin{align*} \Rightarrow 1+x& =y^4+2y^3-y^2-2y+1 \\ &= y^4+y^2+1+2y^3-2y^2-2y\\ &=(y^2+y-1)^2 \end{align*}

So, $1 + x$ is a perfect square as we can see. Hence, option A is the correct choice.

Note: In an exam, even if you are not able to work mathematically as above, you should not leave out this type of question. You should take two or three numerical values for $x$ and check which of the choices will be satisfiÂed. Take the four consecutive integers as $(1, 2, 3, 4)$, $(2, 3, 4, 5)$ and $(3, 4, 5, 6)$ and in each case, we find that $1+ x$ is a perfect square and odd. Then, we can mark (A) as the answer choice.


text:
# What is an equivalent fraction and how to work out an equivalent fraction (2/4 = 4/8)

Equivalent fractions are fractions that are the same size. The numbers on the numerator and denominator may be different, but if you draw out the fractions on a circle they will cover exactly the same amount of space. So for example, 4/8 and 2/4 are equivalent to each other, as they cover exactly half of a shape.

To find a fraction which is equivalent to another fraction, all you need to do is multiply the numerator and denominator of the fraction by the same number.

Example 1

Write down an equivalent fraction to 2/3.

All you need to do is pick a times-table and multiply the numerator and denominator by this times table.

Let’s go with the 6 times table.

2 × 6 = 12

3 × 6 = 18

So 2/3 = 12/18

Example 2

Write down an equivalent fraction to 6/11.

Like example 1, all you need to do is pick a times-table and multiply the numerator and denominator by this times-table.

This time, let’s pick the 7 times table.

6 × 7 = 42

11 × 7 = 77

Therefore, 6/11 = 42/77

Example 3

Write down an equivalent fraction to 5/8.

This time, let’s pick the 3 times-table.

5 × 3 = 15

8 × 3 = 24

Therefore, 5/8 = 15/24

Example 4

Write down an equivalent fraction to 3/4.

This time, let’s pick the 9 times-table.

3 × 9 = 27

4 × 9 = 36

Therefore, 3/4 = 27/36

Example 5

Find the missing numerator of these equivalent fractions 2/5 = ?/35.

Here, you need to find the times-table that the first fraction has been multiplied by to give the second fraction.

Do this by dividing the two denominators.

35 ÷ 5 = 7

So all you need to do now is multiply the numerator by 7.

2 × 7 = 14.

So 2/5 = 14/35.

Example 6

Find the missing denominator of these equivalent fractions 5/6 = 20/?

Again, you need to find the times-table that the first fraction has been multiplied by to give the second fraction.

Do this by dividing the two numerators.

20 ÷ 5 = 4

So all you need to do now is multiply the numerator by 4.

6 × 4 = 24.

So 5/6 = 20/24

2

2

0

0

## Popular

2

8

• ### The Number 9 | The Secret Knowledge of The Ancients Number Nine Code 911

111

Submit a Comment

when i was in year 5, the teacher would show me a method, and i only remmember half of it, and it is completely different than your method, Example:

24

- -

4 32 You must multiply 24 and 4 then i think you divide it with 32? i have a math test tommorow and i will fail if i didn't get this!!!

• Teara 5 years ago

• Nica is now Level 4 in Pioneer Trail! 5 years ago

its coll

• Author

Mark 5 years ago from England, UK

The question is a little vague. I think the question wants you to convert it to a decimal 5 divided by 6 = 0.83 rounded to 2 decimal places. Do this on your calculator.

• help with this fraction 5 years ago

5/6 What is this value?


text:
# Math Help - Alebra Equation

1. ## Alebra Equation

Find an equation of variation in which y varies inversely as x and the following condition exists: 1) y=63 when x=1/7

A) y = 9/x
B) y= 2/x
C) y= 16/x
D) y = 7/x

2. Originally Posted by kharris82
Find an equation of variation in which y varies inversely as x and the following condition exists: 1) y=63 when x=1/7

A) y = 9/x
B) y= 2/x
C) y= 16/x
D) y = 7/x
$y$ varies inversely as $x$ beans that there is a constant
$k$ such that:

$
y=\frac{k}{x}
$
.

Now when $x=1/7$, $y=63$, so:

$
63=\frac{k}{1/7}=7k
$
,

hence $k=63/7=9$, and so:

$
y=\frac{9}{x}
$
,