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
4,121,173
I understand that if $A$ is unitary, then $A^{-1} = A^\ast$ are also unitary matrices. But if $A$ is a unitary upper triangular matrix, then how are $A^{-1}$ and $A^\ast$ also upper triangular? This was from a particular class. Then the statement goes on to say that $A$ will be a diagonal matrix with diagonal entries...
2021/04/29
[ "https://math.stackexchange.com/questions/4121173", "https://math.stackexchange.com", "https://math.stackexchange.com/users/733666/" ]
If $A$ is an upper triangular matrix, then $A^{-1}$ is an upper triangular matrix, and the conjugate transpose $A^\*$ is a lower triangular matrix. If $A$ is upper triangular and unitary, i.e. $A^{-1} = A^\*$, then $A$ is simultaneously upper triangular and lower triangular. The only matrices that are both upper and l...
Upper triangular matrices are closed under multiplication. If you consider the elementary matrices corresponding to row reduction, all the upper right entries concern changing the upper right entries, so changing them back would use matrices of the same shape. $A^\*$ is a notation that I have seen mean different thin...
23,023,036
Basically I want to copy several lines of code from a template file to a script file. Is it even possible to use `sed` to copy a string full of symbols that interact with the script? I used these lines: ``` $SWAP='sudo cat /home/kaarel/template' sed -i -e "s/#pointer/${SWAP}/" "script.sh" ``` The output is: ``` ....
2014/04/11
[ "https://Stackoverflow.com/questions/23023036", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3525354/" ]
So as I explained in the answer to [this question](https://stackoverflow.com/questions/15153349/meteor-subscribe-doesnt-update-sort-order-of-collection), sorting in the publish function has no affect on the order of documents on the client. So you should see the same result if you do: ``` Meteor.publish "families", ->...
Not being expert, what I see here looks for me like the alternative between sorting on server and sorting at client. Well, the work has to be done anyway for each request - letting it do at the client will relieve the server, which typically has enough work anyway... So do the latter.
20,943,078
I want get the ip address of my clients, but i only want to use pure Javascript without another library I searched in the internet but i can't found a way to do it, I'm a student so, I have no choise, I can use only JavaScript I found this, but it doesn't work ``` function myIP(){ var vi="uses java to get the users ...
2014/01/06
[ "https://Stackoverflow.com/questions/20943078", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2514104/" ]
No, it's not possible. The table view owns its whole area, and renders cells based on it's internal logic. You could divide your table view into sections and add a custom cell as a section header or footer, or you could make your cellForRowAtIndexPath serve up a custom type of cell for every 4th row that ONLY contains...
As Duncan mentioned you could use cellForRowAtIndexPath and place a custom cell type for every 4th row. You can set two types of custom cells in your tableview by setting the `identifier` property. Ex. For every 4th row use the "ad" identifier cell.
134,136
When I was learning about salts that show exothermic dissolution, I noticed that the same salts used in Daniel Cell( due to **similarity of size of anion and cation**) were undergoing exothermic dissolution. Is there any relation between the similarity in size of anion/cation and the type of dissolution it undergoes?
2020/05/22
[ "https://chemistry.stackexchange.com/questions/134136", "https://chemistry.stackexchange.com", "https://chemistry.stackexchange.com/users/88896/" ]
You said you read that $\ce{MgH2}$ has a structure of rutile. Actually it is $\alpha$-$\ce{MgH2}$, which forms at room temperature and atmospheric pressure and have rutile type structure. The crystal structure of $\alpha$-$\ce{MgD2}$ was studied as early as 1963 (Ref.1). The abstract states that: > > A magnesium deut...
> > Why rutile structure have primitive unit cell instead of body centered? > > > For it to be centered, the centering operation has to apply to all atoms, not just the magnesium atom. This is not the case, as the picture demonstrates for one of the hydrogen atoms. The orange arrows show the putative translation o...
10,265,651
**I have the following code for registration--** ``` <?php // Connects to your Database mysql_connect("my serner", "user", "password") or die(mysql_error()); mysql_select_db("ec09580") or die(mysql_error()); //This code runs if the form has been submitted if (isset($_POST['submit'])) { //This makes sure the...
2012/04/22
[ "https://Stackoverflow.com/questions/10265651", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1349179/" ]
You need to move these lines: ``` $insert = "INSERT INTO User set FirstName='$fname', LastName='$lname', Email='$email_id', username='$username_r', password='$password_1'"; $add_member = mysql_query($insert); ``` Right now they are outside the conditional that checks if those values are set. So if the form is not ...
> > Notice: Undefined ... > > > Errors of this type are thrown, when the instance you are using is not instantiated yet. --- The variables you are using in the query is not instantiated on all the execution flow. So, receive that error. This can be eliminated by using `isset()` to check if the variable has bee...
10,029,747
I wish to use **sp\_start\_job** to start a job from within an **insert trigger**. The table which the insert trigger is on only has a few inserts a day atm. The point of doing this is so that the insert trigger doesn't have to **wait for the job** to complete - is this correct? The job sends emails to key people wi...
2012/04/05
[ "https://Stackoverflow.com/questions/10029747", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1071203/" ]
yes, you can see from the output of the procedure that it doesn't send the email on the fly, it adds it to a queue so it wont lock anything by waiting the email to be sent and then continue with the trigger execution. you can see your email log at ``` SELECT * FROM sysmail_log ``` another query that may help you i...
Sending email using [sp\_send\_email](http://EXEC%20sp_send_dbmai) is really fast. You can call it from inside a trigger an probably lose 20 milliseconds. Not something you'd normally need to do asynchronously.
73,796
Good day everyone, please help me with my confusion. **"This worked" vs "This would work"** First, **"This worked"** is in the past tense, and **"This would work"** is in the past tense too since **"Would"** is the past tense of **"Will"**. In short, they are both in the past tense, but my question is what are thei...
2015/11/22
[ "https://ell.stackexchange.com/questions/73796", "https://ell.stackexchange.com", "https://ell.stackexchange.com/users/26723/" ]
The word "would" in that case was not used as the past tense of "will." According to Merriam-Webster, the word "would" can also be used to "talk about a possible situation that has not happened or that you are imagining." (Source: <http://www.merriam-webster.com/dictionary/would>)
As @acheigrec says, `This worked` - Gives the idea of something that You fixed in the specific point in the past. `This would work` - You're creating an expectancy which something works, I think that It fits better with a conditional clause, for example `If I were you, probably I would kill me!` [Would](http://ww...
73,796
Good day everyone, please help me with my confusion. **"This worked" vs "This would work"** First, **"This worked"** is in the past tense, and **"This would work"** is in the past tense too since **"Would"** is the past tense of **"Will"**. In short, they are both in the past tense, but my question is what are thei...
2015/11/22
[ "https://ell.stackexchange.com/questions/73796", "https://ell.stackexchange.com", "https://ell.stackexchange.com/users/26723/" ]
The word "would" in that case was not used as the past tense of "will." According to Merriam-Webster, the word "would" can also be used to "talk about a possible situation that has not happened or that you are imagining." (Source: <http://www.merriam-webster.com/dictionary/would>)
As long as *would* is considered with a condition, you invoke an imaginary situation set in the present: > > This would work *if* you did it. (You don't do it, so it doesn't work. > > > Now, the use of *would* can be considered as a repeated action or habit in the past (adding more context): > > When I was a ch...
73,796
Good day everyone, please help me with my confusion. **"This worked" vs "This would work"** First, **"This worked"** is in the past tense, and **"This would work"** is in the past tense too since **"Would"** is the past tense of **"Will"**. In short, they are both in the past tense, but my question is what are thei...
2015/11/22
[ "https://ell.stackexchange.com/questions/73796", "https://ell.stackexchange.com", "https://ell.stackexchange.com/users/26723/" ]
As @acheigrec says, `This worked` - Gives the idea of something that You fixed in the specific point in the past. `This would work` - You're creating an expectancy which something works, I think that It fits better with a conditional clause, for example `If I were you, probably I would kill me!` [Would](http://ww...
As long as *would* is considered with a condition, you invoke an imaginary situation set in the present: > > This would work *if* you did it. (You don't do it, so it doesn't work. > > > Now, the use of *would* can be considered as a repeated action or habit in the past (adding more context): > > When I was a ch...
2,643,384
Is it possible to write database methods in properties file, like some database queries and can be accessed using servlets which may reduce the code?
2010/04/15
[ "https://Stackoverflow.com/questions/2643384", "https://Stackoverflow.com", "https://Stackoverflow.com/users/317223/" ]
I've seen DB work done all sorts of ways from hard coding SQL directly into each method that access a database, to sql stored in static strings in central files, to it being stored in properties files and finally of course ORMs such as hibernate. I've even seen SQL stored in DBs! I would never recommend storing the SQ...
1. webapp can access properties file. 2. a propeties file may have key-value pairs like query1=select something from somewhere You can combine 1 and 2 in order to execute sql queries in webapp, but I'm not sure it will reduce code (you still have to open db connection, reading the rs, close the connection, etc.)
2,643,384
Is it possible to write database methods in properties file, like some database queries and can be accessed using servlets which may reduce the code?
2010/04/15
[ "https://Stackoverflow.com/questions/2643384", "https://Stackoverflow.com", "https://Stackoverflow.com/users/317223/" ]
I've seen DB work done all sorts of ways from hard coding SQL directly into each method that access a database, to sql stored in static strings in central files, to it being stored in properties files and finally of course ORMs such as hibernate. I've even seen SQL stored in DBs! I would never recommend storing the SQ...
Of course, you can put you queries in a properties file but if you are using JDBC, the code depends a lot on these queries. The number of parameters and their order must not be changed, same goes for the results, so I don't see many advantages to do so.
2,643,384
Is it possible to write database methods in properties file, like some database queries and can be accessed using servlets which may reduce the code?
2010/04/15
[ "https://Stackoverflow.com/questions/2643384", "https://Stackoverflow.com", "https://Stackoverflow.com/users/317223/" ]
I've seen DB work done all sorts of ways from hard coding SQL directly into each method that access a database, to sql stored in static strings in central files, to it being stored in properties files and finally of course ORMs such as hibernate. I've even seen SQL stored in DBs! I would never recommend storing the SQ...
You can store the queries in a file that the webapp can access, and then use prepared statements to execute them. By doing this, your queries strings are in an external file, all you do in the code is fill in the parameters, but you will have to read the query strings from what you call "properties file" first. Exampl...
21,944,563
I was reading about how [circular references cause memory leaks in IE](https://developer.mozilla.org/en-US/docs/Web/JavaScript/A_re-introduction_to_JavaScript#Memory_leaks), but I was pretty confused on an example using a closure within closure to break the circular reference: ``` function addHandler() { var click...
2014/02/21
[ "https://Stackoverflow.com/questions/21944563", "https://Stackoverflow.com", "https://Stackoverflow.com/users/158749/" ]
If you had ``` function addHandler() { var clickHandler = function() { this.style.backgroundColor = 'red'; // can access `el` here }; var el = document.getElementById('el'); el.onclick = clickHandler; } ``` then `el` has a reference to `clickHandler`, but `clickHandler` also has a re...
The rules of thumb that I go by: For JavaScript closures to be created, there has to be nested functions and the inner function must have access to or is refered to by (let's just say "touch" for short) a variable in the outer function. If either of these 2 criteria is not found, then there's no closure in JavaScript....
2,271,633
I am quite aware of both java and C# .Net .when i try to create a new windows application which are the factors that decide which technology should be opted? I know of one thing ,for great and faster UI development Visual studio helps a lot.
2010/02/16
[ "https://Stackoverflow.com/questions/2271633", "https://Stackoverflow.com", "https://Stackoverflow.com/users/232899/" ]
There are several factors I would consider... What are your programmers used to working with already? What third party libraries are you likely to need, what's available on both platforms? Does platform independence matter to you? Would LinQ be advantageous? If you're starting from scratch, costs for the platforms?...
Yeah for a pure cross platform application Java can't be beat, but if you can manage it Silverlight is a subset of WPF and a pretty compelling cross-platform proposition on its own. Productivity-wise I think WPF has an edge as it has a nice XAML markup language that can be easily created with the built-in designer in ...
2,271,633
I am quite aware of both java and C# .Net .when i try to create a new windows application which are the factors that decide which technology should be opted? I know of one thing ,for great and faster UI development Visual studio helps a lot.
2010/02/16
[ "https://Stackoverflow.com/questions/2271633", "https://Stackoverflow.com", "https://Stackoverflow.com/users/232899/" ]
Dotnet is pretty much native in Windows which obviously makes it more suited to writing Windows programs. Using Java in a Windows-only environment makes it much harder for you since it effectively just adds another unnecessary API layer. You will soon realise that all integration points between your Java code and Wind...
...But with java you will have crossplatform application on scratch. Also coding UI in java is not difficult - if you read some guides before and use some frameworks as swing application framework or SWT framework.
2,271,633
I am quite aware of both java and C# .Net .when i try to create a new windows application which are the factors that decide which technology should be opted? I know of one thing ,for great and faster UI development Visual studio helps a lot.
2010/02/16
[ "https://Stackoverflow.com/questions/2271633", "https://Stackoverflow.com", "https://Stackoverflow.com/users/232899/" ]
Dotnet is pretty much native in Windows which obviously makes it more suited to writing Windows programs. Using Java in a Windows-only environment makes it much harder for you since it effectively just adds another unnecessary API layer. You will soon realise that all integration points between your Java code and Wind...
If its Exclusively for Windows then .Net is best bet.
2,271,633
I am quite aware of both java and C# .Net .when i try to create a new windows application which are the factors that decide which technology should be opted? I know of one thing ,for great and faster UI development Visual studio helps a lot.
2010/02/16
[ "https://Stackoverflow.com/questions/2271633", "https://Stackoverflow.com", "https://Stackoverflow.com/users/232899/" ]
Choose the one with which you are most familiar. The two platforms are different enough that skills from one does not transfer easily to the other. In any case, try making a trivial application in both your scenarios and see how it works for you. The initial impression is important as it is probably indicative of how ...
If its Exclusively for Windows then .Net is best bet.
2,271,633
I am quite aware of both java and C# .Net .when i try to create a new windows application which are the factors that decide which technology should be opted? I know of one thing ,for great and faster UI development Visual studio helps a lot.
2010/02/16
[ "https://Stackoverflow.com/questions/2271633", "https://Stackoverflow.com", "https://Stackoverflow.com/users/232899/" ]
It also depends on what kind of windows application you want to build. If it's just a question of building a simple standalone application then, considering you know both languages equally well, I wouldn't hesitate and would go for a 100% microsoft solution, especially if you have to do specific things like accessing A...
Yeah for a pure cross platform application Java can't be beat, but if you can manage it Silverlight is a subset of WPF and a pretty compelling cross-platform proposition on its own. Productivity-wise I think WPF has an edge as it has a nice XAML markup language that can be easily created with the built-in designer in ...
2,271,633
I am quite aware of both java and C# .Net .when i try to create a new windows application which are the factors that decide which technology should be opted? I know of one thing ,for great and faster UI development Visual studio helps a lot.
2010/02/16
[ "https://Stackoverflow.com/questions/2271633", "https://Stackoverflow.com", "https://Stackoverflow.com/users/232899/" ]
It also depends on what kind of windows application you want to build. If it's just a question of building a simple standalone application then, considering you know both languages equally well, I wouldn't hesitate and would go for a 100% microsoft solution, especially if you have to do specific things like accessing A...
If its Exclusively for Windows then .Net is best bet.
2,271,633
I am quite aware of both java and C# .Net .when i try to create a new windows application which are the factors that decide which technology should be opted? I know of one thing ,for great and faster UI development Visual studio helps a lot.
2010/02/16
[ "https://Stackoverflow.com/questions/2271633", "https://Stackoverflow.com", "https://Stackoverflow.com/users/232899/" ]
There are several factors I would consider... What are your programmers used to working with already? What third party libraries are you likely to need, what's available on both platforms? Does platform independence matter to you? Would LinQ be advantageous? If you're starting from scratch, costs for the platforms?...
Dotnet is pretty much native in Windows which obviously makes it more suited to writing Windows programs. Using Java in a Windows-only environment makes it much harder for you since it effectively just adds another unnecessary API layer. You will soon realise that all integration points between your Java code and Wind...
2,271,633
I am quite aware of both java and C# .Net .when i try to create a new windows application which are the factors that decide which technology should be opted? I know of one thing ,for great and faster UI development Visual studio helps a lot.
2010/02/16
[ "https://Stackoverflow.com/questions/2271633", "https://Stackoverflow.com", "https://Stackoverflow.com/users/232899/" ]
Choose the one with which you are most familiar. The two platforms are different enough that skills from one does not transfer easily to the other. In any case, try making a trivial application in both your scenarios and see how it works for you. The initial impression is important as it is probably indicative of how ...
Yeah for a pure cross platform application Java can't be beat, but if you can manage it Silverlight is a subset of WPF and a pretty compelling cross-platform proposition on its own. Productivity-wise I think WPF has an edge as it has a nice XAML markup language that can be easily created with the built-in designer in ...
2,271,633
I am quite aware of both java and C# .Net .when i try to create a new windows application which are the factors that decide which technology should be opted? I know of one thing ,for great and faster UI development Visual studio helps a lot.
2010/02/16
[ "https://Stackoverflow.com/questions/2271633", "https://Stackoverflow.com", "https://Stackoverflow.com/users/232899/" ]
There are several factors I would consider... What are your programmers used to working with already? What third party libraries are you likely to need, what's available on both platforms? Does platform independence matter to you? Would LinQ be advantageous? If you're starting from scratch, costs for the platforms?...
It also depends on what kind of windows application you want to build. If it's just a question of building a simple standalone application then, considering you know both languages equally well, I wouldn't hesitate and would go for a 100% microsoft solution, especially if you have to do specific things like accessing A...
2,271,633
I am quite aware of both java and C# .Net .when i try to create a new windows application which are the factors that decide which technology should be opted? I know of one thing ,for great and faster UI development Visual studio helps a lot.
2010/02/16
[ "https://Stackoverflow.com/questions/2271633", "https://Stackoverflow.com", "https://Stackoverflow.com/users/232899/" ]
There are several factors I would consider... What are your programmers used to working with already? What third party libraries are you likely to need, what's available on both platforms? Does platform independence matter to you? Would LinQ be advantageous? If you're starting from scratch, costs for the platforms?...
...But with java you will have crossplatform application on scratch. Also coding UI in java is not difficult - if you read some guides before and use some frameworks as swing application framework or SWT framework.
43,188
Introduction ============ You are a friend of a curator for an art museum, who has had the recent delight of getting modern art from four artists (*some of which may give the curator zero pieces of art, young scoundrels*). As this is modern art, all of any given artist's pieces look exactly the same. Your friend wants...
2015/01/04
[ "https://codegolf.stackexchange.com/questions/43188", "https://codegolf.stackexchange.com", "https://codegolf.stackexchange.com/users/30530/" ]
Python 2: ~~175~~ 163 chars =========================== This is not a serious golfing answer. With a different algorithm I reached 138 byte. Just wanted to post this here, because it doesn't use brute force. Complexity is Theta(#pictures). ``` f=lambda x:0**x or x*f(x-1) def g(Q,n): while sum(Q): for j in 0,1,2,...
CJam, ~~50 43~~ 39 bytes ======================== ``` q~(])\{W):Wa*}%s:X{Xm*:s_&}X,(*{$X=},$= ``` This can be golfed a lot. Takes input from STDIN in following format: ``` 4 1 2 0 24 ``` Outputs the painting. For example for above input: ``` 0020210 ``` [Try it online here](http://cjam.aditsu.net/) Do note t...
43,188
Introduction ============ You are a friend of a curator for an art museum, who has had the recent delight of getting modern art from four artists (*some of which may give the curator zero pieces of art, young scoundrels*). As this is modern art, all of any given artist's pieces look exactly the same. Your friend wants...
2015/01/04
[ "https://codegolf.stackexchange.com/questions/43188", "https://codegolf.stackexchange.com", "https://codegolf.stackexchange.com/users/30530/" ]
Python 2: ~~175~~ 163 chars =========================== This is not a serious golfing answer. With a different algorithm I reached 138 byte. Just wanted to post this here, because it doesn't use brute force. Complexity is Theta(#pictures). ``` f=lambda x:0**x or x*f(x-1) def g(Q,n): while sum(Q): for j in 0,1,2,...
JavaScript (ES6) 120 ~~138 147~~ ================================= As a function with the required five parameters, output via console. Using symbols 0,1,2,3. I calc the total of symbols, then build and check every base 4 number having the required number of digits. Numbers with the wrong number of any digit are d...
43,188
Introduction ============ You are a friend of a curator for an art museum, who has had the recent delight of getting modern art from four artists (*some of which may give the curator zero pieces of art, young scoundrels*). As this is modern art, all of any given artist's pieces look exactly the same. Your friend wants...
2015/01/04
[ "https://codegolf.stackexchange.com/questions/43188", "https://codegolf.stackexchange.com", "https://codegolf.stackexchange.com/users/30530/" ]
Python 2: ~~175~~ 163 chars =========================== This is not a serious golfing answer. With a different algorithm I reached 138 byte. Just wanted to post this here, because it doesn't use brute force. Complexity is Theta(#pictures). ``` f=lambda x:0**x or x*f(x-1) def g(Q,n): while sum(Q): for j in 0,1,2,...
[Pyth](https://github.com/isaacg1/pyth), 20 =========================================== ``` @fqPQm/TdU4^U4sPQteQ ``` [Try it here.](https://pyth.herokuapp.com/) Input is in Python list form, e.g. `[1, 2, 4, 1, 5]` Output is also in Python list form, e.g. `[0, 1, 1, 3, 2, 2, 2, 2]` for the above input. The solutio...
33,947,941
In my jsp i use the line ``` <p> albumid ${param.id}</p> ``` which show on the web page "albumid 2" where 2 is the id of the current album but when i try to send the albumid to a action file upload ``` package ca.qc.bdeb.p55.actions; import ca.qc.bdeb.p55.Dao.PhotoDao; import ca.qc.bdeb.p55.Model.Photo; import co...
2015/11/26
[ "https://Stackoverflow.com/questions/33947941", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4109184/" ]
Depending on how much you want to clean your data, you could use ``` >>> import string >>> tweet = 'measles \xd2@theblackpenseur: gonorrhea rt @kylegotjokes: aids rt \xd2@cache___: my head itching so bad ?\xd3' >>> filter(lambda x: x in string.printable, tweet) 'measles @theblackpenseur: gonorrhea rt @kylegotjokes: ai...
This is going to sound like a bit of self promoting (more given how old this question is) but I have a Python library that can do that (among other things). The library is [cucco](https://github.com/davidmogar/cucco) and basically you would do something like: ``` from cucco import Cucco cucco = Cucco() cucco.remove_st...
4,517
I've noticed a lot of my pictures look muddy. They don't have very high contrast. I know I can post process some pictures, but what is the secret to having nice contrast in a picture?![alt text](https://i.stack.imgur.com/aDZWC.jpg)
2010/11/01
[ "https://photo.stackexchange.com/questions/4517", "https://photo.stackexchange.com", "https://photo.stackexchange.com/users/1972/" ]
Shoot with good/interesting light! See the image below, the reason (ultimately) that the image has nice contrast is the original image has contrast on her face, e.g. once side is quite bright, and the other quite dark, because there is a window beside her. Try: putting your subject inside, with the lights off, facin...
Another cause might be your lens. Long zooms, with their large number of elements and multiple surfaces can significantly degrade contrast and colour. In my case when I moved from an 18-125mm lens to a high quality 17-70mm lens the images had significantly better contrast and better colours. It didn't hurt either that ...
4,517
I've noticed a lot of my pictures look muddy. They don't have very high contrast. I know I can post process some pictures, but what is the secret to having nice contrast in a picture?![alt text](https://i.stack.imgur.com/aDZWC.jpg)
2010/11/01
[ "https://photo.stackexchange.com/questions/4517", "https://photo.stackexchange.com", "https://photo.stackexchange.com/users/1972/" ]
Based on the photograph you posted, there actually is quite a bit of contrast. In general, I think the photo is pretty good, if a bit soft (from a lighting standpoint.) You noted that you shot the photo without flash on an overcast day, which is the primary reason for lack of any defining shadows or "lighting contrast"...
Can you post an example? (even a text link to an image hosted elsewhere) Here are a few common solutions: 1. Adjust the levels in photoshop or some other tool, using either auto-levels, or just manually pull the whitepoint down to the top of the histogram and the black point up to the bottom (for example: <http://www...
4,517
I've noticed a lot of my pictures look muddy. They don't have very high contrast. I know I can post process some pictures, but what is the secret to having nice contrast in a picture?![alt text](https://i.stack.imgur.com/aDZWC.jpg)
2010/11/01
[ "https://photo.stackexchange.com/questions/4517", "https://photo.stackexchange.com", "https://photo.stackexchange.com/users/1972/" ]
Shoot with good/interesting light! See the image below, the reason (ultimately) that the image has nice contrast is the original image has contrast on her face, e.g. once side is quite bright, and the other quite dark, because there is a window beside her. Try: putting your subject inside, with the lights off, facin...
* Are you using flash? Pictures with harsh flash tend have a washed out look, with dark harsh shadows. * In my experience non-SLRs (Point and Shoot / pocket cameras) get terrible results in-doors without a flash, even in situations that seem well lit to the human eye. Photos may look waxy from too much noise reduction ...
4,517
I've noticed a lot of my pictures look muddy. They don't have very high contrast. I know I can post process some pictures, but what is the secret to having nice contrast in a picture?![alt text](https://i.stack.imgur.com/aDZWC.jpg)
2010/11/01
[ "https://photo.stackexchange.com/questions/4517", "https://photo.stackexchange.com", "https://photo.stackexchange.com/users/1972/" ]
Based on the photograph you posted, there actually is quite a bit of contrast. In general, I think the photo is pretty good, if a bit soft (from a lighting standpoint.) You noted that you shot the photo without flash on an overcast day, which is the primary reason for lack of any defining shadows or "lighting contrast"...
* Are you using flash? Pictures with harsh flash tend have a washed out look, with dark harsh shadows. * In my experience non-SLRs (Point and Shoot / pocket cameras) get terrible results in-doors without a flash, even in situations that seem well lit to the human eye. Photos may look waxy from too much noise reduction ...
4,517
I've noticed a lot of my pictures look muddy. They don't have very high contrast. I know I can post process some pictures, but what is the secret to having nice contrast in a picture?![alt text](https://i.stack.imgur.com/aDZWC.jpg)
2010/11/01
[ "https://photo.stackexchange.com/questions/4517", "https://photo.stackexchange.com", "https://photo.stackexchange.com/users/1972/" ]
Based on the photograph you posted, there actually is quite a bit of contrast. In general, I think the photo is pretty good, if a bit soft (from a lighting standpoint.) You noted that you shot the photo without flash on an overcast day, which is the primary reason for lack of any defining shadows or "lighting contrast"...
Another cause might be your lens. Long zooms, with their large number of elements and multiple surfaces can significantly degrade contrast and colour. In my case when I moved from an 18-125mm lens to a high quality 17-70mm lens the images had significantly better contrast and better colours. It didn't hurt either that ...
4,517
I've noticed a lot of my pictures look muddy. They don't have very high contrast. I know I can post process some pictures, but what is the secret to having nice contrast in a picture?![alt text](https://i.stack.imgur.com/aDZWC.jpg)
2010/11/01
[ "https://photo.stackexchange.com/questions/4517", "https://photo.stackexchange.com", "https://photo.stackexchange.com/users/1972/" ]
Please, don't try to fix it later. Another teacher (where I teach photography too) says there should be no such thing as photo-correction, only photo-enhancement. Actually, I don't believe in the latter either ;) You have to be able to produce sharp pictures with good clarity and plenty of details straight out of the ...
* Are you using flash? Pictures with harsh flash tend have a washed out look, with dark harsh shadows. * In my experience non-SLRs (Point and Shoot / pocket cameras) get terrible results in-doors without a flash, even in situations that seem well lit to the human eye. Photos may look waxy from too much noise reduction ...
4,517
I've noticed a lot of my pictures look muddy. They don't have very high contrast. I know I can post process some pictures, but what is the secret to having nice contrast in a picture?![alt text](https://i.stack.imgur.com/aDZWC.jpg)
2010/11/01
[ "https://photo.stackexchange.com/questions/4517", "https://photo.stackexchange.com", "https://photo.stackexchange.com/users/1972/" ]
Can you post an example? (even a text link to an image hosted elsewhere) Here are a few common solutions: 1. Adjust the levels in photoshop or some other tool, using either auto-levels, or just manually pull the whitepoint down to the top of the histogram and the black point up to the bottom (for example: <http://www...
* Are you using flash? Pictures with harsh flash tend have a washed out look, with dark harsh shadows. * In my experience non-SLRs (Point and Shoot / pocket cameras) get terrible results in-doors without a flash, even in situations that seem well lit to the human eye. Photos may look waxy from too much noise reduction ...
4,517
I've noticed a lot of my pictures look muddy. They don't have very high contrast. I know I can post process some pictures, but what is the secret to having nice contrast in a picture?![alt text](https://i.stack.imgur.com/aDZWC.jpg)
2010/11/01
[ "https://photo.stackexchange.com/questions/4517", "https://photo.stackexchange.com", "https://photo.stackexchange.com/users/1972/" ]
Please, don't try to fix it later. Another teacher (where I teach photography too) says there should be no such thing as photo-correction, only photo-enhancement. Actually, I don't believe in the latter either ;) You have to be able to produce sharp pictures with good clarity and plenty of details straight out of the ...
Another cause might be your lens. Long zooms, with their large number of elements and multiple surfaces can significantly degrade contrast and colour. In my case when I moved from an 18-125mm lens to a high quality 17-70mm lens the images had significantly better contrast and better colours. It didn't hurt either that ...
4,517
I've noticed a lot of my pictures look muddy. They don't have very high contrast. I know I can post process some pictures, but what is the secret to having nice contrast in a picture?![alt text](https://i.stack.imgur.com/aDZWC.jpg)
2010/11/01
[ "https://photo.stackexchange.com/questions/4517", "https://photo.stackexchange.com", "https://photo.stackexchange.com/users/1972/" ]
Based on the photograph you posted, there actually is quite a bit of contrast. In general, I think the photo is pretty good, if a bit soft (from a lighting standpoint.) You noted that you shot the photo without flash on an overcast day, which is the primary reason for lack of any defining shadows or "lighting contrast"...
Shoot with good/interesting light! See the image below, the reason (ultimately) that the image has nice contrast is the original image has contrast on her face, e.g. once side is quite bright, and the other quite dark, because there is a window beside her. Try: putting your subject inside, with the lights off, facin...
4,517
I've noticed a lot of my pictures look muddy. They don't have very high contrast. I know I can post process some pictures, but what is the secret to having nice contrast in a picture?![alt text](https://i.stack.imgur.com/aDZWC.jpg)
2010/11/01
[ "https://photo.stackexchange.com/questions/4517", "https://photo.stackexchange.com", "https://photo.stackexchange.com/users/1972/" ]
Please, don't try to fix it later. Another teacher (where I teach photography too) says there should be no such thing as photo-correction, only photo-enhancement. Actually, I don't believe in the latter either ;) You have to be able to produce sharp pictures with good clarity and plenty of details straight out of the ...
Shoot with good/interesting light! See the image below, the reason (ultimately) that the image has nice contrast is the original image has contrast on her face, e.g. once side is quite bright, and the other quite dark, because there is a window beside her. Try: putting your subject inside, with the lights off, facin...
33,026,931
I am having a hard time figuring out how to give an ec2 instance access to an RDS instance in order to perform a mysqldump. Do I need to add a security group that allows the ec2 instance access to that server? I tried this using the RDS endpoint and it would not allow.
2015/10/08
[ "https://Stackoverflow.com/questions/33026931", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1114330/" ]
To access an Amazon EC2 instance with your own domain name, use a DNS server (eg Amazon Route 53) to point your domain name to the IP address of the EC2 instance. The steps are: * Create an Elastic IP address in the EC2 management console. This is a static IP address that you can then control. * Assign the Elastic IP...
You can't change it as it depends upon ec2 servers **Private and Public IP**. Although you can change the public and private IP.
65,074,839
I have data in multiple vectors that I would like to convert to a data.frame with one ID column (vector name) and one data column (vector values). Here's a toy example: ``` data.1 <- c(1, 2) data.2 <- c(10, 20, 30) df <- bind_rows(data.frame(ID="data.1", value=data.1), data.frame(ID="data.2", value=data.2)) ``` If I...
2020/11/30
[ "https://Stackoverflow.com/questions/65074839", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14722475/" ]
```js var jsonObj = [{"Product":"7318802U","Amount":"5"},{"Product":"7304773U","Amount":"1"}]; var Products = ["7318802U","7304773U","7212UCSS"]; for(var i = 0; i<Products.length; i++) { let targetObj = jsonObj.find((v) => v.Product === Products[i]); if (targetObj) { console.info(Products[i] + " exist") c...
```js var txt = [{ "Product": "7318802U", "Amount": "5" }, { "Product": "7304773U", "Amount": "1" }]; var jsonObj = txt; var Products = ["7318802U", "7304773U", "7212UCSS"]; function _isContains(json, value) { let contains = false; Object.keys(json).some(key => { contains = typeof json[key] === 'obje...
65,074,839
I have data in multiple vectors that I would like to convert to a data.frame with one ID column (vector name) and one data column (vector values). Here's a toy example: ``` data.1 <- c(1, 2) data.2 <- c(10, 20, 30) df <- bind_rows(data.frame(ID="data.1", value=data.1), data.frame(ID="data.2", value=data.2)) ``` If I...
2020/11/30
[ "https://Stackoverflow.com/questions/65074839", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14722475/" ]
```js var jsonObj = [{"Product":"7318802U","Amount":"5"},{"Product":"7304773U","Amount":"1"}]; var Products = ["7318802U","7304773U","7212UCSS"]; for(var i = 0; i<Products.length; i++) { let targetObj = jsonObj.find((v) => v.Product === Products[i]); if (targetObj) { console.info(Products[i] + " exist") c...
``` function getProductByCode(code) { return txt.filter( function(data){ return data.Product == code } )[0]; } var txt = [{"Product":"7318802U","Amount":"5"},{"Product":"7304773U","Amount":"1"}]; var jsonObj = eval(txt); var Products = [...
14,188,325
I've recently read an interesting article about securely hashing user passwords by using "salt". (This is the [original article](http://crackstation.net/hashing-security.htm), which unfortunately seems to be down at the time of this post, so [here's](http://webcache.googleusercontent.com/search?q=cache%3a-KnqE3F0Me8J%3...
2013/01/07
[ "https://Stackoverflow.com/questions/14188325", "https://Stackoverflow.com", "https://Stackoverflow.com/users/843732/" ]
You don't want to store a hashed password in cookies, because that would be the same thing as storing the password itself in cookies. If the hash is all you need to login, then it is the password. The reason you want to hash your user's password with random salt is not to secure the logon process, but to secure your pa...
The salt of a hash function in general is something that you compute based on a rule. For example, you use the user identifier as the salt itself. You use the "username" value to find the user in the database, and then use the user id as the salt. This way, you don't have to store the salt anywhere and the salt for eac...
14,188,325
I've recently read an interesting article about securely hashing user passwords by using "salt". (This is the [original article](http://crackstation.net/hashing-security.htm), which unfortunately seems to be down at the time of this post, so [here's](http://webcache.googleusercontent.com/search?q=cache%3a-KnqE3F0Me8J%3...
2013/01/07
[ "https://Stackoverflow.com/questions/14188325", "https://Stackoverflow.com", "https://Stackoverflow.com/users/843732/" ]
Hash is stored on server, as part of user authentication when the plaintext password is sent to the server, the computed salt (per user) is stored in a secure database and added to the password and the crypto result computed based on password + hash. Cookies are the wrong approach, because they expire and there is no ...
The salt of a hash function in general is something that you compute based on a rule. For example, you use the user identifier as the salt itself. You use the "username" value to find the user in the database, and then use the user id as the salt. This way, you don't have to store the salt anywhere and the salt for eac...
14,188,325
I've recently read an interesting article about securely hashing user passwords by using "salt". (This is the [original article](http://crackstation.net/hashing-security.htm), which unfortunately seems to be down at the time of this post, so [here's](http://webcache.googleusercontent.com/search?q=cache%3a-KnqE3F0Me8J%3...
2013/01/07
[ "https://Stackoverflow.com/questions/14188325", "https://Stackoverflow.com", "https://Stackoverflow.com/users/843732/" ]
You don't want to store a hashed password in cookies, because that would be the same thing as storing the password itself in cookies. If the hash is all you need to login, then it is the password. The reason you want to hash your user's password with random salt is not to secure the logon process, but to secure your pa...
Hash is stored on server, as part of user authentication when the plaintext password is sent to the server, the computed salt (per user) is stored in a secure database and added to the password and the crypto result computed based on password + hash. Cookies are the wrong approach, because they expire and there is no ...
4,581,142
What is the best way to debug a jquery plugin? When I open the plugin in visual studio it is shown as a single line in the editor. Also, when debugging with firebug, the plugin code is shown as a series of lines with no indentation which makes it hard to follow. JD
2011/01/02
[ "https://Stackoverflow.com/questions/4581142", "https://Stackoverflow.com", "https://Stackoverflow.com/users/126483/" ]
Download the debug (non-minified) version of the plugin.
Firebug is very helpful as well. But, like SLaks said, unless you have the non-compressed, debug (also called dev) version, line numbers of problems will most likely be useless.
4,581,142
What is the best way to debug a jquery plugin? When I open the plugin in visual studio it is shown as a single line in the editor. Also, when debugging with firebug, the plugin code is shown as a series of lines with no indentation which makes it hard to follow. JD
2011/01/02
[ "https://Stackoverflow.com/questions/4581142", "https://Stackoverflow.com", "https://Stackoverflow.com/users/126483/" ]
Download the debug (non-minified) version of the plugin.
You can try unminifying with a tool like this one <http://jsbeautifier.org/> if you don't have access to the unminified file.
4,581,142
What is the best way to debug a jquery plugin? When I open the plugin in visual studio it is shown as a single line in the editor. Also, when debugging with firebug, the plugin code is shown as a series of lines with no indentation which makes it hard to follow. JD
2011/01/02
[ "https://Stackoverflow.com/questions/4581142", "https://Stackoverflow.com", "https://Stackoverflow.com/users/126483/" ]
You can try unminifying with a tool like this one <http://jsbeautifier.org/> if you don't have access to the unminified file.
Firebug is very helpful as well. But, like SLaks said, unless you have the non-compressed, debug (also called dev) version, line numbers of problems will most likely be useless.
177,216
I have new CentOS 7 box and I have a problem with the `ping` command. When I try to ping ``` ping google.com ``` I get time out and 100% packet loss, but I can dig/nslookup google.com, and I can browse google.com I tried to disable `firewalld` but the result is still the same, can't ping to google.com from my Ce...
2015/01/03
[ "https://unix.stackexchange.com/questions/177216", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/96661/" ]
Since only root can send ICMP packets, ping from VM may fail if your supervisor is executed by non-root user. As mentioned in [answer to this question](https://unix.stackexchange.com/questions/78953/qemu-how-to-ping-host-network), you can config `net.ipv4.ping_group_range` to allow the user running supervisor to send ...
Have you tried with the same machine or system connected to another network? Have you tried with another machine on the same network? From your current description (which may not be accurate) the most probable explanation is that the ping is blocked by your ISP. My results form ICMP: ``` # ping google.com PING google...
177,216
I have new CentOS 7 box and I have a problem with the `ping` command. When I try to ping ``` ping google.com ``` I get time out and 100% packet loss, but I can dig/nslookup google.com, and I can browse google.com I tried to disable `firewalld` but the result is still the same, can't ping to google.com from my Ce...
2015/01/03
[ "https://unix.stackexchange.com/questions/177216", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/96661/" ]
Since only root can send ICMP packets, ping from VM may fail if your supervisor is executed by non-root user. As mentioned in [answer to this question](https://unix.stackexchange.com/questions/78953/qemu-how-to-ping-host-network), you can config `net.ipv4.ping_group_range` to allow the user running supervisor to send ...
You need to setup the nameserver for google.com to resolve to 8.8.8.8 So depending on what you prefer nano or vi on linux you need to do the following: ``` nano /etc/resolv.conf or vi /etc/resolv.conf You should see DNS1: xxx.xxx.xxx.xxx and DNS2: xxx.xxx.xxx.xxx ``` Nano - Just hit enter under the DNS records to ...
177,216
I have new CentOS 7 box and I have a problem with the `ping` command. When I try to ping ``` ping google.com ``` I get time out and 100% packet loss, but I can dig/nslookup google.com, and I can browse google.com I tried to disable `firewalld` but the result is still the same, can't ping to google.com from my Ce...
2015/01/03
[ "https://unix.stackexchange.com/questions/177216", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/96661/" ]
Since only root can send ICMP packets, ping from VM may fail if your supervisor is executed by non-root user. As mentioned in [answer to this question](https://unix.stackexchange.com/questions/78953/qemu-how-to-ping-host-network), you can config `net.ipv4.ping_group_range` to allow the user running supervisor to send ...
Being unable to ping google can be due to several reasons. * One reason can be that your **Gateway** is not properly configured in */etc/sysconfig/network-scripts/ifcfg-interfacename* * Another reason can be that you have not configured **DNS** properly in */etc/sysconfig/network-scripts/ifcfg-interfacename* file Ple...
23,372,420
If I call a function in bash, and that function itself is designed to output messages to the terminal using printf, how can I suppress that functionality. Allow me to explain further. Normally I would have a main script. This script calls a function. That function does its normal stuff and outputs to the terminal usin...
2014/04/29
[ "https://Stackoverflow.com/questions/23372420", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2272450/" ]
If you need to put the function in the background, the `&` [control operator](http://www.gnu.org/software/bash/manual/bashref.html#Simple-Commands) needs to go right at the end of the command, after all redirection specifications: ``` $ function myfunc() { > printf "%s\n" "normal message" > printf "%s\n" "error messag...
The correct syntax would be ``` FUNCTION > /dev/null 2>&1 & ``` Since `&` is a command terminator just like `;`, you need to include the output redirections in the command that runs `FUNCTION`, not the following command.
51,880,988
``` public class Dog { private String name; private int weight; //...getters and //setters and constructor } ``` Controller: ``` @RequestMapping(value = "/dogs", method = RequestMethod.POST, produces = "application/json") public void createDog(Dog dog) { dr.save(dog); } ``` How come whe...
2018/08/16
[ "https://Stackoverflow.com/questions/51880988", "https://Stackoverflow.com", "https://Stackoverflow.com/users/728345/" ]
Add the annotation `@RequestBody` to the param `dog` in your `create` method
Only works with objects so use Integer instead of int.
51,880,988
``` public class Dog { private String name; private int weight; //...getters and //setters and constructor } ``` Controller: ``` @RequestMapping(value = "/dogs", method = RequestMethod.POST, produces = "application/json") public void createDog(Dog dog) { dr.save(dog); } ``` How come whe...
2018/08/16
[ "https://Stackoverflow.com/questions/51880988", "https://Stackoverflow.com", "https://Stackoverflow.com/users/728345/" ]
Need to specify the `@RequestBody` annotation to specify we are sending DOG object as part of request body: ``` @RequestMapping(value = "/dogs", method = RequestMethod.POST, produces = "application/json") public void createDog((**@RequestBody** Dog dog) { dr.save(dog); } ```
Only works with objects so use Integer instead of int.
51,880,988
``` public class Dog { private String name; private int weight; //...getters and //setters and constructor } ``` Controller: ``` @RequestMapping(value = "/dogs", method = RequestMethod.POST, produces = "application/json") public void createDog(Dog dog) { dr.save(dog); } ``` How come whe...
2018/08/16
[ "https://Stackoverflow.com/questions/51880988", "https://Stackoverflow.com", "https://Stackoverflow.com/users/728345/" ]
Add the annotation `@RequestBody` to the param `dog` in your `create` method
If exist possibility object receive null, you can't use type primitives, same int, char, boolean. ``` private int weight ``` Use type objects same Integer, Boolean ... for one type primitive has a Object, then can receive null value.
51,880,988
``` public class Dog { private String name; private int weight; //...getters and //setters and constructor } ``` Controller: ``` @RequestMapping(value = "/dogs", method = RequestMethod.POST, produces = "application/json") public void createDog(Dog dog) { dr.save(dog); } ``` How come whe...
2018/08/16
[ "https://Stackoverflow.com/questions/51880988", "https://Stackoverflow.com", "https://Stackoverflow.com/users/728345/" ]
Need to specify the `@RequestBody` annotation to specify we are sending DOG object as part of request body: ``` @RequestMapping(value = "/dogs", method = RequestMethod.POST, produces = "application/json") public void createDog((**@RequestBody** Dog dog) { dr.save(dog); } ```
If exist possibility object receive null, you can't use type primitives, same int, char, boolean. ``` private int weight ``` Use type objects same Integer, Boolean ... for one type primitive has a Object, then can receive null value.
51,880,988
``` public class Dog { private String name; private int weight; //...getters and //setters and constructor } ``` Controller: ``` @RequestMapping(value = "/dogs", method = RequestMethod.POST, produces = "application/json") public void createDog(Dog dog) { dr.save(dog); } ``` How come whe...
2018/08/16
[ "https://Stackoverflow.com/questions/51880988", "https://Stackoverflow.com", "https://Stackoverflow.com/users/728345/" ]
Add the annotation `@RequestBody` to the param `dog` in your `create` method
Need to specify the `@RequestBody` annotation to specify we are sending DOG object as part of request body: ``` @RequestMapping(value = "/dogs", method = RequestMethod.POST, produces = "application/json") public void createDog((**@RequestBody** Dog dog) { dr.save(dog); } ```
13,115,784
So now, I am making a client server app based multithread. In server side, I make a thread for everysingle connection that accepted. In thread class, I make a method that send a command to client. What i just want is, how to send a parameter to all running client? For simple statement, i just want to make this server ...
2012/10/29
[ "https://Stackoverflow.com/questions/13115784", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1318743/" ]
> > The below answer, is not recommended for a full fledged server, as for this you should use Java EE with servlets, web services etc. > > > This is only intended where a few computers want to connect to perform a specific task, and using simple Java sockets is not a general problem. Think of distributed computing ...
There is no method in server socket to send data or message to all running clinet threads. Please go through the `ServerThread.java` program which is calling the `sendToAll` usng server. ``` // ... and have the server send it to all clients server.sendToAll( message ); ```
13,115,784
So now, I am making a client server app based multithread. In server side, I make a thread for everysingle connection that accepted. In thread class, I make a method that send a command to client. What i just want is, how to send a parameter to all running client? For simple statement, i just want to make this server ...
2012/10/29
[ "https://Stackoverflow.com/questions/13115784", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1318743/" ]
> > The below answer, is not recommended for a full fledged server, as for this you should use Java EE with servlets, web services etc. > > > This is only intended where a few computers want to connect to perform a specific task, and using simple Java sockets is not a general problem. Think of distributed computing ...
Check out zeroMQ. There are methods known as "pub sub" or "publish subscribe" that will do what you want. You can also use it to communicate between your threads. It is an amazing library in my opinion. It has java or jzmq bindings along with over 30+ others as well so you should be able to use it in your program. <h...
2,083,217
Calculate the sum of series: $$\sum\_{n=1}^\infty \ln\left(\frac{n(n+2)}{(n+1)^2}\right)$$ I tried to spread this logarithm, but I'm not seeing any method for this exercise.
2017/01/04
[ "https://math.stackexchange.com/questions/2083217", "https://math.stackexchange.com", "https://math.stackexchange.com/users/398925/" ]
Note $$\ln\left(\frac{n(n+2)}{(n+1)^2}\right)=\ln\left(\frac{\frac{n}{n+1}}{\frac{n+1} {n+2}}\right)=\ln\left(\frac{n}{n+1}\right)-\ln\left(\frac{n+1}{n+2}\right)$$ Thus $$\sum\_{n=1}^\infty \ln\left(\frac{n(n+2)}{(n+1)^2}\right)=\sum\_{n=1}^\infty \left[\ln\left(\frac{n}{n+1}\right)-\ln\left(\frac{n+1}{n+2}\right)\ri...
We can see that $$\frac {n (n+2)}{(n+1)^2} =1-\frac {1}{(n+1)^2} $$ So we have, $$\sum\_{n=1}^{\infty} \log \left(1-\frac {1}{(n+1)^2}\right) =\lim\_{n \to \infty} \log \left(\left(1-\frac {1}{4}\right)\left(1-\frac {1}{9}\right)\cdots\left(1-\frac {1}{(n+1)^2}\right)\right) =\log \frac {1}{2} $$ Hope it helps. --- ...
2,083,217
Calculate the sum of series: $$\sum\_{n=1}^\infty \ln\left(\frac{n(n+2)}{(n+1)^2}\right)$$ I tried to spread this logarithm, but I'm not seeing any method for this exercise.
2017/01/04
[ "https://math.stackexchange.com/questions/2083217", "https://math.stackexchange.com", "https://math.stackexchange.com/users/398925/" ]
An overkill. Since holds $$\prod\_{n\geq0}\frac{\left(n+a\right)\left(n+b\right)}{\left(n+c\right)\left(n+d\right)}=\frac{\Gamma\left(c\right)\Gamma\left(d\right)}{\Gamma\left(a\right)\Gamma\left(b\right)},\, a+b=c+d $$ and this can be proved using the [Euler's definition of the Gamma function](https://en.wikipedia.or...
We can see that $$\frac {n (n+2)}{(n+1)^2} =1-\frac {1}{(n+1)^2} $$ So we have, $$\sum\_{n=1}^{\infty} \log \left(1-\frac {1}{(n+1)^2}\right) =\lim\_{n \to \infty} \log \left(\left(1-\frac {1}{4}\right)\left(1-\frac {1}{9}\right)\cdots\left(1-\frac {1}{(n+1)^2}\right)\right) =\log \frac {1}{2} $$ Hope it helps. --- ...
2,083,217
Calculate the sum of series: $$\sum\_{n=1}^\infty \ln\left(\frac{n(n+2)}{(n+1)^2}\right)$$ I tried to spread this logarithm, but I'm not seeing any method for this exercise.
2017/01/04
[ "https://math.stackexchange.com/questions/2083217", "https://math.stackexchange.com", "https://math.stackexchange.com/users/398925/" ]
Note $$\ln\left(\frac{n(n+2)}{(n+1)^2}\right)=\ln\left(\frac{\frac{n}{n+1}}{\frac{n+1} {n+2}}\right)=\ln\left(\frac{n}{n+1}\right)-\ln\left(\frac{n+1}{n+2}\right)$$ Thus $$\sum\_{n=1}^\infty \ln\left(\frac{n(n+2)}{(n+1)^2}\right)=\sum\_{n=1}^\infty \left[\ln\left(\frac{n}{n+1}\right)-\ln\left(\frac{n+1}{n+2}\right)\ri...
In another, more straight, way: $$ \begin{gathered} \sum\limits\_{1\, \leqslant \,n} {\ln \left( {\frac{{n\left( {n + 2} \right)}} {{\left( {n + 1} \right)^{\,2} }}} \right)} = \ln \left( {\prod\limits\_{1\, \leqslant \,n} {\frac{{n\left( {n + 2} \right)}} {{\left( {n + 1} \right)^{\,2} }}} } \right) = \hfill \\ = \l...
2,083,217
Calculate the sum of series: $$\sum\_{n=1}^\infty \ln\left(\frac{n(n+2)}{(n+1)^2}\right)$$ I tried to spread this logarithm, but I'm not seeing any method for this exercise.
2017/01/04
[ "https://math.stackexchange.com/questions/2083217", "https://math.stackexchange.com", "https://math.stackexchange.com/users/398925/" ]
Note $$\ln\left(\frac{n(n+2)}{(n+1)^2}\right)=\ln\left(\frac{\frac{n}{n+1}}{\frac{n+1} {n+2}}\right)=\ln\left(\frac{n}{n+1}\right)-\ln\left(\frac{n+1}{n+2}\right)$$ Thus $$\sum\_{n=1}^\infty \ln\left(\frac{n(n+2)}{(n+1)^2}\right)=\sum\_{n=1}^\infty \left[\ln\left(\frac{n}{n+1}\right)-\ln\left(\frac{n+1}{n+2}\right)\ri...
\begin{align\*}\sum\_{n=1}^N \ln\left(\frac{n(n+2)}{(n+1)^2}\right)&= \sum\_{n=1}^N \left(\ln n + \ln (n+2) -2\ln(n+1)\right)\\&=\ln 1+\ln(N+2)-\ln2-\ln(N+1)\\&=-\ln2+\ln\frac{N+2}{N+1}\\&\xrightarrow{N\to\infty}-\ln2+\ln1=-\ln2.\end{align\*} This is however essentially the same solution as that given by Behrouz, just ...
2,083,217
Calculate the sum of series: $$\sum\_{n=1}^\infty \ln\left(\frac{n(n+2)}{(n+1)^2}\right)$$ I tried to spread this logarithm, but I'm not seeing any method for this exercise.
2017/01/04
[ "https://math.stackexchange.com/questions/2083217", "https://math.stackexchange.com", "https://math.stackexchange.com/users/398925/" ]
Note $$\ln\left(\frac{n(n+2)}{(n+1)^2}\right)=\ln\left(\frac{\frac{n}{n+1}}{\frac{n+1} {n+2}}\right)=\ln\left(\frac{n}{n+1}\right)-\ln\left(\frac{n+1}{n+2}\right)$$ Thus $$\sum\_{n=1}^\infty \ln\left(\frac{n(n+2)}{(n+1)^2}\right)=\sum\_{n=1}^\infty \left[\ln\left(\frac{n}{n+1}\right)-\ln\left(\frac{n+1}{n+2}\right)\ri...
Another overkill. Since: $$ \frac{\sin(\pi x)}{\pi x}=\prod\_{n\geq 1}\left(1-\frac{x^2}{n^2}\right)\tag{1} $$ we have: $$ \sum\_{n\geq 1}\log\frac{n(n+2)}{(n+1)^2}=\log\prod\_{n\geq 2}\left(1-\frac{1}{n^2}\right)=\log\lim\_{x\to 1}\frac{\sin(\pi x)}{\pi x(1-x^2)}\stackrel{dH}{=}\color{red}{-\log 2}.\tag{2} $$
2,083,217
Calculate the sum of series: $$\sum\_{n=1}^\infty \ln\left(\frac{n(n+2)}{(n+1)^2}\right)$$ I tried to spread this logarithm, but I'm not seeing any method for this exercise.
2017/01/04
[ "https://math.stackexchange.com/questions/2083217", "https://math.stackexchange.com", "https://math.stackexchange.com/users/398925/" ]
An overkill. Since holds $$\prod\_{n\geq0}\frac{\left(n+a\right)\left(n+b\right)}{\left(n+c\right)\left(n+d\right)}=\frac{\Gamma\left(c\right)\Gamma\left(d\right)}{\Gamma\left(a\right)\Gamma\left(b\right)},\, a+b=c+d $$ and this can be proved using the [Euler's definition of the Gamma function](https://en.wikipedia.or...
In another, more straight, way: $$ \begin{gathered} \sum\limits\_{1\, \leqslant \,n} {\ln \left( {\frac{{n\left( {n + 2} \right)}} {{\left( {n + 1} \right)^{\,2} }}} \right)} = \ln \left( {\prod\limits\_{1\, \leqslant \,n} {\frac{{n\left( {n + 2} \right)}} {{\left( {n + 1} \right)^{\,2} }}} } \right) = \hfill \\ = \l...
2,083,217
Calculate the sum of series: $$\sum\_{n=1}^\infty \ln\left(\frac{n(n+2)}{(n+1)^2}\right)$$ I tried to spread this logarithm, but I'm not seeing any method for this exercise.
2017/01/04
[ "https://math.stackexchange.com/questions/2083217", "https://math.stackexchange.com", "https://math.stackexchange.com/users/398925/" ]
An overkill. Since holds $$\prod\_{n\geq0}\frac{\left(n+a\right)\left(n+b\right)}{\left(n+c\right)\left(n+d\right)}=\frac{\Gamma\left(c\right)\Gamma\left(d\right)}{\Gamma\left(a\right)\Gamma\left(b\right)},\, a+b=c+d $$ and this can be proved using the [Euler's definition of the Gamma function](https://en.wikipedia.or...
\begin{align\*}\sum\_{n=1}^N \ln\left(\frac{n(n+2)}{(n+1)^2}\right)&= \sum\_{n=1}^N \left(\ln n + \ln (n+2) -2\ln(n+1)\right)\\&=\ln 1+\ln(N+2)-\ln2-\ln(N+1)\\&=-\ln2+\ln\frac{N+2}{N+1}\\&\xrightarrow{N\to\infty}-\ln2+\ln1=-\ln2.\end{align\*} This is however essentially the same solution as that given by Behrouz, just ...
2,083,217
Calculate the sum of series: $$\sum\_{n=1}^\infty \ln\left(\frac{n(n+2)}{(n+1)^2}\right)$$ I tried to spread this logarithm, but I'm not seeing any method for this exercise.
2017/01/04
[ "https://math.stackexchange.com/questions/2083217", "https://math.stackexchange.com", "https://math.stackexchange.com/users/398925/" ]
An overkill. Since holds $$\prod\_{n\geq0}\frac{\left(n+a\right)\left(n+b\right)}{\left(n+c\right)\left(n+d\right)}=\frac{\Gamma\left(c\right)\Gamma\left(d\right)}{\Gamma\left(a\right)\Gamma\left(b\right)},\, a+b=c+d $$ and this can be proved using the [Euler's definition of the Gamma function](https://en.wikipedia.or...
Another overkill. Since: $$ \frac{\sin(\pi x)}{\pi x}=\prod\_{n\geq 1}\left(1-\frac{x^2}{n^2}\right)\tag{1} $$ we have: $$ \sum\_{n\geq 1}\log\frac{n(n+2)}{(n+1)^2}=\log\prod\_{n\geq 2}\left(1-\frac{1}{n^2}\right)=\log\lim\_{x\to 1}\frac{\sin(\pi x)}{\pi x(1-x^2)}\stackrel{dH}{=}\color{red}{-\log 2}.\tag{2} $$
67,318,988
I have a JSON document like ``` { "outer":{ "inner":{ ... } } } ``` How can I deserialize the value of `"inner"` (the `{ ... }`) into some type `MyType` using `System.Text.Json`?
2021/04/29
[ "https://Stackoverflow.com/questions/67318988", "https://Stackoverflow.com", "https://Stackoverflow.com/users/381801/" ]
In .NET 5, you can deserialize the JSON to an anonymous type that wraps the required type: ``` var myType = JsonSerializerExtensions.DeserializeAnonymousType(jsonString, new { outer = new { inner = default(MyType) } }) ?.outer?.inner; ``` Using the ...
You can try using the JsonDocument class. A section in the link below explains how it works with sample code. <https://devblogs.microsoft.com/dotnet/try-the-new-system-text-json-apis/>
67,318,988
I have a JSON document like ``` { "outer":{ "inner":{ ... } } } ``` How can I deserialize the value of `"inner"` (the `{ ... }`) into some type `MyType` using `System.Text.Json`?
2021/04/29
[ "https://Stackoverflow.com/questions/67318988", "https://Stackoverflow.com", "https://Stackoverflow.com/users/381801/" ]
In .NET 5, you can deserialize the JSON to an anonymous type that wraps the required type: ``` var myType = JsonSerializerExtensions.DeserializeAnonymousType(jsonString, new { outer = new { inner = default(MyType) } }) ?.outer?.inner; ``` Using the ...
You can use [`JsonDocument`](https://learn.microsoft.com/en-us/dotnet/api/system.text.json.jsondocument?view=net-5.0) like this: ```cs public class MyType { public int id { get; set; } } var json = @"{ ""outer"" : { ""inner"" : {""id"":1} }}"; using (JsonDocument doc = JsonDocument.Parse(json)) { var prop =...
17,690,515
I am trying to understand this JS function: [JS Fiddle Demo](http://jsfiddle.net/hx5NY/) I basically got it out of a book that I am trying to learn from. The book is called "JavaScript: The Definitive Guide" (pg484). But the function does not include the html that goes with it. I'd appreciate if someone could help me ...
2013/07/17
[ "https://Stackoverflow.com/questions/17690515", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2392358/" ]
Your code looks good, but you're not getting output because you're not printing it! Simply add a `System.out.println(...)` to your main method. ``` System.out.println("Frequency is: " + c.freq(input, p)); ```
For this part: > > I looked online and found the freq(c.substring(1, c.length()),p); part but going through the code it doesn't make sense.. seems like on every pass its still going to deal with 'aa' and not necessarily shrink it. > > > The line `c.substring(1, c.length())` shrinks the String `c` so that what get...
19,589,235
I have a database and a lot of tables inside it. I wrote definition into the each table and column's definition part. And now using query I want to see all table and columns definition. Can you please help me?
2013/10/25
[ "https://Stackoverflow.com/questions/19589235", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2696542/" ]
If you're using SqlServer. ``` SELECT obj.name, cols.name as columnname from dbname.sys.objects as obj inner join dbname.sys.columns as cols on obj.object_id = cols.object_id where obj.type='U' ```
Try this : ``` SELECT * FROM INFORMATION_SCHEMA.COLUMNS ``` OR for more detailed table information ``` EXEC sp_help [Your Table_Name] ```
19,589,235
I have a database and a lot of tables inside it. I wrote definition into the each table and column's definition part. And now using query I want to see all table and columns definition. Can you please help me?
2013/10/25
[ "https://Stackoverflow.com/questions/19589235", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2696542/" ]
If you're using SqlServer. ``` SELECT obj.name, cols.name as columnname from dbname.sys.objects as obj inner join dbname.sys.columns as cols on obj.object_id = cols.object_id where obj.type='U' ```
If you are looking for extended descriptions: ``` SELECT OBJECT_NAME(major_id) TableName,(select name from sys.columns c where c.object_id=major_id and c.column_id=minor_id) ColumnName,* FROM sys.extended_properties WHERE name='MS_Description' AND minor_id>0 and class=1 ```
19,589,235
I have a database and a lot of tables inside it. I wrote definition into the each table and column's definition part. And now using query I want to see all table and columns definition. Can you please help me?
2013/10/25
[ "https://Stackoverflow.com/questions/19589235", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2696542/" ]
Here's a bass query that can list info from the colums and tables in SQL server. Just add the columns you need from each system table. ``` SELECT t.name table_name, , c.name column_name From sys.tables AS t Inner Join sys.columns c On t.Object_ID = c.Object_ID ```
Try this : ``` SELECT * FROM INFORMATION_SCHEMA.COLUMNS ``` OR for more detailed table information ``` EXEC sp_help [Your Table_Name] ```
19,589,235
I have a database and a lot of tables inside it. I wrote definition into the each table and column's definition part. And now using query I want to see all table and columns definition. Can you please help me?
2013/10/25
[ "https://Stackoverflow.com/questions/19589235", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2696542/" ]
Here's a bass query that can list info from the colums and tables in SQL server. Just add the columns you need from each system table. ``` SELECT t.name table_name, , c.name column_name From sys.tables AS t Inner Join sys.columns c On t.Object_ID = c.Object_ID ```
If you are looking for extended descriptions: ``` SELECT OBJECT_NAME(major_id) TableName,(select name from sys.columns c where c.object_id=major_id and c.column_id=minor_id) ColumnName,* FROM sys.extended_properties WHERE name='MS_Description' AND minor_id>0 and class=1 ```
19,589,235
I have a database and a lot of tables inside it. I wrote definition into the each table and column's definition part. And now using query I want to see all table and columns definition. Can you please help me?
2013/10/25
[ "https://Stackoverflow.com/questions/19589235", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2696542/" ]
try this to get the definition of table in SQL... > > sp\_help 'tableName' > > > example `sp_help 'MyTable'` We can also do same thing as ``` exec sp_help 'MyTable' ``` Because **sp\_help** is a pre define *stored processor* and we can execute stored processor using "**exec**" keyword or also can use "**execu...
Try this : ``` SELECT * FROM INFORMATION_SCHEMA.COLUMNS ``` OR for more detailed table information ``` EXEC sp_help [Your Table_Name] ```
19,589,235
I have a database and a lot of tables inside it. I wrote definition into the each table and column's definition part. And now using query I want to see all table and columns definition. Can you please help me?
2013/10/25
[ "https://Stackoverflow.com/questions/19589235", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2696542/" ]
try this to get the definition of table in SQL... > > sp\_help 'tableName' > > > example `sp_help 'MyTable'` We can also do same thing as ``` exec sp_help 'MyTable' ``` Because **sp\_help** is a pre define *stored processor* and we can execute stored processor using "**exec**" keyword or also can use "**execu...
If you are looking for extended descriptions: ``` SELECT OBJECT_NAME(major_id) TableName,(select name from sys.columns c where c.object_id=major_id and c.column_id=minor_id) ColumnName,* FROM sys.extended_properties WHERE name='MS_Description' AND minor_id>0 and class=1 ```
26,405,117
How to send negative measured numeric in OBX segment of ORU\_R01 profile for PCD DEC profile using HL7 2.6 ?? and also where i can find that requirement defined by IHE.. -Thanks-
2014/10/16
[ "https://Stackoverflow.com/questions/26405117", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3859722/" ]
Since you have to define a data type for each Observation Value (OBX.5), your question is actually how to use HL7 data types to code negative values. For example, the HL7v2 standard defined NM as: > > A number represented as a series of ASCII numeric characters consisting of an optional leading sign (+ or -), the di...
Here is a link to the IHE Pathology and Laboratory Medicine [Technical Framework](http://www.ihe.net/Technical_Frameworks/#PaLM) which contains their requirements.
21,050,960
I am trying to compare two char arrays. The DoSomething() function, however, never get's called. I can't figure out why. What am I doing wrong? ``` //The value the user types in will be stored here: char TempStorage[]={0,0,0,0,0,0}; //User types in a sequence here: GetInput(); //One of the sequences that TempStorag...
2014/01/10
[ "https://Stackoverflow.com/questions/21050960", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2595033/" ]
Misplaced paren. ``` if(memcmp(TempStorage, Sequence, sizeof(TempStorage) == 0)) ``` should be ``` if(memcmp(TempStorage, Sequence, sizeof(TempStorage)) == 0) ``` --- Are those really six inputs that you parsed and placed in an array? Or is `TempStorage` a string of ASCII characters that was input? If it's the l...
your characters will resolve to ASCII values so you should specify it as: ``` char Sequence[]={'1','2','3','4',0,0}; ``` Or compare against an actual string like: ``` char Sequence[]="1234"; ```
853,872
Let me preface that I am not a load balancer expert, but I know that if you offload an SSL certificate on the load balancer you have multiple advantages. One of our clients wants to cache many websites through a CDN using SSL. For the sake of argument, let's pretend the sites are <https://siteone.com> and <https://sit...
2017/06/04
[ "https://serverfault.com/questions/853872", "https://serverfault.com", "https://serverfault.com/users/418673/" ]
Thanks to a comment by EEAA, I was able to solve this using fail2ban. There's very little documentation about how to use fail2ban with HAProxy, however - so little in fact that this page is already nearing the top of a Google search for "haproxy fail2ban", so I'll detail how I did it. First of all, install fail2ban. ...
I'm glad that you seem to have solved the immediate problem with fail2ban, and it does make sense to block at the iptables level, but you can do the exact same thing in your HAProxy config: You can use acl's with src\_http\_req\_rate() or even src\_http\_err\_rate(Abuse): I've used them in some examples of [haproxy con...
28,690
When assembling stair treads and risers, is it better to have the tread tucked under the riser or have the riser tucked in between the tread and the stringer riser backing? I am inclined to think the former because that way the tread gets more framing support but the way my current stairs are assembled is the latter, h...
2013/06/13
[ "https://diy.stackexchange.com/questions/28690", "https://diy.stackexchange.com", "https://diy.stackexchange.com/users/9354/" ]
We installed it so the tread goes under the riser. We installed hardwood stairs in our home and we cut the bottom of the riser at a slight angle to ensure that the front edge of the riser was always fully touching the tread so you couldn't see a gap between the riser and tread. I see a lot of places online that say t...
Treads and risers install should start at the bottom step. First the riser and then the tread. However, on the tread you leave a 1/4 inch gap on the back edge and then install the next riser. Your riser should be at least 1/2" thick and the tread no less than 1" thick. This gives support to the back of the tread and th...
28,690
When assembling stair treads and risers, is it better to have the tread tucked under the riser or have the riser tucked in between the tread and the stringer riser backing? I am inclined to think the former because that way the tread gets more framing support but the way my current stairs are assembled is the latter, h...
2013/06/13
[ "https://diy.stackexchange.com/questions/28690", "https://diy.stackexchange.com", "https://diy.stackexchange.com/users/9354/" ]
We installed it so the tread goes under the riser. We installed hardwood stairs in our home and we cut the bottom of the riser at a slight angle to ensure that the front edge of the riser was always fully touching the tread so you couldn't see a gap between the riser and tread. I see a lot of places online that say t...
Water flow over the tread which overhang these gaps you guys are talking about. If the tread happen to slope backward, no gap will prevent water from getting inside these gaps. Despite this fact, installing tread first then riser makes your life a whole lot better given that the tread is dead flat. Nevertheless, if you...
28,690
When assembling stair treads and risers, is it better to have the tread tucked under the riser or have the riser tucked in between the tread and the stringer riser backing? I am inclined to think the former because that way the tread gets more framing support but the way my current stairs are assembled is the latter, h...
2013/06/13
[ "https://diy.stackexchange.com/questions/28690", "https://diy.stackexchange.com", "https://diy.stackexchange.com/users/9354/" ]
We installed it so the tread goes under the riser. We installed hardwood stairs in our home and we cut the bottom of the riser at a slight angle to ensure that the front edge of the riser was always fully touching the tread so you couldn't see a gap between the riser and tread. I see a lot of places online that say t...
If you install the tread first and then put in the riser, the riser will add stability to the tread by holding down the back of the tread; then it isn't just all on the nails and glue. This could theoretically matter if you had two adults step on the front of the same stair at the same time, especially if they are *run...
28,690
When assembling stair treads and risers, is it better to have the tread tucked under the riser or have the riser tucked in between the tread and the stringer riser backing? I am inclined to think the former because that way the tread gets more framing support but the way my current stairs are assembled is the latter, h...
2013/06/13
[ "https://diy.stackexchange.com/questions/28690", "https://diy.stackexchange.com", "https://diy.stackexchange.com/users/9354/" ]
Treads and risers install should start at the bottom step. First the riser and then the tread. However, on the tread you leave a 1/4 inch gap on the back edge and then install the next riser. Your riser should be at least 1/2" thick and the tread no less than 1" thick. This gives support to the back of the tread and th...
Since you probably have to rip both the tread and the riser to size, I would install a tread and then the riser on top. So the ripped edge of tread would be covered by riser and the top of the riser would be covered by the next tread.
28,690
When assembling stair treads and risers, is it better to have the tread tucked under the riser or have the riser tucked in between the tread and the stringer riser backing? I am inclined to think the former because that way the tread gets more framing support but the way my current stairs are assembled is the latter, h...
2013/06/13
[ "https://diy.stackexchange.com/questions/28690", "https://diy.stackexchange.com", "https://diy.stackexchange.com/users/9354/" ]
The answers of the tread then riser SEEM to make sense, but consider this: A properly installed tread will not come off before the lip breaks off. Using just regular Elmer's wood glue, I used to make treads by gluing the edges of 2 2x6 planks together and then planing and cutting them down (after being clamped for 24 h...
Water flow over the tread which overhang these gaps you guys are talking about. If the tread happen to slope backward, no gap will prevent water from getting inside these gaps. Despite this fact, installing tread first then riser makes your life a whole lot better given that the tread is dead flat. Nevertheless, if you...
28,690
When assembling stair treads and risers, is it better to have the tread tucked under the riser or have the riser tucked in between the tread and the stringer riser backing? I am inclined to think the former because that way the tread gets more framing support but the way my current stairs are assembled is the latter, h...
2013/06/13
[ "https://diy.stackexchange.com/questions/28690", "https://diy.stackexchange.com", "https://diy.stackexchange.com/users/9354/" ]
Treads and risers install should start at the bottom step. First the riser and then the tread. However, on the tread you leave a 1/4 inch gap on the back edge and then install the next riser. Your riser should be at least 1/2" thick and the tread no less than 1" thick. This gives support to the back of the tread and th...
If you install the tread first and then put in the riser, the riser will add stability to the tread by holding down the back of the tread; then it isn't just all on the nails and glue. This could theoretically matter if you had two adults step on the front of the same stair at the same time, especially if they are *run...
28,690
When assembling stair treads and risers, is it better to have the tread tucked under the riser or have the riser tucked in between the tread and the stringer riser backing? I am inclined to think the former because that way the tread gets more framing support but the way my current stairs are assembled is the latter, h...
2013/06/13
[ "https://diy.stackexchange.com/questions/28690", "https://diy.stackexchange.com", "https://diy.stackexchange.com/users/9354/" ]
Treads and risers install should start at the bottom step. First the riser and then the tread. However, on the tread you leave a 1/4 inch gap on the back edge and then install the next riser. Your riser should be at least 1/2" thick and the tread no less than 1" thick. This gives support to the back of the tread and th...
Water flow over the tread which overhang these gaps you guys are talking about. If the tread happen to slope backward, no gap will prevent water from getting inside these gaps. Despite this fact, installing tread first then riser makes your life a whole lot better given that the tread is dead flat. Nevertheless, if you...
28,690
When assembling stair treads and risers, is it better to have the tread tucked under the riser or have the riser tucked in between the tread and the stringer riser backing? I am inclined to think the former because that way the tread gets more framing support but the way my current stairs are assembled is the latter, h...
2013/06/13
[ "https://diy.stackexchange.com/questions/28690", "https://diy.stackexchange.com", "https://diy.stackexchange.com/users/9354/" ]
The answers of the tread then riser SEEM to make sense, but consider this: A properly installed tread will not come off before the lip breaks off. Using just regular Elmer's wood glue, I used to make treads by gluing the edges of 2 2x6 planks together and then planing and cutting them down (after being clamped for 24 h...
Since you probably have to rip both the tread and the riser to size, I would install a tread and then the riser on top. So the ripped edge of tread would be covered by riser and the top of the riser would be covered by the next tread.
28,690
When assembling stair treads and risers, is it better to have the tread tucked under the riser or have the riser tucked in between the tread and the stringer riser backing? I am inclined to think the former because that way the tread gets more framing support but the way my current stairs are assembled is the latter, h...
2013/06/13
[ "https://diy.stackexchange.com/questions/28690", "https://diy.stackexchange.com", "https://diy.stackexchange.com/users/9354/" ]
The answers of the tread then riser SEEM to make sense, but consider this: A properly installed tread will not come off before the lip breaks off. Using just regular Elmer's wood glue, I used to make treads by gluing the edges of 2 2x6 planks together and then planing and cutting them down (after being clamped for 24 h...
Treads and risers install should start at the bottom step. First the riser and then the tread. However, on the tread you leave a 1/4 inch gap on the back edge and then install the next riser. Your riser should be at least 1/2" thick and the tread no less than 1" thick. This gives support to the back of the tread and th...
28,690
When assembling stair treads and risers, is it better to have the tread tucked under the riser or have the riser tucked in between the tread and the stringer riser backing? I am inclined to think the former because that way the tread gets more framing support but the way my current stairs are assembled is the latter, h...
2013/06/13
[ "https://diy.stackexchange.com/questions/28690", "https://diy.stackexchange.com", "https://diy.stackexchange.com/users/9354/" ]
We installed it so the tread goes under the riser. We installed hardwood stairs in our home and we cut the bottom of the riser at a slight angle to ensure that the front edge of the riser was always fully touching the tread so you couldn't see a gap between the riser and tread. I see a lot of places online that say t...
It comes down to flow. From top to bottom on any assembly you should build it so water flows downward and not inside the assembly. If the riser is installed first and the tread pushed up to it, any liquid, dirt or dust falls in between the tread and the riser. This could cause grief, and in the case of dirt be rather u...
372,365
I am using xmlrpclib.ServerProxy to make RPC calls to a remote server. If there is not a network connection to the server it takes the default 10 seconds to return a socket.gaierror to my program. This is annoying when doing development without a network connection, or if the remote server is down. Is there a way to ...
2008/12/16
[ "https://Stackoverflow.com/questions/372365", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22306/" ]
I wanted a small, clean, but also explicit version, so based on all other answers here, this is what I came up with: ``` import xmlrpclib class TimeoutTransport(xmlrpclib.Transport): def __init__(self, timeout, use_datetime=0): self.timeout = timeout # xmlrpclib uses old-style classes so we canno...
Based on the one from antonylesuisse, but works on Python 2.7.5, resolving the problem:`AttributeError: TimeoutHTTP instance has no attribute 'getresponse'` ``` class TimeoutHTTP(httplib.HTTP): def __init__(self, host='', port=None, strict=None, timeout=socket._GLOBAL_DEFAULT_TIMEOUT): if p...
372,365
I am using xmlrpclib.ServerProxy to make RPC calls to a remote server. If there is not a network connection to the server it takes the default 10 seconds to return a socket.gaierror to my program. This is annoying when doing development without a network connection, or if the remote server is down. Is there a way to ...
2008/12/16
[ "https://Stackoverflow.com/questions/372365", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22306/" ]
An more straightforward solution is at: <http://www.devpicayune.com/entry/200609191448> ``` import xmlrpclib import socket x = xmlrpclib.ServerProxy('http:1.2.3.4') socket.setdefaulttimeout(10) #set the timeout to 10 seconds x.func_name(args) #times out after 10 seconds socket.setdefaultt...
The following example works with Python 2.7.4. ``` import xmlrpclib from xmlrpclib import * import httplib def Server(url, *args, **kwargs): t = TimeoutTransport(kwargs.get('timeout', 20)) if 'timeout' in kwargs: del kwargs['timeout'] kwargs['transport'] = t server = xmlrpclib.Server(url, *args...
372,365
I am using xmlrpclib.ServerProxy to make RPC calls to a remote server. If there is not a network connection to the server it takes the default 10 seconds to return a socket.gaierror to my program. This is annoying when doing development without a network connection, or if the remote server is down. Is there a way to ...
2008/12/16
[ "https://Stackoverflow.com/questions/372365", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22306/" ]
Here is code that works on Python 2.7 (probably for other 2.x versions of Python) without raising *AttributeError, instance has no attribute 'getresponse'*. ``` class TimeoutHTTPConnection(httplib.HTTPConnection): def connect(self): httplib.HTTPConnection.connect(self) self.sock.settimeout(self.ti...
Based on the one from antonylesuisse, a working version (on python >= 2.6). ``` # -*- coding: utf8 -*- import xmlrpclib import httplib import socket class TimeoutHTTP(httplib.HTTP): def __init__(self, host='', port=None, strict=None, timeout=socket._GLOBAL_DEFAULT_TIMEOUT): if port == 0: ...
372,365
I am using xmlrpclib.ServerProxy to make RPC calls to a remote server. If there is not a network connection to the server it takes the default 10 seconds to return a socket.gaierror to my program. This is annoying when doing development without a network connection, or if the remote server is down. Is there a way to ...
2008/12/16
[ "https://Stackoverflow.com/questions/372365", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22306/" ]
Here is code that works on Python 2.7 (probably for other 2.x versions of Python) without raising *AttributeError, instance has no attribute 'getresponse'*. ``` class TimeoutHTTPConnection(httplib.HTTPConnection): def connect(self): httplib.HTTPConnection.connect(self) self.sock.settimeout(self.ti...
Here is a verbatim copy from <http://code.activestate.com/recipes/473878/> ``` def timeout(func, args=(), kwargs={}, timeout_duration=1, default=None): import threading class InterruptableThread(threading.Thread): def __init__(self): threading.Thread.__init__(self) self.result = None ...
372,365
I am using xmlrpclib.ServerProxy to make RPC calls to a remote server. If there is not a network connection to the server it takes the default 10 seconds to return a socket.gaierror to my program. This is annoying when doing development without a network connection, or if the remote server is down. Is there a way to ...
2008/12/16
[ "https://Stackoverflow.com/questions/372365", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22306/" ]
An more straightforward solution is at: <http://www.devpicayune.com/entry/200609191448> ``` import xmlrpclib import socket x = xmlrpclib.ServerProxy('http:1.2.3.4') socket.setdefaulttimeout(10) #set the timeout to 10 seconds x.func_name(args) #times out after 10 seconds socket.setdefaultt...
Based on the one from antonylesuisse, but works on Python 2.7.5, resolving the problem:`AttributeError: TimeoutHTTP instance has no attribute 'getresponse'` ``` class TimeoutHTTP(httplib.HTTP): def __init__(self, host='', port=None, strict=None, timeout=socket._GLOBAL_DEFAULT_TIMEOUT): if p...
372,365
I am using xmlrpclib.ServerProxy to make RPC calls to a remote server. If there is not a network connection to the server it takes the default 10 seconds to return a socket.gaierror to my program. This is annoying when doing development without a network connection, or if the remote server is down. Is there a way to ...
2008/12/16
[ "https://Stackoverflow.com/questions/372365", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22306/" ]
clean non global version. ``` import xmlrpclib import httplib class TimeoutHTTPConnection(httplib.HTTPConnection): def connect(self): httplib.HTTPConnection.connect(self) self.sock.settimeout(self.timeout) class TimeoutHTTP(httplib.HTTP): _connection_class = TimeoutHTTPConnection def set...
Here another smart and very **pythonic** solution using Python's `with` statement: ``` import socket import xmlrpc.client class MyServerProxy: def __init__(self, url, timeout=None): self.__url = url self.__timeout = timeout self.__prevDefaultTimeout = None def __enter__(self): ...
372,365
I am using xmlrpclib.ServerProxy to make RPC calls to a remote server. If there is not a network connection to the server it takes the default 10 seconds to return a socket.gaierror to my program. This is annoying when doing development without a network connection, or if the remote server is down. Is there a way to ...
2008/12/16
[ "https://Stackoverflow.com/questions/372365", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22306/" ]
An more straightforward solution is at: <http://www.devpicayune.com/entry/200609191448> ``` import xmlrpclib import socket x = xmlrpclib.ServerProxy('http:1.2.3.4') socket.setdefaulttimeout(10) #set the timeout to 10 seconds x.func_name(args) #times out after 10 seconds socket.setdefaultt...
Based on the one from antonylesuisse, a working version (on python >= 2.6). ``` # -*- coding: utf8 -*- import xmlrpclib import httplib import socket class TimeoutHTTP(httplib.HTTP): def __init__(self, host='', port=None, strict=None, timeout=socket._GLOBAL_DEFAULT_TIMEOUT): if port == 0: ...
372,365
I am using xmlrpclib.ServerProxy to make RPC calls to a remote server. If there is not a network connection to the server it takes the default 10 seconds to return a socket.gaierror to my program. This is annoying when doing development without a network connection, or if the remote server is down. Is there a way to ...
2008/12/16
[ "https://Stackoverflow.com/questions/372365", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22306/" ]
Based on the one from antonylesuisse, a working version (on python >= 2.6). ``` # -*- coding: utf8 -*- import xmlrpclib import httplib import socket class TimeoutHTTP(httplib.HTTP): def __init__(self, host='', port=None, strict=None, timeout=socket._GLOBAL_DEFAULT_TIMEOUT): if port == 0: ...
The following example works with Python 2.7.4. ``` import xmlrpclib from xmlrpclib import * import httplib def Server(url, *args, **kwargs): t = TimeoutTransport(kwargs.get('timeout', 20)) if 'timeout' in kwargs: del kwargs['timeout'] kwargs['transport'] = t server = xmlrpclib.Server(url, *args...
372,365
I am using xmlrpclib.ServerProxy to make RPC calls to a remote server. If there is not a network connection to the server it takes the default 10 seconds to return a socket.gaierror to my program. This is annoying when doing development without a network connection, or if the remote server is down. Is there a way to ...
2008/12/16
[ "https://Stackoverflow.com/questions/372365", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22306/" ]
An more straightforward solution is at: <http://www.devpicayune.com/entry/200609191448> ``` import xmlrpclib import socket x = xmlrpclib.ServerProxy('http:1.2.3.4') socket.setdefaulttimeout(10) #set the timeout to 10 seconds x.func_name(args) #times out after 10 seconds socket.setdefaultt...
Here is code that works on Python 2.7 (probably for other 2.x versions of Python) without raising *AttributeError, instance has no attribute 'getresponse'*. ``` class TimeoutHTTPConnection(httplib.HTTPConnection): def connect(self): httplib.HTTPConnection.connect(self) self.sock.settimeout(self.ti...
372,365
I am using xmlrpclib.ServerProxy to make RPC calls to a remote server. If there is not a network connection to the server it takes the default 10 seconds to return a socket.gaierror to my program. This is annoying when doing development without a network connection, or if the remote server is down. Is there a way to ...
2008/12/16
[ "https://Stackoverflow.com/questions/372365", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22306/" ]
clean non global version. ``` import xmlrpclib import httplib class TimeoutHTTPConnection(httplib.HTTPConnection): def connect(self): httplib.HTTPConnection.connect(self) self.sock.settimeout(self.timeout) class TimeoutHTTP(httplib.HTTP): _connection_class = TimeoutHTTPConnection def set...
Here is code that works on Python 2.7 (probably for other 2.x versions of Python) without raising *AttributeError, instance has no attribute 'getresponse'*. ``` class TimeoutHTTPConnection(httplib.HTTPConnection): def connect(self): httplib.HTTPConnection.connect(self) self.sock.settimeout(self.ti...
6,399,190
I am researching CMS systems, something I know little about. I am an animator and generate large numbers of files and have many source files that I use. There are so many its become difficult to manage them all and keep some organization. Can someone suggest an Open Source CMS solution that could aid in organizing thes...
2011/06/18
[ "https://Stackoverflow.com/questions/6399190", "https://Stackoverflow.com", "https://Stackoverflow.com/users/804896/" ]
Apparently, these systems are called "digital asset management systems" when they're not about text but about images. An overview about open-source ones can be found [here](http://www.opensourcedigitalassetmanagement.org/)
[Razuna](http://www.razuna.org/) looks quite good, I'm looking for a similar solution - though i probably won't have trillions of textures files or something, I do have loads of .psd/.ai/.indd formats, which a number of systems offer thumbnail preview to a certain degree. One thing to look out for is whether the syste...
6,399,190
I am researching CMS systems, something I know little about. I am an animator and generate large numbers of files and have many source files that I use. There are so many its become difficult to manage them all and keep some organization. Can someone suggest an Open Source CMS solution that could aid in organizing thes...
2011/06/18
[ "https://Stackoverflow.com/questions/6399190", "https://Stackoverflow.com", "https://Stackoverflow.com/users/804896/" ]
Apparently, these systems are called "digital asset management systems" when they're not about text but about images. An overview about open-source ones can be found [here](http://www.opensourcedigitalassetmanagement.org/)
We're looking for something as well, preferably cloud-based, but that's not a requirement. We're looking right now at Razuna. It has a lot of great features. The organization seems very flexilble, which is great. The But it doesn't seem very mature in some ways. The development team I think is small. Some features do...
6,399,190
I am researching CMS systems, something I know little about. I am an animator and generate large numbers of files and have many source files that I use. There are so many its become difficult to manage them all and keep some organization. Can someone suggest an Open Source CMS solution that could aid in organizing thes...
2011/06/18
[ "https://Stackoverflow.com/questions/6399190", "https://Stackoverflow.com", "https://Stackoverflow.com/users/804896/" ]
Apparently, these systems are called "digital asset management systems" when they're not about text but about images. An overview about open-source ones can be found [here](http://www.opensourcedigitalassetmanagement.org/)
In the end, Razuna was just too immature for us. It's a great effort. The dev team is obviously talented and sincere. In a couple of years they may well have a great product. I wish them luck. We've settled on a commercial service, WebDAM. It some ways it's very comprehensive and does a lot of things well. The price i...