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
35,739,371
If multi thread concurrently query the following SQL to a database(postgresql): ``` UPDATE mytable SET n=n+1 WHERE n=0; ``` Whether or not 'n' will finally greater than 1
2016/03/02
[ "https://Stackoverflow.com/questions/35739371", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1044094/" ]
Update will take write lock, so no concurrent operation will actually happen on the table. ``` n will not be greater than 1. ```
> > `update mytable set n=n+1 where n=0;` > > > Whether or not 'n' will finally greater than 1 > > > No it will not be "*greater than 1*" because adding `1` to `0` yields `1`. So `n` will be **equal** to `1`, not "*greater than 1*". And yes, it is *guaranteed* that all values that were previously 0 (zero) are ...
58,211,116
I am having an issue where in a website i am working on a form will not run the code when the button is pressed, this litterally worked and i have no idea what changed that broke it. ``` <form action="{{action('Admin\AdminResponsibleController@assign')}}" method="post" id="assignParty"> @csrf First name: <inp...
2019/10/03
[ "https://Stackoverflow.com/questions/58211116", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11506451/" ]
A solution that worked for me: **If you are using PHP,** add this line to the beginning ``` header('Set-Cookie: cross-site-cookie=name; SameSite=None; Secure'); ``` --- **Update** Here is a useful resource including examples in JavaScript, Node.js, PHP, and Python <https://github.com/GoogleChromeLabs/samesite-...
Does your .htaccess file contain a header unset cookie code? and you use cdn and its cache like cloudflare. If so, just delete the code in the htaccess
58,211,116
I am having an issue where in a website i am working on a form will not run the code when the button is pressed, this litterally worked and i have no idea what changed that broke it. ``` <form action="{{action('Admin\AdminResponsibleController@assign')}}" method="post" id="assignParty"> @csrf First name: <inp...
2019/10/03
[ "https://Stackoverflow.com/questions/58211116", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11506451/" ]
There's nothing you can do until Google's developers/admins (and developers/admins of other external resources) modify their scripts/servers to include the necessary cookies settings to the cookies they generate when your website includes them. See here more more info: <https://github.com/GoogleChromeLabs/samesite-exa...
Does your .htaccess file contain a header unset cookie code? and you use cdn and its cache like cloudflare. If so, just delete the code in the htaccess
58,211,116
I am having an issue where in a website i am working on a form will not run the code when the button is pressed, this litterally worked and i have no idea what changed that broke it. ``` <form action="{{action('Admin\AdminResponsibleController@assign')}}" method="post" id="assignParty"> @csrf First name: <inp...
2019/10/03
[ "https://Stackoverflow.com/questions/58211116", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11506451/" ]
A solution that worked for me: **If you are using PHP,** add this line to the beginning ``` header('Set-Cookie: cross-site-cookie=name; SameSite=None; Secure'); ``` --- **Update** Here is a useful resource including examples in JavaScript, Node.js, PHP, and Python <https://github.com/GoogleChromeLabs/samesite-...
There's nothing you can do until Google's developers/admins (and developers/admins of other external resources) modify their scripts/servers to include the necessary cookies settings to the cookies they generate when your website includes them. See here more more info: <https://github.com/GoogleChromeLabs/samesite-exa...
36,973
I was trying to look up some locked posts to check on because of the recent feature requests, and saw that there was no **islocked:1** option. This would help complete the set of advanced search options.
2010/01/25
[ "https://meta.stackexchange.com/questions/36973", "https://meta.stackexchange.com", "https://meta.stackexchange.com/users/13295/" ]
In case that isn't implemented, for whatever reason, you can find out if a post has ever been locked by [using the following Google Search](http://www.google.com/search?hl=en&q=site%3Astackoverflow.com+%22Post+locked+by%22&aq=f&aql=&aqi=&oq=&cad=h): ``` site:stackoverflow.com "Post locked by" -migrated ``` Type that...
This got implemented a while back when we switched over to using Elasticsearch. To search for locked posts, use `locked:1`.
225
In particular, I don't mean mere alternate spellings like *colour*, *honour*, but words that are entirely different: using *lift* instead of *elevator*, *fridge* instead of *refrigerator* etc. What is the common outlook on using them in plain informal speech in the US? What are the chances they won't be recognized at ...
2013/01/24
[ "https://ell.stackexchange.com/questions/225", "https://ell.stackexchange.com", "https://ell.stackexchange.com/users/30/" ]
AFAIK *most* Americans know the British equivalents for their words, and vice versa. Some people even use them (some Britons use the American words). It wouldn't be considered weird - an American would just assume you were British, or learnt British English. It wouldn't be considered unwelcome either, by the vast majo...
I think there is a chance that some of the less common words would not be recognised at all between the AmE and BritE, but it does depend on what sphere the words are from. The common ones are fairly well known, others not so: From cars: Trunk, boot. Hood, bonnet. Rocker panel, sill etc From culinary: Bitter sweet...
225
In particular, I don't mean mere alternate spellings like *colour*, *honour*, but words that are entirely different: using *lift* instead of *elevator*, *fridge* instead of *refrigerator* etc. What is the common outlook on using them in plain informal speech in the US? What are the chances they won't be recognized at ...
2013/01/24
[ "https://ell.stackexchange.com/questions/225", "https://ell.stackexchange.com", "https://ell.stackexchange.com/users/30/" ]
AFAIK *most* Americans know the British equivalents for their words, and vice versa. Some people even use them (some Britons use the American words). It wouldn't be considered weird - an American would just assume you were British, or learnt British English. It wouldn't be considered unwelcome either, by the vast majo...
In general, I would say no, but there are some exceptions. The first time I encountered a sign in a public place saying "toilet," I felt it was quite crude. Americans would only use that word for the actual fixture, preferring restroom for such contexts.
225
In particular, I don't mean mere alternate spellings like *colour*, *honour*, but words that are entirely different: using *lift* instead of *elevator*, *fridge* instead of *refrigerator* etc. What is the common outlook on using them in plain informal speech in the US? What are the chances they won't be recognized at ...
2013/01/24
[ "https://ell.stackexchange.com/questions/225", "https://ell.stackexchange.com", "https://ell.stackexchange.com/users/30/" ]
I think there is a chance that some of the less common words would not be recognised at all between the AmE and BritE, but it does depend on what sphere the words are from. The common ones are fairly well known, others not so: From cars: Trunk, boot. Hood, bonnet. Rocker panel, sill etc From culinary: Bitter sweet...
In general, I would say no, but there are some exceptions. The first time I encountered a sign in a public place saying "toilet," I felt it was quite crude. Americans would only use that word for the actual fixture, preferring restroom for such contexts.
57,778,576
``` this.setState({ object1: { ...object2 }, }); ``` I know it does something to the state. but I'm not able to understand what it means? Is this a technique in JS/React?
2019/09/03
[ "https://Stackoverflow.com/questions/57778576", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12016641/" ]
You are essentially setting `object1` to be the same as `object2` via [spread syntax](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_syntax#Syntax). For example: ``` this.state = { object1: { hello: 'world' } }; const object2 = { foo: 'bar' }; this.setState({ object1: { ...object2...
This is spread operator and you can read more about it here <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_syntax#Spread_in_object_literals>[enter link description here](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_syntax#Spread_in_object_liter...
53,577,333
``` <html> <body> <div class = "container"> <audio id="music" src="/music/orgmusic.mp3"type="audio/mpeg"></audio> <img id="titleimg"src = "images/titleimage.png"> <div class = "gameContainer"> </div> <div id ="play">Press Spacebar To Return To Main Menu!</div> </div> <link rel="styleshee...
2018/12/02
[ "https://Stackoverflow.com/questions/53577333", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10411317/" ]
You are do stuff based on Id and you set class in HTML. ``` <div class = "gameContainer"> // Hear you used class </div> ``` In Js you used `document.getElementById("gameContainer").innerHTML` ``` <div id="gameContainer"> // Hear you have to used id instead of class </div> ```
```js document.getElementById("gameContainer").innerHTML = "hi this is words"; ``` ```html <html> <body> <div class = "container"> <audio id="music" src="/music/orgmusic.mp3"type="audio/mpeg"></audio> <img id="titleimg"src = "images/titleimage.png"> <div id = "gameContainer"class = "gameContainer"...
547,765
Let us assume that we have constructed a $G$-principal bundle $P$ over the manifold $M$ (for a curved space-time this is a $GL$-bundle, for a gauge theory I take $U(1)$ = electrodynamics) and the corresponding associated bundle $P\_F$ with a typical fibre $F$ being a vector space. 1) At first, I am confused about the ...
2020/04/29
[ "https://physics.stackexchange.com/questions/547765", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/235936/" ]
There are too many questions to answer in one go. I'll address the questions of sections of associated bundles and gauge choices. Let's work in a local patch in $P$ with coordinates $(x,g)$ such that $\pi:P\to M$ is $\pi(x,g)=x$. We want a section of an associated bundle $P\_V= P\times \_G V$ where $V$ is a represen...
> > Then the section $\sigma$ fixes a representative in each equivalence class in $P\times F$, and this is interpreted as fixing the frame/gauge, is this correct? > > > Yes. You can also think of $P$ as a collection of all (abstract) reference frames of a given type over all spacetime points. A local section of $P...
1,638,552
There are three events: $A$ and $B$ and $C$. We know $P(A|B) = P(B|C) = 0.5$. Then $P(A|C)$ should be? Is it $0.5\cdot0.5=0.25$? The question only provide the above information and the question provide the following choices. $a. 0.25$ $b. 0.5$ $c. 1$ $d. 0$ $e.$ None of the above is correct
2016/02/03
[ "https://math.stackexchange.com/questions/1638552", "https://math.stackexchange.com", "https://math.stackexchange.com/users/109403/" ]
Why should you be able to tell? You only know how $A$ behaves in the presence of $B$, and how $B$ behaves in the presence of $C$. How could you possibly deduce how $A$ behaves in the presence of $C$, regardless of the presence or absence of $B$? Examples to show that you can't: If the events are all independent, then...
You should know at least the probability of the single events to tell. If you'd know you could apply the *Bayes* theorem and solve.
70,930,865
I need to transform the following input table to the output table where output table will have ranges instead of per day data. Input: ``` Asin day is_instock -------------------- A1 1 0 A1 2 0 A1 3 1 A1 4 1 A1 5 0 A2 3 0 A2 4 0 ``` Output: ``` asin start_...
2022/01/31
[ "https://Stackoverflow.com/questions/70930865", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8538910/" ]
This is what is referred to as the "gaps and islands" problem. There's a fair amount of articles and references you can find if you use that search term. Solution below: ``` /*Data setup*/ DROP TABLE IF EXISTS #Stock CREATE TABLE #Stock ([Asin] Char(2),[day] int,is_instock bit) INSERT INTO #Stock VALUES ('A1',1,0) ...
You are looking for an operator described in the temporal data literature, and "best known" as PACK. This operator was not made part of the SQL standard (SQL:2011) that introduced the temporal features of the literature into the language, so there's extremely little chance you're going to find anything to support you ...
1,551,746
I'm having some trouble with a problem in linear algebra: Let $A$ be a matrix with dimensions $m \times n$ and $B$ also a matrix but with dimensions $n \times m$ which is **not** a null matrix. (That's all that's written - I assume A may or may not be a null matrix). Given that $AB=0$: 1. Prove there is a non-trivia...
2015/11/29
[ "https://math.stackexchange.com/questions/1551746", "https://math.stackexchange.com", "https://math.stackexchange.com/users/281986/" ]
Solved it. 1. If $AB=0$ that means that matrix $A$ multiplied by any column vector $b$ in $B$ will be equal to the zero vector. Since we know that $B\neq 0$, there must be at least one column vector $b$ in $B$ that **isn't** the zero vector. So to summarize, since $A$ multiplied by any column vector in $B$ returns 0 a...
1. A has to be linearly dependent, since it is the case that $AB = 0$. If B is not the zero matrix, then it has to be the case that there is some row of $A$ in Reduce Row Echelon Form that is a zero row. Because of this, it is linearly dependent. It therefore does not matter if $A$ is the zero matrix or not, since the ...
13,927,782
I have a gridview. its data source is a datatable that is loaded from the database. In this gridview, i have a template column. ``` <asp:TemplateField HeaderText="Product Type" SortExpression="ProductID"> <ItemStyle CssClass="MP-table-tb-display-item" /> ...
2012/12/18
[ "https://Stackoverflow.com/questions/13927782", "https://Stackoverflow.com", "https://Stackoverflow.com/users/869233/" ]
use this instead ``` <asp:hyperlink Target="_blank" NavigateUrl='<%# Eval("SourceURL") %>' Visible = '<%# Eval("SourceURL") == null ? false : true %>' > ``` Similarly you could use the `<a>` tag to control its visiblity. The if condition would go in Style attribue and not in href attribute. Something like this `...
Try this : ``` <a target="_blank" href='<%#(String.IsNullOrEmpty(Eval("SourceURL").ToString()) ? "" : Eval("SourceURL"))'%> style='display: none'>Source</a> ``` Thanks
44,660,534
I have data in this form ``` V1 V2 1 6 1 2 6 5 3 1 0 4 1 6 5 1 385 6 5 4 7 5 6 8 5 98 9 0 1 10 0 2 ``` and I want to convert it into ``` V1 V2 V3 V4 1 6 1 ...
2017/06/20
[ "https://Stackoverflow.com/questions/44660534", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8190198/" ]
There are a couple of ways of answering this. We say that a pointer value is the address of a memory location. But different computers have used different addressing schemes for memory. C is a higher-level language, portable across many kinds of computers. C does not mandate a particular memory architecture. As far as...
A pointer is a short arrangement of bytes. Via a cast, C allows to pretend these bytes represent an integer. ``` Type* p = ...; intptr_t i = (intptr_t)p; ``` This is occasionally (but rarely) useful when you need to pass a pointer to an interface expecting an integer. To recover the pointer, one just reverses the ca...
16,881,529
``` <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <style> .square { width: 200px; height:200px; background-color:#F99; } #myimage { position: absolute; top: 0; left: 0; z-index: 10; } .table { position:re...
2013/06/02
[ "https://Stackoverflow.com/questions/16881529", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2399158/" ]
I have a solution for your problem. You can use ``` android:layout_centerInParent="true". ``` But it will make your "Total Amount" TextView in center. But you want You last character touch the center point. So you can make another "Blank TextView" and place it on center using centerInparent and then put your "Tota...
You can do it use `LinearLayout` in `RelativeLayout` and then each of your Element (ie. `Button`& `TextView`) can use `layout_weight` property. ``` <RelativeLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_below="@+id/Tour_Expense_List_De...
1,105,132
I have a list of check boxes. For the check boxes that are selected, I change it's name before submitting. In FF the function works. In IE I get: > > A script on this page is causing Internet Explorer to run slowly. If it > continues to run, your computer may > become unresponsive. > > > Do you want to abort the sc...
2009/07/09
[ "https://Stackoverflow.com/questions/1105132", "https://Stackoverflow.com", "https://Stackoverflow.com/users/52256/" ]
Internet Explorer is buggy. It doesn't return a live nodelist but just a snapshot. Using a framework such as jQuery is your best bet in achieving full compatibility.
Edit: This is wrong, Nick is right. Although I'd look extra hard to make sure IE actually implements the NodeList correctly, since it still sounds like what you're running into is an infinite loop in IE. Thanks for the heads up, Nick, I learned something new today. Javascript never ceases to surprise me :) --- Just ...
1,105,132
I have a list of check boxes. For the check boxes that are selected, I change it's name before submitting. In FF the function works. In IE I get: > > A script on this page is causing Internet Explorer to run slowly. If it > continues to run, your computer may > become unresponsive. > > > Do you want to abort the sc...
2009/07/09
[ "https://Stackoverflow.com/questions/1105132", "https://Stackoverflow.com", "https://Stackoverflow.com/users/52256/" ]
I would avoid writing a script like that - it is like having an for/i++ loop calling a function that changes the index as a side effect - unpredictable. You run an iterator through NodeList while modifying the list from inside the loop. You cannot be sure it works until you happen to know exactly the way NodeList is im...
Edit: This is wrong, Nick is right. Although I'd look extra hard to make sure IE actually implements the NodeList correctly, since it still sounds like what you're running into is an infinite loop in IE. Thanks for the heads up, Nick, I learned something new today. Javascript never ceases to surprise me :) --- Just ...
1,105,132
I have a list of check boxes. For the check boxes that are selected, I change it's name before submitting. In FF the function works. In IE I get: > > A script on this page is causing Internet Explorer to run slowly. If it > continues to run, your computer may > become unresponsive. > > > Do you want to abort the sc...
2009/07/09
[ "https://Stackoverflow.com/questions/1105132", "https://Stackoverflow.com", "https://Stackoverflow.com/users/52256/" ]
This should work with a both a live and a non-live list. Personally, though, I'd try to find some way to output the original page so that the server can figure out which elements to use, instead of relying on javascript to do it. ``` function sub() { var x=document.getElementsByName("user"); var nodesToChan...
Edit: This is wrong, Nick is right. Although I'd look extra hard to make sure IE actually implements the NodeList correctly, since it still sounds like what you're running into is an infinite loop in IE. Thanks for the heads up, Nick, I learned something new today. Javascript never ceases to surprise me :) --- Just ...
1,105,132
I have a list of check boxes. For the check boxes that are selected, I change it's name before submitting. In FF the function works. In IE I get: > > A script on this page is causing Internet Explorer to run slowly. If it > continues to run, your computer may > become unresponsive. > > > Do you want to abort the sc...
2009/07/09
[ "https://Stackoverflow.com/questions/1105132", "https://Stackoverflow.com", "https://Stackoverflow.com/users/52256/" ]
I would avoid writing a script like that - it is like having an for/i++ loop calling a function that changes the index as a side effect - unpredictable. You run an iterator through NodeList while modifying the list from inside the loop. You cannot be sure it works until you happen to know exactly the way NodeList is im...
Internet Explorer is buggy. It doesn't return a live nodelist but just a snapshot. Using a framework such as jQuery is your best bet in achieving full compatibility.
1,105,132
I have a list of check boxes. For the check boxes that are selected, I change it's name before submitting. In FF the function works. In IE I get: > > A script on this page is causing Internet Explorer to run slowly. If it > continues to run, your computer may > become unresponsive. > > > Do you want to abort the sc...
2009/07/09
[ "https://Stackoverflow.com/questions/1105132", "https://Stackoverflow.com", "https://Stackoverflow.com/users/52256/" ]
This should work with a both a live and a non-live list. Personally, though, I'd try to find some way to output the original page so that the server can figure out which elements to use, instead of relying on javascript to do it. ``` function sub() { var x=document.getElementsByName("user"); var nodesToChan...
Internet Explorer is buggy. It doesn't return a live nodelist but just a snapshot. Using a framework such as jQuery is your best bet in achieving full compatibility.
7,023,857
I have simple controller: ``` public class TestController : Controller { public ActionResult Test(string r) { return View(); } } ``` I have simple View Test.cshtml: ``` <h2>@ViewContext.RouteData.Values["r"]</h2> @using (Html.BeginForm("Test", "Test")) { ...
2011/08/11
[ "https://Stackoverflow.com/questions/7023857", "https://Stackoverflow.com", "https://Stackoverflow.com/users/190646/" ]
You cannot do this without javascript. There are two types of methods that exist when submitting a `<form>`: GET and POST. When you use POST (which is the default), the form is POSTed to the url but all data entered in input fields is part of the POST body, so it is not part of the url. When you use GET, the input fiel...
As far as you are saying to post the form to `Html.BeginForm("Test", "Test")` you will be always posted back to the same page. A solution could be to use an explicit Redirect to the action using 'RedirectToAction' (in view) or you can use javascript to change the form's action: ``` <input type="text" name="r" onchan...
7,023,857
I have simple controller: ``` public class TestController : Controller { public ActionResult Test(string r) { return View(); } } ``` I have simple View Test.cshtml: ``` <h2>@ViewContext.RouteData.Values["r"]</h2> @using (Html.BeginForm("Test", "Test")) { ...
2011/08/11
[ "https://Stackoverflow.com/questions/7023857", "https://Stackoverflow.com", "https://Stackoverflow.com/users/190646/" ]
I'm super late to the party, but just wanted to post a solution for reference. Let's assume that this form has more than just a strong as it's input. Assuming there are other inputs, we can wrap up the inputs of the form into a class in our model, called `TestModel` whose properties maps to the id's of the form's input...
As far as you are saying to post the form to `Html.BeginForm("Test", "Test")` you will be always posted back to the same page. A solution could be to use an explicit Redirect to the action using 'RedirectToAction' (in view) or you can use javascript to change the form's action: ``` <input type="text" name="r" onchan...
12,598,156
I'm writing C++ code for a graphics program and in it I have to collect all coordinates to later parse them.I'm trying to use vectors for the same but the following error is returned: > > Debug Assertion failed > > Program:.... > > File:.... > > Line 932 > > Expression:Vector subscript out of range > ...
2012/09/26
[ "https://Stackoverflow.com/questions/12598156", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1699477/" ]
This error can be caused if `coordinates.size()<= i`, the exception is raised which gives you information that you tried to access element out of bounds of vector
You only push one element into coordinates, so the only valid index is `0`. `coordinates[1]` is thus one past the end of the vector. Further there are two conditions that could prevent the one `push_back` that is there at all from happening, so it might very well be, that your vector is empty. But you access the secon...
10,192,672
I am new to Java language and cannot understand the behavior of finally block in this program. This program should exit after printing BC whereas it is printing BCD. Please help. ``` class Main { public static void main(String [] args) { try { badMethod(); System...
2012/04/17
[ "https://Stackoverflow.com/questions/10192672", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1151746/" ]
There is nothing to cause the program to exit. The whole point of a `catch` block is to *catch* the exception and prevent it from propagating further. After catching an exception, execution continues.
Finally is called at the end of a try/catch block. It gets called even if the try fails and the catch is executed. The `Finally`block itself is only not executed if the program is killed somehow (JVM dies, forced to close, etc.) In your example D is executing because it is outside of the try/catch/finally{} blocks. T...
10,192,672
I am new to Java language and cannot understand the behavior of finally block in this program. This program should exit after printing BC whereas it is printing BCD. Please help. ``` class Main { public static void main(String [] args) { try { badMethod(); System...
2012/04/17
[ "https://Stackoverflow.com/questions/10192672", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1151746/" ]
You're catching the exception (in the catch block) and not rethrowing it - so you're effectively *handling* the exception, and execution then proceeds as if it weren't thrown. The program only exits because it reaches the end of the `main` method - it's not like it's terminated abruptly. If you change your code to *ei...
There is nothing to cause the program to exit. The whole point of a `catch` block is to *catch* the exception and prevent it from propagating further. After catching an exception, execution continues.
10,192,672
I am new to Java language and cannot understand the behavior of finally block in this program. This program should exit after printing BC whereas it is printing BCD. Please help. ``` class Main { public static void main(String [] args) { try { badMethod(); System...
2012/04/17
[ "https://Stackoverflow.com/questions/10192672", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1151746/" ]
The `finally` block doesn't finalize the program, it just ensure to execute every time the try catch block runs whereas there is an exception or not..
Finally is the must executable block of java program. It allows all the allocated resources of the currently running program to get free and make it available for the other applications if required. This is mainly used when we share the common resources like Database or the devices.
10,192,672
I am new to Java language and cannot understand the behavior of finally block in this program. This program should exit after printing BC whereas it is printing BCD. Please help. ``` class Main { public static void main(String [] args) { try { badMethod(); System...
2012/04/17
[ "https://Stackoverflow.com/questions/10192672", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1151746/" ]
The `finally` block doesn't finalize the program, it just ensure to execute every time the try catch block runs whereas there is an exception or not..
It would print `BC` if you re-throw the exception in `catch` block. ``` catch (Exception ex) { System.out.print("B"); throw ex; } ``` Then you'll have to declare your main as ``` public static void main(String [] args) throws Exception ```
10,192,672
I am new to Java language and cannot understand the behavior of finally block in this program. This program should exit after printing BC whereas it is printing BCD. Please help. ``` class Main { public static void main(String [] args) { try { badMethod(); System...
2012/04/17
[ "https://Stackoverflow.com/questions/10192672", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1151746/" ]
You're catching the exception (in the catch block) and not rethrowing it - so you're effectively *handling* the exception, and execution then proceeds as if it weren't thrown. The program only exits because it reaches the end of the `main` method - it's not like it's terminated abruptly. If you change your code to *ei...
Which is correct. The above code will. 1. Try to execute `badMethod` and will fail 2. Execute the code in `catch` 3. Execute the code in `finally` 4. Continue in execution - print out the D
10,192,672
I am new to Java language and cannot understand the behavior of finally block in this program. This program should exit after printing BC whereas it is printing BCD. Please help. ``` class Main { public static void main(String [] args) { try { badMethod(); System...
2012/04/17
[ "https://Stackoverflow.com/questions/10192672", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1151746/" ]
The `finally` block doesn't finalize the program, it just ensure to execute every time the try catch block runs whereas there is an exception or not..
The `finally` block is processed after the `try` or `catch` block runs (depending on whether an exception was thrown/caught or not). If the exceptions were all caught properly and handles by the `catch`, it will run `finally` and then continue running the rest of the method.
10,192,672
I am new to Java language and cannot understand the behavior of finally block in this program. This program should exit after printing BC whereas it is printing BCD. Please help. ``` class Main { public static void main(String [] args) { try { badMethod(); System...
2012/04/17
[ "https://Stackoverflow.com/questions/10192672", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1151746/" ]
There is nothing to cause the program to exit. The whole point of a `catch` block is to *catch* the exception and prevent it from propagating further. After catching an exception, execution continues.
Finally is the must executable block of java program. It allows all the allocated resources of the currently running program to get free and make it available for the other applications if required. This is mainly used when we share the common resources like Database or the devices.
10,192,672
I am new to Java language and cannot understand the behavior of finally block in this program. This program should exit after printing BC whereas it is printing BCD. Please help. ``` class Main { public static void main(String [] args) { try { badMethod(); System...
2012/04/17
[ "https://Stackoverflow.com/questions/10192672", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1151746/" ]
The `finally` block doesn't finalize the program, it just ensure to execute every time the try catch block runs whereas there is an exception or not..
Which is correct. The above code will. 1. Try to execute `badMethod` and will fail 2. Execute the code in `catch` 3. Execute the code in `finally` 4. Continue in execution - print out the D
10,192,672
I am new to Java language and cannot understand the behavior of finally block in this program. This program should exit after printing BC whereas it is printing BCD. Please help. ``` class Main { public static void main(String [] args) { try { badMethod(); System...
2012/04/17
[ "https://Stackoverflow.com/questions/10192672", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1151746/" ]
You're catching the exception (in the catch block) and not rethrowing it - so you're effectively *handling* the exception, and execution then proceeds as if it weren't thrown. The program only exits because it reaches the end of the `main` method - it's not like it's terminated abruptly. If you change your code to *ei...
Think of the finally block as an independent block of code(s) you'll still expect your method to continue executing irrespective of whether an exception occurs or not. And so in your case, `badMethod` throws an exception which is consequently caught by the catch block, your main then continue by executing the finally ...
10,192,672
I am new to Java language and cannot understand the behavior of finally block in this program. This program should exit after printing BC whereas it is printing BCD. Please help. ``` class Main { public static void main(String [] args) { try { badMethod(); System...
2012/04/17
[ "https://Stackoverflow.com/questions/10192672", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1151746/" ]
There is nothing to cause the program to exit. The whole point of a `catch` block is to *catch* the exception and prevent it from propagating further. After catching an exception, execution continues.
Think of the finally block as an independent block of code(s) you'll still expect your method to continue executing irrespective of whether an exception occurs or not. And so in your case, `badMethod` throws an exception which is consequently caught by the catch block, your main then continue by executing the finally ...
28,924,130
In other words, is it possible to create a Google Chrome app and package it as an .exe or .app so that users won't need Chrome to be installed to run it? I'm working with NWJS at this time (previously known as Node-Webkit) but I'm interested in the bluetooth/usb APIs from Chrome.
2015/03/08
[ "https://Stackoverflow.com/questions/28924130", "https://Stackoverflow.com", "https://Stackoverflow.com/users/816478/" ]
The editor [Atom](https://atom.io/) uses this approach. It is distributed as a binary on many platforms, but underneath is using Chromium and io.js. The cross-platform desktop application shell portion of atom has been broken into its own project: [atom-shell](https://github.com/atom/atom-shell). In essence, you are ...
Generally, you cannot distribute Chrome Apps the way you are asking, no. Sorry.
19,559,241
Hi I just tried testing if the error function would return an alert but it didn't fire. I altered the url link hoping that it would generate an alert since it won't be able to find or get json data. All I am getting is "Uncaught TypeError: Cannot read property 'length' of undefined jquery-1.9.1.min.js:3" ``` $(documen...
2013/10/24
[ "https://Stackoverflow.com/questions/19559241", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2826276/" ]
I think the problem is that, when you make the AJAX request your code is executing the `success` callback, not the `error` callback. Thus when you execute: `$.each(data.posts, function(key, val) {` The `$.each` function is trying to get the length of `data` which is NULL. It doesn't look right that you have defined ...
Maybe here `$.each(data.posts,` data.posts is undefined and that's why you get an error. Log `data` in success callback and see what it contains.
19,559,241
Hi I just tried testing if the error function would return an alert but it didn't fire. I altered the url link hoping that it would generate an alert since it won't be able to find or get json data. All I am getting is "Uncaught TypeError: Cannot read property 'length' of undefined jquery-1.9.1.min.js:3" ``` $(documen...
2013/10/24
[ "https://Stackoverflow.com/questions/19559241", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2826276/" ]
I think the problem is that, when you make the AJAX request your code is executing the `success` callback, not the `error` callback. Thus when you execute: `$.each(data.posts, function(key, val) {` The `$.each` function is trying to get the length of `data` which is NULL. It doesn't look right that you have defined ...
I created [a clean Fiddle](http://jsfiddle.net/GcXTA/). Opening the given URL gives a 301 redirect followed by a 200 JSON response. The HTTP status code says that everything is fine, so jQuery doesn't know there was an error. You mixed up two different concepts here: jQuery's error callback is for network errors and a...
19,559,241
Hi I just tried testing if the error function would return an alert but it didn't fire. I altered the url link hoping that it would generate an alert since it won't be able to find or get json data. All I am getting is "Uncaught TypeError: Cannot read property 'length' of undefined jquery-1.9.1.min.js:3" ``` $(documen...
2013/10/24
[ "https://Stackoverflow.com/questions/19559241", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2826276/" ]
I think the problem is that, when you make the AJAX request your code is executing the `success` callback, not the `error` callback. Thus when you execute: `$.each(data.posts, function(key, val) {` The `$.each` function is trying to get the length of `data` which is NULL. It doesn't look right that you have defined ...
Thanks everyone for your input. I did take on-board all suggestions. Recommendation from Jason seems to had made more sense so while investigating his suggestion I came to this [site](http://api.jquery.com/jQuery.ajax/) to read up more about jasonCallback. removing the jasonCallback option though did not fix the issue ...
8,774,314
Alright, so here is the property I have ``` public List<String> names{ get{ lock(_names) return _names; } set{ lock(_names) _names = value } } private List<String> _names; ``` and now say I do a foreach on names like this ``` foreach(String s in names) { ...
2012/01/08
[ "https://Stackoverflow.com/questions/8774314", "https://Stackoverflow.com", "https://Stackoverflow.com/users/222054/" ]
The `get_Names` method will only get called once, and the lock will be over (there will be **no** lock) during the iteration of the items. This is probably not what you intend and you should probably go for a much granular lock, such as: ``` lock (someLockObject) { foreach(String s in names) { Console....
It's not locked inside the `foreach`. It's locked once, to `get` a reference, then iterated. (Also, your `lock` statements inside the property are currently unnecessary; those operations are atomic.) Most likely, you should be locking outside the body of the loop, and where the collection is modified. --- In respons...
8,774,314
Alright, so here is the property I have ``` public List<String> names{ get{ lock(_names) return _names; } set{ lock(_names) _names = value } } private List<String> _names; ``` and now say I do a foreach on names like this ``` foreach(String s in names) { ...
2012/01/08
[ "https://Stackoverflow.com/questions/8774314", "https://Stackoverflow.com", "https://Stackoverflow.com/users/222054/" ]
The `get_Names` method will only get called once, and the lock will be over (there will be **no** lock) during the iteration of the items. This is probably not what you intend and you should probably go for a much granular lock, such as: ``` lock (someLockObject) { foreach(String s in names) { Console....
``` lock(_names) return _names; ``` is short for: ``` try { Monitor.Enter(_names); return _names; } finally { Monitor.Exit(_names); } ``` which is the equivalent of: ``` Monitor.Enter(_names); Monitor.Exit(_names); return _names; ``` seeing it that way should make it more clear that the lock is not necess...
8,774,314
Alright, so here is the property I have ``` public List<String> names{ get{ lock(_names) return _names; } set{ lock(_names) _names = value } } private List<String> _names; ``` and now say I do a foreach on names like this ``` foreach(String s in names) { ...
2012/01/08
[ "https://Stackoverflow.com/questions/8774314", "https://Stackoverflow.com", "https://Stackoverflow.com/users/222054/" ]
The `get_Names` method will only get called once, and the lock will be over (there will be **no** lock) during the iteration of the items. This is probably not what you intend and you should probably go for a much granular lock, such as: ``` lock (someLockObject) { foreach(String s in names) { Console....
The foreach loop locks \_names briefly to get the List<>, but unlocks before it starts the actual loop. Locking on \_names may not be exactly good form, I'd introduce another object to lock on that isn't changed by the actual set operation that's supposedly locked.
8,774,314
Alright, so here is the property I have ``` public List<String> names{ get{ lock(_names) return _names; } set{ lock(_names) _names = value } } private List<String> _names; ``` and now say I do a foreach on names like this ``` foreach(String s in names) { ...
2012/01/08
[ "https://Stackoverflow.com/questions/8774314", "https://Stackoverflow.com", "https://Stackoverflow.com/users/222054/" ]
The `get_Names` method will only get called once, and the lock will be over (there will be **no** lock) during the iteration of the items. This is probably not what you intend and you should probably go for a much granular lock, such as: ``` lock (someLockObject) { foreach(String s in names) { Console....
In this scenario your lock is effectively doing nothing. The getter roughly expands into the following ``` public List<string> names { get { Monitor.Enter(_names); try { return _names; } finally { Monitor.Exit(_names); } } } ``` This means access to the resource is synchronized only ...
8,774,314
Alright, so here is the property I have ``` public List<String> names{ get{ lock(_names) return _names; } set{ lock(_names) _names = value } } private List<String> _names; ``` and now say I do a foreach on names like this ``` foreach(String s in names) { ...
2012/01/08
[ "https://Stackoverflow.com/questions/8774314", "https://Stackoverflow.com", "https://Stackoverflow.com/users/222054/" ]
The `get_Names` method will only get called once, and the lock will be over (there will be **no** lock) during the iteration of the items. This is probably not what you intend and you should probably go for a much granular lock, such as: ``` lock (someLockObject) { foreach(String s in names) { Console....
It's locked only one inside `_get` method of the property: ``` void Main() { Test test = new Test(); test.CallMe(); } public class Test { List<string> _names= new List<string>(); public List<string> Names { get { Console.WriteLine("Lock"); ...
249,357
I am currently working on my first website. I have no idea where to start on the CSS page, or if there are any standards that I should be following. I would appreciate any links or first-hand advise.
2008/10/30
[ "https://Stackoverflow.com/questions/249357", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2598/" ]
Have a look at [CSS Systems for writing maintainable CSS](http://natbat.net/2008/Sep/28/css-systems/) by Natalie Downe of [ClearLeft](http://clearleft.com/). There are a lot of great concepts in her presentation (I recommend downloading the PDF because her notes are pretty detailed). I think her presentation is aimed...
I have been building websites for 5 years now and still learn a lot by reading this every so often: <http://code.google.com/speed/page-speed/docs/rendering.html> Also check out <http://www.zeldman.com> blog on CSS. This guy is a legend in the web world.
249,357
I am currently working on my first website. I have no idea where to start on the CSS page, or if there are any standards that I should be following. I would appreciate any links or first-hand advise.
2008/10/30
[ "https://Stackoverflow.com/questions/249357", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2598/" ]
You can save yourself a lot of headache by **understanding specificity**. When you set a rule for something, if there is a conflicting rule, **specificity decides which rule wins**. A quick (incomplete) rundown: An element-wide rule (like `p {color:green;}`) will be trumped by: A class-specific rule (like `p.side...
I have been building websites for 5 years now and still learn a lot by reading this every so often: <http://code.google.com/speed/page-speed/docs/rendering.html> Also check out <http://www.zeldman.com> blog on CSS. This guy is a legend in the web world.
249,357
I am currently working on my first website. I have no idea where to start on the CSS page, or if there are any standards that I should be following. I would appreciate any links or first-hand advise.
2008/10/30
[ "https://Stackoverflow.com/questions/249357", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2598/" ]
You can save yourself a lot of headache by **understanding specificity**. When you set a rule for something, if there is a conflicting rule, **specificity decides which rule wins**. A quick (incomplete) rundown: An element-wide rule (like `p {color:green;}`) will be trumped by: A class-specific rule (like `p.side...
i learned what i need to know from Mc Farland's Missing Manual (Oreilly book), and by staring at a [sample rails' app's](http://oreilly.com/catalog/9780596527440/index.html) stylesheet. That works pretty well, google "example / sample projects / app / repositories" for PHP, ASP.net, whatever you're using.
249,357
I am currently working on my first website. I have no idea where to start on the CSS page, or if there are any standards that I should be following. I would appreciate any links or first-hand advise.
2008/10/30
[ "https://Stackoverflow.com/questions/249357", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2598/" ]
Not exactly beginner material, but [A List Apart](http://www.alistapart.com/) is a very interesting blog about CSS and its intricacies. I find the W3 School's [pages on CSS](http://www.w3schools.com/css/) great for reference.
If you use a reset script - it'll iron out some of the quirks between different browsers. Doing so has made my life easier. I've seen some people swear by simply using ``` * { padding: 0; margin: 0; } ``` But you can also use more thorough implementations - like the one in the YUI library... <http://developer.yaho...
249,357
I am currently working on my first website. I have no idea where to start on the CSS page, or if there are any standards that I should be following. I would appreciate any links or first-hand advise.
2008/10/30
[ "https://Stackoverflow.com/questions/249357", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2598/" ]
Resist the urge to over-specify class or id names. Use contextual or descendent selectors. This let's you easily define styles for areas of your page, but save on the sanity of having to manage and remember tons of names. For example: ``` <ul id="nav"> <li class="navItem"><span class="itemText">Nav Item</span></li>...
Not exactly beginner material, but [A List Apart](http://www.alistapart.com/) is a very interesting blog about CSS and its intricacies. I find the W3 School's [pages on CSS](http://www.w3schools.com/css/) great for reference.
249,357
I am currently working on my first website. I have no idea where to start on the CSS page, or if there are any standards that I should be following. I would appreciate any links or first-hand advise.
2008/10/30
[ "https://Stackoverflow.com/questions/249357", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2598/" ]
Aside from the great resources pointed in the other answers, here are some tips to structure the way you work on the CSS: Do the work in the following order... 1. Lay out the semantic structure of your page in HTML. Make sure it's right without any CSS. * Create the basic layout of the page in a CSS - columns, heade...
The [Complete CSS Guide on westciv.com](http://www.westciv.com/style_master/academy/css_tutorial/index.html) has an exhaustive amount of information on CSS. It's a great place to start diving in.
249,357
I am currently working on my first website. I have no idea where to start on the CSS page, or if there are any standards that I should be following. I would appreciate any links or first-hand advise.
2008/10/30
[ "https://Stackoverflow.com/questions/249357", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2598/" ]
Resist the urge to over-specify class or id names. Use contextual or descendent selectors. This let's you easily define styles for areas of your page, but save on the sanity of having to manage and remember tons of names. For example: ``` <ul id="nav"> <li class="navItem"><span class="itemText">Nav Item</span></li>...
My first tip would be to always use only external style sheets - try to avoid inline or header styles. Use classes and ids as much as possible. I second the suggestion for [A List Apart](http://www.alistapart.com/) Although not very pretty, and sometimes a little old, [HTML Help by WDG](http://htmlhelp.com/reference...
249,357
I am currently working on my first website. I have no idea where to start on the CSS page, or if there are any standards that I should be following. I would appreciate any links or first-hand advise.
2008/10/30
[ "https://Stackoverflow.com/questions/249357", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2598/" ]
An error that beginners make quite often: CSS is semantic as well. Try to express concepts, not formats. Contrived example: ### Wrong: ``` div.red { color: red; } ``` as opposed to: ### Good: ``` div.error { color: red; } ``` CSS should be the formatting companion for the concepts you use on your web s...
Have a look at [CSS Systems for writing maintainable CSS](http://natbat.net/2008/Sep/28/css-systems/) by Natalie Downe of [ClearLeft](http://clearleft.com/). There are a lot of great concepts in her presentation (I recommend downloading the PDF because her notes are pretty detailed). I think her presentation is aimed...
249,357
I am currently working on my first website. I have no idea where to start on the CSS page, or if there are any standards that I should be following. I would appreciate any links or first-hand advise.
2008/10/30
[ "https://Stackoverflow.com/questions/249357", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2598/" ]
You've already gotten a good set of answers regarding your question put here is a point you may find usefull. Use Firefox with Firebug extension. If you don't have firefox I recommend you install it even if it's just for this. Firebug allows you to select element from the page and shows you th applied css. Then you ca...
i learned what i need to know from Mc Farland's Missing Manual (Oreilly book), and by staring at a [sample rails' app's](http://oreilly.com/catalog/9780596527440/index.html) stylesheet. That works pretty well, google "example / sample projects / app / repositories" for PHP, ASP.net, whatever you're using.
249,357
I am currently working on my first website. I have no idea where to start on the CSS page, or if there are any standards that I should be following. I would appreciate any links or first-hand advise.
2008/10/30
[ "https://Stackoverflow.com/questions/249357", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2598/" ]
This is a decent overview: <http://www.onlinetools.org/articles/cssguides.html>
I have been building websites for 5 years now and still learn a lot by reading this every so often: <http://code.google.com/speed/page-speed/docs/rendering.html> Also check out <http://www.zeldman.com> blog on CSS. This guy is a legend in the web world.
256,551
I'm using this code: ``` numbzip=`ls *.plt.zip | wc -l` &>/dev/null ``` and trying to get rid of the output in the command window. No files ending on .plt.zip exist so it comes back with: ``` ls: cannot access *.plt.zip: No such file or directory ``` whatever I try it always writes this line in the command win...
2016/01/20
[ "https://unix.stackexchange.com/questions/256551", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/152384/" ]
If your xargs implementation support `-0` option: ``` tr '\n' '\0' <file | xargs -0 -l1 mkdir ``` POSIXly: ``` while IFS= read -r file; do mkdir -p -- "$file" done <file ``` [(Note that using `while` loop to process text considered bad practice in shell script)](https://unix.stackexchange.com/q/169716/38906)
Make the names null terminated and split there: ``` cat file | tr '\n' '\0' | xargs -l1 -0 mkdir ``` `tr` will replace the newline that `cat` output with `\0`, and the `-0` flags in `xargs` is telling it to split arguments on the `\0`.
256,551
I'm using this code: ``` numbzip=`ls *.plt.zip | wc -l` &>/dev/null ``` and trying to get rid of the output in the command window. No files ending on .plt.zip exist so it comes back with: ``` ls: cannot access *.plt.zip: No such file or directory ``` whatever I try it always writes this line in the command win...
2016/01/20
[ "https://unix.stackexchange.com/questions/256551", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/152384/" ]
Use **`-d '\n'`** with your `xargs` command: ``` cat file | xargs -d '\n' -l1 mkdir ``` From manpage: ``` -d delim Input items are terminated by the specified character. Quotes and backslash are not special; every character in the input is taken literally. Disables the end-of-file ...
If your xargs implementation support `-0` option: ``` tr '\n' '\0' <file | xargs -0 -l1 mkdir ``` POSIXly: ``` while IFS= read -r file; do mkdir -p -- "$file" done <file ``` [(Note that using `while` loop to process text considered bad practice in shell script)](https://unix.stackexchange.com/q/169716/38906)
256,551
I'm using this code: ``` numbzip=`ls *.plt.zip | wc -l` &>/dev/null ``` and trying to get rid of the output in the command window. No files ending on .plt.zip exist so it comes back with: ``` ls: cannot access *.plt.zip: No such file or directory ``` whatever I try it always writes this line in the command win...
2016/01/20
[ "https://unix.stackexchange.com/questions/256551", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/152384/" ]
If your xargs implementation support `-0` option: ``` tr '\n' '\0' <file | xargs -0 -l1 mkdir ``` POSIXly: ``` while IFS= read -r file; do mkdir -p -- "$file" done <file ``` [(Note that using `while` loop to process text considered bad practice in shell script)](https://unix.stackexchange.com/q/169716/38906)
You can do this POSIXLY with the `-I` option: ``` xargs -I % mkdir % < file ``` <http://pubs.opengroup.org/onlinepubs/9699919799/utilities/xargs.html>
256,551
I'm using this code: ``` numbzip=`ls *.plt.zip | wc -l` &>/dev/null ``` and trying to get rid of the output in the command window. No files ending on .plt.zip exist so it comes back with: ``` ls: cannot access *.plt.zip: No such file or directory ``` whatever I try it always writes this line in the command win...
2016/01/20
[ "https://unix.stackexchange.com/questions/256551", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/152384/" ]
If your xargs implementation support `-0` option: ``` tr '\n' '\0' <file | xargs -0 -l1 mkdir ``` POSIXly: ``` while IFS= read -r file; do mkdir -p -- "$file" done <file ``` [(Note that using `while` loop to process text considered bad practice in shell script)](https://unix.stackexchange.com/q/169716/38906)
`xargs` expects a very special input format where arguments are delimited by blanks or newlines (sometimes other forms of vertical whitespace, sometimes dependant on the current locale), and where single quote, double quotes and backslash can be used to escape them (but in a different way from shell quotes). `-l1` is ...
256,551
I'm using this code: ``` numbzip=`ls *.plt.zip | wc -l` &>/dev/null ``` and trying to get rid of the output in the command window. No files ending on .plt.zip exist so it comes back with: ``` ls: cannot access *.plt.zip: No such file or directory ``` whatever I try it always writes this line in the command win...
2016/01/20
[ "https://unix.stackexchange.com/questions/256551", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/152384/" ]
Use **`-d '\n'`** with your `xargs` command: ``` cat file | xargs -d '\n' -l1 mkdir ``` From manpage: ``` -d delim Input items are terminated by the specified character. Quotes and backslash are not special; every character in the input is taken literally. Disables the end-of-file ...
Make the names null terminated and split there: ``` cat file | tr '\n' '\0' | xargs -l1 -0 mkdir ``` `tr` will replace the newline that `cat` output with `\0`, and the `-0` flags in `xargs` is telling it to split arguments on the `\0`.
256,551
I'm using this code: ``` numbzip=`ls *.plt.zip | wc -l` &>/dev/null ``` and trying to get rid of the output in the command window. No files ending on .plt.zip exist so it comes back with: ``` ls: cannot access *.plt.zip: No such file or directory ``` whatever I try it always writes this line in the command win...
2016/01/20
[ "https://unix.stackexchange.com/questions/256551", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/152384/" ]
Make the names null terminated and split there: ``` cat file | tr '\n' '\0' | xargs -l1 -0 mkdir ``` `tr` will replace the newline that `cat` output with `\0`, and the `-0` flags in `xargs` is telling it to split arguments on the `\0`.
You can do this POSIXLY with the `-I` option: ``` xargs -I % mkdir % < file ``` <http://pubs.opengroup.org/onlinepubs/9699919799/utilities/xargs.html>
256,551
I'm using this code: ``` numbzip=`ls *.plt.zip | wc -l` &>/dev/null ``` and trying to get rid of the output in the command window. No files ending on .plt.zip exist so it comes back with: ``` ls: cannot access *.plt.zip: No such file or directory ``` whatever I try it always writes this line in the command win...
2016/01/20
[ "https://unix.stackexchange.com/questions/256551", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/152384/" ]
Use **`-d '\n'`** with your `xargs` command: ``` cat file | xargs -d '\n' -l1 mkdir ``` From manpage: ``` -d delim Input items are terminated by the specified character. Quotes and backslash are not special; every character in the input is taken literally. Disables the end-of-file ...
You can do this POSIXLY with the `-I` option: ``` xargs -I % mkdir % < file ``` <http://pubs.opengroup.org/onlinepubs/9699919799/utilities/xargs.html>
256,551
I'm using this code: ``` numbzip=`ls *.plt.zip | wc -l` &>/dev/null ``` and trying to get rid of the output in the command window. No files ending on .plt.zip exist so it comes back with: ``` ls: cannot access *.plt.zip: No such file or directory ``` whatever I try it always writes this line in the command win...
2016/01/20
[ "https://unix.stackexchange.com/questions/256551", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/152384/" ]
Use **`-d '\n'`** with your `xargs` command: ``` cat file | xargs -d '\n' -l1 mkdir ``` From manpage: ``` -d delim Input items are terminated by the specified character. Quotes and backslash are not special; every character in the input is taken literally. Disables the end-of-file ...
`xargs` expects a very special input format where arguments are delimited by blanks or newlines (sometimes other forms of vertical whitespace, sometimes dependant on the current locale), and where single quote, double quotes and backslash can be used to escape them (but in a different way from shell quotes). `-l1` is ...
256,551
I'm using this code: ``` numbzip=`ls *.plt.zip | wc -l` &>/dev/null ``` and trying to get rid of the output in the command window. No files ending on .plt.zip exist so it comes back with: ``` ls: cannot access *.plt.zip: No such file or directory ``` whatever I try it always writes this line in the command win...
2016/01/20
[ "https://unix.stackexchange.com/questions/256551", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/152384/" ]
`xargs` expects a very special input format where arguments are delimited by blanks or newlines (sometimes other forms of vertical whitespace, sometimes dependant on the current locale), and where single quote, double quotes and backslash can be used to escape them (but in a different way from shell quotes). `-l1` is ...
You can do this POSIXLY with the `-I` option: ``` xargs -I % mkdir % < file ``` <http://pubs.opengroup.org/onlinepubs/9699919799/utilities/xargs.html>
38,194,057
How do I declare, versus define a struct, such as for data shared between multiple files. I understand the idea when defining primitives. So, for example, I might have: ``` extern int myvalue; /* in shared header file */ ``` and ``` int myvalue = 5; /* in data.c file */ ``` But, how do I do the same thing for ...
2016/07/05
[ "https://Stackoverflow.com/questions/38194057", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1655700/" ]
To declare an *instance of* a struct (or a pointer to one): ``` extern STRLIST* ptrList; extern STRLIST list; ``` To define it: ``` STRLIST* ptrList; STRLIST list; ``` To declare a *struct type*: ``` typedef struct STRLIST; ``` To define it: ``` typedef struct { size_t size; char * strings[]; } STRLIS...
Every name in C, before it is used, has to be declared. To declare is (just) to explain what type the name describes. This is information for the compiler how to treat the object of this name. Definition, on the other hand, instructs the compiler to reserve memory for the object. A definition is always also a declarat...
38,194,057
How do I declare, versus define a struct, such as for data shared between multiple files. I understand the idea when defining primitives. So, for example, I might have: ``` extern int myvalue; /* in shared header file */ ``` and ``` int myvalue = 5; /* in data.c file */ ``` But, how do I do the same thing for ...
2016/07/05
[ "https://Stackoverflow.com/questions/38194057", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1655700/" ]
To declare an *instance of* a struct (or a pointer to one): ``` extern STRLIST* ptrList; extern STRLIST list; ``` To define it: ``` STRLIST* ptrList; STRLIST list; ``` To declare a *struct type*: ``` typedef struct STRLIST; ``` To define it: ``` typedef struct { size_t size; char * strings[]; } STRLIS...
Just a small clarification to dbush's answer: From the latest C standard (Feb 2020): <http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2494.pdf> > > 6.7.2.1 Structure and union specifiers (p1) > > > Syntax > > > 1 struct-or-union-specifier: > > > struct-or-union attribute-specifier-sequenceopt identifieropt ...
38,194,057
How do I declare, versus define a struct, such as for data shared between multiple files. I understand the idea when defining primitives. So, for example, I might have: ``` extern int myvalue; /* in shared header file */ ``` and ``` int myvalue = 5; /* in data.c file */ ``` But, how do I do the same thing for ...
2016/07/05
[ "https://Stackoverflow.com/questions/38194057", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1655700/" ]
Every name in C, before it is used, has to be declared. To declare is (just) to explain what type the name describes. This is information for the compiler how to treat the object of this name. Definition, on the other hand, instructs the compiler to reserve memory for the object. A definition is always also a declarat...
Just a small clarification to dbush's answer: From the latest C standard (Feb 2020): <http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2494.pdf> > > 6.7.2.1 Structure and union specifiers (p1) > > > Syntax > > > 1 struct-or-union-specifier: > > > struct-or-union attribute-specifier-sequenceopt identifieropt ...
25,912
There is a dataset that contains body mass ($x$) and metabolic rate ($y$) from many different organisms. It is common to fit the data to the model of the form $y=ax^b$ and estimate the parameters $a$ and $b$ (see [Kleiber's law](http://en.wikipedia.org/wiki/Kleiber%27s_law) and [The Metabolic theory of ecology](http://...
2014/12/16
[ "https://biology.stackexchange.com/questions/25912", "https://biology.stackexchange.com", "https://biology.stackexchange.com/users/11555/" ]
**Short answer**: The results of the two approaches (linear versus non-linear model) do not match because the relationship between body mass and basal metabolic rate does not strictly follow a power law. --- It is indeed the case that if the relationship between two variables follows a power law the two approaches sh...
What will happen during log-conversion is that the large scale variation that happens in data points with high value will be compressed. This will actually produce an estimate that should be more robust toward outliers (because their deviation from the mean will be compressed). If the data was perfectly modeled (i.e. ...
11,003,318
I am trying to make a gridview with large icon for an app but I couldn't find any tutorial about modifying a cell size on a grid layout on android. Can anyone give me an example or a link about it please? Thanks.
2012/06/12
[ "https://Stackoverflow.com/questions/11003318", "https://Stackoverflow.com", "https://Stackoverflow.com/users/869360/" ]
just like the other [adapterViews](http://developer.android.com/reference/android/widget/AdapterView.html) ,on gridView (which extends adapterView) the size that is determined of the children is based on the size that they want to become , as written in the android API: > > An AdapterView is a view whose children are...
Did you try `android:numColumns="2"`
57,340,976
I have the following list: ``` <ul class="nav nav-pills nav-pills-warning nav-pills-icons justify-content-center" role="tablist"> <li class="nav-item"> <a class="nav-link" data-toggle="tab" data-role-slug="admin" href="#" "="" role="tablist"> <i class="material-icons">supervisor_account</i> Adm...
2019/08/03
[ "https://Stackoverflow.com/questions/57340976", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10950788/" ]
Just use `this` inside the event handler. It will be the `<a>` instance the event occurred on regardless of what child is targeted Or alternatively `e.currentTarget` will return the same instance as well ``` $('a[data-role-slug]').on('click', function (e) { let roleSlug = $(this).data('role-slug'); /...
That's because the target of an event is the element that actually received it, not the one is bubbled up to. However you can try to be sneaky, maybe try something like this ? ``` $('a[data-role-slug]').each((index, element) => { element.on('click', () => { let roleSlug = element.data('role-slug'); ...
1,068,974
I have a PL/SQL function in an Oracle database that I can't change. This function takes a parameter which identifies an entity, creates a copy of that entity and then returns the ID of the copy. This looks something like FUNCTION copy\_entity(id IN NUMBER) RETURN NUMBER I need to call this function from Hibernate. I ...
2009/07/01
[ "https://Stackoverflow.com/questions/1068974", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3587/" ]
The problem is that ie6/ie7 will expand an empty element to the height of your font. You can get around this by adding `font-size:0` and `line-height:0` to `.menu ul li.separator`. A better solution would be to add a thicker bottom border to the `<li>` that is before the separator. ``` .menu ul li.sep {border-bottom...
Maybe you should try setting your `li` as follows: ``` li{ display:block; float:left; height:myHeight; clear:right;//may be necessary, can't check with IE7 } ``` This is what I've done with similar problems.
1,068,974
I have a PL/SQL function in an Oracle database that I can't change. This function takes a parameter which identifies an entity, creates a copy of that entity and then returns the ID of the copy. This looks something like FUNCTION copy\_entity(id IN NUMBER) RETURN NUMBER I need to call this function from Hibernate. I ...
2009/07/01
[ "https://Stackoverflow.com/questions/1068974", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3587/" ]
The problem is that ie6/ie7 will expand an empty element to the height of your font. You can get around this by adding `font-size:0` and `line-height:0` to `.menu ul li.separator`. A better solution would be to add a thicker bottom border to the `<li>` that is before the separator. ``` .menu ul li.sep {border-bottom...
Set your css for the LI to `display: block;`.
1,068,974
I have a PL/SQL function in an Oracle database that I can't change. This function takes a parameter which identifies an entity, creates a copy of that entity and then returns the ID of the copy. This looks something like FUNCTION copy\_entity(id IN NUMBER) RETURN NUMBER I need to call this function from Hibernate. I ...
2009/07/01
[ "https://Stackoverflow.com/questions/1068974", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3587/" ]
The problem is that ie6/ie7 will expand an empty element to the height of your font. You can get around this by adding `font-size:0` and `line-height:0` to `.menu ul li.separator`. A better solution would be to add a thicker bottom border to the `<li>` that is before the separator. ``` .menu ul li.sep {border-bottom...
In addition to Daniel A. White answer you can experiment with line-height to center your text vertically and create the necessary height.
1,068,974
I have a PL/SQL function in an Oracle database that I can't change. This function takes a parameter which identifies an entity, creates a copy of that entity and then returns the ID of the copy. This looks something like FUNCTION copy\_entity(id IN NUMBER) RETURN NUMBER I need to call this function from Hibernate. I ...
2009/07/01
[ "https://Stackoverflow.com/questions/1068974", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3587/" ]
The problem is that ie6/ie7 will expand an empty element to the height of your font. You can get around this by adding `font-size:0` and `line-height:0` to `.menu ul li.separator`. A better solution would be to add a thicker bottom border to the `<li>` that is before the separator. ``` .menu ul li.sep {border-bottom...
Have you tried adding a `line-height` attribute to `.menu ul li`? Else have you tried using horizontal rule `<hr>` as a separator instead? If you're using horizontal rule, you can set the `margin-top` and `margin-bottom` to `0px` and see what happens. Can't guarantee it looks the same on IE and other browsers, but at ...
1,068,974
I have a PL/SQL function in an Oracle database that I can't change. This function takes a parameter which identifies an entity, creates a copy of that entity and then returns the ID of the copy. This looks something like FUNCTION copy\_entity(id IN NUMBER) RETURN NUMBER I need to call this function from Hibernate. I ...
2009/07/01
[ "https://Stackoverflow.com/questions/1068974", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3587/" ]
The problem is that ie6/ie7 will expand an empty element to the height of your font. You can get around this by adding `font-size:0` and `line-height:0` to `.menu ul li.separator`. A better solution would be to add a thicker bottom border to the `<li>` that is before the separator. ``` .menu ul li.sep {border-bottom...
Do what was suggested in the previous posts. If these changes are causing issues in browsers other than IE, you can do the following to have only IE use them: ``` .selector { prop1 : val1; /* default value for all browsers */ *prop1 : val2; /* only IE will pick this one up and it will override the initial valu...
1,068,974
I have a PL/SQL function in an Oracle database that I can't change. This function takes a parameter which identifies an entity, creates a copy of that entity and then returns the ID of the copy. This looks something like FUNCTION copy\_entity(id IN NUMBER) RETURN NUMBER I need to call this function from Hibernate. I ...
2009/07/01
[ "https://Stackoverflow.com/questions/1068974", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3587/" ]
Set your css for the LI to `display: block;`.
Have you tried adding a `line-height` attribute to `.menu ul li`? Else have you tried using horizontal rule `<hr>` as a separator instead? If you're using horizontal rule, you can set the `margin-top` and `margin-bottom` to `0px` and see what happens. Can't guarantee it looks the same on IE and other browsers, but at ...
1,068,974
I have a PL/SQL function in an Oracle database that I can't change. This function takes a parameter which identifies an entity, creates a copy of that entity and then returns the ID of the copy. This looks something like FUNCTION copy\_entity(id IN NUMBER) RETURN NUMBER I need to call this function from Hibernate. I ...
2009/07/01
[ "https://Stackoverflow.com/questions/1068974", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3587/" ]
Set your css for the LI to `display: block;`.
Do what was suggested in the previous posts. If these changes are causing issues in browsers other than IE, you can do the following to have only IE use them: ``` .selector { prop1 : val1; /* default value for all browsers */ *prop1 : val2; /* only IE will pick this one up and it will override the initial valu...
1,068,974
I have a PL/SQL function in an Oracle database that I can't change. This function takes a parameter which identifies an entity, creates a copy of that entity and then returns the ID of the copy. This looks something like FUNCTION copy\_entity(id IN NUMBER) RETURN NUMBER I need to call this function from Hibernate. I ...
2009/07/01
[ "https://Stackoverflow.com/questions/1068974", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3587/" ]
Maybe you should try setting your `li` as follows: ``` li{ display:block; float:left; height:myHeight; clear:right;//may be necessary, can't check with IE7 } ``` This is what I've done with similar problems.
In addition to Daniel A. White answer you can experiment with line-height to center your text vertically and create the necessary height.
1,068,974
I have a PL/SQL function in an Oracle database that I can't change. This function takes a parameter which identifies an entity, creates a copy of that entity and then returns the ID of the copy. This looks something like FUNCTION copy\_entity(id IN NUMBER) RETURN NUMBER I need to call this function from Hibernate. I ...
2009/07/01
[ "https://Stackoverflow.com/questions/1068974", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3587/" ]
Maybe you should try setting your `li` as follows: ``` li{ display:block; float:left; height:myHeight; clear:right;//may be necessary, can't check with IE7 } ``` This is what I've done with similar problems.
Do what was suggested in the previous posts. If these changes are causing issues in browsers other than IE, you can do the following to have only IE use them: ``` .selector { prop1 : val1; /* default value for all browsers */ *prop1 : val2; /* only IE will pick this one up and it will override the initial valu...
1,068,974
I have a PL/SQL function in an Oracle database that I can't change. This function takes a parameter which identifies an entity, creates a copy of that entity and then returns the ID of the copy. This looks something like FUNCTION copy\_entity(id IN NUMBER) RETURN NUMBER I need to call this function from Hibernate. I ...
2009/07/01
[ "https://Stackoverflow.com/questions/1068974", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3587/" ]
Set your css for the LI to `display: block;`.
In addition to Daniel A. White answer you can experiment with line-height to center your text vertically and create the necessary height.
20,826,290
I'm trying to merge a two ImageViews to make them look like as one, but there's bounding box that prevents them to be totally next to each other. ![ImageViews bounding box](https://i.stack.imgur.com/rOS19.jpg) ``` <ImageView android:id="@+id/imageView1" android:layout_width="200dp" android:layout_height="...
2013/12/29
[ "https://Stackoverflow.com/questions/20826290", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1426489/" ]
``` set below two properties android:adjustViewBounds="true" android:scaleType="fitEnd" ```
in android gives some default padding 8dp for view: try this: ``` <ImageView android:id="@+id/imageView1" android:layout_width="200dp" android:layout_height="200dp" android:layout_margin="0dp" android:padding="-4dp" android:src="@drawable/plant" /> <ImageView android:layout_width="200dp"...
20,826,290
I'm trying to merge a two ImageViews to make them look like as one, but there's bounding box that prevents them to be totally next to each other. ![ImageViews bounding box](https://i.stack.imgur.com/rOS19.jpg) ``` <ImageView android:id="@+id/imageView1" android:layout_width="200dp" android:layout_height="...
2013/12/29
[ "https://Stackoverflow.com/questions/20826290", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1426489/" ]
``` set below two properties android:adjustViewBounds="true" android:scaleType="fitEnd" ```
Set top margin for the below image as -5 dp i.e. `android:layout_marginTop="-5dp"` Below is your updated code ``` <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" a...
20,826,290
I'm trying to merge a two ImageViews to make them look like as one, but there's bounding box that prevents them to be totally next to each other. ![ImageViews bounding box](https://i.stack.imgur.com/rOS19.jpg) ``` <ImageView android:id="@+id/imageView1" android:layout_width="200dp" android:layout_height="...
2013/12/29
[ "https://Stackoverflow.com/questions/20826290", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1426489/" ]
``` set below two properties android:adjustViewBounds="true" android:scaleType="fitEnd" ```
You need to set the [scaleType](http://developer.android.com/reference/android/widget/ImageView.html#attr_android%3ascaleType) property of the ImageView.
20,826,290
I'm trying to merge a two ImageViews to make them look like as one, but there's bounding box that prevents them to be totally next to each other. ![ImageViews bounding box](https://i.stack.imgur.com/rOS19.jpg) ``` <ImageView android:id="@+id/imageView1" android:layout_width="200dp" android:layout_height="...
2013/12/29
[ "https://Stackoverflow.com/questions/20826290", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1426489/" ]
``` set below two properties android:adjustViewBounds="true" android:scaleType="fitEnd" ```
Push them to relative layout and place them manually, some thing like this: ``` <RelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content"> <ImageView android:id="@+id/imageView1" android:layout_width="200dp" android:layout_height="200d...
20,826,290
I'm trying to merge a two ImageViews to make them look like as one, but there's bounding box that prevents them to be totally next to each other. ![ImageViews bounding box](https://i.stack.imgur.com/rOS19.jpg) ``` <ImageView android:id="@+id/imageView1" android:layout_width="200dp" android:layout_height="...
2013/12/29
[ "https://Stackoverflow.com/questions/20826290", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1426489/" ]
in android gives some default padding 8dp for view: try this: ``` <ImageView android:id="@+id/imageView1" android:layout_width="200dp" android:layout_height="200dp" android:layout_margin="0dp" android:padding="-4dp" android:src="@drawable/plant" /> <ImageView android:layout_width="200dp"...
Set top margin for the below image as -5 dp i.e. `android:layout_marginTop="-5dp"` Below is your updated code ``` <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" a...
20,826,290
I'm trying to merge a two ImageViews to make them look like as one, but there's bounding box that prevents them to be totally next to each other. ![ImageViews bounding box](https://i.stack.imgur.com/rOS19.jpg) ``` <ImageView android:id="@+id/imageView1" android:layout_width="200dp" android:layout_height="...
2013/12/29
[ "https://Stackoverflow.com/questions/20826290", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1426489/" ]
in android gives some default padding 8dp for view: try this: ``` <ImageView android:id="@+id/imageView1" android:layout_width="200dp" android:layout_height="200dp" android:layout_margin="0dp" android:padding="-4dp" android:src="@drawable/plant" /> <ImageView android:layout_width="200dp"...
You need to set the [scaleType](http://developer.android.com/reference/android/widget/ImageView.html#attr_android%3ascaleType) property of the ImageView.
20,826,290
I'm trying to merge a two ImageViews to make them look like as one, but there's bounding box that prevents them to be totally next to each other. ![ImageViews bounding box](https://i.stack.imgur.com/rOS19.jpg) ``` <ImageView android:id="@+id/imageView1" android:layout_width="200dp" android:layout_height="...
2013/12/29
[ "https://Stackoverflow.com/questions/20826290", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1426489/" ]
in android gives some default padding 8dp for view: try this: ``` <ImageView android:id="@+id/imageView1" android:layout_width="200dp" android:layout_height="200dp" android:layout_margin="0dp" android:padding="-4dp" android:src="@drawable/plant" /> <ImageView android:layout_width="200dp"...
Push them to relative layout and place them manually, some thing like this: ``` <RelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content"> <ImageView android:id="@+id/imageView1" android:layout_width="200dp" android:layout_height="200d...
248,370
I want to build a flat ground level deck approx 25x26ft. I have very limited space between the ground and the door, so it needs to be streamlined. I plan to use 3 26’ 2x10 as primary frame supports and than use 12’ 2x10 as joists with 12” spacing. Wondering how many posts do I need for each 26’ piece of lumber? Will 4...
2022/04/27
[ "https://diy.stackexchange.com/questions/248370", "https://diy.stackexchange.com", "https://diy.stackexchange.com/users/25752/" ]
Contact your power company. Say: "Am I correct that my smart meter has a large contactor in it, so that you can remotely shut off my power with a few keystrokes on your computer?" And "If I have you do that for 10 minutes, will you require a permit and inspection to turn it back on?" And this may lead to a short co...
There's a couple of ways to play this, assuming you don't want to just YOLO this and shove them on with your bare hand (not the greatest idea) 1. Ask your utility to kill the power to your house for a few minutes. They might not like coming out for something this minor, but I can't say how well this will or won't go. ...
36,552,197
I'm trying to implement a Fast Fourier Transform (Radix-2) in MS's Excel VBA. The code I'm using pulls data from a range in the worksheet, does the calculations, then dumps the results in the adjacent columns. What I'm having trouble with is 1) know what to do with the resulting X[k] arrays, and 2) matching these resul...
2016/04/11
[ "https://Stackoverflow.com/questions/36552197", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5748328/" ]
I went back through the process and determined my problem was that I had assigned the wrong values to the twiddle factors, TFactor\_N1 and TFactor\_N2. After fixing this problem and adjusting which values are displayed, I was able to get the same results as Excel's built in FFT. The fixed code is show below. ``` Sub E...
The function call is not good Call Called\_Core.DecimationInTime(WS, n, 2 ^ x, x, TFactor\_N1, TFactor\_N2) It should be: Call DecimationInTime(WS, n, 2 ^ x, x, TFactor\_N1, TFactor\_N2)
36,552,197
I'm trying to implement a Fast Fourier Transform (Radix-2) in MS's Excel VBA. The code I'm using pulls data from a range in the worksheet, does the calculations, then dumps the results in the adjacent columns. What I'm having trouble with is 1) know what to do with the resulting X[k] arrays, and 2) matching these resul...
2016/04/11
[ "https://Stackoverflow.com/questions/36552197", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5748328/" ]
I went back through the process and determined my problem was that I had assigned the wrong values to the twiddle factors, TFactor\_N1 and TFactor\_N2. After fixing this problem and adjusting which values are displayed, I was able to get the same results as Excel's built in FFT. The fixed code is show below. ``` Sub E...
Implementing FFT in ExcelVBA is kind of involved, but not too bad. For typical applications, the input signal is usually real-valued, not coplex-valued. This would be the case if you were measuring a dynamic signal from a velocity or acceleration transducer, or microphone. Shown here is a DFT that will convert any numb...
46,465,366
I tried to create a spring boot deployable war file and then deployed it to weblogic 12c. Application startup failed with the exception: ``` Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled. ERROR SpringApplication - Application startup failed org...
2017/09/28
[ "https://Stackoverflow.com/questions/46465366", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3432316/" ]
I wasted 8 hours in this loophole, piecing together various clues I got from other people facing the same problem. \*\*solution 1 is to deploy your application as exploded WAR in Weblogic. I assume you already prepared your spring boot application for deployment on Weblogic, there are several tricks on this topic but ...
Without seeing your code, or knowing your spring-boot version, it's difficult to really diagnose your issue. There were small changes here and there that had to be to get my spring-boot app to run on WebLogic. Thinks like inclusion of weblogic.xml and some dependencies here and there The main one being the addition of...
46,465,366
I tried to create a spring boot deployable war file and then deployed it to weblogic 12c. Application startup failed with the exception: ``` Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled. ERROR SpringApplication - Application startup failed org...
2017/09/28
[ "https://Stackoverflow.com/questions/46465366", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3432316/" ]
I wasted 8 hours in this loophole, piecing together various clues I got from other people facing the same problem. \*\*solution 1 is to deploy your application as exploded WAR in Weblogic. I assume you already prepared your spring boot application for deployment on Weblogic, there are several tricks on this topic but ...
I've figured out the cause of this issue. It's a bit odd in weblogic when deploying war file. It creates an internal \_wl\_cls\_gen.jar file to package all files for /WEB-INF/classes folder. but the application still looks for resources in match directory like /j2ee/wl12/cp\_domain/servers/cp\_msp01/tmp/\_WL\_user/cp...
38,819
[This question on SO](https://stackoverflow.com/questions/2215314/sybase-central-issues-on-64-bit-windows-2008-server-r2) clearly belongs elsewhere, but the asker already put a bounty on the question. If the question is migrated, does the rep get refunded? Does the question continue to be a bounty question on the targ...
2010/02/09
[ "https://meta.stackexchange.com/questions/38819", "https://meta.stackexchange.com", "https://meta.stackexchange.com/users/136558/" ]
The correct procedure would be to flag for moderator attention. If required diamond moderators can migrate the question by removing the bounty. * Bounty is removed and refunded * Question is closed and migrated I have flagged the question as well for the SO mods to look at it
Questions with bounties on them can't be closed or migrated (unless by a superpower of mod type personage). It'll stay until the bounty's accepted or expired.
38,819
[This question on SO](https://stackoverflow.com/questions/2215314/sybase-central-issues-on-64-bit-windows-2008-server-r2) clearly belongs elsewhere, but the asker already put a bounty on the question. If the question is migrated, does the rep get refunded? Does the question continue to be a bounty question on the targ...
2010/02/09
[ "https://meta.stackexchange.com/questions/38819", "https://meta.stackexchange.com", "https://meta.stackexchange.com/users/136558/" ]
Questions with bounties on them can't be closed or migrated (unless by a superpower of mod type personage). It'll stay until the bounty's accepted or expired.
I can confirm that if the question is migrated and the bounty was not awarded in the original page, then the reputation is refunded. I proposed +100 bounty for this [question](https://math.stackexchange.com/questions/33617/a-sequence-of-order-statistics-from-an-iid-sequence) in stats.SE which I could not award, so I su...
38,819
[This question on SO](https://stackoverflow.com/questions/2215314/sybase-central-issues-on-64-bit-windows-2008-server-r2) clearly belongs elsewhere, but the asker already put a bounty on the question. If the question is migrated, does the rep get refunded? Does the question continue to be a bounty question on the targ...
2010/02/09
[ "https://meta.stackexchange.com/questions/38819", "https://meta.stackexchange.com", "https://meta.stackexchange.com/users/136558/" ]
The correct procedure would be to flag for moderator attention. If required diamond moderators can migrate the question by removing the bounty. * Bounty is removed and refunded * Question is closed and migrated I have flagged the question as well for the SO mods to look at it
I can confirm that if the question is migrated and the bounty was not awarded in the original page, then the reputation is refunded. I proposed +100 bounty for this [question](https://math.stackexchange.com/questions/33617/a-sequence-of-order-statistics-from-an-iid-sequence) in stats.SE which I could not award, so I su...
58,286,178
I have a simple input with an ngModel in it, the thing is that I can't see in real time what that ngModel contains and I get an error saying `Cannot read property 'content' of undefined` ```html <input ([ngModel])="page.content" /> {{ page.content }} ``` ```js export interface Page { uid: string; content: strin...
2019/10/08
[ "https://Stackoverflow.com/questions/58286178", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12025029/" ]
This happens because during the Angular lifecycle when your page is first created the value of page is null. What you can do in your .html you could do this : `[(ngModel)]="page?.content"`. This checks if page exists before trying to access content. Hope this helps!
You must initialize page object. Try this: ``` ngOnInit() { this.page = { uid: '1234', content: 'hello' } } ``` or ``` ngOnInit() { this.page = { uid: '', content: '' } } ``` Regards
58,286,178
I have a simple input with an ngModel in it, the thing is that I can't see in real time what that ngModel contains and I get an error saying `Cannot read property 'content' of undefined` ```html <input ([ngModel])="page.content" /> {{ page.content }} ``` ```js export interface Page { uid: string; content: strin...
2019/10/08
[ "https://Stackoverflow.com/questions/58286178", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12025029/" ]
Please make the following change in your html: ``` [(ngModel)]="page.content" ``` instead of ``` ([ngModel])="page.content" ``` and initialise the object in your ts: ``` this.page = {uid: '000001', content: 'zero'}; ``` Please find the modified demo: [modified stackblitz](https://stackblitz.com/edit/angular-le...
You must initialize page object. Try this: ``` ngOnInit() { this.page = { uid: '1234', content: 'hello' } } ``` or ``` ngOnInit() { this.page = { uid: '', content: '' } } ``` Regards
58,286,178
I have a simple input with an ngModel in it, the thing is that I can't see in real time what that ngModel contains and I get an error saying `Cannot read property 'content' of undefined` ```html <input ([ngModel])="page.content" /> {{ page.content }} ``` ```js export interface Page { uid: string; content: strin...
2019/10/08
[ "https://Stackoverflow.com/questions/58286178", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12025029/" ]
This happens because during the Angular lifecycle when your page is first created the value of page is null. What you can do in your .html you could do this : `[(ngModel)]="page?.content"`. This checks if page exists before trying to access content. Hope this helps!
Please make the following change in your html: ``` [(ngModel)]="page.content" ``` instead of ``` ([ngModel])="page.content" ``` and initialise the object in your ts: ``` this.page = {uid: '000001', content: 'zero'}; ``` Please find the modified demo: [modified stackblitz](https://stackblitz.com/edit/angular-le...
72,875,246
I created a Service to read data from the database. In order to achieve that, I want to make a Controller and throw this controller I want to call first the `ReadingDataService`. **Error Message:** > > **Too few arguments** to function `TryPlugin\Service\ReadingData::__construct()`, **1 passed** in `/var/www/html/va...
2022/07/05
[ "https://Stackoverflow.com/questions/72875246", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17204096/" ]
You need to pass the 2nd argument in `service.xml` -------------------------------------------------- Your class requires two arguments: ```php public function __construct(EntityRepositoryInterface $productRepository, Context $con) { //... ``` but only provides one in `service.xml`: ```xml <service id="TryPlugin\S...
This is unecessary in the first place. Do the following in your controller and pass the context down: ``` namespace TryPlugin\Storefront\Controller; use Shopware\Core\Framework\Context; use Shopware\Core\Framework\DataAbstractionLayer\EntityRepositoryInterface; use Shopware\Core\Framework\Routing\Annotation\LoginReq...
2,398,161
I'm trying to add paths to my classpath in the Clojure REPL that I've set up in Emacs using ELPA. Apparently, this isn't the $CLASSPATH environment variable, but rather the swank-clojure-classpath variable that Swank sets up. Because I used ELPA to install Swank, Clojure, etc., there are a ton of .el files that take ca...
2010/03/07
[ "https://Stackoverflow.com/questions/2398161", "https://Stackoverflow.com", "https://Stackoverflow.com/users/288389/" ]
As mac says, you can use ``` M-x swank-clojure-project ``` to establish a slime REPL to a clojure project; the command will ask you for your projects root directory, and will establish a classpath that includes a variety of directories including src/ lib/ and resources/ if they are present. Alternatively, if you ar...
You want: ``` M-x swank-clojure-project ``` This adds all jars in your /lib dir. If you want to :use a clojure file (bar.clj), in for instance /foo you would do: ``` (ns foo (:use foo.bar)) ```
2,398,161
I'm trying to add paths to my classpath in the Clojure REPL that I've set up in Emacs using ELPA. Apparently, this isn't the $CLASSPATH environment variable, but rather the swank-clojure-classpath variable that Swank sets up. Because I used ELPA to install Swank, Clojure, etc., there are a ton of .el files that take ca...
2010/03/07
[ "https://Stackoverflow.com/questions/2398161", "https://Stackoverflow.com", "https://Stackoverflow.com/users/288389/" ]
As mac says, you can use ``` M-x swank-clojure-project ``` to establish a slime REPL to a clojure project; the command will ask you for your projects root directory, and will establish a classpath that includes a variety of directories including src/ lib/ and resources/ if they are present. Alternatively, if you ar...
Sorry I cannot help you with an answer, but maybe your question is wrong: I myself haven't started a clojure session from within Emacs for ages. I think the better way is to describe all your dependencies in a single place (e.g. the maven `pom.xml` or leiningen's `project.clj`) and then start a swank session with thos...