qid int64 1 74.7M | question stringlengths 0 58.3k | date stringlengths 10 10 | metadata list | response_j stringlengths 2 48.3k | response_k stringlengths 2 40.5k |
|---|---|---|---|---|---|
28,024 | In my case, I am planning to design how a website looks; I am a bit of a newbie. I'd love to learn :)
Are there any books that I can refer to? | 2014/03/06 | [
"https://graphicdesign.stackexchange.com/questions/28024",
"https://graphicdesign.stackexchange.com",
"https://graphicdesign.stackexchange.com/users/20460/"
] | So for something like website design, the first step is research which has two main sides to it: understanding **the purpose of the design**, and **understanding the client** and/or the brief. The first is the most important for the site being a success. The last is most important for making sure you get paid!
For **t... | I'm also a newbie in web design.. but I have one good advice for you.. search and search and look for the best website designs in the world, that will rich your creativity and is a very good way for inspiration.. It's totally fine for your first website to be a mixture of a few ideas which you already saw in other webs... |
28,024 | In my case, I am planning to design how a website looks; I am a bit of a newbie. I'd love to learn :)
Are there any books that I can refer to? | 2014/03/06 | [
"https://graphicdesign.stackexchange.com/questions/28024",
"https://graphicdesign.stackexchange.com",
"https://graphicdesign.stackexchange.com/users/20460/"
] | Design basically boils down to this:
1. Who is my target audience?
2. What is the goal of my website?
3. How can I use colors, typography, and graphics to cater to #1 and satisfy #2?
For beginners, I would recommend these books to get started:
**[Dont make me think, revisited](http://rads.stackoverflow.com/amzn/clic... | I'm also a newbie in web design.. but I have one good advice for you.. search and search and look for the best website designs in the world, that will rich your creativity and is a very good way for inspiration.. It's totally fine for your first website to be a mixture of a few ideas which you already saw in other webs... |
2,321,578 | I noticed that there is no reference to reference but there is pointer to pointer, and also there is no an array of references but an array of pointers.
Could anybody give me any reason? | 2010/02/23 | [
"https://Stackoverflow.com/questions/2321578",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/233254/"
] | Pointers are mutable (if non-const), references never. Thus there is no point having a pointer or reference to a reference.
Also, a reference must always refer to something - there is no such thing as a null reference. This is why there can be no arrays of references, as there is no way to default instantiate referenc... | It is according to C++ Standard 8.3.2/4:
>
> There shall be no references to references, no arrays of references, and no pointers to references.
>
>
> |
2,321,578 | I noticed that there is no reference to reference but there is pointer to pointer, and also there is no an array of references but an array of pointers.
Could anybody give me any reason? | 2010/02/23 | [
"https://Stackoverflow.com/questions/2321578",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/233254/"
] | It is according to C++ Standard 8.3.2/4:
>
> There shall be no references to references, no arrays of references, and no pointers to references.
>
>
> | A reference is an abstraction at the language level. It's an opaque way of aliasing a variable to another. While under the hood, the compiler is likely to work out references using pointers, they are very different things at a higher level. On the other hand, pointers are explicitly used by a programmer to achieve indi... |
2,321,578 | I noticed that there is no reference to reference but there is pointer to pointer, and also there is no an array of references but an array of pointers.
Could anybody give me any reason? | 2010/02/23 | [
"https://Stackoverflow.com/questions/2321578",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/233254/"
] | It is according to C++ Standard 8.3.2/4:
>
> There shall be no references to references, no arrays of references, and no pointers to references.
>
>
> | C++ Standard 8.3.2/4:
`There shall be no references to references, no arrays of references, and no pointers to references.`
The reasoning behind this is that a reference doesn't exist in and of itself at run-time. A reference merely is another name for a location. They are immutable. |
2,321,578 | I noticed that there is no reference to reference but there is pointer to pointer, and also there is no an array of references but an array of pointers.
Could anybody give me any reason? | 2010/02/23 | [
"https://Stackoverflow.com/questions/2321578",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/233254/"
] | Pointers are mutable (if non-const), references never. Thus there is no point having a pointer or reference to a reference.
Also, a reference must always refer to something - there is no such thing as a null reference. This is why there can be no arrays of references, as there is no way to default instantiate referenc... | A reference is an abstraction at the language level. It's an opaque way of aliasing a variable to another. While under the hood, the compiler is likely to work out references using pointers, they are very different things at a higher level. On the other hand, pointers are explicitly used by a programmer to achieve indi... |
2,321,578 | I noticed that there is no reference to reference but there is pointer to pointer, and also there is no an array of references but an array of pointers.
Could anybody give me any reason? | 2010/02/23 | [
"https://Stackoverflow.com/questions/2321578",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/233254/"
] | Pointers are mutable (if non-const), references never. Thus there is no point having a pointer or reference to a reference.
Also, a reference must always refer to something - there is no such thing as a null reference. This is why there can be no arrays of references, as there is no way to default instantiate referenc... | C++ Standard 8.3.2/4:
`There shall be no references to references, no arrays of references, and no pointers to references.`
The reasoning behind this is that a reference doesn't exist in and of itself at run-time. A reference merely is another name for a location. They are immutable. |
2,321,578 | I noticed that there is no reference to reference but there is pointer to pointer, and also there is no an array of references but an array of pointers.
Could anybody give me any reason? | 2010/02/23 | [
"https://Stackoverflow.com/questions/2321578",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/233254/"
] | A reference is an abstraction at the language level. It's an opaque way of aliasing a variable to another. While under the hood, the compiler is likely to work out references using pointers, they are very different things at a higher level. On the other hand, pointers are explicitly used by a programmer to achieve indi... | C++ Standard 8.3.2/4:
`There shall be no references to references, no arrays of references, and no pointers to references.`
The reasoning behind this is that a reference doesn't exist in and of itself at run-time. A reference merely is another name for a location. They are immutable. |
36,115,527 | In an attempt to build an "emulated" [Reentrant mutex](https://en.wikipedia.org/wiki/Reentrant_mutex), I need an identifier that is unique to each thread. I can get the current thread via [`thread::current`](https://doc.rust-lang.org/std/thread/fn.current.html), but [`Thread`](https://doc.rust-lang.org/std/thread/struc... | 2016/03/20 | [
"https://Stackoverflow.com/questions/36115527",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/155423/"
] | Another way is, if you can use `libc`:
```
fn get_thread_id() -> libc::pthread_t {
unsafe { libc::pthread_self() }
}
```
`pthread_t` will map to the right target per plattform. | Although it would be much nicer to use something built-in to the threading system, one solution is to track our own thread IDs. These can be created using a combination of atomic and thread-local variables:
```
use std::sync::atomic;
use std::thread;
static THREAD_COUNT: atomic::AtomicUsize = atomic::ATOMIC_USIZE_INI... |
36,115,527 | In an attempt to build an "emulated" [Reentrant mutex](https://en.wikipedia.org/wiki/Reentrant_mutex), I need an identifier that is unique to each thread. I can get the current thread via [`thread::current`](https://doc.rust-lang.org/std/thread/fn.current.html), but [`Thread`](https://doc.rust-lang.org/std/thread/struc... | 2016/03/20 | [
"https://Stackoverflow.com/questions/36115527",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/155423/"
] | Another way is, if you can use `libc`:
```
fn get_thread_id() -> libc::pthread_t {
unsafe { libc::pthread_self() }
}
```
`pthread_t` will map to the right target per plattform. | >
> but `Thread` doesn't seem to have anything that could be used (or abused) as an identifier.
>
>
>
This was rectified in Rust 1.19 via [`Thread::id`](https://doc.rust-lang.org/std/thread/struct.Thread.html#method.id). |
17,239,887 | I need to redirect all urls like these:
```
www.example.com/blog.php?id=29
```
to urls like these:
```
www.example.com/blog/29/this-is-a-blogpost
```
Where "This is a blogpost" is the title stored in the database.
Is there a way to rewrite these urls in this way ? | 2013/06/21 | [
"https://Stackoverflow.com/questions/17239887",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/244413/"
] | Well mod\_rewrite canot query your database and pull the title for the provided id from a DB table.
You'll need to pass id to a server side code (like a php script) in order to fetch & display title.
For ex look at the SO URL for this question: `http://stackoverflow.com/questions/17239887/is-there-a-way-to-rewrite-t... | What you ask is obviously impossible: the second url you want to redirect to contains data that is not present (known) in the original request. Where should that data come from inside the redirection process?
The other way round certainly *is* possible and often done. |
122,337 | The volume on my macbook pro has suddenly become greyed out. I haven't installed any updates or made any modifications to the computer, it just suddenly became greyed out after waking the macbook up from sleeping.
I've tried resetting the PRAM, but I don't hear any chime at all when I start up my computer, no matter h... | 2014/02/26 | [
"https://apple.stackexchange.com/questions/122337",
"https://apple.stackexchange.com",
"https://apple.stackexchange.com/users/71479/"
] | Try switching back to your internal speakers with [alt]-clicking on the speaker icon in menubar. Many interfaces don't support volume adjustment and thus the control becomes greyed out.
 | I had no output from speakers, or headphones. And the System Preferences - Volume was greyed out.
I tried everything up to including a PRAM reset and nothing worked.
Took it to the company tech and after awhile he figured out what was wrong.
The inner head phone jack was dirty. He cleaned it with a qtip or a special... |
122,337 | The volume on my macbook pro has suddenly become greyed out. I haven't installed any updates or made any modifications to the computer, it just suddenly became greyed out after waking the macbook up from sleeping.
I've tried resetting the PRAM, but I don't hear any chime at all when I start up my computer, no matter h... | 2014/02/26 | [
"https://apple.stackexchange.com/questions/122337",
"https://apple.stackexchange.com",
"https://apple.stackexchange.com/users/71479/"
] | The switch in the headphone input could be stuck, you can put in a headphone jack and wiggle it around.
Don't be afraid to use a little force, just don't break of the plug.
I had this problem too and this solved it for me at least. | Try picking up some [compressed air](http://www.mcmelectronics.com/product/CHEMTRONICS-ES1027-/20-4468) and using it to blow out any dust or debris that might be in the headphone jack. Make sure to first expel any liquid build (white frost-like substance) before you spray in the headphone jack.
You can also try fish... |
122,337 | The volume on my macbook pro has suddenly become greyed out. I haven't installed any updates or made any modifications to the computer, it just suddenly became greyed out after waking the macbook up from sleeping.
I've tried resetting the PRAM, but I don't hear any chime at all when I start up my computer, no matter h... | 2014/02/26 | [
"https://apple.stackexchange.com/questions/122337",
"https://apple.stackexchange.com",
"https://apple.stackexchange.com/users/71479/"
] | Try picking up some [compressed air](http://www.mcmelectronics.com/product/CHEMTRONICS-ES1027-/20-4468) and using it to blow out any dust or debris that might be in the headphone jack. Make sure to first expel any liquid build (white frost-like substance) before you spray in the headphone jack.
You can also try fish... | I have had the same problem twice. And what I did was (for the first time[i am listing two so there are more possibilities])
1st. restart my laptop. I know that it sounds cliche. But it works most of the time.
2nd. If all else fails. Try playing with the volume buttons on the keyboard. And this one sounds silly but i... |
122,337 | The volume on my macbook pro has suddenly become greyed out. I haven't installed any updates or made any modifications to the computer, it just suddenly became greyed out after waking the macbook up from sleeping.
I've tried resetting the PRAM, but I don't hear any chime at all when I start up my computer, no matter h... | 2014/02/26 | [
"https://apple.stackexchange.com/questions/122337",
"https://apple.stackexchange.com",
"https://apple.stackexchange.com/users/71479/"
] | I had no output from speakers, or headphones. And the System Preferences - Volume was greyed out.
I tried everything up to including a PRAM reset and nothing worked.
Took it to the company tech and after awhile he figured out what was wrong.
The inner head phone jack was dirty. He cleaned it with a qtip or a special... | I had this same problem with my MacBook Pro, and used the technique described by dennismuys. I inserted and removed my headphone plug about a dozen times, and the internal speakers started working again. I have no idea what could possibly have gotten in the jack to keep the switch from closing. Lint maybe. |
122,337 | The volume on my macbook pro has suddenly become greyed out. I haven't installed any updates or made any modifications to the computer, it just suddenly became greyed out after waking the macbook up from sleeping.
I've tried resetting the PRAM, but I don't hear any chime at all when I start up my computer, no matter h... | 2014/02/26 | [
"https://apple.stackexchange.com/questions/122337",
"https://apple.stackexchange.com",
"https://apple.stackexchange.com/users/71479/"
] | Try switching back to your internal speakers with [alt]-clicking on the speaker icon in menubar. Many interfaces don't support volume adjustment and thus the control becomes greyed out.
 | I just blew into the headphone jack - problem solved! |
122,337 | The volume on my macbook pro has suddenly become greyed out. I haven't installed any updates or made any modifications to the computer, it just suddenly became greyed out after waking the macbook up from sleeping.
I've tried resetting the PRAM, but I don't hear any chime at all when I start up my computer, no matter h... | 2014/02/26 | [
"https://apple.stackexchange.com/questions/122337",
"https://apple.stackexchange.com",
"https://apple.stackexchange.com/users/71479/"
] | Try switching back to your internal speakers with [alt]-clicking on the speaker icon in menubar. Many interfaces don't support volume adjustment and thus the control becomes greyed out.
 | I have had the same problem twice. And what I did was (for the first time[i am listing two so there are more possibilities])
1st. restart my laptop. I know that it sounds cliche. But it works most of the time.
2nd. If all else fails. Try playing with the volume buttons on the keyboard. And this one sounds silly but i... |
122,337 | The volume on my macbook pro has suddenly become greyed out. I haven't installed any updates or made any modifications to the computer, it just suddenly became greyed out after waking the macbook up from sleeping.
I've tried resetting the PRAM, but I don't hear any chime at all when I start up my computer, no matter h... | 2014/02/26 | [
"https://apple.stackexchange.com/questions/122337",
"https://apple.stackexchange.com",
"https://apple.stackexchange.com/users/71479/"
] | Try switching back to your internal speakers with [alt]-clicking on the speaker icon in menubar. Many interfaces don't support volume adjustment and thus the control becomes greyed out.
 | I just had this same problem. I didn't realise straight away but it must have happened after taking out my headphones. I accidentally solved it by doing the following:
1. Make sure your headphones are plugged in and sound is working.
2. Alt-click the speaker icon at the top of the screen, then click on 'Sound Preferen... |
122,337 | The volume on my macbook pro has suddenly become greyed out. I haven't installed any updates or made any modifications to the computer, it just suddenly became greyed out after waking the macbook up from sleeping.
I've tried resetting the PRAM, but I don't hear any chime at all when I start up my computer, no matter h... | 2014/02/26 | [
"https://apple.stackexchange.com/questions/122337",
"https://apple.stackexchange.com",
"https://apple.stackexchange.com/users/71479/"
] | Try switching back to your internal speakers with [alt]-clicking on the speaker icon in menubar. Many interfaces don't support volume adjustment and thus the control becomes greyed out.
 | Try picking up some [compressed air](http://www.mcmelectronics.com/product/CHEMTRONICS-ES1027-/20-4468) and using it to blow out any dust or debris that might be in the headphone jack. Make sure to first expel any liquid build (white frost-like substance) before you spray in the headphone jack.
You can also try fish... |
122,337 | The volume on my macbook pro has suddenly become greyed out. I haven't installed any updates or made any modifications to the computer, it just suddenly became greyed out after waking the macbook up from sleeping.
I've tried resetting the PRAM, but I don't hear any chime at all when I start up my computer, no matter h... | 2014/02/26 | [
"https://apple.stackexchange.com/questions/122337",
"https://apple.stackexchange.com",
"https://apple.stackexchange.com/users/71479/"
] | The switch in the headphone input could be stuck, you can put in a headphone jack and wiggle it around.
Don't be afraid to use a little force, just don't break of the plug.
I had this problem too and this solved it for me at least. | I have had the same problem twice. And what I did was (for the first time[i am listing two so there are more possibilities])
1st. restart my laptop. I know that it sounds cliche. But it works most of the time.
2nd. If all else fails. Try playing with the volume buttons on the keyboard. And this one sounds silly but i... |
122,337 | The volume on my macbook pro has suddenly become greyed out. I haven't installed any updates or made any modifications to the computer, it just suddenly became greyed out after waking the macbook up from sleeping.
I've tried resetting the PRAM, but I don't hear any chime at all when I start up my computer, no matter h... | 2014/02/26 | [
"https://apple.stackexchange.com/questions/122337",
"https://apple.stackexchange.com",
"https://apple.stackexchange.com/users/71479/"
] | Try switching back to your internal speakers with [alt]-clicking on the speaker icon in menubar. Many interfaces don't support volume adjustment and thus the control becomes greyed out.
 | I had this same problem with my MacBook Pro, and used the technique described by dennismuys. I inserted and removed my headphone plug about a dozen times, and the internal speakers started working again. I have no idea what could possibly have gotten in the jack to keep the switch from closing. Lint maybe. |
150,073 | >
> **Possible Duplicate:**
>
> [List of all badges with full descriptions](https://meta.stackexchange.com/questions/67397/list-of-all-badges-with-full-descriptions)
>
>
>
I want to know what "Raised 80 helpful flags" means. Should I flag 80 comments, or what? | 2012/10/11 | [
"https://meta.stackexchange.com/questions/150073",
"https://meta.stackexchange.com",
"https://meta.stackexchange.com/users/198138/"
] | It means that at least 80 flags you raised were deemed helpful by the moderator(s) that handled them. There are some instances where a flag is automatically deemed helpful, for example if you flag a question as Off Topic and then a 3K+ user votes to close it as such.
Since you brought this up in the context of the de... | Flags aren't meant only for comments. You can flag questions,answers,users(who does nasty things like voting fraud) and also comments. Those flags are only counted when they are *helpful*. A moderator should approve that those flags helped in some way!
 |
46,932,435 | I am working on this kata <https://www.codewars.com/kata/count-9-s-from-1-to-n/train/javascript>
and i have written this code for it, but its not working. This question is similar to this one [Count the number of occurrences of 0's in integers from 1 to N](https://stackoverflow.com/questions/11891984/count-the-number-... | 2017/10/25 | [
"https://Stackoverflow.com/questions/46932435",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8592967/"
] | delete the minor
```
DELETE A
(
SELECT
[Column1PK], [Column2], [Column3],
RN = ROW_NUMBER() OVER (PARTITION BY [Column1PK] ORDER BY [Column1PK] DESC)
FROM
[dbo].[table]
) A
WHERE RN > 1
```
Delete the largest
```
DELETE A
(
SELECT
[Column1PK], [Column2], [Column3],
RN... | Not sure if I understand you correctly, but if you want to remove only the duplicates with the highest value, you can use exists. That would look something like this:
```
DELETE FROM Table_A AS A
WHERE EXISTS (SELECT * FROM Table_A AS A2
WHERE A2.Column1PK = A.Column1PK
AND A2?? < A.??)... |
36,002,342 | Im having troubles converting my String to integer. My Data Table consist of 3 columns, two of which are INT type. But when i started inserting my String to my Database it gives an Auto\_Increment error:
Class:
```
public class Strong extends javax.swing.JFrame {
String a;
public Apply() {
initCompone... | 2016/03/15 | [
"https://Stackoverflow.com/questions/36002342",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5418127/"
] | Use [`event.stopImmediatePropagation()`](https://api.jquery.com/event.stopimmediatepropagation/) in the button click handler to stop event from bubbling.
```
$(".addtocart").click(function (event) {
// ^^^^^ Pass event object to the callback
//add to cart
event.stopImmediatePro... | It is a easy solution.
Just use on method in jQuery.
```
$(document).ready(function(){
$("dynamically_created_element_selector").on("click", function()
{
//do whatever u want
});
});
```
Demo is here-
-------------
```js
$(function(){
$('button').on('click',function(){
var r= $('<... |
8,243,259 | How do I format a reg.exp. to ignore matching text in a search. We have documents formatted like this:
>
> ProductType\_[dimensions][density].pdf
>
>
>
So in a typical folder, the file list would be:
```
RN_HG_HighDry_001x450.pdf
RN_HG_HighDry_001x895.pdf
RN_HG_HighDry_002x136.pdf
RN_HG_HighDry_002x887.pdf
RN_HG... | 2011/11/23 | [
"https://Stackoverflow.com/questions/8243259",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1061988/"
] | With the square brackets `[]` you are creating a character class, that means such a class matches all character that are inside the class. And you are right a character class starting with `^` means NOT, but in a different sense. It means match any character but not those in the class.
`[^\d{3}x\d{3}]` will match any ... | If you don't have support for negative lookaheads, you will basically have to enumerate the patterns you do want to catch. For your particular application, why don't you just exclude the ones you know how to match, and keep the rest? You don't mention which programming language or matching program you are using, but so... |
55,046,391 | I´m working on a Google Apps Script project (can be bound to a Spreadsheet or standalone) that will be deployed as webapp and I want to grant users access based on
* **1) Google Sign-In** (some users will be granted access or some will be prevented from access) for some users and
* **2) username/password** for the ot... | 2019/03/07 | [
"https://Stackoverflow.com/questions/55046391",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8468137/"
] | May be I can give You answer for the first question .
1) Google Sign-In .
Before you begin add this Google Oauth2 [link](https://github.com/gsuitedevs/apps-script-oauth2)
1B7FSrk5Zi6L1rSxxTDgDEUsPzlukDsi4KGuTMorsTQHhGBzBkMun4iDF
This will solve some login issues
You need to add a new OAuth 2.0 client ID apart fr... | Bitz Trail answer is unfortunately no longer valid. It is not longer possible to add the origin of a google WebApp in the "Authorized redirect URI" in the "OAuth 2.0 Client IDs"
see this link for more details. [Why webapp can no longer use client side authentification](https://stackoverflow.com/a/67966293)
However, i... |
75,956 | After reading [Should package names be singular or plural?](https://softwareengineering.stackexchange.com/q/75919/7167) it occurred to me that I've never seen a proper debate covering one of my pet peeves: naming implementations of interfaces.
Let's assume that you have a interface `Order` that is intended to be impl... | 2011/05/12 | [
"https://softwareengineering.stackexchange.com/questions/75956",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/7167/"
] | Names have the opportunity to convey meaning. Why would you throw away that opportunity with Impl?
First of all, **if you will only ever have one implementation, do away with the interface.** It creates this naming problem and adds nothing. Even worse, it could cause trouble with inconsistent method signatures in APIs... | I always go for `OrderImpl` simply because it shows up alphabetically right after the `Order` interface. |
75,956 | After reading [Should package names be singular or plural?](https://softwareengineering.stackexchange.com/q/75919/7167) it occurred to me that I've never seen a proper debate covering one of my pet peeves: naming implementations of interfaces.
Let's assume that you have a interface `Order` that is intended to be impl... | 2011/05/12 | [
"https://softwareengineering.stackexchange.com/questions/75956",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/7167/"
] | Names have the opportunity to convey meaning. Why would you throw away that opportunity with Impl?
First of all, **if you will only ever have one implementation, do away with the interface.** It creates this naming problem and adds nothing. Even worse, it could cause trouble with inconsistent method signatures in APIs... | Try to figure out what is more concrete or specific about the class than the interface and incorporate that into the name.
Say you have an interface for persisting data, FooDao. Persistence could be to a flat file, an XML document, a spreadsheet, a relational database, a non-relational database, etc. If the class is ... |
75,956 | After reading [Should package names be singular or plural?](https://softwareengineering.stackexchange.com/q/75919/7167) it occurred to me that I've never seen a proper debate covering one of my pet peeves: naming implementations of interfaces.
Let's assume that you have a interface `Order` that is intended to be impl... | 2011/05/12 | [
"https://softwareengineering.stackexchange.com/questions/75956",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/7167/"
] | I agree with Nicole's answer (particularly that the interface probably isn't necessary in most cases), but for the sake of discussion I'll throw out an additional alternative other than `OrderImpl` and `DefaultOrder`: hide the implementation behind a static factory method like `Orders.create()`. For example:
```
publi... | You can name interface with prefix I (IWhatever) and then make implementation Whatever.
Official Java code conventions don't tell about this kind of naming for interfaces, however this kind of naming helps recognition and navigation. |
75,956 | After reading [Should package names be singular or plural?](https://softwareengineering.stackexchange.com/q/75919/7167) it occurred to me that I've never seen a proper debate covering one of my pet peeves: naming implementations of interfaces.
Let's assume that you have a interface `Order` that is intended to be impl... | 2011/05/12 | [
"https://softwareengineering.stackexchange.com/questions/75956",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/7167/"
] | I decide the naming by the use case of the interface.
If the interface is used for **decoupling**, then I choose `Impl` for implementations.
If the purpose of the interface is **behavioral abstraction**, then the implementations are named according to what they are concretely doing. I often append the interface name ... | Try to figure out what is more concrete or specific about the class than the interface and incorporate that into the name.
Say you have an interface for persisting data, FooDao. Persistence could be to a flat file, an XML document, a spreadsheet, a relational database, a non-relational database, etc. If the class is ... |
75,956 | After reading [Should package names be singular or plural?](https://softwareengineering.stackexchange.com/q/75919/7167) it occurred to me that I've never seen a proper debate covering one of my pet peeves: naming implementations of interfaces.
Let's assume that you have a interface `Order` that is intended to be impl... | 2011/05/12 | [
"https://softwareengineering.stackexchange.com/questions/75956",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/7167/"
] | Names have the opportunity to convey meaning. Why would you throw away that opportunity with Impl?
First of all, **if you will only ever have one implementation, do away with the interface.** It creates this naming problem and adds nothing. Even worse, it could cause trouble with inconsistent method signatures in APIs... | I agree with Nicole's answer (particularly that the interface probably isn't necessary in most cases), but for the sake of discussion I'll throw out an additional alternative other than `OrderImpl` and `DefaultOrder`: hide the implementation behind a static factory method like `Orders.create()`. For example:
```
publi... |
75,956 | After reading [Should package names be singular or plural?](https://softwareengineering.stackexchange.com/q/75919/7167) it occurred to me that I've never seen a proper debate covering one of my pet peeves: naming implementations of interfaces.
Let's assume that you have a interface `Order` that is intended to be impl... | 2011/05/12 | [
"https://softwareengineering.stackexchange.com/questions/75956",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/7167/"
] | I always go for `OrderImpl` simply because it shows up alphabetically right after the `Order` interface. | I think that while Default can make sense in some cases, it would be more helpful to describe the implementation. So if your interface is `UserProfileDAO` then your implementations can be `UserProfileSQLDAO` or `UserProfileLDAPDAO` or something like that. |
75,956 | After reading [Should package names be singular or plural?](https://softwareengineering.stackexchange.com/q/75919/7167) it occurred to me that I've never seen a proper debate covering one of my pet peeves: naming implementations of interfaces.
Let's assume that you have a interface `Order` that is intended to be impl... | 2011/05/12 | [
"https://softwareengineering.stackexchange.com/questions/75956",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/7167/"
] | Names have the opportunity to convey meaning. Why would you throw away that opportunity with Impl?
First of all, **if you will only ever have one implementation, do away with the interface.** It creates this naming problem and adds nothing. Even worse, it could cause trouble with inconsistent method signatures in APIs... | if possible, name it after what/how it does its thing.
usually worst approach is naming it after how it is supposed to be used.
If it is supposed to be used as base class for implementation, you can use BaseX or AbstractX (if it is abstract (but try to squeze in what it does, because if it did not do anything you wou... |
75,956 | After reading [Should package names be singular or plural?](https://softwareengineering.stackexchange.com/q/75919/7167) it occurred to me that I've never seen a proper debate covering one of my pet peeves: naming implementations of interfaces.
Let's assume that you have a interface `Order` that is intended to be impl... | 2011/05/12 | [
"https://softwareengineering.stackexchange.com/questions/75956",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/7167/"
] | I always go for `OrderImpl` simply because it shows up alphabetically right after the `Order` interface. | You can name interface with prefix I (IWhatever) and then make implementation Whatever.
Official Java code conventions don't tell about this kind of naming for interfaces, however this kind of naming helps recognition and navigation. |
75,956 | After reading [Should package names be singular or plural?](https://softwareengineering.stackexchange.com/q/75919/7167) it occurred to me that I've never seen a proper debate covering one of my pet peeves: naming implementations of interfaces.
Let's assume that you have a interface `Order` that is intended to be impl... | 2011/05/12 | [
"https://softwareengineering.stackexchange.com/questions/75956",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/7167/"
] | I always go for `OrderImpl` simply because it shows up alphabetically right after the `Order` interface. | if possible, name it after what/how it does its thing.
usually worst approach is naming it after how it is supposed to be used.
If it is supposed to be used as base class for implementation, you can use BaseX or AbstractX (if it is abstract (but try to squeze in what it does, because if it did not do anything you wou... |
75,956 | After reading [Should package names be singular or plural?](https://softwareengineering.stackexchange.com/q/75919/7167) it occurred to me that I've never seen a proper debate covering one of my pet peeves: naming implementations of interfaces.
Let's assume that you have a interface `Order` that is intended to be impl... | 2011/05/12 | [
"https://softwareengineering.stackexchange.com/questions/75956",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/7167/"
] | I think that while Default can make sense in some cases, it would be more helpful to describe the implementation. So if your interface is `UserProfileDAO` then your implementations can be `UserProfileSQLDAO` or `UserProfileLDAPDAO` or something like that. | You can name interface with prefix I (IWhatever) and then make implementation Whatever.
Official Java code conventions don't tell about this kind of naming for interfaces, however this kind of naming helps recognition and navigation. |
1,013,014 | I'm learning about [DNS amplification attacks](https://www.incapsula.com/ddos/attack-glossary/dns-amplification.html). The idea is an attacker can send a small message (the request to the DNS server) and have it send a huge message to the spoofed ip address. What is in the message of a DNS response that makes it so big... | 2015/12/14 | [
"https://superuser.com/questions/1013014",
"https://superuser.com",
"https://superuser.com/users/137864/"
] | A DNS response can contain much more than a single IP address. For a request of type A (asking for IP addresses associated with a hostname) you can already have multiple IPs, so if you find a host that's served by a lot of IPs, the response can already be larger than the request.
But DNS can store a lot of other field... | Already really well answered on the securtity stack.
>
> To amplify a DNS attack, each DNS request can be sent using the EDNS0 DNS protocol extension, which allows for large DNS messages, or using the cryptographic feature of the DNS security extension (DNSSEC) to increase message size. Spoofed queries of the type “... |
19,017,530 | I'm using the HTML version of the script. I'm trying to read a dynamic version of the drop down and submit it with the files. The manual says that the onUploadStart should do it however in my case it doesn't work. It looks like the alert that I've put inside to test it is not triggered:
```
$(function() {
$('#file_... | 2013/09/26 | [
"https://Stackoverflow.com/questions/19017530",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1029829/"
] | DO THIS PROCEDURE and do not deviate:
1. Torch this option from your jQuery script (yes, remove it):
```
'formData' : {
'timestamp' : '<?php echo $timestamp;?>',
'token' : '<?php echo md5('unique_salt' . $timestamp);?>'
},
```
2. Edit your uploadifive.php script. Add these three statements:
```
$_POST['time... | try
```
uploadify_obj.data('uploadifive').settings.uploadScript = ""
``` |
19,017,530 | I'm using the HTML version of the script. I'm trying to read a dynamic version of the drop down and submit it with the files. The manual says that the onUploadStart should do it however in my case it doesn't work. It looks like the alert that I've put inside to test it is not triggered:
```
$(function() {
$('#file_... | 2013/09/26 | [
"https://Stackoverflow.com/questions/19017530",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1029829/"
] | DO THIS PROCEDURE and do not deviate:
1. Torch this option from your jQuery script (yes, remove it):
```
'formData' : {
'timestamp' : '<?php echo $timestamp;?>',
'token' : '<?php echo md5('unique_salt' . $timestamp);?>'
},
```
2. Edit your uploadifive.php script. Add these three statements:
```
$_POST['time... | You have to move formData out of the initialization entirely and call a function on upload. See my post on [this page](https://stackoverflow.com/questions/22418807/uploadifive-dynamically-posting-input-variables/22429479#22429479) |
63,077 | Let us start with a simple sentence:
* Ich **lerne** Deutsch.
... in which we have Subject + Verb + Object. Then we have:
* Du musst **lernen**, den Ball weiter zu werfen.
... in which we replace the Object with the phrase "*den Ball weiter zu werfen*".
By the same logic, I first have:
* Ich **hasse** Fast-Food.
... | 2021/02/20 | [
"https://german.stackexchange.com/questions/63077",
"https://german.stackexchange.com",
"https://german.stackexchange.com/users/41812/"
] | **(1)** Yes. The dummy *es* (Korrelat) can frequently be omitted. However, as you seem to have observed, German speakers often have (sometimes strong, sometimes weak) preferences about the Korrelat use.
The preference is generally related to the information packaging in a given sentence (Duden-Grammatik (9th edn), par... | In my experience (both as a language learner and language teacher), attempting to understand grammar is not usually a helpful approach to learning a language.
Look at how children learn their mother tongue. Most native speakers do not understand the grammatical rules of their native tongue (at least not until they are... |
63,077 | Let us start with a simple sentence:
* Ich **lerne** Deutsch.
... in which we have Subject + Verb + Object. Then we have:
* Du musst **lernen**, den Ball weiter zu werfen.
... in which we replace the Object with the phrase "*den Ball weiter zu werfen*".
By the same logic, I first have:
* Ich **hasse** Fast-Food.
... | 2021/02/20 | [
"https://german.stackexchange.com/questions/63077",
"https://german.stackexchange.com",
"https://german.stackexchange.com/users/41812/"
] | **(1)** Yes. The dummy *es* (Korrelat) can frequently be omitted. However, as you seem to have observed, German speakers often have (sometimes strong, sometimes weak) preferences about the Korrelat use.
The preference is generally related to the information packaging in a given sentence (Duden-Grammatik (9th edn), par... | Let me give you an answer based solely on gut feeling.
My impression is that the subtlety of whether to use "es" or not is related to the pronunciation. Note that "hasse" ends with the vowel e and "es" begins with the same vowel. This means that in spoken language the two words melt together. The sentence "Ich hasse e... |
63,077 | Let us start with a simple sentence:
* Ich **lerne** Deutsch.
... in which we have Subject + Verb + Object. Then we have:
* Du musst **lernen**, den Ball weiter zu werfen.
... in which we replace the Object with the phrase "*den Ball weiter zu werfen*".
By the same logic, I first have:
* Ich **hasse** Fast-Food.
... | 2021/02/20 | [
"https://german.stackexchange.com/questions/63077",
"https://german.stackexchange.com",
"https://german.stackexchange.com/users/41812/"
] | In my experience (both as a language learner and language teacher), attempting to understand grammar is not usually a helpful approach to learning a language.
Look at how children learn their mother tongue. Most native speakers do not understand the grammatical rules of their native tongue (at least not until they are... | Let me give you an answer based solely on gut feeling.
My impression is that the subtlety of whether to use "es" or not is related to the pronunciation. Note that "hasse" ends with the vowel e and "es" begins with the same vowel. This means that in spoken language the two words melt together. The sentence "Ich hasse e... |
6,574,236 | I'm looking for a way to have multiple time clocks running along side the system time clock that are also accessible programatically so that I could access their time values much like I can system time with C#. A third party framework is acceptable. Anyone have any ideas, or even heard of such a need? | 2011/07/04 | [
"https://Stackoverflow.com/questions/6574236",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/164257/"
] | This might be totally off but why not just use the system clock as is and store offsets for your 'other clocks' (not sure what you are trying to do exactly) and wrappers to make them work similar? Still one clock, just different views to give different perspectives. | [System.Diagnostics.Stopwatch](http://msdn.microsoft.com/en-us/library/system.diagnostics.stopwatch.aspx) might be what you're looking for.
```
// Start the Stopwatch
Stopwatch stopwatch = new Stopwatch();
stopwatch.Start();
// do something...
// perhaps the rest of this could be in a method
TimeSpan ts = stopWatch.E... |
35,333,077 | I'm trying to configure a file with a bash script. And the variables in the bash script are not written in file as it is written in script.
Ex:
```
#!/bin/bash
printf "%s" "template("$DATE\t$HOST\t$PRIORITY\t$MSG\n")" >> /file.txt
exit 0
```
This results to template('tttn') instead of template("$DATE\t$HOST\t$PRI... | 2016/02/11 | [
"https://Stackoverflow.com/questions/35333077",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5912192/"
] | Enclose the strings you want to write within single quotes to avoid variable replacement.
```
> FOO=bar
> echo "$FOO"
bar
> echo '$FOO'
$FOO
>
``` | Using `printf` in any shell script is uncommon, just use `echo` with the `-e` option.
It allows you to use ANSI C metacharacters, like `\t` or `\n`. The `\n` at the end however isn't necessary, as `echo` will add one itself.
```
echo -e "template(${DATE}\t${HOST}\t${PRIORITY}\t${MSG})" >> file.txt
```
The problem w... |
35,333,077 | I'm trying to configure a file with a bash script. And the variables in the bash script are not written in file as it is written in script.
Ex:
```
#!/bin/bash
printf "%s" "template("$DATE\t$HOST\t$PRIORITY\t$MSG\n")" >> /file.txt
exit 0
```
This results to template('tttn') instead of template("$DATE\t$HOST\t$PRI... | 2016/02/11 | [
"https://Stackoverflow.com/questions/35333077",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5912192/"
] | Enclose the strings you want to write within single quotes to avoid variable replacement.
```
> FOO=bar
> echo "$FOO"
bar
> echo '$FOO'
$FOO
>
``` | There are several escaping issues and the power of `printf` has not been used, try
```
printf 'template(%s\t%s\t%s\t%s)\n' "${DATE}" "${HOST}" "${PRIORITY}" "${MSG}" >> file.txt
```
Reasons for this separate answer:
* The accepted answer does not fit the title of the question (see comment).
* The post with the righ... |
35,333,077 | I'm trying to configure a file with a bash script. And the variables in the bash script are not written in file as it is written in script.
Ex:
```
#!/bin/bash
printf "%s" "template("$DATE\t$HOST\t$PRIORITY\t$MSG\n")" >> /file.txt
exit 0
```
This results to template('tttn') instead of template("$DATE\t$HOST\t$PRI... | 2016/02/11 | [
"https://Stackoverflow.com/questions/35333077",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5912192/"
] | Using `printf` in any shell script is uncommon, just use `echo` with the `-e` option.
It allows you to use ANSI C metacharacters, like `\t` or `\n`. The `\n` at the end however isn't necessary, as `echo` will add one itself.
```
echo -e "template(${DATE}\t${HOST}\t${PRIORITY}\t${MSG})" >> file.txt
```
The problem w... | There are several escaping issues and the power of `printf` has not been used, try
```
printf 'template(%s\t%s\t%s\t%s)\n' "${DATE}" "${HOST}" "${PRIORITY}" "${MSG}" >> file.txt
```
Reasons for this separate answer:
* The accepted answer does not fit the title of the question (see comment).
* The post with the righ... |
533,037 | Is there a way or a program that marks the icon of a file with a badge, similar to how Dropbox marks synced files with a green checkmark, and files that are currently syncing blue?
I'd use that to mark videos I've watched in a series. | 2013/01/12 | [
"https://superuser.com/questions/533037",
"https://superuser.com",
"https://superuser.com/users/187417/"
] | I couldn't find a better solution, so I've created an open-source project for that. Available at <https://github.com/csomakk/IWatchSeriez>
Its nothing special yet, but it does the trick, and I'll try to work more on it. I Watch Seriez, IWatchSeriez :)
:
>
> * Select some files or folders, assign icons for them, and add a description to be displayed in Explorer's popup windows.
> * You can easily notice the marked files among other files and recognize their types by the icons.
>
>
>
:
>
> * Select some files or folders, assign icons for them, and add a description to be displayed in Explorer's popup windows.
> * You can easily notice the marked files among other files and recognize their types by the icons.
>
>
>
. Since I'm not using the rating feature to really rate a file, instead I use it for the purpose of marking it as a read file, no matter what file type it was. I also... |
533,037 | Is there a way or a program that marks the icon of a file with a badge, similar to how Dropbox marks synced files with a green checkmark, and files that are currently syncing blue?
I'd use that to mark videos I've watched in a series. | 2013/01/12 | [
"https://superuser.com/questions/533037",
"https://superuser.com",
"https://superuser.com/users/187417/"
] | You can try something like [**UserInfoTip**](http://www.akslab.com):
>
> * Select some files or folders, assign icons for them, and add a description to be displayed in Explorer's popup windows.
> * You can easily notice the marked files among other files and recognize their types by the icons.
>
>
>
 Maybe it will help others that happen upon this.
If you have the appropriate permissions, you can view "Hidden" files in Windows. They show up as g... |
533,037 | Is there a way or a program that marks the icon of a file with a badge, similar to how Dropbox marks synced files with a green checkmark, and files that are currently syncing blue?
I'd use that to mark videos I've watched in a series. | 2013/01/12 | [
"https://superuser.com/questions/533037",
"https://superuser.com",
"https://superuser.com/users/187417/"
] | You can try something like [**UserInfoTip**](http://www.akslab.com):
>
> * Select some files or folders, assign icons for them, and add a description to be displayed in Explorer's popup windows.
> * You can easily notice the marked files among other files and recognize their types by the icons.
>
>
>

Click, show the hidden files from the folder options and hide the file you already viewed. Since you enabled to show the hidden files from the folder options windows will show the hidden files by blurring it. This way you can mark the viewed files See the photo att... |
533,037 | Is there a way or a program that marks the icon of a file with a badge, similar to how Dropbox marks synced files with a green checkmark, and files that are currently syncing blue?
I'd use that to mark videos I've watched in a series. | 2013/01/12 | [
"https://superuser.com/questions/533037",
"https://superuser.com",
"https://superuser.com/users/187417/"
] | I couldn't find a better solution, so I've created an open-source project for that. Available at <https://github.com/csomakk/IWatchSeriez>
Its nothing special yet, but it does the trick, and I'll try to work more on it. I Watch Seriez, IWatchSeriez :)
. Since I'm not using the rating feature to really rate a file, instead I use it for the purpose of marking it as a read file, no matter what file type it was. I also... |
533,037 | Is there a way or a program that marks the icon of a file with a badge, similar to how Dropbox marks synced files with a green checkmark, and files that are currently syncing blue?
I'd use that to mark videos I've watched in a series. | 2013/01/12 | [
"https://superuser.com/questions/533037",
"https://superuser.com",
"https://superuser.com/users/187417/"
] | I couldn't find a better solution, so I've created an open-source project for that. Available at <https://github.com/csomakk/IWatchSeriez>
Its nothing special yet, but it does the trick, and I'll try to work more on it. I Watch Seriez, IWatchSeriez :)
 Maybe it will help others that happen upon this.
If you have the appropriate permissions, you can view "Hidden" files in Windows. They show up as g... |
533,037 | Is there a way or a program that marks the icon of a file with a badge, similar to how Dropbox marks synced files with a green checkmark, and files that are currently syncing blue?
I'd use that to mark videos I've watched in a series. | 2013/01/12 | [
"https://superuser.com/questions/533037",
"https://superuser.com",
"https://superuser.com/users/187417/"
] | I couldn't find a better solution, so I've created an open-source project for that. Available at <https://github.com/csomakk/IWatchSeriez>
Its nothing special yet, but it does the trick, and I'll try to work more on it. I Watch Seriez, IWatchSeriez :)

Click, show the hidden files from the folder options and hide the file you already viewed. Since you enabled to show the hidden files from the folder options windows will show the hidden files by blurring it. This way you can mark the viewed files See the photo att... |
533,037 | Is there a way or a program that marks the icon of a file with a badge, similar to how Dropbox marks synced files with a green checkmark, and files that are currently syncing blue?
I'd use that to mark videos I've watched in a series. | 2013/01/12 | [
"https://superuser.com/questions/533037",
"https://superuser.com",
"https://superuser.com/users/187417/"
] | You can use Rating in Windows Explorer as work around. Mark \* as read.
From File's Properties, it allows me to do file Rating from (zero star ~ 5 stars). Since I'm not using the rating feature to really rate a file, instead I use it for the purpose of marking it as a read file, no matter what file type it was. I also... | [See this image](https://i.stack.imgur.com/u7AqA.png)
Click, show the hidden files from the folder options and hide the file you already viewed. Since you enabled to show the hidden files from the folder options windows will show the hidden files by blurring it. This way you can mark the viewed files See the photo att... |
533,037 | Is there a way or a program that marks the icon of a file with a badge, similar to how Dropbox marks synced files with a green checkmark, and files that are currently syncing blue?
I'd use that to mark videos I've watched in a series. | 2013/01/12 | [
"https://superuser.com/questions/533037",
"https://superuser.com",
"https://superuser.com/users/187417/"
] | I was searching for a similar solution when I found this thread. I figured out a fairly simple way to achieve what you're looking to do (at least in this particular case.) Maybe it will help others that happen upon this.
If you have the appropriate permissions, you can view "Hidden" files in Windows. They show up as g... | [See this image](https://i.stack.imgur.com/u7AqA.png)
Click, show the hidden files from the folder options and hide the file you already viewed. Since you enabled to show the hidden files from the folder options windows will show the hidden files by blurring it. This way you can mark the viewed files See the photo att... |
7,898,630 | Here's my SQL statement:
```
(select * from items
where items.created > curdate() - interval 2 week
order by items.created desc limit 0,10000000000)
union all
(select * from items
where items.created < curdate() - interval 2 week
order by items.popularity desc limit 0,15)
```
I'm trying to figure out a way to li... | 2011/10/26 | [
"https://Stackoverflow.com/questions/7898630",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/331043/"
] | Another select:
```
select * from
(
(select * from items
where items.created > curdate() - interval 2 week
order by items.created desc limit 0,10000000000)
union all
(select * from items
where items.created < curdate() - interval 2 week
order by items.popularity desc)
) uniond_tables_alias
limit 25... | ```
SELECT 1 AS sortkey, * from items ....
UNION ALL
SELECT 2 AS sortkey, * from items ....
ORDER BY sortkey, etc.
LIMIT 25
``` |
7,898,630 | Here's my SQL statement:
```
(select * from items
where items.created > curdate() - interval 2 week
order by items.created desc limit 0,10000000000)
union all
(select * from items
where items.created < curdate() - interval 2 week
order by items.popularity desc limit 0,15)
```
I'm trying to figure out a way to li... | 2011/10/26 | [
"https://Stackoverflow.com/questions/7898630",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/331043/"
] | Another select:
```
select * from
(
(select * from items
where items.created > curdate() - interval 2 week
order by items.created desc limit 0,10000000000)
union all
(select * from items
where items.created < curdate() - interval 2 week
order by items.popularity desc)
) uniond_tables_alias
limit 25... | No need for nested queries, simply do:
```
(select * from items
where items.created > curdate() - interval 2 week
order by items.created desc) # remove LIMIT here
UNION ALL
(select * from items
where items.created < curdate() - interval 2 week
order by items.popularity desc) ... |
7,898,630 | Here's my SQL statement:
```
(select * from items
where items.created > curdate() - interval 2 week
order by items.created desc limit 0,10000000000)
union all
(select * from items
where items.created < curdate() - interval 2 week
order by items.popularity desc limit 0,15)
```
I'm trying to figure out a way to li... | 2011/10/26 | [
"https://Stackoverflow.com/questions/7898630",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/331043/"
] | Here is the required query -
```
select *
from
((select * from items
where items.created > curdate() - interval 2 week
order by items.created desc limit 0,10000000000)
union all
(select * from items
where items.created < curdate() - interval 2 week
order by items.popularity desc)) t
limit 0,25
``` | ```
SELECT 1 AS sortkey, * from items ....
UNION ALL
SELECT 2 AS sortkey, * from items ....
ORDER BY sortkey, etc.
LIMIT 25
``` |
7,898,630 | Here's my SQL statement:
```
(select * from items
where items.created > curdate() - interval 2 week
order by items.created desc limit 0,10000000000)
union all
(select * from items
where items.created < curdate() - interval 2 week
order by items.popularity desc limit 0,15)
```
I'm trying to figure out a way to li... | 2011/10/26 | [
"https://Stackoverflow.com/questions/7898630",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/331043/"
] | Here is the required query -
```
select *
from
((select * from items
where items.created > curdate() - interval 2 week
order by items.created desc limit 0,10000000000)
union all
(select * from items
where items.created < curdate() - interval 2 week
order by items.popularity desc)) t
limit 0,25
``` | No need for nested queries, simply do:
```
(select * from items
where items.created > curdate() - interval 2 week
order by items.created desc) # remove LIMIT here
UNION ALL
(select * from items
where items.created < curdate() - interval 2 week
order by items.popularity desc) ... |
7,898,630 | Here's my SQL statement:
```
(select * from items
where items.created > curdate() - interval 2 week
order by items.created desc limit 0,10000000000)
union all
(select * from items
where items.created < curdate() - interval 2 week
order by items.popularity desc limit 0,15)
```
I'm trying to figure out a way to li... | 2011/10/26 | [
"https://Stackoverflow.com/questions/7898630",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/331043/"
] | No need for nested queries, simply do:
```
(select * from items
where items.created > curdate() - interval 2 week
order by items.created desc) # remove LIMIT here
UNION ALL
(select * from items
where items.created < curdate() - interval 2 week
order by items.popularity desc) ... | ```
SELECT 1 AS sortkey, * from items ....
UNION ALL
SELECT 2 AS sortkey, * from items ....
ORDER BY sortkey, etc.
LIMIT 25
``` |
36,556,349 | Am creating a mock class, for generate example data for my Angular2 TypeScript project. Am still a beginner with programming, and struggle with the informatie that is available about TypeScript. My question:
I want to create 100 items and save them in an array. The 100 items will be generated dynamically. The static w... | 2016/04/11 | [
"https://Stackoverflow.com/questions/36556349",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6189635/"
] | All you have to do is use the push function of the array in Javascript.
```
var NAMES = [];
for (let i = 1; i < 100; i++) {
let newName = {
id:i.toString(),
name:"Tony"
};
NAMES.push(newName);
}
``` | ES6 Way:
```
const getData = () => Array.from(new Array(100), (val, index) => ({
id:index.toString(),
name:"Tony"
};);
``` |
36,556,349 | Am creating a mock class, for generate example data for my Angular2 TypeScript project. Am still a beginner with programming, and struggle with the informatie that is available about TypeScript. My question:
I want to create 100 items and save them in an array. The 100 items will be generated dynamically. The static w... | 2016/04/11 | [
"https://Stackoverflow.com/questions/36556349",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6189635/"
] | All you have to do is use the push function of the array in Javascript.
```
var NAMES = [];
for (let i = 1; i < 100; i++) {
let newName = {
id:i.toString(),
name:"Tony"
};
NAMES.push(newName);
}
``` | Another way of dynamic initialization, if you are not sure about the size of the array-
```
let list:Array<{_id:string,name:string}> = Array()
```
Then simply push values using a loop
```
list.push({_id:'it001',name:'Sam'})
``` |
36,556,349 | Am creating a mock class, for generate example data for my Angular2 TypeScript project. Am still a beginner with programming, and struggle with the informatie that is available about TypeScript. My question:
I want to create 100 items and save them in an array. The 100 items will be generated dynamically. The static w... | 2016/04/11 | [
"https://Stackoverflow.com/questions/36556349",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6189635/"
] | ES6 Way:
```
const getData = () => Array.from(new Array(100), (val, index) => ({
id:index.toString(),
name:"Tony"
};);
``` | Another way of dynamic initialization, if you are not sure about the size of the array-
```
let list:Array<{_id:string,name:string}> = Array()
```
Then simply push values using a loop
```
list.push({_id:'it001',name:'Sam'})
``` |
9,834,915 | I have two JFrames `login.java` and `account.java`
I need to get the `username` from the `login.java` page and put it in a variable in the `account.java` `JFrame`. How can I do this in the Java NetBeans using the Swing? | 2012/03/23 | [
"https://Stackoverflow.com/questions/9834915",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1225502/"
] | You can use getter and setter methods...
Set the username in a setter. And using object of login.java use it in account.java through getter...
```
public class login {
private String username;
private String password;
public String getUsername() {
return username;
}
public void setUsernam... | Well you have very nice way to do it.
Define new Static **Final Objects of that class.**
and Save that value into the Object.
and in other Class u can easily use that objects and as well as that values.
By using
**CLASSNAME.OBJECT VALUE.**
use that. |
9,834,915 | I have two JFrames `login.java` and `account.java`
I need to get the `username` from the `login.java` page and put it in a variable in the `account.java` `JFrame`. How can I do this in the Java NetBeans using the Swing? | 2012/03/23 | [
"https://Stackoverflow.com/questions/9834915",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1225502/"
] | You can use getter and setter methods...
Set the username in a setter. And using object of login.java use it in account.java through getter...
```
public class login {
private String username;
private String password;
public String getUsername() {
return username;
}
public void setUsernam... | Since you have asked how to pass a variable value from one JFrame to Another JFrame (using swing). So for this put one textbox(tx) and a button(jButton3) in login.java and one label(lx) in account.java where we will print the value of the textbox from login.java .
Type this in login.java :-
```
private void jButton3... |
9,834,915 | I have two JFrames `login.java` and `account.java`
I need to get the `username` from the `login.java` page and put it in a variable in the `account.java` `JFrame`. How can I do this in the Java NetBeans using the Swing? | 2012/03/23 | [
"https://Stackoverflow.com/questions/9834915",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1225502/"
] | You can use getter and setter methods...
Set the username in a setter. And using object of login.java use it in account.java through getter...
```
public class login {
private String username;
private String password;
public String getUsername() {
return username;
}
public void setUsernam... | The 100% working solution. Suppose u r calling welcome.java
```
Account ac= new Account(new JFrame(), true);
```
After this line call a method of welcome.java which u have to create like:
```
wc.setUser(username);
```
For account.java
```
create a method:void setUser(String username) {
user1 = user;
... |
9,834,915 | I have two JFrames `login.java` and `account.java`
I need to get the `username` from the `login.java` page and put it in a variable in the `account.java` `JFrame`. How can I do this in the Java NetBeans using the Swing? | 2012/03/23 | [
"https://Stackoverflow.com/questions/9834915",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1225502/"
] | Instead of Using JFrames for passing values between different forms you can use CardLayout which will persist your data which you have entered in the previous form.
All you have to do is Create a JFrameForm and add panels to it. | Well you have very nice way to do it.
Define new Static **Final Objects of that class.**
and Save that value into the Object.
and in other Class u can easily use that objects and as well as that values.
By using
**CLASSNAME.OBJECT VALUE.**
use that. |
9,834,915 | I have two JFrames `login.java` and `account.java`
I need to get the `username` from the `login.java` page and put it in a variable in the `account.java` `JFrame`. How can I do this in the Java NetBeans using the Swing? | 2012/03/23 | [
"https://Stackoverflow.com/questions/9834915",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1225502/"
] | Instead of Using JFrames for passing values between different forms you can use CardLayout which will persist your data which you have entered in the previous form.
All you have to do is Create a JFrameForm and add panels to it. | Since you have asked how to pass a variable value from one JFrame to Another JFrame (using swing). So for this put one textbox(tx) and a button(jButton3) in login.java and one label(lx) in account.java where we will print the value of the textbox from login.java .
Type this in login.java :-
```
private void jButton3... |
9,834,915 | I have two JFrames `login.java` and `account.java`
I need to get the `username` from the `login.java` page and put it in a variable in the `account.java` `JFrame`. How can I do this in the Java NetBeans using the Swing? | 2012/03/23 | [
"https://Stackoverflow.com/questions/9834915",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1225502/"
] | Instead of Using JFrames for passing values between different forms you can use CardLayout which will persist your data which you have entered in the previous form.
All you have to do is Create a JFrameForm and add panels to it. | The 100% working solution. Suppose u r calling welcome.java
```
Account ac= new Account(new JFrame(), true);
```
After this line call a method of welcome.java which u have to create like:
```
wc.setUser(username);
```
For account.java
```
create a method:void setUser(String username) {
user1 = user;
... |
9,834,915 | I have two JFrames `login.java` and `account.java`
I need to get the `username` from the `login.java` page and put it in a variable in the `account.java` `JFrame`. How can I do this in the Java NetBeans using the Swing? | 2012/03/23 | [
"https://Stackoverflow.com/questions/9834915",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1225502/"
] | Since you have asked how to pass a variable value from one JFrame to Another JFrame (using swing). So for this put one textbox(tx) and a button(jButton3) in login.java and one label(lx) in account.java where we will print the value of the textbox from login.java .
Type this in login.java :-
```
private void jButton3... | Well you have very nice way to do it.
Define new Static **Final Objects of that class.**
and Save that value into the Object.
and in other Class u can easily use that objects and as well as that values.
By using
**CLASSNAME.OBJECT VALUE.**
use that. |
9,834,915 | I have two JFrames `login.java` and `account.java`
I need to get the `username` from the `login.java` page and put it in a variable in the `account.java` `JFrame`. How can I do this in the Java NetBeans using the Swing? | 2012/03/23 | [
"https://Stackoverflow.com/questions/9834915",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1225502/"
] | Since you have asked how to pass a variable value from one JFrame to Another JFrame (using swing). So for this put one textbox(tx) and a button(jButton3) in login.java and one label(lx) in account.java where we will print the value of the textbox from login.java .
Type this in login.java :-
```
private void jButton3... | The 100% working solution. Suppose u r calling welcome.java
```
Account ac= new Account(new JFrame(), true);
```
After this line call a method of welcome.java which u have to create like:
```
wc.setUser(username);
```
For account.java
```
create a method:void setUser(String username) {
user1 = user;
... |
41,545,073 | I'm developing a C++ application with Eclipse CDT but sometimes I need to work with Java projects.
How do you switch between the Java and C++ eclipse environments? | 2017/01/09 | [
"https://Stackoverflow.com/questions/41545073",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1179925/"
] | The general Eclipse shortcut for switching perspectives is:
```
Ctrl+F8
```
If you hold down Ctrl longer, you can choose to which perspective to jump.
See Eclipse tutorial about shortcuts:
[here](https://www.tutorialspoint.com/eclipse/eclipse_shortcuts.htm) | You can change perspectives by accessing `Window>Perspective>Open Perspective>..`, however there are some buttons on the right of the toolbar for switching perspectives and a button for adding new perspective switch buttons, so you can use those to switch perspectives rapidly. |
62,421,797 | I want to display a select option on a condition like this :
```
<select id="updateType" class="form-control" formControlName="updateType">
<option value="personalDetails">Personal</option>
<option value="addressDetails">Address}</option>
<option *ngIf="{{userModalData.orgTypeCode == 'BO'}... | 2020/06/17 | [
"https://Stackoverflow.com/questions/62421797",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8643979/"
] | You should be able to use `*ngIf`.
```
<select id="updateType" class="form-control" formControlName="updateType">
<option value="personalDetails">Personal</option>
<option value="addressDetails">Address</option>
<option *ngIf="userModalData.orgTypeCode == 'BO'" value="financialDetails">Financial</option>
</select>... | You can use `ngIf` like that
```
<option *ngIf="userModalData.orgTypeCode == 'BO'" value="financialDetails">Financial</option>
```
Please look <https://angular.io/api/common/NgIf> for more details |
22,338 | inner conversation of mind has reduced now.after a period of had stopped during meditation.is it due to Samadhi which achieved?And what is personality view? | 2017/08/29 | [
"https://buddhism.stackexchange.com/questions/22338",
"https://buddhism.stackexchange.com",
"https://buddhism.stackexchange.com/users/11976/"
] | Inner conversation will greatly decrease in the second jhana, I'm happy you have experienced this. Yes, this is a development of Samadhi and you are on the right track. A lack of personality view basically speaking, means that you know deeply within yourself that you are simply body, feeling, mental formation, consciou... | Personality view is seen things as internal (five aggregate) and external (five aggregate).
You perceive internal as I,me and myself and external as not me, not mine and not myself. |
13,822,087 | I am trying to do a mysqldump from a local Linux machine to a Windows folder that has been mounted on the system. This is the command I am using in the terminal:
```
mysqldump -u root -plinuxsux myDB -t LOG > /mounted folder/path/blah/myDB.sql
```
I am getting the following error:
```
/mounted folder/path/blah/myDB... | 2012/12/11 | [
"https://Stackoverflow.com/questions/13822087",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1620175/"
] | No, it is not OK to use a blocking API call in a node server as you describe. Your site's responsiveness to many concurrent connections will take a huge hit. It's also just blatantly violating the #1 principle of node.
The key to node working is that while it is waiting on IO, it is doing CPU/memory processing at the ... | You are blocking the callback of the asynchronous read with your synchronous read, remember **single thread**.
Now I understand that the time difference is still amazing, but you should try with a file that is much, much longer to read and imagine that many, many clients will do the same, only then the overhead will p... |
13,822,087 | I am trying to do a mysqldump from a local Linux machine to a Windows folder that has been mounted on the system. This is the command I am using in the terminal:
```
mysqldump -u root -plinuxsux myDB -t LOG > /mounted folder/path/blah/myDB.sql
```
I am getting the following error:
```
/mounted folder/path/blah/myDB... | 2012/12/11 | [
"https://Stackoverflow.com/questions/13822087",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1620175/"
] | You are blocking the callback of the asynchronous read with your synchronous read, remember **single thread**.
Now I understand that the time difference is still amazing, but you should try with a file that is much, much longer to read and imagine that many, many clients will do the same, only then the overhead will p... | I've tried to check the real, measurable difference in a speed between fs.readFileSync() and fs.readFile() for downloading 3 different files which are on SD card and I've added between this downloads some math calculation and I don't understand where is the difference in speed which is always showed on node pictures wh... |
13,822,087 | I am trying to do a mysqldump from a local Linux machine to a Windows folder that has been mounted on the system. This is the command I am using in the terminal:
```
mysqldump -u root -plinuxsux myDB -t LOG > /mounted folder/path/blah/myDB.sql
```
I am getting the following error:
```
/mounted folder/path/blah/myDB... | 2012/12/11 | [
"https://Stackoverflow.com/questions/13822087",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1620175/"
] | You are blocking the callback of the asynchronous read with your synchronous read, remember **single thread**.
Now I understand that the time difference is still amazing, but you should try with a file that is much, much longer to read and imagine that many, many clients will do the same, only then the overhead will p... | After a lot of time and a lot of learn & practice I've tried once more and I've found the answer and I can show some example:
```
const fs = require('fs');
const syncTest = () => {
let startTime = +new Date();
const results = [];
const files = [];
for (let i=0, len=4; i<len; i++) {
files.push... |
13,822,087 | I am trying to do a mysqldump from a local Linux machine to a Windows folder that has been mounted on the system. This is the command I am using in the terminal:
```
mysqldump -u root -plinuxsux myDB -t LOG > /mounted folder/path/blah/myDB.sql
```
I am getting the following error:
```
/mounted folder/path/blah/myDB... | 2012/12/11 | [
"https://Stackoverflow.com/questions/13822087",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1620175/"
] | You are blocking the callback of the asynchronous read with your synchronous read, remember **single thread**.
Now I understand that the time difference is still amazing, but you should try with a file that is much, much longer to read and imagine that many, many clients will do the same, only then the overhead will p... | Yes, it's correct, to deal with the asynchronous way in a server-side environment. But if their use case is different like to generating the build as in client-side JS project, meanwhile reading and writing the JSON files for different flavors.
It doesn't affect that much. Although we needed a rapid manner to create a... |
13,822,087 | I am trying to do a mysqldump from a local Linux machine to a Windows folder that has been mounted on the system. This is the command I am using in the terminal:
```
mysqldump -u root -plinuxsux myDB -t LOG > /mounted folder/path/blah/myDB.sql
```
I am getting the following error:
```
/mounted folder/path/blah/myDB... | 2012/12/11 | [
"https://Stackoverflow.com/questions/13822087",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1620175/"
] | No, it is not OK to use a blocking API call in a node server as you describe. Your site's responsiveness to many concurrent connections will take a huge hit. It's also just blatantly violating the #1 principle of node.
The key to node working is that while it is waiting on IO, it is doing CPU/memory processing at the ... | I've tried to check the real, measurable difference in a speed between fs.readFileSync() and fs.readFile() for downloading 3 different files which are on SD card and I've added between this downloads some math calculation and I don't understand where is the difference in speed which is always showed on node pictures wh... |
13,822,087 | I am trying to do a mysqldump from a local Linux machine to a Windows folder that has been mounted on the system. This is the command I am using in the terminal:
```
mysqldump -u root -plinuxsux myDB -t LOG > /mounted folder/path/blah/myDB.sql
```
I am getting the following error:
```
/mounted folder/path/blah/myDB... | 2012/12/11 | [
"https://Stackoverflow.com/questions/13822087",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1620175/"
] | No, it is not OK to use a blocking API call in a node server as you describe. Your site's responsiveness to many concurrent connections will take a huge hit. It's also just blatantly violating the #1 principle of node.
The key to node working is that while it is waiting on IO, it is doing CPU/memory processing at the ... | After a lot of time and a lot of learn & practice I've tried once more and I've found the answer and I can show some example:
```
const fs = require('fs');
const syncTest = () => {
let startTime = +new Date();
const results = [];
const files = [];
for (let i=0, len=4; i<len; i++) {
files.push... |
13,822,087 | I am trying to do a mysqldump from a local Linux machine to a Windows folder that has been mounted on the system. This is the command I am using in the terminal:
```
mysqldump -u root -plinuxsux myDB -t LOG > /mounted folder/path/blah/myDB.sql
```
I am getting the following error:
```
/mounted folder/path/blah/myDB... | 2012/12/11 | [
"https://Stackoverflow.com/questions/13822087",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1620175/"
] | No, it is not OK to use a blocking API call in a node server as you describe. Your site's responsiveness to many concurrent connections will take a huge hit. It's also just blatantly violating the #1 principle of node.
The key to node working is that while it is waiting on IO, it is doing CPU/memory processing at the ... | Yes, it's correct, to deal with the asynchronous way in a server-side environment. But if their use case is different like to generating the build as in client-side JS project, meanwhile reading and writing the JSON files for different flavors.
It doesn't affect that much. Although we needed a rapid manner to create a... |
13,822,087 | I am trying to do a mysqldump from a local Linux machine to a Windows folder that has been mounted on the system. This is the command I am using in the terminal:
```
mysqldump -u root -plinuxsux myDB -t LOG > /mounted folder/path/blah/myDB.sql
```
I am getting the following error:
```
/mounted folder/path/blah/myDB... | 2012/12/11 | [
"https://Stackoverflow.com/questions/13822087",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1620175/"
] | After a lot of time and a lot of learn & practice I've tried once more and I've found the answer and I can show some example:
```
const fs = require('fs');
const syncTest = () => {
let startTime = +new Date();
const results = [];
const files = [];
for (let i=0, len=4; i<len; i++) {
files.push... | I've tried to check the real, measurable difference in a speed between fs.readFileSync() and fs.readFile() for downloading 3 different files which are on SD card and I've added between this downloads some math calculation and I don't understand where is the difference in speed which is always showed on node pictures wh... |
13,822,087 | I am trying to do a mysqldump from a local Linux machine to a Windows folder that has been mounted on the system. This is the command I am using in the terminal:
```
mysqldump -u root -plinuxsux myDB -t LOG > /mounted folder/path/blah/myDB.sql
```
I am getting the following error:
```
/mounted folder/path/blah/myDB... | 2012/12/11 | [
"https://Stackoverflow.com/questions/13822087",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1620175/"
] | Yes, it's correct, to deal with the asynchronous way in a server-side environment. But if their use case is different like to generating the build as in client-side JS project, meanwhile reading and writing the JSON files for different flavors.
It doesn't affect that much. Although we needed a rapid manner to create a... | I've tried to check the real, measurable difference in a speed between fs.readFileSync() and fs.readFile() for downloading 3 different files which are on SD card and I've added between this downloads some math calculation and I don't understand where is the difference in speed which is always showed on node pictures wh... |
13,822,087 | I am trying to do a mysqldump from a local Linux machine to a Windows folder that has been mounted on the system. This is the command I am using in the terminal:
```
mysqldump -u root -plinuxsux myDB -t LOG > /mounted folder/path/blah/myDB.sql
```
I am getting the following error:
```
/mounted folder/path/blah/myDB... | 2012/12/11 | [
"https://Stackoverflow.com/questions/13822087",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1620175/"
] | Yes, it's correct, to deal with the asynchronous way in a server-side environment. But if their use case is different like to generating the build as in client-side JS project, meanwhile reading and writing the JSON files for different flavors.
It doesn't affect that much. Although we needed a rapid manner to create a... | After a lot of time and a lot of learn & practice I've tried once more and I've found the answer and I can show some example:
```
const fs = require('fs');
const syncTest = () => {
let startTime = +new Date();
const results = [];
const files = [];
for (let i=0, len=4; i<len; i++) {
files.push... |
792,529 | If I want to show that something is Cauchy, should I show it converges and then show it is Cauchy or should I go at it straight from the definition. I am just trying to figure out generally what to do for a sequence.
I don't have a concrete example. I am sorry, but like if the question was Prove that this series is Ca... | 2014/05/13 | [
"https://math.stackexchange.com/questions/792529",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/130948/"
] | If a sequence does converge, then it is a Cauchy sequence. Be careful, though, that not always does a Cauchy sequence converges. For exemple, the sequence $x\_n = \frac{1}{n}$ is a Cauchy sequence, but does **not** converge in $]0,1]$. It does converge in $[0,1]$. Search about *completeness* of a topological space (or ... | If you have a candidate for what the sequence converges to, then it can be easier to show that the sequence converges. If you don't, though, it can be hard to show that a sequence converges just from the definition. In that case it can be easier to use the definition of Cauchy |
792,529 | If I want to show that something is Cauchy, should I show it converges and then show it is Cauchy or should I go at it straight from the definition. I am just trying to figure out generally what to do for a sequence.
I don't have a concrete example. I am sorry, but like if the question was Prove that this series is Ca... | 2014/05/13 | [
"https://math.stackexchange.com/questions/792529",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/130948/"
] | As a general rule:
* If you know what it converges to, i.e. if what it converges to is obvious, it is often easier to check convergence directly. For instance, the sequence $1 - \frac{1}{n}$ obviously converges to $1$, and it's easier to check this than it is to check the Cauchy criterion.
* If you have no idea what i... | If you have a candidate for what the sequence converges to, then it can be easier to show that the sequence converges. If you don't, though, it can be hard to show that a sequence converges just from the definition. In that case it can be easier to use the definition of Cauchy |
792,529 | If I want to show that something is Cauchy, should I show it converges and then show it is Cauchy or should I go at it straight from the definition. I am just trying to figure out generally what to do for a sequence.
I don't have a concrete example. I am sorry, but like if the question was Prove that this series is Ca... | 2014/05/13 | [
"https://math.stackexchange.com/questions/792529",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/130948/"
] | As a general rule:
* If you know what it converges to, i.e. if what it converges to is obvious, it is often easier to check convergence directly. For instance, the sequence $1 - \frac{1}{n}$ obviously converges to $1$, and it's easier to check this than it is to check the Cauchy criterion.
* If you have no idea what i... | If a sequence does converge, then it is a Cauchy sequence. Be careful, though, that not always does a Cauchy sequence converges. For exemple, the sequence $x\_n = \frac{1}{n}$ is a Cauchy sequence, but does **not** converge in $]0,1]$. It does converge in $[0,1]$. Search about *completeness* of a topological space (or ... |
261,604 | I bought my base model 15" MacBook Pro w/ Touch Bar the day it was released, and I just received it yesterday. I've been copying and downloading all the data and files that I needed and the battery didn't last me more than 5 hours, if even 4. I have no idea what is wrong with it, but it's really overheating and I almos... | 2016/11/19 | [
"https://apple.stackexchange.com/questions/261604",
"https://apple.stackexchange.com",
"https://apple.stackexchange.com/users/211302/"
] | How did you reset the SMC? There are different processes depending on Mac model. Just to make sure, in your case the process is as follows:
1. Shut down your computer
2. Keep the power cable **plugged in**.
3. Press at the same time `shift``option``control` (on the left side of the keyboard) ***and*** the `power butto... | My 15" MBP w/ touchbar was overheating as well with as simple a task as streaming Netflix. I was roaming around the internet about temperature conditions and if cold weather could mess up my MBP as where I store it it could get very cold. I came across the setting of putting the "hard disk to sleep when possible" as a ... |
261,604 | I bought my base model 15" MacBook Pro w/ Touch Bar the day it was released, and I just received it yesterday. I've been copying and downloading all the data and files that I needed and the battery didn't last me more than 5 hours, if even 4. I have no idea what is wrong with it, but it's really overheating and I almos... | 2016/11/19 | [
"https://apple.stackexchange.com/questions/261604",
"https://apple.stackexchange.com",
"https://apple.stackexchange.com/users/211302/"
] | The problem you discribed is exactly the same that I have with my new MBP 15" Touchbar (2,9Ghz, Radeon 460).
The reason why it's overheating is, that the fans do not automatically accelerate when there's a higher workload. They are continuously running at 2000 rpm.
My solution: Use iStat Menus
There you can manuall... | How did you reset the SMC? There are different processes depending on Mac model. Just to make sure, in your case the process is as follows:
1. Shut down your computer
2. Keep the power cable **plugged in**.
3. Press at the same time `shift``option``control` (on the left side of the keyboard) ***and*** the `power butto... |
261,604 | I bought my base model 15" MacBook Pro w/ Touch Bar the day it was released, and I just received it yesterday. I've been copying and downloading all the data and files that I needed and the battery didn't last me more than 5 hours, if even 4. I have no idea what is wrong with it, but it's really overheating and I almos... | 2016/11/19 | [
"https://apple.stackexchange.com/questions/261604",
"https://apple.stackexchange.com",
"https://apple.stackexchange.com/users/211302/"
] | How did you reset the SMC? There are different processes depending on Mac model. Just to make sure, in your case the process is as follows:
1. Shut down your computer
2. Keep the power cable **plugged in**.
3. Press at the same time `shift``option``control` (on the left side of the keyboard) ***and*** the `power butto... | I am having the exact same issue, & even after apple provided a replacement device to me today at 6pm this issue has not been resolved.
Backstory: My original device was picked up 2 weeks ago, from the Pasadena store. Immediately that night I noticed that the heat was so bad the equipment was hot to touch, and even s... |
261,604 | I bought my base model 15" MacBook Pro w/ Touch Bar the day it was released, and I just received it yesterday. I've been copying and downloading all the data and files that I needed and the battery didn't last me more than 5 hours, if even 4. I have no idea what is wrong with it, but it's really overheating and I almos... | 2016/11/19 | [
"https://apple.stackexchange.com/questions/261604",
"https://apple.stackexchange.com",
"https://apple.stackexchange.com/users/211302/"
] | A brand new computer should not give you such problems. I would return it within the two-week time window and ask for a full refund.
Some people I work for need to buy new MacBook Pros, but it's hard to recommend them right now. For one person in particular, battery life is crucial. Everything I've heard so far about ... | My 15" MBP w/ touchbar was overheating as well with as simple a task as streaming Netflix. I was roaming around the internet about temperature conditions and if cold weather could mess up my MBP as where I store it it could get very cold. I came across the setting of putting the "hard disk to sleep when possible" as a ... |
261,604 | I bought my base model 15" MacBook Pro w/ Touch Bar the day it was released, and I just received it yesterday. I've been copying and downloading all the data and files that I needed and the battery didn't last me more than 5 hours, if even 4. I have no idea what is wrong with it, but it's really overheating and I almos... | 2016/11/19 | [
"https://apple.stackexchange.com/questions/261604",
"https://apple.stackexchange.com",
"https://apple.stackexchange.com/users/211302/"
] | The problem you discribed is exactly the same that I have with my new MBP 15" Touchbar (2,9Ghz, Radeon 460).
The reason why it's overheating is, that the fans do not automatically accelerate when there's a higher workload. They are continuously running at 2000 rpm.
My solution: Use iStat Menus
There you can manuall... | My 15" MBP w/ touchbar was overheating as well with as simple a task as streaming Netflix. I was roaming around the internet about temperature conditions and if cold weather could mess up my MBP as where I store it it could get very cold. I came across the setting of putting the "hard disk to sleep when possible" as a ... |
261,604 | I bought my base model 15" MacBook Pro w/ Touch Bar the day it was released, and I just received it yesterday. I've been copying and downloading all the data and files that I needed and the battery didn't last me more than 5 hours, if even 4. I have no idea what is wrong with it, but it's really overheating and I almos... | 2016/11/19 | [
"https://apple.stackexchange.com/questions/261604",
"https://apple.stackexchange.com",
"https://apple.stackexchange.com/users/211302/"
] | The problem you discribed is exactly the same that I have with my new MBP 15" Touchbar (2,9Ghz, Radeon 460).
The reason why it's overheating is, that the fans do not automatically accelerate when there's a higher workload. They are continuously running at 2000 rpm.
My solution: Use iStat Menus
There you can manuall... | A brand new computer should not give you such problems. I would return it within the two-week time window and ask for a full refund.
Some people I work for need to buy new MacBook Pros, but it's hard to recommend them right now. For one person in particular, battery life is crucial. Everything I've heard so far about ... |
261,604 | I bought my base model 15" MacBook Pro w/ Touch Bar the day it was released, and I just received it yesterday. I've been copying and downloading all the data and files that I needed and the battery didn't last me more than 5 hours, if even 4. I have no idea what is wrong with it, but it's really overheating and I almos... | 2016/11/19 | [
"https://apple.stackexchange.com/questions/261604",
"https://apple.stackexchange.com",
"https://apple.stackexchange.com/users/211302/"
] | A brand new computer should not give you such problems. I would return it within the two-week time window and ask for a full refund.
Some people I work for need to buy new MacBook Pros, but it's hard to recommend them right now. For one person in particular, battery life is crucial. Everything I've heard so far about ... | I am having the exact same issue, & even after apple provided a replacement device to me today at 6pm this issue has not been resolved.
Backstory: My original device was picked up 2 weeks ago, from the Pasadena store. Immediately that night I noticed that the heat was so bad the equipment was hot to touch, and even s... |
261,604 | I bought my base model 15" MacBook Pro w/ Touch Bar the day it was released, and I just received it yesterday. I've been copying and downloading all the data and files that I needed and the battery didn't last me more than 5 hours, if even 4. I have no idea what is wrong with it, but it's really overheating and I almos... | 2016/11/19 | [
"https://apple.stackexchange.com/questions/261604",
"https://apple.stackexchange.com",
"https://apple.stackexchange.com/users/211302/"
] | The problem you discribed is exactly the same that I have with my new MBP 15" Touchbar (2,9Ghz, Radeon 460).
The reason why it's overheating is, that the fans do not automatically accelerate when there's a higher workload. They are continuously running at 2000 rpm.
My solution: Use iStat Menus
There you can manuall... | I am having the exact same issue, & even after apple provided a replacement device to me today at 6pm this issue has not been resolved.
Backstory: My original device was picked up 2 weeks ago, from the Pasadena store. Immediately that night I noticed that the heat was so bad the equipment was hot to touch, and even s... |
44,770,876 | I have a system where we process text messages. Each message gets split up into sentences, and each sentence gets processed individually and the results of each sentence get published to a topic. This all happens asynchronously.
I want to be able to aggregate the results for the sentences.
The problem is that I want ... | 2017/06/27 | [
"https://Stackoverflow.com/questions/44770876",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1245281/"
] | It's possible but you have to implement a custom processor - your requirements are simply to specific for the high-level API to cater for.
Your processor would store messages into a state store and use punctuate to periodically check if the window expired. It would also keep a running counter and check if the max numb... | Now Apache Kafka offers you a way to wait closing the window. Here piece of code;
```
suppress(Suppressed.untilWindowCloses(Suppressed.BufferConfig.unbounded()))
```
For more, [check it out.](https://cwiki.apache.org/confluence/display/KAFKA/KIP-328%3A+Ability+to+suppress+updates+for+KTables#KIP-328:Abilitytosuppres... |
23,677,988 | CONTEXT:
========
I run on an old laptop. I only just have 128Mo ram free on 512Mo total. No money to buy more ram.
I use `mmap` to help me circumvent this issue and it works quite well.
C code.
Debian 64 bits.
PROBLEM:
========
Besides all my efforts, I am running out of memory pretty quick right know and I would ... | 2014/05/15 | [
"https://Stackoverflow.com/questions/23677988",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1791534/"
] | For random read/write access to a `mmap()`ed file, `MADV_SEQUENTIAL` is probably not very useful (and may in fact cause undesired behavior). `MADV_RANDOM` or `MADV_DONTNEED` would be better options in this case. However, be aware that the kernel is free to ignore any `madvise()` - although in my understanding, Linux cu... | Or course you must free resources when you're done with them in order not to leak them and thus run out of available space too soon.
Not sure what the question is, if you know about `mmap()` then surely you know about [`munmap()`](http://linux.die.net/man/2/munmap) too? It's right there on the same manual page. |
423,002 | I would like to know what is a more appropriate way to code in Java. Is it generally better to pass entire objects in the method's parameters or just using the fields from the class?
1. Using the field:
```
public class Dictionary {
ArrayList<Definition> list;
public Dictionary() {
this.list = new Ar... | 2021/03/04 | [
"https://softwareengineering.stackexchange.com/questions/423002",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/386383/"
] | One of the principles of object-oriented programming is **encapsulation**. It says that one should hide the internal structure of the object and prevent direct access to it.
In your case this means that those who use your class should not "know" whether your class `Dictionary` uses `ArrayList` or `Map` or something ot... | Option 1, without question.
The whole point of your `Dictionary` class is to encapsulate the list and any other information you need to make your dictionary work. You already have access to the class's fields, so passing them as parameters is pointless.
Your Option 2 exposes the internal details of your class, defeat... |
423,002 | I would like to know what is a more appropriate way to code in Java. Is it generally better to pass entire objects in the method's parameters or just using the fields from the class?
1. Using the field:
```
public class Dictionary {
ArrayList<Definition> list;
public Dictionary() {
this.list = new Ar... | 2021/03/04 | [
"https://softwareengineering.stackexchange.com/questions/423002",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/386383/"
] | Option 1, without question.
The whole point of your `Dictionary` class is to encapsulate the list and any other information you need to make your dictionary work. You already have access to the class's fields, so passing them as parameters is pointless.
Your Option 2 exposes the internal details of your class, defeat... | In real life, very often you don’t just add an entry to a list, but it has consequences. Like an application could be displaying the entries of a list, and adding something needs to trigger a whole sequence of events. If you tell the object to add an item, it can take care of everything. If you insert an item yourself ... |
423,002 | I would like to know what is a more appropriate way to code in Java. Is it generally better to pass entire objects in the method's parameters or just using the fields from the class?
1. Using the field:
```
public class Dictionary {
ArrayList<Definition> list;
public Dictionary() {
this.list = new Ar... | 2021/03/04 | [
"https://softwareengineering.stackexchange.com/questions/423002",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/386383/"
] | One of the principles of object-oriented programming is **encapsulation**. It says that one should hide the internal structure of the object and prevent direct access to it.
In your case this means that those who use your class should not "know" whether your class `Dictionary` uses `ArrayList` or `Map` or something ot... | In real life, very often you don’t just add an entry to a list, but it has consequences. Like an application could be displaying the entries of a list, and adding something needs to trigger a whole sequence of events. If you tell the object to add an item, it can take care of everything. If you insert an item yourself ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.