text:
• Create Account

We're offering banner ads on our site from just \$5!

# (C++ Beginner) I hate to post here, but... why won't my "if" statement evaluate a string?

Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

35 replies to this topic

### #21King Mir  Members   -  Reputation: 2050

Like
0Likes
Like

Posted 16 July 2012 - 06:40 PM

C++ switch statements only work with some data types (mostly ints) - not with std::strings. Even so, that's pretty ugly syntax.

Which is why I said "some languages" and not "c++ and some languages"

Ah, I thought your "some languages" was a not-so-subtle "hint hint", referring to C++ itself (What with the topic being about C++, and the "Close enough?" comment).

I was responding to kunos's question if any languages allowed the syntax he quoted.

Why do you think switches are ugly?

Not switches, per se, but using switches (which are typically meant to branch logic) to imitate the use of AND logic (which is what && is for).
In some situations it may be the best solution, but in general I prefer to use if() when I mean logical IF, and && when I mean logical AND.

Totally don't agree here. Switching on a variable is what switches are for.

### #22Servant of the Lord  Crossbones+   -  Reputation: 20965

Like
0Likes
Like

Posted 16 July 2012 - 07:02 PM

Switching, yes, but you aren't switching (the code execution path isn't really changing much), you're faking multiple logical ANDs, and using more lines to do so, with - in my opinion - slightly less code clarity.

Ah, I thought your "some languages" was a not-so-subtle "hint hint", referring to C++ itself (What with the topic being about C++, and the "Close enough?" comment).

I was responding to kunos's question if any languages allowed the syntax he quoted.

Ah, my mistake then.

Edited by Servant of the Lord, 16 July 2012 - 07:15 PM.

It's perfectly fine to abbreviate my username to 'Servant' rather than copy+pasting it all the time.
All glory be to the Man at the right hand... On David's throne the King will reign, and the Government will rest upon His shoulders. All the earth will see the salvation of God.
Of Stranger Flames -

[Need web hosting? I personally like A Small Orange]

### #23Cornstalks  Crossbones+   -  Reputation: 6991

Like
1Likes
Like

Posted 16 July 2012 - 07:14 PM

*snip*
[...] AND logic (which is what && is for).
[...] and && when I mean logical logical AND.

[...] you're faking multiple logical ANDs

I presume you mean logical OR (operator ||), correct?

and using more lines to do so

Depends on how you format your code. I'd probably break the if condition into multiple lines if it was that long anyway. But that's me.

I don't think I'd use a switch for only two code paths (like in this example), but I might use it if there are more (or if I was switching on strings and the switch was done by hashes and operator == was not, and I cared about that).
[ I was ninja'd 71 times before I stopped counting a long time ago ] [ f.k.a. MikeTacular ] [ My Blog ] [ SWFer: Gaplessly looped MP3s in your Flash games ]

### #24Servant of the Lord  Crossbones+   -  Reputation: 20965

Like
1Likes
Like

Posted 16 July 2012 - 10:18 PM

*snip*
[...] AND logic (which is what && is for).
[...] and && when I mean logical logical AND.

[...] you're faking multiple logical ANDs

I presume you mean logical OR (operator ||), correct?

</facepalm> Yes, logical OR.

and using more lines to do so

Depends on how you format your code. I'd probably break the if condition into multiple lines if it was that long anyway. But that's me.

Certainly, I typically write longer comparisons like this:
if(blah || blah || blah
|| blah || blah)
{
//...
}

...and, depending on the logic of the function, may even group the options into boolean variables.
bool logicalEvaluationA = (blah || blah || blah);
bool logicalEvaluationB (blah || blah);
if(logicalEvaluationA || logicalEvaluationB)
{

}

...but switch statements just have more visible clutter (to me). Furthermore, the name 'switch()' implies switching, and past usage and experience teaches your mind that that is what those kinds of statements do.

When you read code, you have certain expectations from blocks of code before you even read it. while() implies a loop, as does for(). for() usually implies an iteration or a fixed number of loops, whereas while() usually implies a continuous loop until some condition is meant. if() usually implies conditional logic, if-else() multiple branches, and switch() usually implies a large number of branches.
When these "first glance" expectations are then turned on their head following a closer inspection, my mind has to do a double take, and reevaluate the whole block of code.

Doing things like:
do
{

}
while(false); //Hahah, not actually a loop!

Or:
switch(option)
{
case :
case :
case :
case :
case :
{

} break;
default: //Jokes on you, I'm actually a if-else() statement in disguise!
{

} break;
}

...increase the time it takes (at least for me) to understand code, because my mind has to then backpedal and throw out some previously made common assumptions about the code that is usually true, but in this case is not.

Often times when reading through code, you don't actually have to read the fine details of the code, you can just look at the general picture and understand what it's doing. This is really useful. If the code does what it is expected to do, and looks like it should do, that's good. If you have to manually mentally walk through a piece of code to find out what it actually does, because it breaks expectations, that's not good (but is acceptable if that's what is required - for example, a heavily optimized algorithm).

Reading code (from top of the page downward), you start to build an idea of what the code does.
for(int i = 0; i < myVector.size(); i++)

"...looking at the lady in the red dress? Look again, Neo."
for(int i = 0; i < myVector.size(); i++)
{
//...code...
if((myVector % 2) == 1)
{
i++;
}
//...code...
}

Additional logic that controls the flow of the entire loop is buried in the body of the loop?!

A 'break', 'return', or even 'continue' is fine, because your mind easily parses those keywords and can argument it's understanding of the code very rapidly. It'll take a few moments longer for your mind to recognize the 'i++' alters the flow of the code (and even longer if it's hidden away admist other code), and it may even have to throw out parts of its previous understanding that your mind has already built up, causing even more mentally delay and extra mental, "Let me double check this" processing as it encounters unexpected deviations from the norm.

I don't think I'd use a switch for only two code paths (like in this example), but I might use it if there are more (or if I was switching on strings and the switch was done by hashes and operator == was not, and I cared about that).

Well sure, I'm not at all saying switch()s are bad. I'm not even saying case fall-through is bad. When asked about it originally, I was trying to explain that using a switch() when you really want a single if() or if-else() is undesirable as a default thing to go to, because it makes your code less understandable at-a-glance, and departs from the norm of what is expected that a switch() statement does.

For multiple branches of logic, switch() statements are excellent. For other situations, switch() statements are less desirable. 'Less desirable' may be a fine tradeoff if something else is needed in its place, like speed or memory optimization, but if you are decreasing readability and not gaining anything at all, that's not a good tradeoff - so as a default (but I'm not saying "never" or "always" - there are exceptions), one should go for the most commonly expected solution, so code does what one expects it to do.

An extreme example of such a valid optimization vs code expectation tradeoff would be Duff's Device.
Do you understand that code? Being honest with yourself, how many times did you have to read through it carefully (the first time you ever saw it) before you understood it?

Now this, on the other hand:
int sum = 0;
for(iterator = numbers.begin(); iterator != numbers.end(); iterator++)
{
sum += *iterator;
}

Using a switch() to choose between multiple hashes of a string? Certainly, because you're switching between multiple code branches. When you see a switch() statement, this is your instant expectation from your prior experience with switch statements.
Using a switch() to imitate "if(optionA OR optionB OR optionC)" won't cause too much mental backpedaling, but it will take a bit longer to process because you are failing to take advantage of the instant mental expectation of if()s which are normally used for that purpose... so by default, one should prefer the more common "if( OR OR )" with its built-in mental benefits and syntactical simplicity.

Edited by Servant of the Lord, 16 July 2012 - 10:48 PM.

It's perfectly fine to abbreviate my username to 'Servant' rather than copy+pasting it all the time.
All glory be to the Man at the right hand... On David's throne the King will reign, and the Government will rest upon His shoulders. All the earth will see the salvation of God.
Of Stranger Flames -

[Need web hosting? I personally like A Small Orange]

### #25King Mir  Members   -  Reputation: 2050

Like
1Likes
Like

Posted 16 July 2012 - 11:07 PM

I agree with you in general, but not concerning switch. There's not much cognitive difference between this:
switch(myString){
case "--option1":
case "-o1":
case "o1":

...
break;
default:
...
}
And this:
switch(hash(myString)){
case hash("--option1"):
case hash("-o1"):
case hash("o1"):
...
break;
default:
...
}

Or doing the same thing with a single character. Not having to write myString== a bunch of times reduces code size, and so clarifies what's going on; it's only comparing values to a single variable. To each his own I guess.

### #26Krohm  Crossbones+   -  Reputation: 3245

Like
2Likes
Like

Posted 17 July 2012 - 03:49 AM

I'm confused about what you are disagreeing with.

Are you saying that this...

if(name == "person mcperson" || name == "Person Mcperson" || name == "Person McPerson"
|| name == "PERSON MCPERSON" || name == "person MCPERSON" || name == "PERSON mcperson" || ...etc... )
{
//...
}

...is better than this:
std::string name = "Person McPerson";
std::transform(name.begin(), name.end(), name.begin(), ::tolower);
if(name == "person mcperson")
{
//...
}

Or are you just saying to cache the lowercase name when possible, so you don't have to convert it every function call?

Neither, but it appears you're likely got things in reverse.
What I'm saying is that the whole notion of string (upprer/lower case) permutations is flat out insane.The difference is conceptual, even before we start thinking about comparing strings, so many things have gone wrong I can hardly believe.
• there should be input sanitization forcing a coherent format... but let this pass.
• everyone thinking about storing or even computing those permutations is on the wrong track: this is clearly not the way to do things (very special bonus for elaborations about working on strings loaded from a file you know nothing about!). But what the heck, let this pass as well.
• everyone saying that toupper is to be used "to save space" is not saying it as (s)he should. What (s)he should say is "you have to use the proper function becouse everything else is flat out broken and if you have come so far you're really better take a step back and rethink everything you have done so far"!
Original OP question is: why my string comparisons do fail? Because of operator precedence and syntax rules.
But the problem he is having, behind the scenes is he does not understand the basic of string comparisons in this specific context (as much as having two variables varx and VARX might make sense, I hardly believe the difference between Person McSurname and Person MCSurname is meaningful in most cases).
All posts regarding permutations are madness. And should be eradicated. Some people reading this might actually believe working with the permutation is somewhat ... maybe encouraged? Think of the children!

If a string is so important permutations have to be checked... it probably is not a string!

I don't know if I'm being able to explain myself.

### #27Álvaro  Crossbones+   -  Reputation: 13897

Like
0Likes
Like

Posted 17 July 2012 - 06:10 AM

I think I should point out that neither of King Mir's snippets is valid: You can't use switch' on strings, and you can't have non-constant values in the case clauses.

You can use a hash map (unordered_map') to convert a string into an enum and then switch on the enum. In one case I used a trie instead of a hash map because speed was critical, but you generally won't need that.

Edited by alvaro, 17 July 2012 - 06:12 AM.

### #28Servant of the Lord  Crossbones+   -  Reputation: 20965

Like
1Likes
Like

Posted 17 July 2012 - 12:09 PM

...
...

I don't know if I'm being able to explain myself.

I think I get what you're saying, and those are some good points. Let me try to summarize what I think you are saying:
1) For comparisons, strings are not what should be used - if you are using a string to frequently compare to other values, it shouldn't be a string.
2) If you have to compare strings (because they come from user input - like parsing files) they should be sanitized when received, not when compared.

Am I missing anything?

Edited by Servant of the Lord, 17 July 2012 - 12:10 PM.

It's perfectly fine to abbreviate my username to 'Servant' rather than copy+pasting it all the time.
All glory be to the Man at the right hand... On David's throne the King will reign, and the Government will rest upon His shoulders. All the earth will see the salvation of God.
Of Stranger Flames -

[Need web hosting? I personally like A Small Orange]

### #29Cornstalks  Crossbones+   -  Reputation: 6991

Like
2Likes
Like

Posted 17 July 2012 - 12:29 PM

I think I should point out that neither of King Mir's snippets is valid: You can't use switch' on strings, and you can't have non-constant values in the case clauses.

I don't know if you saw this. If you did, sorry for being redundant. That's what Servant of the Lord pointed out, but King Mir was responding to kunos's question if any languages allowed the syntax he quoted. Since then, the thread kind of derailed into non-C++ land. Yes, it's worth pointing out that this can't be done in C++, but it's also worth pointing out that this can be done in some other languages.

@Servant of the Lord: I wasn't saying you implied all switches were bad. The primary point of my post was the operator mix up The other points were just small addendum; I didn't think you'd write such an epic reply ha. I think I'm more used to seeing switch statements used in ways similar to Duff's Device, though. That's probably due to my work in C with FFmpeg, where things like that are common. Whether it's clear or not to someone I think depends on both the person and the situation. And whether or not code like that is a "good idea" is something else too
[ I was ninja'd 71 times before I stopped counting a long time ago ] [ f.k.a. MikeTacular ] [ My Blog ] [ SWFer: Gaplessly looped MP3s in your Flash games ]

### #30Servant of the Lord  Crossbones+   -  Reputation: 20965

Like
0Likes
Like

Posted 17 July 2012 - 12:50 PM

@Cornstalks: I lack succinctness.
My posts are usually too repetitive, reiterating previous points multiple times.
It's perfectly fine to abbreviate my username to 'Servant' rather than copy+pasting it all the time.
All glory be to the Man at the right hand... On David's throne the King will reign, and the Government will rest upon His shoulders. All the earth will see the salvation of God.
Of Stranger Flames -

[Need web hosting? I personally like A Small Orange]

### #31King Mir  Members   -  Reputation: 2050

Like
0Likes
Like

Posted 17 July 2012 - 11:26 PM

I think I should point out that neither of King Mir's snippets is valid: You can't use switch' on strings, and you can't have non-constant values in the case clauses.

You can use a hash map (unordered_map') to convert a string into an enum and then switch on the enum. In one case I used a trie instead of a hash map because speed was critical, but you generally won't need that.

The examples were not C++. It was a divergent discussion on the elegance of using switch statements to compare a value to series of literals when there are only two possible branch paths. In fact the same question arises when using int, so the discussion is relevant to C++, though the examples aren't.

### #32Krohm  Crossbones+   -  Reputation: 3245

Like
0Likes
Like

Posted 18 July 2012 - 12:47 AM

I think I get what you're saying, and those are some good points. Let me try to summarize what I think you are saying:
1) For comparisons, strings are not what should be used - if you are using a string to frequently compare to other values, it shouldn't be a string.
2) If you have to compare strings (because they come from user input - like parsing files) they should be sanitized when received, not when compared.

Am I missing anything?

Almost there.
3) If you do not sanitize and need to work on strings, at least make sure you're understanding the real meaning of the data you're looking at. Compare them case-insensitive for this specific case using toupper.

### #33TMKCodes  Members   -  Reputation: 271

Like
0Likes
Like

Posted 18 July 2012 - 08:56 AM

I think I get what you're saying, and those are some good points. Let me try to summarize what I think you are saying:
1) For comparisons, strings are not what should be used - if you are using a string to frequently compare to other values, it shouldn't be a string.
2) If you have to compare strings (because they come from user input - like parsing files) they should be sanitized when received, not when compared.

Am I missing anything?

Almost there.
3) If you do not sanitize and need to work on strings, at least make sure you're understanding the real meaning of the data you're looking at. Compare them case-insensitive for this specific case using toupper.

About point one. So if I can't use username in the database and username given by the user as a input to compare if the user gave the correct input then what the fuck I should compare? Better example yet is searching for a username in the database without knowing the users id. String comparisons happen every day everywhere, so why they should not be used? Even when you log in to gamedev.net. We would not have compilers if we would not compare strings...

Edited by TMKCodes, 18 July 2012 - 09:00 AM.

### #34BinaryPhysics  Members   -  Reputation: 294

Like
0Likes
Like

Posted 18 July 2012 - 11:25 AM

"Saves space" is pushing it though, overhead of calling method is likely to outweight space saving but of course this is irrelevant and space saving is hardly the reason to use this approach.

I did have this in the back of my mind by I was, for some bizarre reason I can't currently recall, thinking more in terms of space in the actual source file. Having 30 lines to catch a single string is pretty ugly...

It's also more human-friendly. It allows the program to recognise a string however someone wants to write it.

### #35Williamcrdv  Members   -  Reputation: 106

Like
1Likes
Like

Posted 18 July 2012 - 12:48 PM

you can use the string::find() member function as I do below to check if the string contains "tiffany" which would remove all of the other superfluous checks. You could search for the minimal accepted permutation of the name, even just "tif" (just in case she can't spell her name correctly).

#include <iostream>
#include <string>
#include <algorithm>
using namespace std;
int main(void)
{
cout << "Hello \n";
cin.get();
cout << "What is your name? ";
cin.get();

{
cout << "Your name is Tiffany... \n The Creator has a message for you: \n I love you Cupcake";
cin.get();
}
else
{
cout << "Your name is not Tiffany.";
cin.get();
}
}

### #36Sarmon  Members   -  Reputation: 103

Like
0Likes
Like

Posted 21 July 2012 - 03:30 AM

if (username == "Tiffany" || "tiffany" || "Tiffany McClure" || "tiffany McClure" || "Tiffany Mcclure" || "tiffany mcclue")

`

Am I the only one thinking that looks pretty elegant? Is there any language that implements this way of checking the same variable for different boolean cases?

Regular expressions can match a specified pattern, every language will have at least one implementation of a regex language.

EDIT: Although that's not exactly what you're asking, the effect is to want to test your variable against a range, which for strings is equivalent to a pattern.

Edited by Sarmon, 21 July 2012 - 03:32 AM.

Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

PARTNERS


text:
# Revision history [back]

Definition:     H.conjugacy_classes_representatives(self)
Docstring:
Returns a complete list of representatives of conjugacy classes in
a permutation group G. The ordering is that given by GAP.

Definition:     H.character_table(self)
Docstring:
Returns the matrix of values of the irreducible characters of a
permutation group G at the conjugacy classes of G. The columns
represent the conjugacy classes of G and the rows represent the
different irreducible characters in the ordering given by GAP.

So it seems that the rows correspond to characters only, and perhaps they aren't guaranteed to be in the same order as the conjugacy classes. After all, in your example above, which of the two 3-dimensional reps should correspond to which order 9 conjugacy class? And I do get the same order for the irreducible characters as in the table with H.irreducible_characters().

format: plain


text:
## Fluid Section Types: Open Channels

A network element is characterized by a type of fluid section. It has to be specified on the *FLUID SECTION card unless the analysis is a pure thermomechanical calculation (no calculation of pressure, mass flow or fluid depth). For an open channel network the boundary conditions for each branch are located upstream (frontwater flow) or downstream (backwater flow). These boundary conditions are made up of special elements, such as a sluice gate or a weir. Nearly all of these elements actually consist of pairs of elements, which reference each other. For instance, adjacent and downstream of the sluice gate element a sluice opening element has to be defined. The upstream element of such a pair has an additional degree of freedom attached to its middle node to accommodate the location of any hydraulic jump which might occur in the downstream channel branch. Therefore, all elements downstream of a pair of such boundary elements have to reference the upstream element of the pair. In our example, this is the sluice gate element. The friction in all elements is modeled by the White-Colebrook law, unless the parameter MANNING is specified on the *FLUID SECTION card. For details on these laws the reader is referred to Section 6.9.18.

Subsections


text:
# HTML5 Applet to Explore Equations of Ellipses

An HTML5 applet to explore the properties of the graph of ellipses whose equations are of the form $\dfrac{(x-h)^2}{a^2}+\dfrac{(y-k)^2}{b^2}=1$. The applets allows you to change the parameters $h$, $k$, $a$ and $b$.

 h = 0 k = 1 a = 3 b = 1
>

More HTML5 Math Applets for Mobile Learning


text:
# Questions tagged [oscillation]

The tag has no usage guidance.

155 questions
Filter by
Sorted by
Tagged with
27 views

### L5973 (step down) used in constant current oscillates

For a couple of days i'am playing with a L5973 dc - dc converter whith I want to convert to a constant current driver for 5 or 10W LED's. It kind of works but I get some oscillations in audible range. ...
61 views

### Is it possible for any circuit to independently make its own trigger, sweep or oscillation without the aid of an AC sine wave?

Even a Schmidt trigger, attributed to being able to create the start of an oscillating circuit, has to get its start from an AC sine wave. It seems that no amount of tubes or transistors can ...
68 views

### How to understand this oscillating circuit made of two transistors and R C?

How to understand this oscillating circuit made of two transistors and R C? This is an oscillating circuit which is made of two transistors and some R C. As below schematic shows, during the power ...
80 views

### How does a transistor sweep generator work?

In particular I'm wondering about oscilloscope sweep generators, but the concept I don't understand remains the same for any type, which is, what does the triggering? I know a transistor can be ...
30 views

### Multicell overvoltage protection with op amps, how to get rid of oscillating behavior?

Still a beginner in analog electronics, so excuse me for being inaccurate. Also I am playing with circuitjs@falstad.com which might not be the most accurate sim... I wanted to provide a very sharp ...
24 views

### Bridge rectifier ripple under load

Why when I put even a light load on the bridge rectifier output shows 100Hz ripple? simulate this circuit – Schematic created using CircuitLab SR240 datasheet
15 views

### 2 switch forward converter oscillation simulation

Here is the simulation of a 2 switches forward converter : The blue waveform is the voltage across the inductance. It seems that there is an RLC circuit. R is really low, which is why the ...
67 views

### Amplifying voltage from an inductor

I have a primary inductor connected to a voltage source with frequencies varying from 100kHz to 15MHz. This primary inductor induces a voltage across a secondary inductor via coupling and I want to ...
2k views

### The Intuition for RLC circuits

I'm reading through Hayt's Engineering Circuit Analysis 9e and it does a fairly good job of giving the intuition for "where" the energy is going in a damped RLC circuit, but I'm hoping that someone ...
59 views

### Finding Quartz Crystal Datasheets and Choosing resistors for Pierce Oscillators

I am trying to build a 2Hz oscillator using a CD4060 IC and a 32.768kHz quartz crystal for a digital clock project. The schematic below is from a hackersbench article. I've circled the part i'm ...
77 views

### How Does the Positive Feedback Bring an Oscillator's Poles on the Imaginary Axis?

In an oscillator, there is a positive feedback that injects energy into the system in order to sustain the oscillations. This feedback places the system's poles on the imaginary axis. I'd like to know ...
51 views

### Paralleling MOSFET Oscillation

I'm currently reading an application note about paralleling MOSFET and oscillation and it is written the following sentence : "In addition, parallel MOSFETs share a common low-impedance path, which ...
32 views

### Oscillations with paralleled MOSFET

I m actually reading a section of a book which talks about parralleling MOSFETs. The book talk about "Power supply design". There is a sub section which describes how to design the circuit layout. It ...
250 views

### Voltage levels of Microcontroller Oscillator Pins

I am using MPC5606S Microcontroller. I want to clear one concept and have a doubt. The Microcontroller using 8MHz crystal on the pins 27 (XTAL) and 29 (EXTAL) And a 32.768kHz RTC crystal between ...
146 views

### Guitar amp “motorboating” after upgrading op amps

I've been repairing an old (~1982) Fender solid-state guitar amp. While I had it apart I took the opportunity to replace some of the RC4558 op amps with NE5532's in DIP sockets I installed. It was ...
66 views

### Unstable current source when reaching a certain threshold in current draw

I’m currently building a system for automated testing of ECUs. It consists of an ECU with regulated loads connected to its power outputs. The other IO of the ECU is connected to an IO expansion card. ...
124 views

### Dave Jones's uCurrent - oscillations

uCurrent is a tool for measuring small (micro) currents by Dave Jones (EEVblog). He published source files: https://www.eevblog.com/projects/ucurrent/ I took his schematic and recreated in KiCad (no ...
124 views

### Where do the oscillations in a GaN half-bridge design exactly come from?

I'm working on a inverter pcb for a PMSM with GaN switches and I'm wondering: where exactly do the oscillations come from, when the high-side GaN goes high and the low-side GaN goes low. Why don't ...
55 views

### digital PLL - oscillations

I'm building a 3 phase digital PLL and implementing it on a microcontroller. I included a schematic of the SRF-PLL principle that I use. The abc->dq0 transform is done so that the q component for a ...
98 views

67 views

### Time period of output in relaxation oscillator circuit

I'm an electrical engineering student, and have spent the last 4 hours trying to figure out the time period of the output of the circuit below (in terms of the variables shown in the image). So far, ...
65 views

### PLL (Phase Locked Loop)

I find a bit of confusion on the web about the use of the PLL. Sometimes I read that, given a certain input signal, it is used to generate a signal whose frequency is N times that od the input one, ...
68 views

### Always starting LC colpitts oscillator

Is there a way to make an LC oscillator that works in most circumstances? Which is able to start up an keeps oscillating for a wide range of inductors? I'm asking this because I made a LC oscillator ...
68 views

### Oscillations on High Side Sensing Current Source

I designed a simple adjustable constant current source that uses high side sensing but I can't seem to figure out where the oscillations on my output are coming from. The circuit is shown in a picture ...
115 views

### What causes those oscillations in a comparator circuit

I designed a simple class D amplifier based on theory (output stage not pictured): Layout(ish, the board was modified in a few places, the whole top part is a separate PCB soldered into where some ...
147 views

I know this question has been asked many times before, however this question differs in the use of an uneven set of capacitors. I'm replacing the crystal on an old computer. The original symptoms ...
228 views

I'm trying to build a very simple headphone amplifier for my bass guitar. The bass has a built-in amplifier, meaning that unity-gain is sufficient for my amplifier, I essentially only need a voltage ...
86 views

### Oscillating boost converter output voltage that has a differential amplifier for load, in DRV8662 piezo actuator driver IC

I am building a circuit to drive a piezo stack in a pulsatile fashion and I am using the DRV8662 piezo driver from TI to do so. The circuit diagram is shown here (please disregard the several ...
104 views

### Active filter - oscillation and incorrect operation

I have a noisy and low amplitude (0-50mV amplitude) signal from a hall effect sensor (TI DRV5053) that has a ~1V DC offset. The signal will be in the range of 95-105 Hz and is used to determine the ...
55 views

### Trying to have NMOSs in parallel while passing current through only one at a time

If I wanted to have a bias current I1 going through M1 or M2 and I want M1 to alternate between on off (M1 on/M2 off, M1 off/M2 on) would this work? I simulated this with spice and for the first ...
84 views

### Can oscillations happen even if negative feedback is present?

By OPAMP book says that virtual short is applicable in OPAMP only if negative feedback is present an output is not oscillating.I don't get how oscillations can occur at output if the feedback is ...
2k views

### This op-amp buffer is oscillating and I can't figure out why

Currently, this is the only assembled part on the circuit board. This is a simple inverting buffer circuit that should be at the input. The op-amp (LTC6241HV) is powered +/-5V from a linear bench ...
400 views

### Opamp + NPN and MOSFET in the feedback network, how to prevent oscillations

Background The task is to add an electronic means to limit the power applied to an electric motor in an industrial setting. The operator normally controls the motor power through a lever that is ...
127 views

### Deliyannis-type narrowband filter is oscillating when I apply GND to the input

TLTR: My Deliyannis-type narrowband filter is oscillating when I apply GND to the input Vin. I was expecting to get almost zero volts, but I am actually getting a sine wave at almost 20KHz. I´m trying ...
89 views

### Simple way to create a disturbance on DC power

First of all, i must say that I am a software engineer, with very-low to no experience in circuits designs, and a very rudimentary understanding of electrical engineering and circuits. 101 really. ...
1k views

### Constant current source with MOSFET, OPAMP and Instrument Amp

UPDATE Based on the information from everyone answering below, I have modified my circuit and the oscillation has completely vanished! I started performing small modifications in order of easiest to ...
69 views

### LM2776 is it normal to have the oscillations in “bursts”

Is it normal LM2776 to oscillate in "bursts": The frequency of the oscillation is OK, but they come in the 8 oscillation bursts every ~9us. Is it normal? The board design and the schematic is ...
353 views

### PA92 OPAMP phase compensation

I'm having trouble to understand the phase compensation on the PA92 opamp. First I'll explain quickly the circuit I'm building.   1.  The circuit I'm using a 200V battery and would like ...
114 views

### Driving a difficult load with an Op-Amp: high capacitance, high current, high speed

I've been banging my head against this problem all day. I have a bizarre load that I need to drive over 88 feet of SMA that is a 68 ohm pullup to 15V. The cabling adds 2.64 nF of capacitance. I've ...
615 views

### Kickstarting an opamp for oscillating?

I have been building many different variations of op-amp oscillators but have come across a recurring issue that has manifested itself again in this VCO schematic: I find that when turning on my ...
139 views

### Quartz Clock Accuracy

Do the vibrations of aircraft engines (or any engine, for that matter) dilute the accuracy of a quartz clock? I haven't done any kind of research or hypothesis testing, though I believe that the ...
979 views

### Op amp driving a LED oscillates, how to stabilize?

I have a simple LED driver circuit like this: simulate this circuit – Schematic created using CircuitLab The op-amp is OPA354 250-MHz, Rail-to-Rail I/O, CMOS Operational Amplifier supplied ...
136 views

First sorry if the question is stupid... I am learning. I am trying to visualize here, without equations, what happens to a RLC circuit that makes it oscillate. Consider a RLC circuit, a switch and ...
539 views

### 5.5 kHz noise on SMPS output

I am designing a low noise SMPS like this http://www.ti.com/lit/df/tidrgc2/tidrgc2.pdf switching from 40-90 kHz. I have a weird problem, on the output we are seeing a spike of noise at 5.5 kHz and ...
34 views

### Can a bilateral switch block transmitter interference and can my board still produce great audio?

I made a circuit in which an ISD1760 chip outputs music via an LM386 IC and I like the quality and volume of sound, however, when I run an HM-TRP transmitter on the same circuit board and the ...
83 views

### High Frequency Excitation on Class D Amplifier

I'm building a discretized class D audio amplifier that's running at 250kHz that's designed to run on a single ended 80V supply. I was seeing very high amplitude, high frequency excitations on the ...
133 views

### LM2664 noise in the OPAMPS output signal. How to remove

I have 4 opamps powered from the LM2664. Two of them (1MHZ 1.6V R-R) are preparing the offset voltage for the pair of the OPA4141 which actually provide the signal for the ADC It works as expected ...
2k views

### How to calculate the frequency of oscillation of this low-pass phase shift oscillator?

In the following phase-shift oscillator a low pass network is used instead of a high-pass network. simulate this circuit – Schematic created using CircuitLab Usually the frequency of ...


text:
Jump to content

# Search the Community

Showing results for tags 'steam'.

• ### Search By Tags

Type tags separated by commas.

### Forums

• General
• Announcements
• DayZ
• Discussion
• Public Servers
• DayZ SA Resources
• Q&A Section
• ArmA 3
• Epoch Survival
• Community Projects
• Q&A Section
• Terrain Discussion
• Resources
• Arma 3 Resources
• ArmA 2
• General Discussion.
• Q&A Section
• Resources
• Legacy Resources
• A2: Community Projects
• A2 Community Servers
• Space Engineers
• General Discussion.
• Public Servers
• Other Games
• Discussion
• Off Topic
• Off Topic

• Arma 3
• Arma 2
• DayZ

• 0 Comments

• 0 Replies

• 0 Reviews

• 0 Views

Found 22 results

delete
2. ## Extended Base Objects for Epoch V 0.1

For a while now I have wanted to put together an addon that makes available additional storage containers and, in the future, other craftable items like heli pads, additional lights and so forth. To that end, and with quite a lot of help from Grahame, I offer V 0.1 of Extended Base Objects for Epoch. It offers a variety of additional storage containers and an easy method for installation. Installation: download from my github here: https://github.com/Ghostrider-DbD-/EB4E Subscribe on Steam here: https://steamcommunity.com/sharedfiles/filedetails/?id=1475332817 Unpack your mission.pbo using PBO manager or its equivalent. Copy all files from the mapname.epoch folder to the folder created by unpacking your mission. Repack your mission. Copy @EB4E to the same folder containing @Epoch and @epochhive on your server. Copy the key found in @EB4E\Key to the \keys folder on your server. Add "EB4E" to the -mods="@Epoch;blahblah;" parameter for server startup. Players can subscribe to the mod here: https://github.com/Ghostrider-DbD-/EB4E
3. ## hackers Kick new steam accounts?

Was wondering if theres a way to kick new steam accounts say a new accounts that arent any older than 60 Days or so? Hackers just using new accounts.... Kinda annoying Thanks :)
4. ## steam patch

Hi guys, Looks like the steam patch last night screwed up both my servers, I can't find anything here about how to fix it and I can only see folks complaining on the steam forums. Anyone else having issues?
5. ## [Help] Private Server Kicking players or Session Lost

Ok guys, this is racking my brain. Ill set a few things first This is not my first rodeo. I have privately hosted servers long before Epoch. Then i got bored. Currently im hosting an Epoch with Overwatch server (Overpoch) Here is my current Server launch bat: (working) " start arma2oaserver.exe -port=2302 "-config=instance_11_Chernarus\config.cfg" "-cfg=instance_11_Chernarus\basic.cfg" "-profiles=instance_11_Chernarus" -name=instance_11_Chernarus "[email protected];@DayZ_Epoch1051;@DayZ_Epoch_Server" " Here is my client launch params in steam: (working) " -window -nosplash -mod=C:\@ArmaMODS\@DayzOverwatch;C:\@ArmaMODS\@Dayz_Epoch1051 " You will notice in the Server and Client params that i am not referencing the Arma 2 directory OR the Expansion directory. The Addons (from Arma2) folder is copied into the Arma OA directory on both the Server and the Client. The Server and Client are on 2 diff machines. This current configuration works perfectly with NO issues. Lets get that straight. Now with this said, Ive had friends join with out issues using this same client method. What ive noticed is people trying to join thru out the day and getting kick almost immediately OR sitting in debug (used spectate to watch). Yes, verify sigs are enabled. This got me wondering why? Had another friend try joining and they used DayzLauncher. He would log in, then get sent to debug right after the lobby. if he switched back to my method, joins right in with no issues. Ok, so i tried joining with DayzLauncher, same thing, i get stuck in debug. Ok this got me thinking how DZL is loading, its referencing the Arma 2 directory and the Expansion folder such as: " "-mod=C:\Program Files (x86)\Steam\steamapps\common\Arma 2;Expansion" " ok, so maybe thats my problem on my server. so I attempt to use this param on the server: " start arma2oaserver.exe -port=2302 "-config=instance_11_Chernarus\config.cfg" "-cfg=instance_11_Chernarus\basic.cfg" "-profiles=instance_11_Chernarus" -name=instance_11_Chernarus "-mod=C:\Program Files (x86)\Steam\steamapps\common\Arma 2;Expansion;@DayzOverwatch;@DayZ_Epoch1051;@DayZ_Epoch_Server" " And this one on the Client thru steam: " -window -nosplash -mod=C:\Program Files (x86)\Steam\steamapps\common\Arma 2;Expansion;C:\@ArmaMODS\@DayzOverwatch;C:\@ArmaMODS\@Dayz_Epoch1051 " no dice, Session Lost. Ok, Lets try DZL, nope, same thing, Session Lost. Ok, lets try DZL and connect to someone else's Overpoch server, SAME THING. Ask my buddy to try, Same result. Reinstall EVERYTHING fresh. SAME THING. only a hand full of servers are able to be joined with DZL, and I tried almost EVERY Overpoch server i could find in DZL. Now, back to my method, I am able to join EVERY overpoch server i can find in the Server browser with out issue. So im asking all the server owners and gamers to fill me in on the secrete here? People say the whole copy the Addons folder no longer works, but it seems to be the ONLY method that works for me in any configuration. Clients shouldn't have to do anything special to connect to my server, so how are all the Servers on DZL getting people to connect with out issues? Any help would be appreciated, though ive probably tried it. If you comment, ill respond with results.
6. ## [Beta] Finder Multiaccount steam

Hello everyone! Any player has the ability to create multiple parent accounts Steam. They get a new UID and a new GUID that is attached to the main. If you get bans bad players on the UID by using infistar, the guilty person may go to your server with the new UID without buying a new game. To track these multi-accounts I created a small script that checks Your server_log.txt and displays the list of violators. The script is here: cplace.ru/tvink.php You can use if your server is not allowed to have multiple accounts! Всем привет! У любого игрока есть возможность создать несколько родительских аккаунтов Steam. При этом они получают новый UID и новый GUID, который привязан к основному. Если вы баните плохих игроков по UID при помощи инфистара, то виновник может зайти к Вам на сервер с новым UID без покупки новой игры. Чтобы отслеживать такие мультиаккаунты я создал небольшой скрипт, который проверяет Ваш server_log.txt и выводит список нарушителей. Скрипт тут: cplace.ru/tvink.php Можно использовать, если у Вас на сервере запрещено иметь несколько аккаунтов!
7. ## [HOW-TO] New Steam-Only Arma Update

Guys you really need to update your arma version this weekend. June 30 is final gamespy shutdown, and Battleye will not protect older versions after june 30th. You are urged to upgrade to the new steam version (125548). This guide is designed for private server hosting with access to all files, epoch 1.0.5.1 installed, with the steam version of Arma 2 + Arma 2 OA. To do so: step 1: go to your operation arrowhead folder step 2: delete the all the exe files (ArmA2OA, arma2oaserver, ArmA2OA_BE) if you don't have ArmA2OA_BE skip it. step 3: go into your Expansion\ folder step 4: delete the beta\ folder and all it's contents. If you don't have a beta folder, skip it. step 5: go to steam library -> operation arrowhead -> right click -> properties -> beta -> Choose your version. Opt-out (stable) Opt-In (beta) 1.62- (older version) step 6: wait for game to switch to versions step 7: go to steam library -> operation arrowhead -> right click -> properties -> local files -> verify integrity of the game. step 8: wait for game to verify and then launch arma 2 oa from steam library. check to see if you have the new version in the bottom right corner. ************************************************************************************************************************************************************************************************************************ For a point of reference... when I launch my arma OA.. at the main menu I see: - 3 pictures in the bottom-left corner: first one is Dayz Epoch, next one is Arma 2, next one is Arma Arrowhead. - In the bottom-right corner it says version 1.63.125548 and beneath that it says 1.0.5.1 - In the top-right corner, under the dayz epoch picture it says Dayz Epoch 1.0.5.1. If you got all that it should work on newly updated servers, like mine. If you are missing any of that try clicking the expansion button and activate them. ************************************************************************************************************************************************************************************************************************ SERVER OWNERS EXTRA STEPS: Step 9: Copy the entire contents of your Arma 2 & Arma 2 OA folder into your server folder. This should update your server to new version. STEAM VERSION EXTRA STEPS: Step 10: Change your launchers .exe paths: Expansion\beta\arma2OAserver.exe (delete the red part. steam version uses exe in the main folder, not the expansion\beta folder.) Step 11: In your config.cfg add two lines at the very top: steamport = 2300; steamqueryport = 2301; Step 12: add port forwarding to these ports. Step 13: In your config.cfg update your requiredBuild = 125548; Step 14: In your config.cfg.. right below your requiredBuild add this line: requiredSecureId = 2; Notes: - Keep the old gamespyreportingIP= in the configs. - Keep your old port forwarding. - Keep the -port=2302 in the launchers. If you have any problems feel free to pm me. WARNING A LOT OF EPOCH CUSTOM SCRIPTING DOES NOT WORK PROPERLY ON NEW VERSION. RECOMMENDED: FRESH SERVER INSTALL AND ADD SCRIPTS 1 BY 1. With steam, it has new steamID. I'm not 100% sure but it looks like I have a new GUID also. When players connect to the database it will create a whole new player to the database with the new steamID. In the database it will keep the old entries with playerUID and create all new entires with steamIDs. This may, or may not cause DB issues/loading issues. Not sure. All players will start with a new, fresh character... kills reset, humanity reset, plot poles will need not recognize you as owner, etc... I'm guessing all the player bans need to be updated, and I doubt that is even possible, so server admins need to find there own ways to deal with these problems. So we need to be extra vigilant against hackers. My information tells me that Dayz commander will not work after the gamespy shutdown unless we are very lucky, so I am recommending this update to all server admins.
8. ## New server, responding to Steam

Hey, I just followed this tut here to make a new server on a dedicated box, no host or anything. The server seems to run fine but I can't find it in DayZ Commander, Launcher or the game its self. Any help please? I opened ports: 2302 2300 2301 If you need any files, please ask!
9. ## DayZ Epoch 1.0.5.1 Server error: Player without identity Help Session Lost

I have installed and "setup" a DayZ Epoch 1.0.5.1 server to where i can start it up all vine but when i try to join it dose the following I have looked and tried things with no avail, there is no data in the player sql stuff to format/wipe, i have 2300, 2301, and 2303 ports open/forwarded, it shows in the arma MP browser but i simply can not join. I often see people getting asked for certain .RPT files so i have included them along with my hive and cfg. Also in the server_log it often shows "Mission DayZ Epoch Chernarus read from directory." is this a problem? EpochServerStf.zip
10. ## Server showing up as offline, cant join

Im hosting an epoch server, when I try to connect to it in dayz commander, it just shows up as offline and the name doesnt appear, only the IP address to the server. It shows up as online on the same network as the server is hosted on although I have opened what I believe is all necessary ports to open, it's only online when adding it to favorites with the steam query port instead of the server port. I have updated the server to 1.63 and I have tried to get it to work, I've followed tutorial and it doesn't seem to work for me. Ports I have opened are: 2200 - 2400 - For the dayz server itself, steam query and the steam port 27000 - 28000 - Steam query (although I am using 2301 as a steam query port) 8766 - Steam port (although I am using 2300 as a steam query port) 20 - 21 (for FTP) 80 (for XAMPP) 443 (for XAMPP) 3306 (for XAMPP) 3389 (for remote desktop) 14147 (for FileZilla, FTP) This is what I get when using netstat -a: http://pastebin.com/DVq31VT6 It doesnt say "LISTENING" next to 0.0.0.0:2302 which I believe is used by the epoch server. My config.cfg file: http://pastebin.com/xjYDTemZ I have hosted epoch servers a couple of months before, before the 1.63 patch and the gamespy shutdown and those weren't having any of theese problems. Im sorry for any bad english in this post, I am not a native english speaker, I'm from Sweden :) Thanks in advance Simon
11. ## InfiSTAR not working after Vilayer Steam ID switch...

Hey guys, Vilayer has switched from using GameSpy Player IDs to Steam Player IDs. As a result my InfiSTAR admin tools no longer work. I cant interact with traders either, their menus close right away. I have tried just inputting the new Steam ID into my AHconfig with no luck. Any thoughts? Thanks!
12. ## Battleye Problem

Hi, every once in a while, I will try to join a DayZ (mod) server, and when I do, a command prompt will open saying Battleye failed to install. When this happens, I go to Steam, and verify the files, then launch Arma 2: OA, then Battleye will install succesfully. I just want to know if there's a fix for this, because I'm getting tired of doing this little fix all the time. I just want to play DayZ without problems. Please help?
13. ## Epoch Linux 1.0.5.1 (Steam update)

https://github.com/denisio/Dayz-Epoch-Linux-Server
14. ## Players don't know to add Overwatch

So, with the change to steam, instead of gamespy, all of the names on DayzCommander and Dayz Launcher have been shortened. This means it's almost impossible to have "[email protected]" in the title anymore. I see so many people joining our server and immediately disconnecting and I'm thinking this is because a lot of people don't know to add the overwatch parameter. I don't know a good solution for this other than getting longer name support, the only other thing I was thinking is that when you join and you get kicked for "Missing addons blah blah" if that could say "You need to add this to your launch parameters" but I'd hazard a guess and say that message comes locally and isn't sent out by the server. Does anyone have any ideas on this?
15. ## Client sent to wrong server (same IP different port) ODD!

Hey all, So there's one or two players who try to connect to our Chernarus server on port 2302 and end up trying to join the Namalsk server on port 2362! They've tried commander, custom bat file AND the multiplayer REMOTE > IP and Port I've watched on an rcon client - and they are sent to the wrong server, even though I've confirmed with them that they are putting in the correct IP and port! I've checked my server launch files - all set correctly. The config files for my servers - there's 10 digits between the servers: - 2302 chernarus gameserver 2301 and chernarus steam query port - 2362 Namalsk gameserver and 2361 Namalsk steam query port I've had the guy clear his mpmissions cache too - no joy! Not sure what is going on here - Ideas anyone???
16. ## How to get Steam patch

Hello, I have a problem joining any server, after Gamespy has been shut down. I have the retail (NON-steam) version so how can i get the new 1.63.125548 update? peace
17. ## If you close Steam, the Arma 2 server closes

It's that. You have the server running, then you close Steam for any reason, and the server also closes like if its dependent on Steam. Any way to not close the server when closing Steam? Thankyou!
18. ## After updateing to the latest steam build, vehicle explode random

Hey, After i updated to the latest steam version some of my players get issues that vehicle keeps randomlly exploding, after some time driving they get ejected and the vehicle explode but they dont get any damage, what i see in the logs it hapens every time when the server do a cleanup, see here, vehicle exploded at "13:03" (03:03 P.M), 13:02:18 "Player is Null FAILED: Exiting, player sync: <NULL-object>" 13:02:42 "infiSTAR.de PlayerConnected: _uid: 76561198146178268 _name: keezarts" 13:02:44 Server: Object 20:568 not found (message 94) 13:03:08 "CLEANUP: Deleted 127 Loot Piles out of 536" 13:03:09 "get: STRING (76561198038755076), sent: STRING (76561198038755076)" 13:03:09 "DISCONNECT: EnZZo (76561198038755076) Object: B 1-2-H:1 (EnZZo) REMOTE, _characterID: 153 at loc [4850.96,2916.29,0.00152969]" 13:03:09 Client: Remote object 28:410 not found 13:03:09 Client: Object 13:241 (type Type_149) not found. 13:03:09 Client: Object 4:478 (type Type_149) not found. 13:03:09 Client: Object 11:119 (type Type_149) not found. 13:03:09 Client: Object 23:96 (type Type_149) not found. 13:03:09 Client: Object 19:220 (type Type_149) not found. 13:03:09 Client: Object 9:71 (type Type_149) not found. 13:03:09 Client: Object 20:573 (type Type_149) not found. 13:03:11 "infiSTAR.de PlayerConnected: _uid: 76561198046305176 _name: David007" 13:03:11 "infiSTAR.de - Player-Log: David007(76561198046305176) - 1h 02min" 13:03:20 "infiSTAR.de Log: David007 (76561198046305176) | New Player: ["161",[],[],[0,0,0],true,"1.0.5.1","Survivor2_DZ",true,true,0]" 13:03:39 "DELETE: e19ac100# 1056164: v3s_transport.p3d REMOTE Deleted by ID: 122" 13:03:39 Client: Object 23:98 (type Type_69) not found. 13:03:39 Client: Object 23:98 (type Type_70) not found. 13:03:39 "Vehicle killed: Vehicle e19ac100# 1056164: v3s_transport.p3d REMOTE (TYPE: V3S_TK_EP1_DZE), CharacterID: 0, ObjectID: 122, ObjectUID: 0, Position: [11452.1,11343.5,-0.0125427]" 13:03:53 "CLEANUP: Deleted 27 Loot Piles out of 420" 13:04:02 "0 Active ground units" 13:04:02 "0 Active emplacement units" 13:04:02 "0 Active chopper patrol units (Crew)" 13:04:02 "0 Active vehicle patrol units (Crew)" 13:04:07 "EPOCH SERVERTRADE: Player: [F4] bathing ape (76561198082824296) sold a ItemSodaMdew in/at Unknown Trader City for 3x ItemGoldBar" 13:04:42 NetServer::SendMsg: cannot find channel #240256419, users.card=15 13:04:42 NetServer: users.get failed when sending to 240256419 13:04:42 Message not sent - error 0, message ID = ffffffff, to 240256419 (Bryan Pegre) 13:04:51 "CLEANUP: Deleted 26 Loot Piles out of 393" and i dont on what i can do... did no changes to my mpmission, the only what i chagend was installing plotpole for life.
19. ## (upgrading from 103718) What version should we run now?

Hey guys, I am still on 1.62.103718 and planning to work on the server tomorrow night & Saturday basically to reinstall it to bring it to a more recent version. So I want to ask the more experienced fellow owner/admins here what version are you running at the moment, are there any major issues with 1.0.5.1 and any other advice you find relevant? Via PM I've already consulted MGT who is very helpful and provides solid advice but in case he's away I really need to get going tomorrow, hence the thread here. So what do you advise, shall I just go to the latest version since we heard DayZ Commander is about to be released (presumably it'll be supporting the latest version without any issues)? Is there a particular version that is clearly better to run at this point in time? I know 112555 has some issues with being not being deleted properly which in turn affects server performance after some runtime but I don't know much about other (higher) versions. Thanks in advance!
20. ## 1.0.5 Steam ports and reporting IP

I havent seen this mentioned yet but how do you go about adding the server to steam server instead of gamespy? I know you have to change the reportingIP to steam but im not sure were the address is and https://community.bi...itional_details is still showing gamespy. Also do you have to add steamPort = <number>; and steamQueryPort = <number>; to your config.cfg? I'd rather be ahead of gamespy shutting down instead of behind : ) One last thing, are we going to have to change our server ports as well for this to work? I would love to update to the latest build of arma OA but as i understand it, it must report to steam.
21. ## Arma 3 Free to Play Until May 18th

Arma III is free to download and play until May 18th. http://store.steampowered.com/app/107410/
22. ## Arma 2 Complete $7.99 Arma II Complete is on sale for$7.99 through May 19th. http://store.steampowered.com/sub/40710/
×
×
• Create New...


text:
Potential function for stack problem

Consider the follow operations on a stack of size at most $k$.

Push - insert element in the stack - actual cost 1

Pop - remove top element from the stack - actual cost 1

Copy - copy whole stack (but maintain the number of elements) - actual cost is the number of elements in the stack

Prove using the potential method that each single operation (push, pop or copy) has amortized cost at most 2.

What would be a suitable potential function for this problem?

• What have you tried? Where did you get stuck? We're happy to help you understand the concepts but just solving exercises for you is unlikely to achieve that. You might find this page helpful in improving your question.
– D.W.
Mar 28 '17 at 16:23

A reasonable potential function here would be $C\ell$ or $C(k-\ell)$, where $\ell$ is the number of elements on the stack.

However, I don't think that the amortized cost can be bounded. Consider $k$ push operations followed by $M$ copy operations. The total cost is $k(M+1)$. If the amortized cost of push is $a$ and of copy is $b$, then $ka + Mb \geq k(M+1)$. Dividing by $M$ and letting $M\to\infty$, we obtain $b \geq k$.

• Thank you for the answer. I really the question was 'prove that each operation' and not a sequence of them. I've edited it, although I'm not sure it makes a difference to your conclusion. Mar 28 '17 at 15:43
• I don't understand your comment. Amortized cost is an upper bound on the average cost of an operation in an arbitrary sequence of operations (the exact definition is a bit more complicated). If the copy operation deleted the stack, then indeed you could bound the amortized cost by some constant. As it is, there seems to be a mistake in the question. Mar 28 '17 at 15:47

Let us consider a particular potential function in the context of amortized analysis:

$$\hat{c_i} = c_i + \phi(D_i) - \phi(D_{i-1})$$

Let's assume we have some stack $S$.

So let's look at push — this has an actual cost of 1, so it's potential function will look like

$$\hat{c_i} = 1 + (|S| + 1) - |S| \rightarrow 1 + 1 \rightarrow 2$$

Similarly, pop has an actual cost of 1, so we get

$$\hat{c_i} = 1 + (|S| - 1) - |S| \rightarrow 1 - 1 \rightarrow 0$$

Finally, copy has an actual cost of $|S|$ so we end up with

$$\hat{c_i} = |S| + |S| - |S| \rightarrow |S| + 0 \rightarrow |S|$$

Prove using the potential method that each single operation (push, pop or copy) has amortized cost at most 2.

As you can see, the amortized cost for copying the entire stack will always be $|S|$ since copying does not affect the potential energy of your stack.

However, both push and pop have an amortized cost of at most 2.

• In amortized analysis we are free to choose whatever potential function we want. You are using a particular one. In fact, with a constant potential the cost of push and pop would be only 1. Mar 28 '17 at 17:13
• @YuvalFilmus Ah you're right, thank you for pointing that out. Does this affect my conclusion? Mar 28 '17 at 19:02
• You're analyzing a particular potential function. Perhaps a different one will lead to better conclusions? Mar 28 '17 at 19:18


text:
# Basic Abstract Algebra Isomorphism Question

I've shown that the two groups $\mathbb{Z_2}\times\mathbb{Z_{12}}$ and $\mathbb{Z_4}\times\mathbb{Z_6}$ are isomorphic, but the map that I constructed is rather messy. Is there a more straightforward way to see this?

I thought perhaps I could say that since $gcd(3,4)=1$, we have $\mathbb{Z_3}\times\mathbb{Z_4}\cong\mathbb{Z_{12}}$, and since $gcd(2,3)=1$, we have $\mathbb{Z_2}\times\mathbb{Z_3}\cong\mathbb{Z_6}$, so our original groups are isomorphic to $\mathbb{Z_2}\times\mathbb{Z_3}\times\mathbb{Z_4}$ and $\mathbb{Z_4}\times\mathbb{Z_2}\times\mathbb{Z_3}$ respectively. Both groups have order 24, and the fundamental theorem of finitely generated abelian groups says that since these group differ only in the order of their factors, they are isomorphic. Hence, we have $\mathbb{Z_2}\times\mathbb{Z_{12}}\cong\mathbb{Z_2}\times\mathbb{Z_3}\times\mathbb{Z_4}\cong\mathbb{Z_4}\times\mathbb{Z_2}\times\mathbb{Z_3}\cong\mathbb{Z_4}\times\mathbb{Z_6}$. Is this argument correct?

Yes, that's correct. You don't have to appeal to the fundamental theorem of finitely generated abelian groups though: $\mathbb{Z}_2\times \mathbb{Z}_3 \times \mathbb{Z}_4$ and $\mathbb{Z}_4\times\mathbb{Z}_2\times\mathbb{Z}_3$ are obviously isomorphic by the map $(a,b,c)\mapsto (c,a,b)$. In general, $G\times H\cong H\times G$. The real work here (and the "messiness" of the explicit map you say you've found) is hidden in the two applications of the Chinese remainder theorem.


text:
Home > Standard Error > Using Standard Error To Determine Significance

# Using Standard Error To Determine Significance

## Contents

Why does removing Iceweasel nuke GNOME? All rights Reserved. And that means that the statistic has little accuracy because it is not a good estimate of the population parameter. Masterov Dec 4 '14 at 0:21 add a comment| up vote 1 down vote Picking up on Underminer, regression coefficients are estimates of a population parameter. http://tenableinfo.net/standard-error/using-standard-error-to-calculate-significance.html

In a scatterplot in which the S.E.est is small, one would therefore expect to see that most of the observed values cluster fairly closely to the regression line. Australia evisitor visa - criminal conviction Does compactness depend on the metric? A large margin of error makes the survey estimate less reliable, which can negatively affect your analysis and comparisons. Unfortunately, it is a bit more complex than that, and the Census Bureau discourages the use of confidence intervals alone to determine a value's statistical significance.

## Importance Of Standard Error In Statistics

However, S must be <= 2.5 to produce a sufficiently narrow 95% prediction interval. A two-sided hypothesis claims that a parameter is simply not equal to the value given by the null hypothesis -- the direction does not matter. However, while the standard deviation provides information on the dispersion of sample values, the standard error provides information on the dispersion of values in the sampling distribution associated with the population Is “X times five” a popular idiom to mean a big number / impact / difference?

I don't question your knowledge, but it seems there is a serious lack of clarity in your exposition at this point.) –whuber♦ Dec 3 '14 at 20:54 @whuber For So most likely what your professor is doing, is looking to see if the coefficient estimate is at least two standard errors away from 0 (or in other words looking to Linked 153 Interpretation of R's lm() output 28 Why do political polls have such large sample sizes? Significance Of Standard Error Of Estimate The SPSS ANOVA command does not automatically provide a report of the Eta-square statistic, but the researcher can obtain the Eta-square as an optional test on the ANOVA menu.

There’s no way of knowing. How To Interpret Standard Error In Regression Of these, count the number of positive differences X. Table 3: Z-Scores and Levels of Significance If … Then the difference between A and B is … z < - 1.645 or z > 1.645 Significant at the 90 percent Name: Jim Frost • Monday, April 7, 2014 Hi Mukundraj, You can assess the S value in multiple regression without using the fitted line plot.

That assumption of normality, with the same variance (homoscedasticity) for each $\epsilon_i$, is important for all those lovely confidence intervals and significance tests to work. What Is A Good Standard Error Here is are the probability density curves of $\hat{\beta_1}$ with high and low standard error: It's instructive to rewrite the standard error of $\hat{\beta_1}$ using the mean square deviation, \text{MSD}(x) = Thanks for the beautiful and enlightening blog posts. I was looking for something that would make my fundamentals crystal clear.

## How To Interpret Standard Error In Regression

For a two-sided test, we are interested in the probability that 2P(Z > z*) = , so the critical value z* corresponds to the /2 significance level. For example, in a clinical trial of a new drug, the alternative hypothesis might be that the new drug has a different effect, on average, compared to that of the current Importance Of Standard Error In Statistics Another use of the value, 1.96 ± SEM is to determine whether the population parameter is zero. Standard Error Significance Rule Of Thumb Its application requires that the sample is a random sample, and that the observations on each subject are independent of the observations on any other subject.

I know if you divide the estimate by the s.e. http://tenableinfo.net/standard-error/variance-standard-deviation-standard-error.html more hot questions question feed about us tour help blog chat data legal privacy policy work here advertising info mobile contact us feedback Technology Life / Arts Culture / Recreation Science Usually, the null hypothesis H0 assumes that that the mean of these differences is equal to 0, while the alternative hypothesis Ha claims that the mean of the differences is not Why was Susan treated so unkindly? What Is The Standard Error Of The Estimate

on a regression table? That's nothing amazing - after doing a few dozen such tests, that stuff should be straightforward. –Glen_b♦ Dec 3 '14 at 22:47 @whuber thanks! Thanks for writing! this contact form The probability is doubled for the two-sided test, since the two-sided alternative hypothesis considers the possibility of observing extreme values on either tail of the normal distribution.

more hot questions question feed about us tour help blog chat data legal privacy policy work here advertising info mobile contact us feedback Technology Life / Arts Culture / Recreation Science Can Standard Error Be Greater Than 1 The school board can confidently reject H0 given this result, although they cannot conclude any additional information about the mean of the distribution. It is particularly important to use the standard error to estimate an interval about the population parameter when an effect size statistic is not available.

## It also can indicate model fit problems.

The effect size provides the answer to that question. This textbook comes highly recommdend: Applied Linear Statistical Models by Michael Kutner, Christopher Nachtsheim, and William Li. We either "reject H0 in favor of Ha" or "do not reject H0"; we never conclude "reject Ha", or even "accept Ha". Statistically Significant Coefficient Standard Error Decision theory is also concerned with a second error possible in significance testing, known as Type II error.

The model is essentially unable to precisely estimate the parameter because of collinearity with one or more of the other predictors. With a 1 tailed test where all 5% of the sampling distribution is lumped in that one tail, those same 70 degrees freedom will require that the coefficient be only (at Note that all we get to observe are the $x_i$ and $y_i$, but that we can't directly see the $\epsilon_i$ and their $\sigma^2$ or (more interesting to us) the $\beta_0$ and navigate here Jim Name: Nicholas Azzopardi • Wednesday, July 2, 2014 Dear Mr.

Describing a shrine, just not a Shinto shrine? blog comments powered by Disqus Who We Are Minitab is the leading provider of software and services for quality improvement and statistics education. The smaller the standard error, the closer the sample statistic is to the population parameter. If the standard error of the mean is 0.011, then the population mean number of bedsores will fall approximately between 0.04 and -0.0016.

Suppose the mean number of bedsores was 0.02 in a sample of 500 subjects, meaning 10 subjects developed bedsores. It is an even more valuable statistic than the Pearson because it is a measure of the overlap, or association between the independent and dependent variables. (See Figure 3).


text:
## 每週問題 May 22, 2017

Suppose $A$ is $n\times n$, $B$ is $n\times 1$, $C$ is $1\times n$, and $d$ is a number. Prove that

$\begin{vmatrix} A&B\\ C&d \end{vmatrix}=d|A|-C(\hbox{adj}A)B$.

## 每週問題 May 15, 2017

Let $A$ be an $n\times n$ skew-symmetric matrix. Prove that $\hbox{adj}A$ is a symmetric matrix for odd $n$ and a skew-symmetric matrix for even $n$.

## 每週問題 May 8, 2017

Let $\mathbf{v}_1,\ldots,\mathbf{v}_{n+1}$ be vectors in $\mathbb{R}^n$ ($n\ge 2$) such that $\mathbf{v}_i^T\mathbf{v}_j<0$ for $i\neq j$. Prove that any $n$ of these vectors form a basis of $\mathbb{R}^n$.

## 每週問題 May 1, 2017

Let $A=[a_{ij}]$ be an $n\times n$ matrix. Prove that if $|a_{ii}|>\sum_{j\neq i}|a_{ij}|$ for $i=1,\ldots,n$, then $A$ is invertible.

| 標記 , , | 發表留言

## 每週問題 April 24, 2017

Let $A$ be an $m\times n$ matrix and $B$ be an $n\times p$ matrix. Prove that

$\dim (C(B)\cap N(A))=\dim C(B)-\dim C(AB)=\dim N(AB)-\dim N(B)$.

Note that $C(X)$ and $N(X)$ denote the column space and nullspace of $X$, respectively.

## 每週問題 April 17, 2017

Let $A$ and $B$ be $n\times n$ matrices. If $A^2B+BA^2=2ABA$, show that $(AB-BA)^n=0$.

| 標記 , , | 發表留言

## 每週問題 April 10, 2017

Let $\mathbf{x}$ and $\mathbf{y}$ be $n$-dimensional column vectors. Prove that

$\hbox{adj}(I-\mathbf{x}\mathbf{y}^T)=\mathbf{x}\mathbf{y}^T+(1-\mathbf{y}^T\mathbf{x})I$.

## 每週問題 April 3, 2017

Find all matrices commuting with $E$, where $E$ is the matrix all elements of which are equal to $1$.

| 標記 | 發表留言

## 每週問題 March 27, 2017

Prove the following statements.
(a) Let $D=\hbox{diag}(d_1,\ldots,d_n)$, where $d_i$ are distinct. If $AD=DA$, then $A$ is a diagonal matrix.
(b) Let $D=\hbox{diag}(d_1,\ldots,d_n)$, where $d_i$ are distinct and nonzero, and $N=[n_{ij}]$ be an $n\times n$ matrix, where $n_{ij}=\delta_{i+1,j}$. If $AD=DA$ and $NDA=AND$, then $A=aI$.

| 標記 | 發表留言

## 每週問題 March 20, 2017

Let $A$ and $B$ be normal matrices such that $C(A)\perp C(B)$, where $C(X)$ denotes the column space of $X$. Prove that $A+B$ is a normal matrix. Note that $P$ is a normal matrix if $P^\ast P=PP^\ast$.


text:
# Mathematics (2015) | Study Mode

Question 31
A

21cm2

B

21cm2

C

15cm2

D

17cm2

##### Explanation

The area of cross section = (2 - 102)

= (11 + 10)(11 - 10)

(21)(1)

= 21cm2

Question 32
A

x = 2 or 1

B

x = 3 or -1

C

x = 1 or 0

D

x = 1 or 2

##### Explanation

x2 - 2x - 3 = 0

-3x + x = - 2x

- 3x $$\times$$ x = - 3x2

(x2 - 3x)(x - 3) = 0

(x - 3)(x + 1) = 0

Either (x - 3) = 0 or (x + 1) = 0

x = 3 or - 1

Question 33
A

3.13cm2

B

145cm2

C

314cm2

D

214cm2

##### Explanation

Explanation

V = r2h

V = ?, h = 4cm, r = 5cm

V = 3.14(5)2 (4)

V = 3.14(25)(4)

V = 3.14 $$\times$$ 1200

= 314cm2

Question 34
A

1/T

B

2T

C

5/T

D

T/5

##### Explanation

4-(390625T - 8)
[(390625T - 8)]

[((390625) $$\times$$ T - 8)]

(- 390625 $$\times$$ T - 4 )

(625 $$\times$$ T -)

(54 $$\times$$ T -4)

= (54) $$\times$$ (T - 4 )

= 5 $$\times$$ T - 1

= 5 $$\times$$ 1/T

= 5/T

Question 35
A
x6 = 123.346
B
x6 = 424.56
C
x6 = 122.436
D
x6 = 124.456
##### Explanation
(159.75)10 = (y)6

$$\begin{array}{c|c} 6 & 159 \\ \hline 6 & 26 \text{ rem 3} \\ 6 & 4 \text{ rem 2} \\ & 0 \text{ rem 4} \\ \end{array}\uparrow$$

15910 = 4236

Then Convert 0.75 to base 6

0.75 x 6 =4.5 i.e 4.5 - 3.00 = 1.5
0.5 x 6 = 3.00 423 + 1.5 =424.5

159.75 = (424.5)6

(159)10 = (424.5)6

Question 36
A

15%

B

25%

C

35%

D

10%

##### Explanation

Percentage Loss = (actual loss ) (Cost price) $$\times$$ 100

Actual loss = Cost Price - Selling Price (sold price)

= N800 - N520 = N280

Percentage loss = (280 800) $$\times$$ 100 = 35%

His loss percent = 35%

Question 37
A

$$3 \frac{5}{6}$$

B

$$4 \frac{5}{6}$$

C

$$2 \frac{1}{6}$$

D

$$\frac{1}{3}$$

##### Explanation

6 - 2 + 1

73/12 - 11/4 + 3/2

[(73 - 33 + 18) (12)]

58/12

29/6

$$4\frac{5}{6}$$

Question 38
A
3m
B
2.4m
C
3.2m
D
5.1m

Question 39
A

1458

B

1485

C

1345

D

1258

##### Explanation

1st G.P. = a =2

2nd G.P. = ar - 1 = 54

2(r) = 54

r = 54/2 = 27

r = 27

3rd term = ar2 = (2) (27)2

2 $$\times$$ 27 $$\times$$ 27

= 1458

Question 40
A

-Cos x + 2xSin x + C

B

-Cos x + 2

C

x2Cos x + 2xSin x + 2Cos x+ C

D

-x2Cos x + 2xSinx + 2Cos x + C

##### Explanation

Let u= x2

du = 2xdx

Let v = sinx

-dv = - sin x i.e. v = cos x

- udv = uv - - vdu

- x2 Sin xdx = - x2 Cos x - - (- Cos x)2 $$\times$$ dx

x2 Cos x + 2 - x cos x1 dx

= - x2 Cos x + 2 - x Cos x2 dx

2 - u Cos xdx

Let u = x

du = dx

dv = Cos x

-dv = - Cos x

- x2 Sin x1 dx = - x2 Cos x + 2Sin x - 2Cos x + C

- x2 Sin xdx

= - x2 Cos x + 2xSin + 2Cos x + C

Try this quiz in in E-test/CBT Mode
switch to

Question Map


text:
When:
August 18, 2020 @ 6:00 am – 8:00 am
2020-08-18T06:00:00-10:00
2020-08-18T08:00:00-10:00
Where:
Lecture held in Elysium

Title: Group dualities: G-barrelled groups
A natural notion in the framework of abelian groups are the group dualities. The most efficient definition of a group duality is simply a pair $(G, H)$, where $G$ denotes an abstract abelian group and $H$ a subgroup of characters of $G$, that is $H leq {rm Hom}(G, mathbb T)$. Two group topologies for $G$ and $H$ appear from scratch in a group duality $(G, H)$: the weak topologies $sigma(G, H)$ and $sigma (H, G)$ respectively. Are there more group topologies either in $G$ or $H$ that can be strictly related with the duality $(G, H)$? In this sense we shall define the term “compatible topology” and loosely speaking we consider the compatible topologies as members of the duality.
The same question for a metrizable, or a $k$-group topology.
We shall also introduce the $g$-barrelled groups, a class for which the Mackey-Arens Theorem admits an optimal counterpart. We study also the existence of $g$-barrelled topologies in a group duality $(G, H)$.


text:
# Why does the parameterization (F:F':1) happen?

1) To parameterize the conic $x^2+y^2=1$, we can use $(x,y)=(\sin t,\sin't)$ ($\sin'$ meaning the derivative of $\sin$, namely $\cos$).

2) To parameterize an elliptic curve $y^2=4x^3-g_2x-g_3$, we can use $(x,y)=(\wp(t),\wp'(t))$.

(I know how to prove (1) and (2), and that it is possible to parameterize curves of higher genus using the unit disc.)

Question: Is there a common explanation for why both parameterizations are of the form $(F(t),F'(t))$? (as opposed to $(F(t),G(t)$) Does this phenomenon generalize to curves of higher genus?

-
This always true if you 'define' your parameter $t$ by $dt = dx/y$. In each case, this defines $t$ as a multivalued function on the Riemann surface (= algebraic curve) (minus the poles of the differential $dx/y$, of course), or, if you prefer, it defines $t$ on a cover of the Riemann surface. You might ask when this $t$ has some special properties, such as, for example, that $dx/y$ be of the second kind, or have no poles, or some such condition, which might be of interest. –  Robert Bryant Aug 4 '12 at 14:48

I would say it's a consequence of the Riemann-Roch theorem. Let's take a look at what happens in the case of an elliptic curve. The $\wp$ function has a double pole at a prescribed point $\mathcal{O}$. The function $\wp'$ thus has a triple pole there. By the Riemann-Roch theorem, the vector space $H^0(6\mathcal{O})$ has dimension $6+1-g=6$. Thus, the functions ${1, \wp, \wp^2, \wp^3, \wp\wp', \wp', \wp'^2}$ must be linearly dependent. A nontrivial relation of linear dependence for this set translates into a parametrization of the curve using $\wp$ and $\wp'$ - this is pretty much a tautology.

Note that the integers $n$ and $n+1$ are always relatively prime. This implies that every sufficiently large integer can be written as a linear combination of $n$ and $n+1$ with non-negative integer coefficients (this is the so-called postage stamp theorem). Take any meromorphic differential $\omega$ on a curve $X$, with a pole at $\mathcal{O}$. The derivative $d\omega$ has a pole of order $n+1$ at $\mathcal{O}$. The exact same construction can be carried out!

-