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
32,704
During my job search, I found [Glassdoor](http://www.glassdoor.com) to be a very useful tool for getting to know about the companies I was searching for. I'd like to give back to that and submit my own reviews to help others. However, my most recent job is at a small company. Currently the company's listing on Glassd...
2014/08/21
[ "https://workplace.stackexchange.com/questions/32704", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/8233/" ]
If you are going to stay more in that company, **never ever leave negative feedback**. Full stop. This will only go against you. Even if you are not the **single** employee in that position, reducing the chances to two or three people is too risky. You might be recognized as the author even in the future. For example ...
* No, they don't know. unless you share full details of you or about any particular the incident that happened in the company. * Be honest with your reviews, * try to post anonymously, * And glassdoor doesn't reveal your identity to anyone.
32,704
During my job search, I found [Glassdoor](http://www.glassdoor.com) to be a very useful tool for getting to know about the companies I was searching for. I'd like to give back to that and submit my own reviews to help others. However, my most recent job is at a small company. Currently the company's listing on Glassd...
2014/08/21
[ "https://workplace.stackexchange.com/questions/32704", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/8233/" ]
> > How can I go about leaving an anonymous review (what Glassdoor is > intended for) when the company is so small that they will know it is > me? > > > It's not clear what your motivation for leaving a review might be, and clearly you don't want to leave a positive review, but there are several possibilities he...
Leaving a review about the company on Glassdoor.com has two purposes: 1. You want your concerns to be addressed, a lot of genuine employers do attend to employees' (ex or current) concerns if any... 2. Your review helps other job seekers get a fair view on choosing this specific employer as a next stop in their career...
32,704
During my job search, I found [Glassdoor](http://www.glassdoor.com) to be a very useful tool for getting to know about the companies I was searching for. I'd like to give back to that and submit my own reviews to help others. However, my most recent job is at a small company. Currently the company's listing on Glassd...
2014/08/21
[ "https://workplace.stackexchange.com/questions/32704", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/8233/" ]
Personally I make it a policy to never bad mouth past employers in writing anywhere. I have run into past colleagues at new workplaces many times. It makes no sense to do something that might mean I am unable to get a job at a place I wanted to work at because ten years ago I insulted the person who is now friends with...
* No, they don't know. unless you share full details of you or about any particular the incident that happened in the company. * Be honest with your reviews, * try to post anonymously, * And glassdoor doesn't reveal your identity to anyone.
32,704
During my job search, I found [Glassdoor](http://www.glassdoor.com) to be a very useful tool for getting to know about the companies I was searching for. I'd like to give back to that and submit my own reviews to help others. However, my most recent job is at a small company. Currently the company's listing on Glassd...
2014/08/21
[ "https://workplace.stackexchange.com/questions/32704", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/8233/" ]
I find Glassdoor to be invaluable in reviewing companies, though not infallible. Your issue is one I've stumbled across a few times where I've worked or contracted with a small company and want to leave a review. Some points to consider: * If there's only one review on the site, the odds are no one at the company is ...
If you are going to stay more in that company, **never ever leave negative feedback**. Full stop. This will only go against you. Even if you are not the **single** employee in that position, reducing the chances to two or three people is too risky. You might be recognized as the author even in the future. For example ...
32,704
During my job search, I found [Glassdoor](http://www.glassdoor.com) to be a very useful tool for getting to know about the companies I was searching for. I'd like to give back to that and submit my own reviews to help others. However, my most recent job is at a small company. Currently the company's listing on Glassd...
2014/08/21
[ "https://workplace.stackexchange.com/questions/32704", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/8233/" ]
I find Glassdoor to be invaluable in reviewing companies, though not infallible. Your issue is one I've stumbled across a few times where I've worked or contracted with a small company and want to leave a review. Some points to consider: * If there's only one review on the site, the odds are no one at the company is ...
First of all, I smell its going to be a bad one. If you are so sure of being identified, and your review may hurt you within the company, I would suggest avoiding that. Anyway, all job seekers don't take reviews to their heart and are not strict believers, it is just taken as a suggestion. If the review is a positive...
16,626,401
I want to rearrange the sheets being generated before writing it to an xls document using apache poi in java. Is there any way of doing it? For ex:sheet Names are "RF for 10","Blended for 10","RF for 30","Blended for 30". I want the xls to be generated in the following order of sheets: "RF for 10","RF for 30","Blended...
2013/05/18
[ "https://Stackoverflow.com/questions/16626401", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2397217/" ]
You can rearrange the order of the sheets in a workbook with the [`setSheetOrder`](http://poi.apache.org/apidocs/org/apache/poi/ss/usermodel/Workbook.html#setSheetOrder(java.lang.String,%20int)) method of the `Workbook` class.
You can create a new sheet in a specific position of the book. ``` * Create a new sheet in a specific position of the book, if the sheet name has * 32 characters or more the method createSafeSheetName get 31 characters and * remove unsafe characters * * @param book book of excel * @param nameSheet Sheet n...
28,440,523
I'd like to automatically add a new line break every 10 characters with this code : HTML : ``` <div ng-app=""> <textarea id="chat" ng-model="msg"></textarea> <span class="msg" ng-bind="msg"></span> </div> ``` Naturally when I type something in the textarea, it appears below in the span. But I want it to work li...
2015/02/10
[ "https://Stackoverflow.com/questions/28440523", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4551932/" ]
`If` is not gonna work, you have loop through the text like this ``` $("#chat").keyup(function(){ var msg = $(this).val(); var span_msg=''; for(var i=0; i<msg.length; i++) span_msg+=msg[i]+(i==10?"<br>":""); $('.msg').html(span_msg); }); ```
Angular way: **Filter:** ``` app.filter('addBr', function($sce){ return function(input, length) { return $sce.trustAsHtml(input.match(new RegExp(".{1," + length + "}", 'g')).join("<br/>")); }; }); ``` **Controller:** ``` $scope.test = "Professional lorem ipsum generator for typographers"; ``` ...
27,295,673
If I have a histogram: ``` > hist(faithful$waiting,seq(min(faithful$waiting),max(faithful$waiting))) ``` and a list of "special" frequencies: ``` > c(51, 52, 57, 59, 64) ``` is it possible to colour the bars corresponding to these special frequencies a different colour from the rest of the histobram?
2014/12/04
[ "https://Stackoverflow.com/questions/27295673", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2093458/" ]
You could simply create a vector of the colors and use the `col` option. ``` data(faithful) # make sure frequencies in order and unique for the histogram call special <- ifelse(sort(unique(faithful$waiting)) %in% c(51, 52, 57, 59, 64), "red", "white") # same call with the 'col' option hist(faithful$waiting,seq(min(f...
Fun with ggplot2... ``` faithful$special <- faithful$waiting %in% c(51, 52, 57, 59, 64) library(ggplot2) ggplot(data = faithful, aes(x = waiting, fill = special)) + geom_histogram(binwidth = 1, colour = 'white') ``` ![enter image description here](https://i.stack.imgur.com/Ju7EB.png)
970,443
I need to extract code (but not data!) from classic win32 exe/dll files. It's clear I can't do this only with extraction of code segment content (because code segment contains also the data -- jump tables for example) and that I need some help from compiler. \*.map files are nice but they only contain addresses of fun...
2009/06/09
[ "https://Stackoverflow.com/questions/970443", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21009/" ]
There is a [PDB extractor](http://undocumented.rawol.com/win_pdbx.zip) for download at the page here: <http://undocumented.rawol.com>. It can extract all information when you use the /type option. There is also an article with PDB viewer here: <http://www.codeproject.com/KB/bugs/PdbParser.aspx> but it extracts less inf...
Well, I just happened to read the other day that [DIA is a lot easier to use from C#](http://msinilo.pl/blog/?p=425 "Crunching bytes | .mischief.mayhem.soap.:") (links to source for a simple program); another program that keeps coming up on my google searches is [PDB Cracker](http://www.ishani.org/pdb.php), which also ...
1,138,232
I'm embedding a PDF in a web page with the following html :- ``` <object id="pdf" classid="clsid:CA8A9780-280D-11CF-A24D-444553540000" width="1024" height="600"> <param name="SRC" value="/GetDoc.ashx?SOID=<%=Html.Encode(Model.OrderID)%>" /> <embed src="/GetDoc.ashx?SOID=<%=Html.Encode(Model.OrderID)%>" width="...
2009/07/16
[ "https://Stackoverflow.com/questions/1138232", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
None of the recommendations are valid, because DOM is loaded before the PDF content is loaded. So DOM can't control ActiveX content
You are going to want something like jQuery's `document.ready()` function. For non-IE browsers, you can register a handler for the event `DOMContentLoaded`, and your handler function will be called after all the images and objects have been loaded. For IE, you have to continually check the `document.readyState` propert...
1,138,232
I'm embedding a PDF in a web page with the following html :- ``` <object id="pdf" classid="clsid:CA8A9780-280D-11CF-A24D-444553540000" width="1024" height="600"> <param name="SRC" value="/GetDoc.ashx?SOID=<%=Html.Encode(Model.OrderID)%>" /> <embed src="/GetDoc.ashx?SOID=<%=Html.Encode(Model.OrderID)%>" width="...
2009/07/16
[ "https://Stackoverflow.com/questions/1138232", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
I'm loading the PDF with jQuery ajax into browser cache. Then I create embedded element with data already in browser cache. ``` var url = "http://example.com/my.pdf"; // show spinner $.mobile.showPageLoadingMsg('b', note, false); $.ajax({ url: url, cache: true, mimeType: 'application/pdf', success: fu...
None of the recommendations are valid, because DOM is loaded before the PDF content is loaded. So DOM can't control ActiveX content
1,138,232
I'm embedding a PDF in a web page with the following html :- ``` <object id="pdf" classid="clsid:CA8A9780-280D-11CF-A24D-444553540000" width="1024" height="600"> <param name="SRC" value="/GetDoc.ashx?SOID=<%=Html.Encode(Model.OrderID)%>" /> <embed src="/GetDoc.ashx?SOID=<%=Html.Encode(Model.OrderID)%>" width="...
2009/07/16
[ "https://Stackoverflow.com/questions/1138232", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Following code works. ``` <div style="background: transparent url(loading.gif) no-repeat"> <object height="1250px" width="100%" type="application/pdf" data="aaa.pdf"> <param value="aaa.pdf" name="src"/> <param value="transparent" name="wmode"/> </object> </div> ```
None of the recommendations are valid, because DOM is loaded before the PDF content is loaded. So DOM can't control ActiveX content
1,138,232
I'm embedding a PDF in a web page with the following html :- ``` <object id="pdf" classid="clsid:CA8A9780-280D-11CF-A24D-444553540000" width="1024" height="600"> <param name="SRC" value="/GetDoc.ashx?SOID=<%=Html.Encode(Model.OrderID)%>" /> <embed src="/GetDoc.ashx?SOID=<%=Html.Encode(Model.OrderID)%>" width="...
2009/07/16
[ "https://Stackoverflow.com/questions/1138232", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
I don't know why everyone makes it so hard. ``` <object data="yourfile.pdf" style="background: transparent url(AnimatedLoading.gif) no-repeat center;" type="application/pdf" /> ```
I'm loading the PDF with jQuery ajax into browser cache. Then I create embedded element with data already in browser cache. ``` var url = "http://example.com/my.pdf"; // show spinner $.mobile.showPageLoadingMsg('b', note, false); $.ajax({ url: url, cache: true, mimeType: 'application/pdf', success: fu...
1,138,232
I'm embedding a PDF in a web page with the following html :- ``` <object id="pdf" classid="clsid:CA8A9780-280D-11CF-A24D-444553540000" width="1024" height="600"> <param name="SRC" value="/GetDoc.ashx?SOID=<%=Html.Encode(Model.OrderID)%>" /> <embed src="/GetDoc.ashx?SOID=<%=Html.Encode(Model.OrderID)%>" width="...
2009/07/16
[ "https://Stackoverflow.com/questions/1138232", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
None of the recommendations are valid, because DOM is loaded before the PDF content is loaded. So DOM can't control ActiveX content
``` <embed onload='alert("I should be called")'></embed> ```
1,138,232
I'm embedding a PDF in a web page with the following html :- ``` <object id="pdf" classid="clsid:CA8A9780-280D-11CF-A24D-444553540000" width="1024" height="600"> <param name="SRC" value="/GetDoc.ashx?SOID=<%=Html.Encode(Model.OrderID)%>" /> <embed src="/GetDoc.ashx?SOID=<%=Html.Encode(Model.OrderID)%>" width="...
2009/07/16
[ "https://Stackoverflow.com/questions/1138232", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
I don't know why everyone makes it so hard. ``` <object data="yourfile.pdf" style="background: transparent url(AnimatedLoading.gif) no-repeat center;" type="application/pdf" /> ```
``` <embed onload='alert("I should be called")'></embed> ```
1,138,232
I'm embedding a PDF in a web page with the following html :- ``` <object id="pdf" classid="clsid:CA8A9780-280D-11CF-A24D-444553540000" width="1024" height="600"> <param name="SRC" value="/GetDoc.ashx?SOID=<%=Html.Encode(Model.OrderID)%>" /> <embed src="/GetDoc.ashx?SOID=<%=Html.Encode(Model.OrderID)%>" width="...
2009/07/16
[ "https://Stackoverflow.com/questions/1138232", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
I don't know why everyone makes it so hard. ``` <object data="yourfile.pdf" style="background: transparent url(AnimatedLoading.gif) no-repeat center;" type="application/pdf" /> ```
None of the recommendations are valid, because DOM is loaded before the PDF content is loaded. So DOM can't control ActiveX content
1,138,232
I'm embedding a PDF in a web page with the following html :- ``` <object id="pdf" classid="clsid:CA8A9780-280D-11CF-A24D-444553540000" width="1024" height="600"> <param name="SRC" value="/GetDoc.ashx?SOID=<%=Html.Encode(Model.OrderID)%>" /> <embed src="/GetDoc.ashx?SOID=<%=Html.Encode(Model.OrderID)%>" width="...
2009/07/16
[ "https://Stackoverflow.com/questions/1138232", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
I'm loading the PDF with jQuery ajax into browser cache. Then I create embedded element with data already in browser cache. ``` var url = "http://example.com/my.pdf"; // show spinner $.mobile.showPageLoadingMsg('b', note, false); $.ajax({ url: url, cache: true, mimeType: 'application/pdf', success: fu...
``` <embed onload='alert("I should be called")'></embed> ```
1,138,232
I'm embedding a PDF in a web page with the following html :- ``` <object id="pdf" classid="clsid:CA8A9780-280D-11CF-A24D-444553540000" width="1024" height="600"> <param name="SRC" value="/GetDoc.ashx?SOID=<%=Html.Encode(Model.OrderID)%>" /> <embed src="/GetDoc.ashx?SOID=<%=Html.Encode(Model.OrderID)%>" width="...
2009/07/16
[ "https://Stackoverflow.com/questions/1138232", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
I'm loading the PDF with jQuery ajax into browser cache. Then I create embedded element with data already in browser cache. ``` var url = "http://example.com/my.pdf"; // show spinner $.mobile.showPageLoadingMsg('b', note, false); $.ajax({ url: url, cache: true, mimeType: 'application/pdf', success: fu...
"Content within a tag is displayed when an object is loading, but hasn't yet finished." So put your spinner in there and it should work out nicely for you. And you won't have to write any JavaScript. src: <http://en.wikibooks.org/wiki/XHTML/XHTML_Objects>
1,138,232
I'm embedding a PDF in a web page with the following html :- ``` <object id="pdf" classid="clsid:CA8A9780-280D-11CF-A24D-444553540000" width="1024" height="600"> <param name="SRC" value="/GetDoc.ashx?SOID=<%=Html.Encode(Model.OrderID)%>" /> <embed src="/GetDoc.ashx?SOID=<%=Html.Encode(Model.OrderID)%>" width="...
2009/07/16
[ "https://Stackoverflow.com/questions/1138232", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
I don't know why everyone makes it so hard. ``` <object data="yourfile.pdf" style="background: transparent url(AnimatedLoading.gif) no-repeat center;" type="application/pdf" /> ```
"Content within a tag is displayed when an object is loading, but hasn't yet finished." So put your spinner in there and it should work out nicely for you. And you won't have to write any JavaScript. src: <http://en.wikibooks.org/wiki/XHTML/XHTML_Objects>
64,161,060
I have Citus extension on a PostgresSQL server. And I want to see the statistics from `pg_stat_statements` of each worker through the coordinator node. However, there is no column to match the tables from coordinator and workers. Does anybody know how can I do that? I am also interested on how the queryId is being com...
2020/10/01
[ "https://Stackoverflow.com/questions/64161060", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10468528/" ]
`__init__` can be overloaded. `self` will become the given type. `TypeVar` needs to become some kind of real type during type analysis. It can't stay as `T` or `U` or `V`. It must be filled in with a type like `str` or `Literal["foo"]`. ```py from __future__ import annotations from typing import TypeVar, overload, Li...
I also had to overload `get` in @Slix first example: ```py from __future__ import annotations from typing import TypeVar, overload, Literal, Generic _GetReturnT = TypeVar('_GetReturnT', str, list[str], str | list[str]) class StringProperty(Generic[_GetReturnT]): # Handles the default value case too. @overlo...
39,852,811
I need to get users from my database, by this query : ``` SELECT * FROM users WHERE first_name = 'Aragorn' AND last_name = 'SonOfAratorn' AND city = 'Osgiliot' AND country = 'Gondor' ``` The problem is that in my app, i will often have city or country missing, or both of them missing. I can make 3 or four HQL queri...
2016/10/04
[ "https://Stackoverflow.com/questions/39852811", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5663107/" ]
Check the **coalesce** function; ``` coalesce(:valueifnotnull,'valueifnull') ``` should do the trick
``` SELECT * FROM users WHERE first_name = 'Aragorn' AND last_name = 'SonOfAratorn' AND (city is null or @city is null or city like '%' + @city) AND (country is null or @country is null or country like '%' + @country) ```
39,852,811
I need to get users from my database, by this query : ``` SELECT * FROM users WHERE first_name = 'Aragorn' AND last_name = 'SonOfAratorn' AND city = 'Osgiliot' AND country = 'Gondor' ``` The problem is that in my app, i will often have city or country missing, or both of them missing. I can make 3 or four HQL queri...
2016/10/04
[ "https://Stackoverflow.com/questions/39852811", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5663107/" ]
If you have an entity called `Users` and you not always pass the city and country parameters filled and would like to ignore them, this is the JPQL/HQL and Java codes: ``` StringBuilder jpql = new StringBuilder(); jpql.append("SELECT user FROM Users user "); jpql.append("WHERE user.first_name = :firstname "); jpql.ap...
``` SELECT * FROM users WHERE first_name = 'Aragorn' AND last_name = 'SonOfAratorn' AND (city is null or @city is null or city like '%' + @city) AND (country is null or @country is null or country like '%' + @country) ```
41,571,531
I'm trying to assign focus to a widget when it's clicked. I am only partially successful in doing so. Attempt 1: ---------- ``` class TreeWidget(Widget, FocusBehavior): def __init__(self, **kwargs): super(TreeWidget, self).__init__(**kwargs) def on_touch_down(self, touch): ret = super(TreeWi...
2017/01/10
[ "https://Stackoverflow.com/questions/41571531", "https://Stackoverflow.com", "https://Stackoverflow.com/users/339144/" ]
Whenever you import a class which is at the same directory level, you should import it like ``` './fileName.extension' ```
Try `import { ProfileEditModal } from './profileEdit';`
38,968,125
I'm currently working on a movie recommendation query that should return the movies with the most "recommendation impact" using the following cypher query: ``` match (m:Movie) with m, size((m)<-[:LIKED]-(:User)-[:LIKED]->(:Movie)) as score order by score desc limit 10 return m.title, score ``` After reading the gra...
2016/08/16
[ "https://Stackoverflow.com/questions/38968125", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2513772/" ]
You can simply remove element from array using below method ``` categories .splice( $.inArray(removeItem, categories), 1 );//removeItem is name of item which you want to remove from array ```
If you want to remove, for example, "Lenovo" from: ``` var categories = ["Lenovo","Large","100"]; ``` do: ``` categories.splice(0) ```
24,352,208
I have an RCpp code, where in a part of code I am trying to convert a DataFrame to a Matrix. The DataFrame only has numbers (no strings or dates). The following code works: ``` //[[Rcpp::export]] NumericMatrix testDFtoNM1(DataFrame x) { int nRows=x.nrows(); NumericMatrix y(nRows,x.size()); for (int i=0; i<x....
2014/06/22
[ "https://Stackoverflow.com/questions/24352208", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2526657/" ]
Similar to Gabor's version, you can do something like this: ``` #include <Rcpp.h> using namespace Rcpp ; //[[Rcpp::export]] NumericMatrix testDFtoNM(DataFrame x) { NumericMatrix y = internal::convert_using_rfunction(x, "as.matrix"); return y; } ```
If you don't mind calling back to R it can be done compactly like this: ``` #include <Rcpp.h> using namespace Rcpp; // [[Rcpp::export]] NumericMatrix DF2mat(DataFrame x) { Function asMatrix("as.matrix"); return asMatrix(x); } ``` **UPDATE** Incorporated Romain's comment.
19,525,378
When I compile the following program (the code for all the defines I've gotten from [64 bit ntohl() in C++?](https://stackoverflow.com/questions/809902/64-bit-ntohl-in-c/4410728#4410728) which seemed sensible): ``` #include <stdint.h> #if defined(__linux__) #include <endian.h> //htobe64,be64toh #include <arpa/inet.h> ...
2013/10/22
[ "https://Stackoverflow.com/questions/19525378", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1055398/" ]
Without explicit `-std=` option, calling `gcc` is the same as `-std=gnu89` with means C89 + GNU extensions. The GNU extensions will enable macros which will enable the presence of the functions in your header.
If you see the [`be64toh`](http://linux.die.net/man/3/be64toh) manual, you will see that it needs the `_BSD_SOURCE` to be defined. So on Linux `#define` it before you include `<endian.h>`.
19,525,378
When I compile the following program (the code for all the defines I've gotten from [64 bit ntohl() in C++?](https://stackoverflow.com/questions/809902/64-bit-ntohl-in-c/4410728#4410728) which seemed sensible): ``` #include <stdint.h> #if defined(__linux__) #include <endian.h> //htobe64,be64toh #include <arpa/inet.h> ...
2013/10/22
[ "https://Stackoverflow.com/questions/19525378", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1055398/" ]
Without explicit `-std=` option, calling `gcc` is the same as `-std=gnu89` with means C89 + GNU extensions. The GNU extensions will enable macros which will enable the presence of the functions in your header.
I had this problem. The solution was to declare not only ``` #define _BSD_SOURCE ``` but also ``` #define __USE_BSD ``` <https://github.com/tailhook/zerogw/pull/34/files#r32008569>
19,525,378
When I compile the following program (the code for all the defines I've gotten from [64 bit ntohl() in C++?](https://stackoverflow.com/questions/809902/64-bit-ntohl-in-c/4410728#4410728) which seemed sensible): ``` #include <stdint.h> #if defined(__linux__) #include <endian.h> //htobe64,be64toh #include <arpa/inet.h> ...
2013/10/22
[ "https://Stackoverflow.com/questions/19525378", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1055398/" ]
Without explicit `-std=` option, calling `gcc` is the same as `-std=gnu89` with means C89 + GNU extensions. The GNU extensions will enable macros which will enable the presence of the functions in your header.
Recent changes to glibc has meant you need ``` #define _DEFAULT_SOURCE ``` instead of ``` #define _BSD_SOURCE ``` [Deprecation of \_BSD\_SOURCE and \_SVID\_SOURCE feature macros](https://sourceware.org/glibc/wiki/Release/2.20#Deprecation_of__BSD_SOURCE_and__SVID_SOURCE_feature_macros)
19,525,378
When I compile the following program (the code for all the defines I've gotten from [64 bit ntohl() in C++?](https://stackoverflow.com/questions/809902/64-bit-ntohl-in-c/4410728#4410728) which seemed sensible): ``` #include <stdint.h> #if defined(__linux__) #include <endian.h> //htobe64,be64toh #include <arpa/inet.h> ...
2013/10/22
[ "https://Stackoverflow.com/questions/19525378", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1055398/" ]
If you see the [`be64toh`](http://linux.die.net/man/3/be64toh) manual, you will see that it needs the `_BSD_SOURCE` to be defined. So on Linux `#define` it before you include `<endian.h>`.
I had this problem. The solution was to declare not only ``` #define _BSD_SOURCE ``` but also ``` #define __USE_BSD ``` <https://github.com/tailhook/zerogw/pull/34/files#r32008569>
19,525,378
When I compile the following program (the code for all the defines I've gotten from [64 bit ntohl() in C++?](https://stackoverflow.com/questions/809902/64-bit-ntohl-in-c/4410728#4410728) which seemed sensible): ``` #include <stdint.h> #if defined(__linux__) #include <endian.h> //htobe64,be64toh #include <arpa/inet.h> ...
2013/10/22
[ "https://Stackoverflow.com/questions/19525378", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1055398/" ]
If you see the [`be64toh`](http://linux.die.net/man/3/be64toh) manual, you will see that it needs the `_BSD_SOURCE` to be defined. So on Linux `#define` it before you include `<endian.h>`.
Recent changes to glibc has meant you need ``` #define _DEFAULT_SOURCE ``` instead of ``` #define _BSD_SOURCE ``` [Deprecation of \_BSD\_SOURCE and \_SVID\_SOURCE feature macros](https://sourceware.org/glibc/wiki/Release/2.20#Deprecation_of__BSD_SOURCE_and__SVID_SOURCE_feature_macros)
49,918,989
My table is as follows: ``` Balance Value 1 Value2 Date Daily Change (Expected) 8 8,648,668.60 12,620,390.51 3/27/2018 -1 7 3,087,707.30 3,494,174.70 3/28/2018 -1 6 3,039,443.51 2,345,356.15 3/29/2018 -1 ``` How ...
2018/04/19
[ "https://Stackoverflow.com/questions/49918989", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
You can use a `left join`: ``` select t.*, (t.balance - tprev.balance) as daily_change from `table` t left join `table` tprev on t.date = tprev.date + interval 1 day; ```
I used the following to answer this question: SELECT t1.\*,t1.balance-t2.balance Daily\_Change FROM TestData t1 LEFT JOIN TestData t2 ON t2.report\_date=DATE\_SUB(t1.report\_date, INTERVAL 1 DAY) AND t1.account=t2.account ORDER BY t1.report\_date,t1.account
17,361,116
Passcoder is jquery library that I have made and will be releasing. It splits an input field into one-character input boxes (like the iPhone passcode). One of the features it to focus the next input one you press a button. The problem seems to be that the `.next('.passcoder')` does not do what is expected. On the firs...
2013/06/28
[ "https://Stackoverflow.com/questions/17361116", "https://Stackoverflow.com", "https://Stackoverflow.com/users/541059/" ]
You can use `prevAll` and `nextAll` with the selector `:first` to find the next and the previous element: ``` $('.passcoder').keyup(function(e){ if (e.which == 8){ //backspace $(this).prevAll('input:first').focus(); } else if(e.which > 47 && e.which < 58){ $(this).nextAll('.passcode...
I think your problem is using the num pad. Try using your normal numbers, or add keycode 97 to 105 to you `else if` block `(e.which > 47 && e.which < 58) || (e.which > 96 && e.which < 106)` ``` $('.passcoder').keyup(function (e) { if (e.which == 8) { //backspace $(this).prev('input').focus(); }...
17,361,116
Passcoder is jquery library that I have made and will be releasing. It splits an input field into one-character input boxes (like the iPhone passcode). One of the features it to focus the next input one you press a button. The problem seems to be that the `.next('.passcoder')` does not do what is expected. On the firs...
2013/06/28
[ "https://Stackoverflow.com/questions/17361116", "https://Stackoverflow.com", "https://Stackoverflow.com/users/541059/" ]
You can use `prevAll` and `nextAll` with the selector `:first` to find the next and the previous element: ``` $('.passcoder').keyup(function(e){ if (e.which == 8){ //backspace $(this).prevAll('input:first').focus(); } else if(e.which > 47 && e.which < 58){ $(this).nextAll('.passcode...
try this ``` $(this).nextAll(".passcoder").eq(0).focus(); ```
17,361,116
Passcoder is jquery library that I have made and will be releasing. It splits an input field into one-character input boxes (like the iPhone passcode). One of the features it to focus the next input one you press a button. The problem seems to be that the `.next('.passcoder')` does not do what is expected. On the firs...
2013/06/28
[ "https://Stackoverflow.com/questions/17361116", "https://Stackoverflow.com", "https://Stackoverflow.com/users/541059/" ]
You can use `prevAll` and `nextAll` with the selector `:first` to find the next and the previous element: ``` $('.passcoder').keyup(function(e){ if (e.which == 8){ //backspace $(this).prevAll('input:first').focus(); } else if(e.which > 47 && e.which < 58){ $(this).nextAll('.passcode...
According to the `jQuery.next` [documentation](http://api.jquery.com/next/): > > Get the immediately following sibling of each element in the set of > matched elements. If a selector is provided, it retrieves the next > sibling only if it matches that selector. > > > Since you have a `<br>` and a `<h4>` between...
17,361,116
Passcoder is jquery library that I have made and will be releasing. It splits an input field into one-character input boxes (like the iPhone passcode). One of the features it to focus the next input one you press a button. The problem seems to be that the `.next('.passcoder')` does not do what is expected. On the firs...
2013/06/28
[ "https://Stackoverflow.com/questions/17361116", "https://Stackoverflow.com", "https://Stackoverflow.com/users/541059/" ]
You can use `prevAll` and `nextAll` with the selector `:first` to find the next and the previous element: ``` $('.passcoder').keyup(function(e){ if (e.which == 8){ //backspace $(this).prevAll('input:first').focus(); } else if(e.which > 47 && e.which < 58){ $(this).nextAll('.passcode...
Try this <http://jsfiddle.net/mattydsw/DDNbQ/> ``` var next = $(this).next('.passcoder'); if (next.length>0) { next.focus(); } else { $(this).nextUntil('.passcoder').next('.passcoder').focus(); } ```
41,312,115
I'm creating a program in which user enter mcqs and option and then save the data into the `txt` file.How can i do this .I try but it's not working. ``` #include <iostream> #include <fstream> #include <string> using namespace std; int main() { ofstream outputFile; std::string fname; cout<<"Enter file name"...
2016/12/24
[ "https://Stackoverflow.com/questions/41312115", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7178846/" ]
Try something like this maybe? ``` public static void main(String[] args) { for (int i = 1; i < 65535; i++) { System.out.println( i + ": " + getBinaryPalindrom(i) + " = " + Integer.toBinaryString(getBinaryPalindrom(i))); } } public static int getBinaryPalindrom(int N) { if (N < 4) ...
Idea to optimize, Let's look at the palindrome sequence 0, 1, 11, 101, 111, 1001 etc... All numbers must begin and end with 1, So the middle bits only changes and midle substring should be palindrome for full string to become palindrome, * So let's take a 2 digit binary number - one palindrome is possible. The bina...
41,312,115
I'm creating a program in which user enter mcqs and option and then save the data into the `txt` file.How can i do this .I try but it's not working. ``` #include <iostream> #include <fstream> #include <string> using namespace std; int main() { ofstream outputFile; std::string fname; cout<<"Enter file name"...
2016/12/24
[ "https://Stackoverflow.com/questions/41312115", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7178846/" ]
[The relevant OEIS entry (A006995)](https://oeis.org/A006995) has a lot of nice tips if you read through it. For example, `a(2^n-1)=2^(2n-2)-1` lets you skip right to the (2n - 1)th palindrome really quickly. It also gives several implementations. For example, the Smalltalk implementation works like this (note that th...
Idea to optimize, Let's look at the palindrome sequence 0, 1, 11, 101, 111, 1001 etc... All numbers must begin and end with 1, So the middle bits only changes and midle substring should be palindrome for full string to become palindrome, * So let's take a 2 digit binary number - one palindrome is possible. The bina...
41,312,115
I'm creating a program in which user enter mcqs and option and then save the data into the `txt` file.How can i do this .I try but it's not working. ``` #include <iostream> #include <fstream> #include <string> using namespace std; int main() { ofstream outputFile; std::string fname; cout<<"Enter file name"...
2016/12/24
[ "https://Stackoverflow.com/questions/41312115", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7178846/" ]
Try something like this maybe? ``` public static void main(String[] args) { for (int i = 1; i < 65535; i++) { System.out.println( i + ": " + getBinaryPalindrom(i) + " = " + Integer.toBinaryString(getBinaryPalindrom(i))); } } public static int getBinaryPalindrom(int N) { if (N < 4) ...
I have the same idea with @Kiran Kumar: you should not count number one by one to find if it is a binary palindrome which is too slow, but rather find the internal pattern that number has. List the number in binary string one by one, you can find the pattern: ``` 0 1 11 101 1001 1111 ... 1......1 ``` And the follow...
41,312,115
I'm creating a program in which user enter mcqs and option and then save the data into the `txt` file.How can i do this .I try but it's not working. ``` #include <iostream> #include <fstream> #include <string> using namespace std; int main() { ofstream outputFile; std::string fname; cout<<"Enter file name"...
2016/12/24
[ "https://Stackoverflow.com/questions/41312115", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7178846/" ]
[The relevant OEIS entry (A006995)](https://oeis.org/A006995) has a lot of nice tips if you read through it. For example, `a(2^n-1)=2^(2n-2)-1` lets you skip right to the (2n - 1)th palindrome really quickly. It also gives several implementations. For example, the Smalltalk implementation works like this (note that th...
I have the same idea with @Kiran Kumar: you should not count number one by one to find if it is a binary palindrome which is too slow, but rather find the internal pattern that number has. List the number in binary string one by one, you can find the pattern: ``` 0 1 11 101 1001 1111 ... 1......1 ``` And the follow...
22,479,607
I have some text boxes,their value is being generated from some source.Hence upon editing them if i remove the values and then I click submit button my jquery validation doesnt work I am using this jquery. ``` $(function() {$("#error1").hide();}); $('#save').click(function() {     $('input:text').each(function(){ ...
2014/03/18
[ "https://Stackoverflow.com/questions/22479607", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3400342/" ]
You wrote window.History. Did you include [history.js](https://github.com/browserstate/history.js) by Benjamin Lupton? window.History and window.history is not the same thing as window.History referes to history.js and that makes the history backwards compatible with html4 browsers. Take a look at these two: * [jQue...
you can refer below answer [IE history push state](https://stackoverflow.com/questions/11705241/ie-history-push-state) IE9 and below don't support `pushState`. You have an exception when calling the following line: ``` window.history.pushState(null, null, pathFullPage); SCRIPT438: Object doesn't support property o...
3,325,528
HI! I'm trying to install opencv and use it with python, but when I compile it I get no errors but I can't import cv module from python: ``` patrick:release patrick$ python Python 2.6.1 (r261:67515, Feb 11 2010, 00:51:29) [GCC 4.2.1 (Apple Inc. build 5646)] on darwin Type "help", "copyright", "credits" or "license" f...
2010/07/24
[ "https://Stackoverflow.com/questions/3325528", "https://Stackoverflow.com", "https://Stackoverflow.com/users/169274/" ]
``` easy_install pip pip install opencv-python --user export PYTHONPATH=/usr/local/lib/python2.7/site-packages:$PYTHONPATH ``` Maybe you will use `sudo`, and the path of installed may not be like mentioned.
You could try [ctypes-opencv](http://code.google.com/p/ctypes-opencv/) -- not sure why building and installing with `-D BUILD_PYTHON_SUPPORT=ON` didn't work for you (maybe it doesn't know where to install the Python wrappers in osx...?), but the ctypes wrappers should, in theory, work anyway.
3,325,528
HI! I'm trying to install opencv and use it with python, but when I compile it I get no errors but I can't import cv module from python: ``` patrick:release patrick$ python Python 2.6.1 (r261:67515, Feb 11 2010, 00:51:29) [GCC 4.2.1 (Apple Inc. build 5646)] on darwin Type "help", "copyright", "credits" or "license" f...
2010/07/24
[ "https://Stackoverflow.com/questions/3325528", "https://Stackoverflow.com", "https://Stackoverflow.com/users/169274/" ]
``` brew tap homebrew/science brew install opencv export PYTHONPATH=/usr/local/lib/python2.7/site-packages:$PYTHONPATH ```
When using Virtual Environment Thanks to @user495470. Follow these steps ``` brew update brew install -v cmake brew install opencv` ``` If Part 1 didn't work kindly follow Part 2 **Part I** Next step might work sometime, although it didn't work for me `export PYTHONPATH="/VENV_PATH/python2.7/site-packa...
3,325,528
HI! I'm trying to install opencv and use it with python, but when I compile it I get no errors but I can't import cv module from python: ``` patrick:release patrick$ python Python 2.6.1 (r261:67515, Feb 11 2010, 00:51:29) [GCC 4.2.1 (Apple Inc. build 5646)] on darwin Type "help", "copyright", "credits" or "license" f...
2010/07/24
[ "https://Stackoverflow.com/questions/3325528", "https://Stackoverflow.com", "https://Stackoverflow.com/users/169274/" ]
I found here a way to install opencv for python: <http://recursive-design.com/blog/2010/12/14/face-detection-with-osx-and-python/> :)
This worked for me (change python36 to whatever version you want) `sudo port install opencv +avx2 +python36 +qt5 +contrib +eigen` I got [this error](https://trac.macports.org/ticket/53427#no1) and had to apply the patch there ([download link](https://trac.macports.org/raw-attachment/ticket/53427/patch-cpp11-narrowing...
3,325,528
HI! I'm trying to install opencv and use it with python, but when I compile it I get no errors but I can't import cv module from python: ``` patrick:release patrick$ python Python 2.6.1 (r261:67515, Feb 11 2010, 00:51:29) [GCC 4.2.1 (Apple Inc. build 5646)] on darwin Type "help", "copyright", "credits" or "license" f...
2010/07/24
[ "https://Stackoverflow.com/questions/3325528", "https://Stackoverflow.com", "https://Stackoverflow.com/users/169274/" ]
We can install opencv for Python for Mac OS X with home-brew. First, install home-brew: `ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"` You can see the details for how to install homebrew. <http://brew.sh> If you don't install Python, install python(brew will install pyth...
You could try [ctypes-opencv](http://code.google.com/p/ctypes-opencv/) -- not sure why building and installing with `-D BUILD_PYTHON_SUPPORT=ON` didn't work for you (maybe it doesn't know where to install the Python wrappers in osx...?), but the ctypes wrappers should, in theory, work anyway.
3,325,528
HI! I'm trying to install opencv and use it with python, but when I compile it I get no errors but I can't import cv module from python: ``` patrick:release patrick$ python Python 2.6.1 (r261:67515, Feb 11 2010, 00:51:29) [GCC 4.2.1 (Apple Inc. build 5646)] on darwin Type "help", "copyright", "credits" or "license" f...
2010/07/24
[ "https://Stackoverflow.com/questions/3325528", "https://Stackoverflow.com", "https://Stackoverflow.com/users/169274/" ]
This worked for me (change python36 to whatever version you want) `sudo port install opencv +avx2 +python36 +qt5 +contrib +eigen` I got [this error](https://trac.macports.org/ticket/53427#no1) and had to apply the patch there ([download link](https://trac.macports.org/raw-attachment/ticket/53427/patch-cpp11-narrowing...
You could try [ctypes-opencv](http://code.google.com/p/ctypes-opencv/) -- not sure why building and installing with `-D BUILD_PYTHON_SUPPORT=ON` didn't work for you (maybe it doesn't know where to install the Python wrappers in osx...?), but the ctypes wrappers should, in theory, work anyway.
3,325,528
HI! I'm trying to install opencv and use it with python, but when I compile it I get no errors but I can't import cv module from python: ``` patrick:release patrick$ python Python 2.6.1 (r261:67515, Feb 11 2010, 00:51:29) [GCC 4.2.1 (Apple Inc. build 5646)] on darwin Type "help", "copyright", "credits" or "license" f...
2010/07/24
[ "https://Stackoverflow.com/questions/3325528", "https://Stackoverflow.com", "https://Stackoverflow.com/users/169274/" ]
This worked for me (change python36 to whatever version you want) `sudo port install opencv +avx2 +python36 +qt5 +contrib +eigen` I got [this error](https://trac.macports.org/ticket/53427#no1) and had to apply the patch there ([download link](https://trac.macports.org/raw-attachment/ticket/53427/patch-cpp11-narrowing...
When using Virtual Environment Thanks to @user495470. Follow these steps ``` brew update brew install -v cmake brew install opencv` ``` If Part 1 didn't work kindly follow Part 2 **Part I** Next step might work sometime, although it didn't work for me `export PYTHONPATH="/VENV_PATH/python2.7/site-packa...
3,325,528
HI! I'm trying to install opencv and use it with python, but when I compile it I get no errors but I can't import cv module from python: ``` patrick:release patrick$ python Python 2.6.1 (r261:67515, Feb 11 2010, 00:51:29) [GCC 4.2.1 (Apple Inc. build 5646)] on darwin Type "help", "copyright", "credits" or "license" f...
2010/07/24
[ "https://Stackoverflow.com/questions/3325528", "https://Stackoverflow.com", "https://Stackoverflow.com/users/169274/" ]
``` easy_install pip pip install opencv-python --user export PYTHONPATH=/usr/local/lib/python2.7/site-packages:$PYTHONPATH ``` Maybe you will use `sudo`, and the path of installed may not be like mentioned.
When using Virtual Environment Thanks to @user495470. Follow these steps ``` brew update brew install -v cmake brew install opencv` ``` If Part 1 didn't work kindly follow Part 2 **Part I** Next step might work sometime, although it didn't work for me `export PYTHONPATH="/VENV_PATH/python2.7/site-packa...
3,325,528
HI! I'm trying to install opencv and use it with python, but when I compile it I get no errors but I can't import cv module from python: ``` patrick:release patrick$ python Python 2.6.1 (r261:67515, Feb 11 2010, 00:51:29) [GCC 4.2.1 (Apple Inc. build 5646)] on darwin Type "help", "copyright", "credits" or "license" f...
2010/07/24
[ "https://Stackoverflow.com/questions/3325528", "https://Stackoverflow.com", "https://Stackoverflow.com/users/169274/" ]
``` easy_install pip pip install opencv-python --user export PYTHONPATH=/usr/local/lib/python2.7/site-packages:$PYTHONPATH ``` Maybe you will use `sudo`, and the path of installed may not be like mentioned.
If you have you want a simple and quick install in Windows, you can download [Python(x,y)](http://python-xy.github.io). This distribution includes OpenCv. Be sure to specify that you want to install OpenCV in the installation setup, because it is not installed by default.
3,325,528
HI! I'm trying to install opencv and use it with python, but when I compile it I get no errors but I can't import cv module from python: ``` patrick:release patrick$ python Python 2.6.1 (r261:67515, Feb 11 2010, 00:51:29) [GCC 4.2.1 (Apple Inc. build 5646)] on darwin Type "help", "copyright", "credits" or "license" f...
2010/07/24
[ "https://Stackoverflow.com/questions/3325528", "https://Stackoverflow.com", "https://Stackoverflow.com/users/169274/" ]
I found here a way to install opencv for python: <http://recursive-design.com/blog/2010/12/14/face-detection-with-osx-and-python/> :)
You could try [ctypes-opencv](http://code.google.com/p/ctypes-opencv/) -- not sure why building and installing with `-D BUILD_PYTHON_SUPPORT=ON` didn't work for you (maybe it doesn't know where to install the Python wrappers in osx...?), but the ctypes wrappers should, in theory, work anyway.
3,325,528
HI! I'm trying to install opencv and use it with python, but when I compile it I get no errors but I can't import cv module from python: ``` patrick:release patrick$ python Python 2.6.1 (r261:67515, Feb 11 2010, 00:51:29) [GCC 4.2.1 (Apple Inc. build 5646)] on darwin Type "help", "copyright", "credits" or "license" f...
2010/07/24
[ "https://Stackoverflow.com/questions/3325528", "https://Stackoverflow.com", "https://Stackoverflow.com/users/169274/" ]
We can install opencv for Python for Mac OS X with home-brew. First, install home-brew: `ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"` You can see the details for how to install homebrew. <http://brew.sh> If you don't install Python, install python(brew will install pyth...
If you have you want a simple and quick install in Windows, you can download [Python(x,y)](http://python-xy.github.io). This distribution includes OpenCv. Be sure to specify that you want to install OpenCV in the installation setup, because it is not installed by default.
7,092
My dog loves walks and with winter upon us, salt is everywhere. Salt seriously dries out skin, so what is a good moisturizer for both her and me? I have all natural coconut oil based lotion and cream and Aveeno Oatmeal lotion, are either of them OK to use on Maggy, the border collie?
2014/12/20
[ "https://pets.stackexchange.com/questions/7092", "https://pets.stackexchange.com", "https://pets.stackexchange.com/users/1205/" ]
Vaseline works just fine. A dab on the paws before bed and a dab before walks. If you want I'd shop for one but you can make homemade moisturizers for your dog. > > Shea butter > Lavender oil (Lavendula augustifolia) (I chose this because of its calming healing properties) > Vitamin E oil > Beeswax > Olive oil. ...
The dryness might just be a symptom and salt might be the problem to address. When living in a Northeast city with my dog, I vaguely remember vets telling me that salt was very corrosive for a dogs paws and that the dog should wear booties or the salt should be rinsed off after walks. We had a small Tupperware contai...
17,972,096
I want to improve the look and feel of my tables and jQuery datatables looks great for doing that but I can not work out why it is not rendering on my table. I have registered the plugin correctly on my bundle config. Followed the tutorial and ensured everything was in correct place, but no effect. Here is my generate...
2013/07/31
[ "https://Stackoverflow.com/questions/17972096", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1358806/" ]
There are a few problems: Your code says "var el = doucument..." but that should be "document". Also you are using "getElementByName" when your table doesn't have the name attribute set, just the ID set. But why not use the built in jQuery function to select by ID: ``` $('#customerIndex').dataTable({ "sScrolly": "2...
you load two different jquery version: ``` <script src="/Scripts/DataTables-1.9.4/media/js/jquery.js"></script> // in the header <script src="/Scripts/jquery-2.0.2.js"></script> // in the body ``` another small correction: ``` <script src="/Content/DataTables-1.9.4/media/css/demo_table.css"></script> // should be <...
17,972,096
I want to improve the look and feel of my tables and jQuery datatables looks great for doing that but I can not work out why it is not rendering on my table. I have registered the plugin correctly on my bundle config. Followed the tutorial and ensured everything was in correct place, but no effect. Here is my generate...
2013/07/31
[ "https://Stackoverflow.com/questions/17972096", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1358806/" ]
There are a few problems: Your code says "var el = doucument..." but that should be "document". Also you are using "getElementByName" when your table doesn't have the name attribute set, just the ID set. But why not use the built in jQuery function to select by ID: ``` $('#customerIndex').dataTable({ "sScrolly": "2...
had an extra script src="/Scripts/jquery-2.0.2.js" at bottom of page.....
8,852,502
The source code of our application is hundreds of thousands of line, thousands of files, and in places very old - the app was first written in 1995 or 1996. Over the past few years my team has greatly improved the quality of the source, but one issue remains that particularly bugs me: a lot of classes have a lot of met...
2012/01/13
[ "https://Stackoverflow.com/questions/8852502", "https://Stackoverflow.com", "https://Stackoverflow.com/users/121689/" ]
You might try [Lazy C++](https://github.com/driedfruit/lzz). I have not used it, but I believe it is a command line tool to do just what you want.
If the code is working then I would vote against any major automated rewrite. Lots of work could be involved fixing it up. Small iterative improvements over time is a better technique as you will be able to test each change in isolation (and add unit tests). Anyway your major complaint about not being able to find ...
8,852,502
The source code of our application is hundreds of thousands of line, thousands of files, and in places very old - the app was first written in 1995 or 1996. Over the past few years my team has greatly improved the quality of the source, but one issue remains that particularly bugs me: a lot of classes have a lot of met...
2012/01/13
[ "https://Stackoverflow.com/questions/8852502", "https://Stackoverflow.com", "https://Stackoverflow.com/users/121689/" ]
You might try [Lazy C++](https://github.com/driedfruit/lzz). I have not used it, but I believe it is a command line tool to do just what you want.
You have a number of problems to solve: * How to regroup the source and header files ideally * How to automate the code modifications to carry this out In both cases, you need a robust C++ parser with full name resolution to determine the dependencies accurately. Then you need machinery that can reliably modify the ...
8,852,502
The source code of our application is hundreds of thousands of line, thousands of files, and in places very old - the app was first written in 1995 or 1996. Over the past few years my team has greatly improved the quality of the source, but one issue remains that particularly bugs me: a lot of classes have a lot of met...
2012/01/13
[ "https://Stackoverflow.com/questions/8852502", "https://Stackoverflow.com", "https://Stackoverflow.com/users/121689/" ]
You might try [Lazy C++](https://github.com/driedfruit/lzz). I have not used it, but I believe it is a command line tool to do just what you want.
XE2 includes a new static analyzer. It might be worthwhile to give the new version of C++Builer's trial a spin.
8,852,502
The source code of our application is hundreds of thousands of line, thousands of files, and in places very old - the app was first written in 1995 or 1996. Over the past few years my team has greatly improved the quality of the source, but one issue remains that particularly bugs me: a lot of classes have a lot of met...
2012/01/13
[ "https://Stackoverflow.com/questions/8852502", "https://Stackoverflow.com", "https://Stackoverflow.com/users/121689/" ]
If the code is working then I would vote against any major automated rewrite. Lots of work could be involved fixing it up. Small iterative improvements over time is a better technique as you will be able to test each change in isolation (and add unit tests). Anyway your major complaint about not being able to find ...
You have a number of problems to solve: * How to regroup the source and header files ideally * How to automate the code modifications to carry this out In both cases, you need a robust C++ parser with full name resolution to determine the dependencies accurately. Then you need machinery that can reliably modify the ...
8,852,502
The source code of our application is hundreds of thousands of line, thousands of files, and in places very old - the app was first written in 1995 or 1996. Over the past few years my team has greatly improved the quality of the source, but one issue remains that particularly bugs me: a lot of classes have a lot of met...
2012/01/13
[ "https://Stackoverflow.com/questions/8852502", "https://Stackoverflow.com", "https://Stackoverflow.com/users/121689/" ]
If the code is working then I would vote against any major automated rewrite. Lots of work could be involved fixing it up. Small iterative improvements over time is a better technique as you will be able to test each change in isolation (and add unit tests). Anyway your major complaint about not being able to find ...
XE2 includes a new static analyzer. It might be worthwhile to give the new version of C++Builer's trial a spin.
43,180,203
I have a Mobile First project with Eclipse, how do I remove `Cordova` for android only or remove the `cordova` plugin for that particular project? I did tried to use the `cordova` plugin list command in the project but it always showing me this is not a `cordova-based` project. However, the `Cordova` are inside the ``...
2017/04/03
[ "https://Stackoverflow.com/questions/43180203", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2713077/" ]
Your problem is here: ``` literal.Text = tableData.ToString(); literal2.Text = tableData.ToString(); literal3.Text = tableData.ToString(); ``` It should be: ``` literal.Text = tableData.ToString(); literal2.Text = tableData2.ToString(); literal3.Text = tableData3.ToString(); ``` The difference is that I've specif...
Change below code: ``` literal.Text = tableData.ToString(); literal2.Text = tableData2.ToString(); literal3.Text = tableData3.ToString(); ```
110,821
I just cut an object in half and then mirrored it. Before i joined the objects, they looked perfectly similar, but after joining, one half is darker than the other. I tried some stuff and i did delete doubles, and i checked the material but it all doesn't help That's the thing, after joining the 2 halves: [![thats th...
2018/06/15
[ "https://blender.stackexchange.com/questions/110821", "https://blender.stackexchange.com", "https://blender.stackexchange.com/users/57857/" ]
I have 2 possible solutions. One, try (in edit mode) pressing {control n} which will recalculate the normals. If the normals are incorrect then it will fix that. Otherwise, it's just a question of shading.
My solution is. Roughness set it to 1.0. I'm creating character, I really don't know how to do. But when I did it. It goes fine. Maybe after applying Mirror then that's the time to adjust roughness again if you need.
110,821
I just cut an object in half and then mirrored it. Before i joined the objects, they looked perfectly similar, but after joining, one half is darker than the other. I tried some stuff and i did delete doubles, and i checked the material but it all doesn't help That's the thing, after joining the 2 halves: [![thats th...
2018/06/15
[ "https://blender.stackexchange.com/questions/110821", "https://blender.stackexchange.com", "https://blender.stackexchange.com/users/57857/" ]
I have 2 possible solutions. One, try (in edit mode) pressing {control n} which will recalculate the normals. If the normals are incorrect then it will fix that. Otherwise, it's just a question of shading.
Remove Mirror modifier. Object Mode > CRTL+A, Apply all transformation, then add Mirror Modifier again. Hahahahaha can't believe I remember that 4 seconds to some videos I watch.
31,694,639
I have a JSON file that was filtered and lost the original structure. Each line of the file looks like this: ``` {u'spec1': {u'property1': u'12345', u'property2': 1234}, u'spec2': {u'property3': u'98754', u'property4': u'val1'}} ``` `json.loads` doesn't work and `ast.literal_eval` doesn't work. I guess I have 2 issu...
2015/07/29
[ "https://Stackoverflow.com/questions/31694639", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4678453/" ]
You can unwrap it this way: ``` if let yourStr = str_VAR?.toInt() { println("str_VAR = \(yourStr)") //"str_VAR = 100" println(yourStr) //"100" } ``` Refer [THIS](https://stackoverflow.com/questions/24034483/what-is-an-unwrapped-value-in-swift) for more info. **When to use “if let”?** `if...
Try this: ``` if let i = str_VAR?.toInt() { println("\(i)") } ```
31,694,639
I have a JSON file that was filtered and lost the original structure. Each line of the file looks like this: ``` {u'spec1': {u'property1': u'12345', u'property2': 1234}, u'spec2': {u'property3': u'98754', u'property4': u'val1'}} ``` `json.loads` doesn't work and `ast.literal_eval` doesn't work. I guess I have 2 issu...
2015/07/29
[ "https://Stackoverflow.com/questions/31694639", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4678453/" ]
At the time of writing, the other answers on this page used old Swift syntax. This is an update. Convert Optional String to Int: `String? -> Int` ================================================ ``` let optionalString: String? = "100" if let string = optionalString, let myInt = Int(string) { print("Int : \(myInt...
Try this: ``` if let i = str_VAR?.toInt() { println("\(i)") } ```
454,155
Good afternoon, I have an economics time series of around 3300 daily observations that go over 10 years. I already developed and ARIMA(1,1,1) Model based on the autocorrelation and partial autocorrelation correlograms and some unit root tests to determine whether it was necessary to differentiate the series or not. ...
2020/03/14
[ "https://stats.stackexchange.com/questions/454155", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/216102/" ]
Usually, you would not care about both of them simultaneously. Depending on the goal of your analysis (say, description vs. prediction vs. causal inference), you would care about at most one of them. **Description**$\color{red}{^\*}$ Multicollinearity (MC) is just a fact to be mentioned, just one of the characteri...
If your goal is inference, multicollinearity is problematic. Consider multiple linear regression where the beta parameters help us estimate the increase or decrease in Y for a unit increase in X1, all other variables held constant. Multicollinearity has the effect of inflating the standard errors of the beta parameters...
23,766,043
I'm writing a wrapper for a static API (Jenkins CI) and I'm trying to make my life easier when dealing with serialized objects I receive from a .Net System.Net.WebResponse by writing a function into the object class to perform the WebRequest and get the object. This works fine until I want to initialize an instance of ...
2014/05/20
[ "https://Stackoverflow.com/questions/23766043", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3657486/" ]
On machines where a C `long` integer is 64-bit, `numpy.random.binomial()` will accept and generate 64-bit integers. Most 64-bit platforms except for Windows are such. For example, on my 64-bit OS X machine: ``` [~] |11> np.random.binomial(1 << 40, 0.5) 549755265539 [~] |12> np.random.binomial(1 << 40, 0.5) > (1<<32) ...
There is an exact and efficient sampler to generate binomial(*n*, 1/2) random variates, even if *n* is large, described in Bringmann et al. 2014. An algorithm that is equivalent to the one described in that paper is as follows: 1. If *n* is less than 4, generate *n* unbiased random bits (zeros or ones) and return thei...
33,949,443
As title, I use C to do this job between two programs in Linux system. But, I encounter some problem. Assuming that I have a server write data to FIFO in ten rounds, and the client will read each round data and write another FIFO to feed back to server. The client will block in each round until that the server writer ...
2015/11/27
[ "https://Stackoverflow.com/questions/33949443", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4722964/" ]
as TonyB said, the `fopen()` function will return a file pointer `FILE*` ``` FILE *fp_R, *fp_W; char temp[100]; fp_R = fopen(FIFO_R,"rb"); fp_W = fopen(FIFO_W,"wb"); for ( i = 0 ; i < 10 ; i ++ ) { char* ret = fgets(temp, 100, fp_R); while(ret == null) { Sleep(1); } Handle Data; fprintf(fp_W,DATA...
Add 1 line and try as below: ``` int fp_R,fp_W; char temp[100]; fp_R = fopen(FIFO_R,"rb"); fp_W = fopen(FIFO_W,"wb"); for ( i = 0 ; i < 10 ; i ++ ) { sleep(1); or usleep(10);//try it fgets will wait for some time bcz of this fgets(temp, 100, fp_R); Handle Data; fprintf(fp_W,DATA); } ```
33,949,443
As title, I use C to do this job between two programs in Linux system. But, I encounter some problem. Assuming that I have a server write data to FIFO in ten rounds, and the client will read each round data and write another FIFO to feed back to server. The client will block in each round until that the server writer ...
2015/11/27
[ "https://Stackoverflow.com/questions/33949443", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4722964/" ]
`read(2)` on a fifo will block until there's data available, or the writing side `close(2)`es its open FD. (In which case you will get EOF). --- Run your program under `strace`, to see the system calls it makes. e.g. ### Reading side ``` peter@tesla:/tmp$ mkfifo mypipe peter@tesla:/tmp$ strace cat mypipe execve("/...
Add 1 line and try as below: ``` int fp_R,fp_W; char temp[100]; fp_R = fopen(FIFO_R,"rb"); fp_W = fopen(FIFO_W,"wb"); for ( i = 0 ; i < 10 ; i ++ ) { sleep(1); or usleep(10);//try it fgets will wait for some time bcz of this fgets(temp, 100, fp_R); Handle Data; fprintf(fp_W,DATA); } ```
87,742
Good Day When you are inside the wordpress ctrl panel, and you edit/create posts, do theme changes etc, where does Wordpress store all that content? In which files? Thank you
2013/02/21
[ "https://wordpress.stackexchange.com/questions/87742", "https://wordpress.stackexchange.com", "https://wordpress.stackexchange.com/users/27604/" ]
That information is stored in the MySQL database, not in files like you may be thinking of. They aren't stored in `.php` or `.html` files. If you want to "see" how and where that data is stored the easiest way is to browse the database using a tool like PhpMyAdmin. NOTE: Technically, there are files associated with ...
WordPress does not save anything in files. All settings are stored in your database, normally the `options` table. Posts are stored in `posts` and `postmeta`. You can have a look at the [Database Description](http://codex.wordpress.org/Database_Description) to get a better understanding.
87,742
Good Day When you are inside the wordpress ctrl panel, and you edit/create posts, do theme changes etc, where does Wordpress store all that content? In which files? Thank you
2013/02/21
[ "https://wordpress.stackexchange.com/questions/87742", "https://wordpress.stackexchange.com", "https://wordpress.stackexchange.com/users/27604/" ]
WordPress does not save anything in files. All settings are stored in your database, normally the `options` table. Posts are stored in `posts` and `postmeta`. You can have a look at the [Database Description](http://codex.wordpress.org/Database_Description) to get a better understanding.
If your theme is called *my-theme* the configuration is stored as serialized PHP object in a option name called theme\_mods\_*my-theme* in the `wp_options` table in your Wordpress database. Use any Database editor tool to execute the query: ``` SELECT * FROM `wp_options` WHERE `option_name` LIKE 'theme_mods_%' ``` w...
87,742
Good Day When you are inside the wordpress ctrl panel, and you edit/create posts, do theme changes etc, where does Wordpress store all that content? In which files? Thank you
2013/02/21
[ "https://wordpress.stackexchange.com/questions/87742", "https://wordpress.stackexchange.com", "https://wordpress.stackexchange.com/users/27604/" ]
That information is stored in the MySQL database, not in files like you may be thinking of. They aren't stored in `.php` or `.html` files. If you want to "see" how and where that data is stored the easiest way is to browse the database using a tool like PhpMyAdmin. NOTE: Technically, there are files associated with ...
If your theme is called *my-theme* the configuration is stored as serialized PHP object in a option name called theme\_mods\_*my-theme* in the `wp_options` table in your Wordpress database. Use any Database editor tool to execute the query: ``` SELECT * FROM `wp_options` WHERE `option_name` LIKE 'theme_mods_%' ``` w...
26,281,743
``` Sub insertHeader() Dim rng1 As Range Dim ws As Worksheet Dim c1 As Range Dim rng2 As Range Set ws = Worksheets("Sheet1") Set rng1 = ws.Range("A2:AV2") For Each c1 In rng1 If c1.Value <> "" Then c1.Value = c1.Offset(-1) & "_" & c1.Value End If Next End ...
2014/10/09
[ "https://Stackoverflow.com/questions/26281743", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2321589/" ]
namespace is the currently relevant feature. But isn't possible to get a friend namespace, no more that it is possible to template a namespace or pass a namespace as a template parameters, two common cases where struct with only static members are commonly used as a work around. So there is a good precedent of using a ...
Friends do not have to be classes. You can declare a function to be a friend.
26,281,743
``` Sub insertHeader() Dim rng1 As Range Dim ws As Worksheet Dim c1 As Range Dim rng2 As Range Set ws = Worksheets("Sheet1") Set rng1 = ws.Range("A2:AV2") For Each c1 In rng1 If c1.Value <> "" Then c1.Value = c1.Offset(-1) & "_" & c1.Value End If Next End ...
2014/10/09
[ "https://Stackoverflow.com/questions/26281743", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2321589/" ]
namespace is the currently relevant feature. But isn't possible to get a friend namespace, no more that it is possible to template a namespace or pass a namespace as a template parameters, two common cases where struct with only static members are commonly used as a work around. So there is a good precedent of using a ...
You typically implement such functions as free-standing functions which are members of the target class. You can implement them "literally" inside the class but still they are free-standing. So you don't need to repeat yourself when listing all those functions as friends + implement them: ``` class MyClass { int x...
6,509,869
I have existing PDFs to which I need to dynamically add an image/images. The image comes from a file upload. Once I have the file uploaded, how can specify where to place the image on the PDF. One code snippet I found does not work correctly. This needs to work for PDFs with any number of pages. From what I understand,...
2011/06/28
[ "https://Stackoverflow.com/questions/6509869", "https://Stackoverflow.com", "https://Stackoverflow.com/users/31298/" ]
I found my answer: The page number has to be set in `com.lowagie.text.pdf.PdfStamper.getOverContent()`: ``` content = stamper.getOverContent(myPageNum); ``` Knew it was easy.
are you using CF8+? You can use ``` <cfpdf action="addWatermark" source="myPDF.pdf" image="myImage.jpg" position="0,0" rotation="0" showOnPrint="true" opacity="10"> ```
6,509,869
I have existing PDFs to which I need to dynamically add an image/images. The image comes from a file upload. Once I have the file uploaded, how can specify where to place the image on the PDF. One code snippet I found does not work correctly. This needs to work for PDFs with any number of pages. From what I understand,...
2011/06/28
[ "https://Stackoverflow.com/questions/6509869", "https://Stackoverflow.com", "https://Stackoverflow.com/users/31298/" ]
You're getting your "OverContent" from `stamper.getOverContent(reader.getNumberOfPages());`. The parameter for `getOverContent()` is the page number. So your code is getting a `PdfContentByte` for the last page, not the first.
I found my answer: The page number has to be set in `com.lowagie.text.pdf.PdfStamper.getOverContent()`: ``` content = stamper.getOverContent(myPageNum); ``` Knew it was easy.
6,509,869
I have existing PDFs to which I need to dynamically add an image/images. The image comes from a file upload. Once I have the file uploaded, how can specify where to place the image on the PDF. One code snippet I found does not work correctly. This needs to work for PDFs with any number of pages. From what I understand,...
2011/06/28
[ "https://Stackoverflow.com/questions/6509869", "https://Stackoverflow.com", "https://Stackoverflow.com/users/31298/" ]
You're getting your "OverContent" from `stamper.getOverContent(reader.getNumberOfPages());`. The parameter for `getOverContent()` is the page number. So your code is getting a `PdfContentByte` for the last page, not the first.
are you using CF8+? You can use ``` <cfpdf action="addWatermark" source="myPDF.pdf" image="myImage.jpg" position="0,0" rotation="0" showOnPrint="true" opacity="10"> ```
3,637,005
Let $v:C\to \mathbb{R}^m$ be a $C^1$-vectorfield, where $C$ is a compact subset of $\mathbb{R}^m$. I want to prove that there is a constant $L>0$ such that $$\lvert Dv\_u \cdot w\rvert \leq L\cdot\lvert w \rvert$$ for all $u\in C$ and $w\in \mathbb{R}^m$, where $Dv\_u$ denotes the jacobian of $v$ at $u$. By using the u...
2020/04/21
[ "https://math.stackexchange.com/questions/3637005", "https://math.stackexchange.com", "https://math.stackexchange.com/users/776794/" ]
$\frac {c^2 - 14c - 28}{(c-7)^2} = -\frac {72}{5}$ I think the easiest thing to do is cross multiply. $5(c^2 - 14c - 28) = -72(c-7)^2$ That looks like it is going to make some big numbers, but it might be nicer than it, at first looks. Expanding the right handd side: $5(c^2 - 14c - 28) = -72(c^2 - 14c + 49)$ We ha...
this seems like a homework problem. Therefore, I'm happy to guide you, but you need to do some of the work yourself. Start out by expanding $(c - 7)^2$. This yields $c^2 - 14c + 49$. Then, cross-multiply to get rid of the denominators. That is, multiply both sides of the equation by $\frac{5}{5}$, and then multiply bot...
2,442,158
I have some difficulties proving the following statement: $\sqrt {n+1} - \sqrt n ≤ 1$ Thus far I have the following: The root of a positive integer is always smaller than or equal to the integer, since $a^2 ≥ a$ where a is a positive integer. Therefore $\sqrt {n+1} ≤ \sqrt n + 1$ and thus $\sqrt {n+1} - \sqrt n ≤ 1$...
2017/09/23
[ "https://math.stackexchange.com/questions/2442158", "https://math.stackexchange.com", "https://math.stackexchange.com/users/415597/" ]
Hint: $$\sqrt{n+1}-\sqrt{n}=\frac{(\sqrt{n+1}-\sqrt{n})(\sqrt{n+1}+\sqrt{n})}{\sqrt{n+1}+\sqrt{n}}$$ Use $(a+b)(a-b)=(a^2-b^2)$ for the numerator.
0) For $n=0:$ $(1)^{1/2}-0 =1$. 1) Consider $n \ne 0$. $f(x) = x^{1/2}$ is continuos in $[n,n+1]$, differentiable in $(n,n+1)$. Mean value Theorem: $\dfrac{f(n+1) -f(n)}{1} = f'(t)$, where $t \in (n,n+1)$. $(n+1)^{1/2} - (n)^{1/2} =$ $ (1/2)(t)^{-1/2} \lt 1$, where $t \in (n,n+1)$.
2,442,158
I have some difficulties proving the following statement: $\sqrt {n+1} - \sqrt n ≤ 1$ Thus far I have the following: The root of a positive integer is always smaller than or equal to the integer, since $a^2 ≥ a$ where a is a positive integer. Therefore $\sqrt {n+1} ≤ \sqrt n + 1$ and thus $\sqrt {n+1} - \sqrt n ≤ 1$...
2017/09/23
[ "https://math.stackexchange.com/questions/2442158", "https://math.stackexchange.com", "https://math.stackexchange.com/users/415597/" ]
write $$\sqrt{n+1}\le 1+\sqrt{n}$$ after squaring (all summands are positive) we get $$0\le \sqrt{n}$$ which is true.
$\sqrt {n+1} - \sqrt n ≤ 1$ $(\sqrt {n+1} - \sqrt n) (\sqrt {n+1} + \sqrt n)≤\sqrt {n+1} + \sqrt n $ $ 1 \leq \sqrt {n+1} + \sqrt n=f(n)$ $f(n)$ increase on [0,$\infty$]...with minimum at $n=0$ then $f(n)=1$
2,442,158
I have some difficulties proving the following statement: $\sqrt {n+1} - \sqrt n ≤ 1$ Thus far I have the following: The root of a positive integer is always smaller than or equal to the integer, since $a^2 ≥ a$ where a is a positive integer. Therefore $\sqrt {n+1} ≤ \sqrt n + 1$ and thus $\sqrt {n+1} - \sqrt n ≤ 1$...
2017/09/23
[ "https://math.stackexchange.com/questions/2442158", "https://math.stackexchange.com", "https://math.stackexchange.com/users/415597/" ]
Hint: $$\sqrt{n+1}-\sqrt{n}=\frac{(\sqrt{n+1}-\sqrt{n})(\sqrt{n+1}+\sqrt{n})}{\sqrt{n+1}+\sqrt{n}}$$ Use $(a+b)(a-b)=(a^2-b^2)$ for the numerator.
Another method: Show that $\sqrt{x+1}-\sqrt{x} \le 1$ for all non-negative real numbers ... which of course includes all the non-negative integers. One way to do this is to show that the function $f(x)=\sqrt{x+1}-\sqrt{x}$ equals $1$ for $x=0$ and that for all $x$: $f'(x) <0$, i.e. $f(x)$ is a monotonically decreasin...
2,442,158
I have some difficulties proving the following statement: $\sqrt {n+1} - \sqrt n ≤ 1$ Thus far I have the following: The root of a positive integer is always smaller than or equal to the integer, since $a^2 ≥ a$ where a is a positive integer. Therefore $\sqrt {n+1} ≤ \sqrt n + 1$ and thus $\sqrt {n+1} - \sqrt n ≤ 1$...
2017/09/23
[ "https://math.stackexchange.com/questions/2442158", "https://math.stackexchange.com", "https://math.stackexchange.com/users/415597/" ]
write $$\sqrt{n+1}\le 1+\sqrt{n}$$ after squaring (all summands are positive) we get $$0\le \sqrt{n}$$ which is true.
Another method: Show that $\sqrt{x+1}-\sqrt{x} \le 1$ for all non-negative real numbers ... which of course includes all the non-negative integers. One way to do this is to show that the function $f(x)=\sqrt{x+1}-\sqrt{x}$ equals $1$ for $x=0$ and that for all $x$: $f'(x) <0$, i.e. $f(x)$ is a monotonically decreasin...
2,442,158
I have some difficulties proving the following statement: $\sqrt {n+1} - \sqrt n ≤ 1$ Thus far I have the following: The root of a positive integer is always smaller than or equal to the integer, since $a^2 ≥ a$ where a is a positive integer. Therefore $\sqrt {n+1} ≤ \sqrt n + 1$ and thus $\sqrt {n+1} - \sqrt n ≤ 1$...
2017/09/23
[ "https://math.stackexchange.com/questions/2442158", "https://math.stackexchange.com", "https://math.stackexchange.com/users/415597/" ]
write $$\sqrt{n+1}\le 1+\sqrt{n}$$ after squaring (all summands are positive) we get $$0\le \sqrt{n}$$ which is true.
Not exactly number-theoretic, but for $n=0$ the inequality is obvious, while for $n\ge1$ we have $$\sqrt{n+1}-\sqrt n=\int\_n^{n+1}{2dx\over\sqrt x}\le\int\_n^{n+1}{dx\over2\sqrt n}={1\over2\sqrt n}\le1$$
2,442,158
I have some difficulties proving the following statement: $\sqrt {n+1} - \sqrt n ≤ 1$ Thus far I have the following: The root of a positive integer is always smaller than or equal to the integer, since $a^2 ≥ a$ where a is a positive integer. Therefore $\sqrt {n+1} ≤ \sqrt n + 1$ and thus $\sqrt {n+1} - \sqrt n ≤ 1$...
2017/09/23
[ "https://math.stackexchange.com/questions/2442158", "https://math.stackexchange.com", "https://math.stackexchange.com/users/415597/" ]
Hint: $$\sqrt{n+1}-\sqrt{n}=\frac{(\sqrt{n+1}-\sqrt{n})(\sqrt{n+1}+\sqrt{n})}{\sqrt{n+1}+\sqrt{n}}$$ Use $(a+b)(a-b)=(a^2-b^2)$ for the numerator.
Not exactly number-theoretic, but for $n=0$ the inequality is obvious, while for $n\ge1$ we have $$\sqrt{n+1}-\sqrt n=\int\_n^{n+1}{2dx\over\sqrt x}\le\int\_n^{n+1}{dx\over2\sqrt n}={1\over2\sqrt n}\le1$$
2,442,158
I have some difficulties proving the following statement: $\sqrt {n+1} - \sqrt n ≤ 1$ Thus far I have the following: The root of a positive integer is always smaller than or equal to the integer, since $a^2 ≥ a$ where a is a positive integer. Therefore $\sqrt {n+1} ≤ \sqrt n + 1$ and thus $\sqrt {n+1} - \sqrt n ≤ 1$...
2017/09/23
[ "https://math.stackexchange.com/questions/2442158", "https://math.stackexchange.com", "https://math.stackexchange.com/users/415597/" ]
write $$\sqrt{n+1}\le 1+\sqrt{n}$$ after squaring (all summands are positive) we get $$0\le \sqrt{n}$$ which is true.
Another way, which does not use the standard $a^2-b^2 = (a-b)(a+b)$: Since $(\sqrt{n}+1/2)^2 = n+\sqrt{n}+\frac14 \gt n+1 $ for $n \ge 1$, $\sqrt{n+1} \lt \sqrt{n}+\frac12$.
2,442,158
I have some difficulties proving the following statement: $\sqrt {n+1} - \sqrt n ≤ 1$ Thus far I have the following: The root of a positive integer is always smaller than or equal to the integer, since $a^2 ≥ a$ where a is a positive integer. Therefore $\sqrt {n+1} ≤ \sqrt n + 1$ and thus $\sqrt {n+1} - \sqrt n ≤ 1$...
2017/09/23
[ "https://math.stackexchange.com/questions/2442158", "https://math.stackexchange.com", "https://math.stackexchange.com/users/415597/" ]
write $$\sqrt{n+1}\le 1+\sqrt{n}$$ after squaring (all summands are positive) we get $$0\le \sqrt{n}$$ which is true.
0) For $n=0:$ $(1)^{1/2}-0 =1$. 1) Consider $n \ne 0$. $f(x) = x^{1/2}$ is continuos in $[n,n+1]$, differentiable in $(n,n+1)$. Mean value Theorem: $\dfrac{f(n+1) -f(n)}{1} = f'(t)$, where $t \in (n,n+1)$. $(n+1)^{1/2} - (n)^{1/2} =$ $ (1/2)(t)^{-1/2} \lt 1$, where $t \in (n,n+1)$.
2,442,158
I have some difficulties proving the following statement: $\sqrt {n+1} - \sqrt n ≤ 1$ Thus far I have the following: The root of a positive integer is always smaller than or equal to the integer, since $a^2 ≥ a$ where a is a positive integer. Therefore $\sqrt {n+1} ≤ \sqrt n + 1$ and thus $\sqrt {n+1} - \sqrt n ≤ 1$...
2017/09/23
[ "https://math.stackexchange.com/questions/2442158", "https://math.stackexchange.com", "https://math.stackexchange.com/users/415597/" ]
Hint: $$\sqrt{n+1}-\sqrt{n}=\frac{(\sqrt{n+1}-\sqrt{n})(\sqrt{n+1}+\sqrt{n})}{\sqrt{n+1}+\sqrt{n}}$$ Use $(a+b)(a-b)=(a^2-b^2)$ for the numerator.
Another way, which does not use the standard $a^2-b^2 = (a-b)(a+b)$: Since $(\sqrt{n}+1/2)^2 = n+\sqrt{n}+\frac14 \gt n+1 $ for $n \ge 1$, $\sqrt{n+1} \lt \sqrt{n}+\frac12$.
2,442,158
I have some difficulties proving the following statement: $\sqrt {n+1} - \sqrt n ≤ 1$ Thus far I have the following: The root of a positive integer is always smaller than or equal to the integer, since $a^2 ≥ a$ where a is a positive integer. Therefore $\sqrt {n+1} ≤ \sqrt n + 1$ and thus $\sqrt {n+1} - \sqrt n ≤ 1$...
2017/09/23
[ "https://math.stackexchange.com/questions/2442158", "https://math.stackexchange.com", "https://math.stackexchange.com/users/415597/" ]
write $$\sqrt{n+1}\le 1+\sqrt{n}$$ after squaring (all summands are positive) we get $$0\le \sqrt{n}$$ which is true.
Hint: $$\sqrt{n+1}-\sqrt{n}=\frac{(\sqrt{n+1}-\sqrt{n})(\sqrt{n+1}+\sqrt{n})}{\sqrt{n+1}+\sqrt{n}}$$ Use $(a+b)(a-b)=(a^2-b^2)$ for the numerator.
5,226,862
Ok this is simple, I want to write a huge paragraph of text to a file. I know I can do ``` f=open("blah.txt",'w') f.write("blah blah \n") f.write("bla blah blah ") f.close() ``` but what is a little more elegant solution?
2011/03/08
[ "https://Stackoverflow.com/questions/5226862", "https://Stackoverflow.com", "https://Stackoverflow.com/users/612258/" ]
``` f.write("""I’ve got a lovely bunch of coconuts There they are all standing in a row Big ones, small ones, some as big as your head Give them a twist a flick of the wrist That’s what the showman said""") ```
You can use the 3 quote string declaration like so. ``` >>> a = '''blah blah blah blah blah blah blah blah blah blah blah blah''' >>> print(a) blah blah blah blah blah blah blah blah blah blah blah blah ```
2,625,899
What is the difference between 2\*a and 2a? What is the difference between 2(3+4) and 2\*(3+4)? We all know that omitting the multiplication sign still means multiplication so nothing changed! This question is related to a well-known mathematical debate as follows: 6/2(1+2) If we use the rule of order of operation wh...
2018/01/29
[ "https://math.stackexchange.com/questions/2625899", "https://math.stackexchange.com", "https://math.stackexchange.com/users/509327/" ]
The difference between any two integer solutions is an integer multiple of the cross product $(3,-4,1).$ By inspection, I can see that $(0,20,0)$ is a solution. Next $$ (3, 16,1), $$ $$ (6, 12,2) $$ $$ (9, 8,3) $$ $$ (12, 4,4) $$
$x+2y+5z=40$ and $x+y+z=20$ and $x,y,z > 0$ Subtracting you get $y + 4z = 20$, that is $y = 20-4z$ $y>0$ and $z>0$ implies $z \in \{1,2,3,4\}$. Substituting $y=20-4z$ into $x+y+z=20$, we get $x=3z$. So $x = 3z, \ y = 20-4z$, and $z \in \{1,2,3,4\}$.
67,787,148
pandas get days in a column from start date? start\_date = '01/01/2021' (dd/mm/yyyy) df ``` dates 2021-01-01 2021-01-02 . . . 2021-02-01 . . . 2021-06-01 (end date should be current date) ```
2021/06/01
[ "https://Stackoverflow.com/questions/67787148", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15590480/" ]
According to a latest confluent doc `NONE`: schema compatibility checks are disabled [docs](https://docs.confluent.io/platform/current/schema-registry/develop/api.html#compatibility):
The whole problem with serialisation was about the usage of the following flag in the kafka config: ``` "schema.registry.url" "key.serializer" "key.deserializer" "value.serializer" "value.deserializer" ``` Setting this flags in flink, even if they are logically correct leads to a undebuggable schema validation and s...
255,741
I'm a complete Ada newbie, though I've used Pascal for 2-3 years during HS. IIRC, it is possible to call Pascal compiled functions from C/C++. Is it possible to call procedures & functions written in Ada from C++?
2008/11/01
[ "https://Stackoverflow.com/questions/255741", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14069/" ]
According to this [old tutorial](http://www.ghs.com/download/whitepapers/ada_c++.pdf), it should be possible. However, as illustrated by [this thread](http://archives.devshed.com/forums/programming-132/problem-passing-in-out-parameter-from-c-to-ada-1023388.html), you must be careful with the c++ extern "C" definitions...
That kind of thing is done all the time. The trick is to tell both sides to use a "C"-style calling protocol for the routine. In C++ this is done with extern "C" declarations, and in the Ada side with pragma Export ("C", ... Look those up in your favorite respective reference sources for details. Watch out for pointer...
255,741
I'm a complete Ada newbie, though I've used Pascal for 2-3 years during HS. IIRC, it is possible to call Pascal compiled functions from C/C++. Is it possible to call procedures & functions written in Ada from C++?
2008/11/01
[ "https://Stackoverflow.com/questions/255741", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14069/" ]
According to this [old tutorial](http://www.ghs.com/download/whitepapers/ada_c++.pdf), it should be possible. However, as illustrated by [this thread](http://archives.devshed.com/forums/programming-132/problem-passing-in-out-parameter-from-c-to-ada-1023388.html), you must be careful with the c++ extern "C" definitions...
Yes. Several years ago I wrote a short simple demo to prove it. There were two DLLs, one written in C++ and the other in Ada. They just added constants to floating point values. Two apps, one in C++ and one in Ada, each used both the DLL. So every possible combination of C++ calling/called from Ada existed. It all work...
255,741
I'm a complete Ada newbie, though I've used Pascal for 2-3 years during HS. IIRC, it is possible to call Pascal compiled functions from C/C++. Is it possible to call procedures & functions written in Ada from C++?
2008/11/01
[ "https://Stackoverflow.com/questions/255741", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14069/" ]
According to this [old tutorial](http://www.ghs.com/download/whitepapers/ada_c++.pdf), it should be possible. However, as illustrated by [this thread](http://archives.devshed.com/forums/programming-132/problem-passing-in-out-parameter-from-c-to-ada-1023388.html), you must be careful with the c++ extern "C" definitions...
Here's an example using g++/gnatmake 5.3.0: *NOTE: Be careful when passing data between C++ and Ada* **ada\_pkg.ads** ``` package Ada_Pkg is procedure DoSomething (Number : in Integer); pragma Export (C, DoSomething, "doSomething"); end Ada_Pkg; ``` **ada\_pkg.adb** ``` with Ada.Text_I...
255,741
I'm a complete Ada newbie, though I've used Pascal for 2-3 years during HS. IIRC, it is possible to call Pascal compiled functions from C/C++. Is it possible to call procedures & functions written in Ada from C++?
2008/11/01
[ "https://Stackoverflow.com/questions/255741", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14069/" ]
That kind of thing is done all the time. The trick is to tell both sides to use a "C"-style calling protocol for the routine. In C++ this is done with extern "C" declarations, and in the Ada side with pragma Export ("C", ... Look those up in your favorite respective reference sources for details. Watch out for pointer...
Yes. Several years ago I wrote a short simple demo to prove it. There were two DLLs, one written in C++ and the other in Ada. They just added constants to floating point values. Two apps, one in C++ and one in Ada, each used both the DLL. So every possible combination of C++ calling/called from Ada existed. It all work...
255,741
I'm a complete Ada newbie, though I've used Pascal for 2-3 years during HS. IIRC, it is possible to call Pascal compiled functions from C/C++. Is it possible to call procedures & functions written in Ada from C++?
2008/11/01
[ "https://Stackoverflow.com/questions/255741", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14069/" ]
Here's an example using g++/gnatmake 5.3.0: *NOTE: Be careful when passing data between C++ and Ada* **ada\_pkg.ads** ``` package Ada_Pkg is procedure DoSomething (Number : in Integer); pragma Export (C, DoSomething, "doSomething"); end Ada_Pkg; ``` **ada\_pkg.adb** ``` with Ada.Text_I...
That kind of thing is done all the time. The trick is to tell both sides to use a "C"-style calling protocol for the routine. In C++ this is done with extern "C" declarations, and in the Ada side with pragma Export ("C", ... Look those up in your favorite respective reference sources for details. Watch out for pointer...
255,741
I'm a complete Ada newbie, though I've used Pascal for 2-3 years during HS. IIRC, it is possible to call Pascal compiled functions from C/C++. Is it possible to call procedures & functions written in Ada from C++?
2008/11/01
[ "https://Stackoverflow.com/questions/255741", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14069/" ]
Here's an example using g++/gnatmake 5.3.0: *NOTE: Be careful when passing data between C++ and Ada* **ada\_pkg.ads** ``` package Ada_Pkg is procedure DoSomething (Number : in Integer); pragma Export (C, DoSomething, "doSomething"); end Ada_Pkg; ``` **ada\_pkg.adb** ``` with Ada.Text_I...
Yes. Several years ago I wrote a short simple demo to prove it. There were two DLLs, one written in C++ and the other in Ada. They just added constants to floating point values. Two apps, one in C++ and one in Ada, each used both the DLL. So every possible combination of C++ calling/called from Ada existed. It all work...
1,602,436
I was wondering if anybody could give me ballpark figures for translating resx files. Let's say I have 10 Resx files with each about 10K words. What would be the cost to translate those from English to Spanish (or English to German)? For the details, we are using Infragistics controls in our application. IG does not p...
2009/10/21
[ "https://Stackoverflow.com/questions/1602436", "https://Stackoverflow.com", "https://Stackoverflow.com/users/80280/" ]
A ballpark would be .10~.20 USD per word. You need to be careful when translating resx files, especially if translatable and do-not-translate content is mixed together. There are tools like [Alchemy Catalyst](http://www.alchemysoftware.ie/products/alchemy_catalyst.html) and [Lingobit Localizer](http://www.lingobit.co...
As far as pricing is concerned: <http://www.proz.com> is a excellent translators forum. It's probably the best place to start with.
333,757
Can someone help me with a relatively complex command-line file matching pattern? I've got files in a directory as follows: ``` 1.png 1_thumb.png 1-1.png 1-1_thumb.png 1-2.png 1-2_thumb.png 2.png 2_thumb.png 2-1.png 2-1_thumb.png 3.png 3_thumb.png 3-1_thumb.png ``` I want to list all the files that don't have a co...
2011/09/09
[ "https://superuser.com/questions/333757", "https://superuser.com", "https://superuser.com/users/87936/" ]
Assuming that all files with `-n` is a copy and that you don't want the thumbs either, this works in KornShell (ksh), and also in Bash with the `extglob` option set (`shopt -s extglob`): ``` for f in !(*_thumb.png|*-[1-9].png); do g=${f%.png}-1.png test -f $g || echo $f done ```
If it's only "-1" that determines it's a copy, then you have no copy of your 2-1.png or 2-1\_thumb.png files either. If that's your matching criteria and you want the thumbs tested as well, you can do ``` for i in `ls |grep -v "\-1" | cut -f1 -d.`; do if `echo $i | grep thumb > /dev/null`; then test -f ...
28,472,457
I'm trying to to skip the first and last rows in my SQL query (i.e. skip where `sequence=0` and `sequence=4` in this case) but my SQL query does not seem to be working. Any idea why? The logic seems correct: ``` SELECT * FROM waypoint WHERE id NOT IN( (SELECT MIN(ID) FROM waypoint), (SELECT MAX(ID) F...
2015/02/12
[ "https://Stackoverflow.com/questions/28472457", "https://Stackoverflow.com", "https://Stackoverflow.com/users/436493/" ]
You have 7 rows. Their id's are from 1 to 7. Your `not in` clause filters out 1 and 7. If you want to skip first and last with `booking_id=1` you should add this clause to subselects: ``` SELECT * FROM waypoint WHERE id NOT IN( (SELECT MIN(ID) FROM waypoint where booking_id="1"), (SELECT MAX(ID) FRO...
you need to copy your second part of your `where` clause into the select of your `not in` clause, because each `select` is handled for its own and has access to the whole dataset. So you need to add the restriction logic to each `select`. Otherwise your `MAX(ID)` will return 7 because it has access to the whole dataset...
28,472,457
I'm trying to to skip the first and last rows in my SQL query (i.e. skip where `sequence=0` and `sequence=4` in this case) but my SQL query does not seem to be working. Any idea why? The logic seems correct: ``` SELECT * FROM waypoint WHERE id NOT IN( (SELECT MIN(ID) FROM waypoint), (SELECT MAX(ID) F...
2015/02/12
[ "https://Stackoverflow.com/questions/28472457", "https://Stackoverflow.com", "https://Stackoverflow.com/users/436493/" ]
You have 7 rows. Their id's are from 1 to 7. Your `not in` clause filters out 1 and 7. If you want to skip first and last with `booking_id=1` you should add this clause to subselects: ``` SELECT * FROM waypoint WHERE id NOT IN( (SELECT MIN(ID) FROM waypoint where booking_id="1"), (SELECT MAX(ID) FRO...
I dont know if it works and I cannot test it here in the moment but have you tried ``` SELECT * FROM waypoint WHERE booking_id="1" ORDER BY ID LIMIT 2,COUNT(ID) ``` This could be more perfoment because you dont need two subselects.
93,210
6 Jan 2012 v.puzzled, Ubuntu 10.04 Lucid Lynx, Firefox 3.6.24, sun-java6-plugin 6.26-2lucid1: Firefox does not seem to even know that the java plugin is there (it is installed, and re-installed), i.e., it does not show up in Firefox's tools -> addons -> plugins, nor does it run. (It did, until some recent update.-)
2012/01/06
[ "https://askubuntu.com/questions/93210", "https://askubuntu.com", "https://askubuntu.com/users/40748/" ]
Try installing the open source java plugin `sudo apt-get install icedtea6-plugin` It works for me.
(Solved for me) Update of my recent post: I had the same problem as reported by lloyd allison after the recent update on the Ubuntu 10.04 64-bit system. The problem was compounded but the presence of the NoScript (2.2.6) plugin (which I like ;). The solution was: a) disable NoScript and stop firefox b) install icedt...