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
37,852,417
I have two entities: ``` public class Transport { [Key] public int TransportID {get; set;} public string Model { get; set; } public string Brand { get; set; } } public class TransportOwner { [Key] public int TransportOwnerID {get; set;} public in...
2016/06/16
[ "https://Stackoverflow.com/questions/37852417", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6324239/" ]
Well you can actually do this: ``` List<OwnerTransportTransport> ListIWantToShow = (from transport in dbContext.TransportOwner select new OwnerTransportTransport() { ID = transport.ID, Transp...
According to user3185569 answer, I wrote this: ``` var query = DBContext.TransportOwner.AsQueryable() .Where(st => st.OwnerID.StartsWith(someParam)); List<OwnerTransportTransport> ListIWantToShow = query.Select(transport => new OwnerTransportTransport() { ID = trans...
2,710,528
I have a simple grammar: ``` grammar sample; options { output = AST; } assignment : IDENT ':=' expr ';' ; expr : factor ('*' factor)* ; factor : primary ('+' primary)* ; primary : NUM | '(' expr ')' ; IDENT : ('a'..'z')+ ; NUM : ('0'..'9')+ ; WS : (' '|'\n'|'\t'|'\r')+ {$ch...
2010/04/26
[ "https://Stackoverflow.com/questions/2710528", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17312/" ]
No, not a bug, AFAIK. Take your `expr` rule for example: ``` expr : factor ('*' factor)* -> ^('*' factor+) ; ``` since the `*` might not be present, it should also not be in your AST rewrite rule. So, the above is incorrect and ANTLR complaining about it *is* correct. Now if you insert an imaginary toke...
If you want to generate an N-ary tree for the '\*' operator with all children at the same level you can do this: ``` expr : (s=factor -> factor) (('*' factor)+ -> ^('*' $s factor+))? ; ``` Here are some examples of what this will return: ``` Tokens: AST factor: factor factor '*' factor: ^('*' factor factor)...
62,144,628
[![enter image description here](https://i.stack.imgur.com/JCL2V.jpg)](https://i.stack.imgur.com/JCL2V.jpg) One String value is coming from my firebase: ```java if (task.isSuccessful()) { // binding.contentMain.noData.setVisibility(View.GONE); for (QueryDocumentSnapshot document : Objects.requireNonNull(tas...
2020/06/02
[ "https://Stackoverflow.com/questions/62144628", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
I have a solution that I am running with. It's a separate Wordpress site with the latest posts accessed via the built-in API (<https://developer.wordpress.org/rest-api/reference/posts/>) I will be getting all the posts in a category with: ``` curl https://example.com/wp-json/wp/v2/posts ``` Then storing the posts ...
Looks like you want Dynamic News Feature in your existing PHP Web Application. And you want to build that specific feature in Wordpress. I don't think it's a good idea to use Wordpress CMS for small features like this. IF you already have full functional PHP Web Application then I would recommend to use same Web Appli...
57,711,233
I want the getUserToken function and userLogin function to run before the next line which is the Firebase Authentication. For it to run ansynchronous ``` @IBAction func loginButtonPressed(_ sender: UIButton) { self.showSpinner(onView: self.view) guard var phoneNumber = phoneTextField.getRawPhoneNumber() ...
2019/08/29
[ "https://Stackoverflow.com/questions/57711233", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10598550/" ]
See [this page](https://commons.apache.org/proper/commons-configuration/userguide/howto_basicfeatures.html#Variable_Interpolation) in the documentation, which says: > > Below is some more information related to variable interpolation users should be aware of: > > > * ... > * Variable interpolation is done by all pr...
It is also possible to use it in generic way with placeholders substitution like below: ``` config.get(Object.class, propName); ``` Unlike `getProperty` method the `get` method with `Object.class` parameter will return value of original class with variables interpolated.
38,556,408
I have a GridView holding TextViews in my app and for some reason the last column is getting it's edge cut (see screenshot below). I'm guessing it has something to do with the little bit of gap in the left side of the GridView, but I don't know whats causing it. What am I doing wrong here? [![screenshot](https://i.sta...
2016/07/24
[ "https://Stackoverflow.com/questions/38556408", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5199189/" ]
1) add to your sinchClient `mSinchClient.setSupportManagedPush(true);` to receive push notification message when you receive call 2) Set Up a Firebase Cloud Messaging on your app 3) onMessageReceived transfer data to your IncomingTransparentCallActivity ``` public class FirebaseMsgService extends FirebaseMessagi...
It seems like you haven't declared your Service in manifest file. Do it following way: ``` <service android:name=".SinchService" android:exported="false" /> ``` If you have, please share your manifest file with us.
58,352
I have defined a command for a letter in the margin as follows (using marginnote because marginpar did not work at all): ``` \newcommand{\sideletter}[1]{\marginnote{\Huge\bf\sffamily\color{orange} #1}} ``` I appreciate that there are likely going to be issues with vertical alignment, due to the different fonts/sizes...
2012/06/02
[ "https://tex.stackexchange.com/questions/58352", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/15228/" ]
I would go about this a little differently. It seems to me that your 'Q' and 'A' could be wrapped up in a `list` environment, which makes me immediately think of the `enumitem` package. ![enter image description here](https://i.stack.imgur.com/1Exbe.png) Instead of using a `command` I have used an `environment`. Pe...
``` \newcommand{\sideletter}[1]{\marginnote{\Huge\bf\sffamily\color{orange} #1}} ``` Here the letter will be the start of a paragraph in a fixed width parbox, so it will be flush *left* in that box and the distance between the letter and the main text will depend on the width and sidebearings of the letter. Also `\b...
58,352
I have defined a command for a letter in the margin as follows (using marginnote because marginpar did not work at all): ``` \newcommand{\sideletter}[1]{\marginnote{\Huge\bf\sffamily\color{orange} #1}} ``` I appreciate that there are likely going to be issues with vertical alignment, due to the different fonts/sizes...
2012/06/02
[ "https://tex.stackexchange.com/questions/58352", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/15228/" ]
I would go about this a little differently. It seems to me that your 'Q' and 'A' could be wrapped up in a `list` environment, which makes me immediately think of the `enumitem` package. ![enter image description here](https://i.stack.imgur.com/1Exbe.png) Instead of using a `command` I have used an `environment`. Pe...
Regardless of the method of alignment (e.g., `\marginpar`, list, etc.) by the end of the day alignment happens by pushing some material towards the edge of some box. This will do proper alignment as long as the material pushed doesn't have any white space included. With individual characters one may not expect this, b...
58,352
I have defined a command for a letter in the margin as follows (using marginnote because marginpar did not work at all): ``` \newcommand{\sideletter}[1]{\marginnote{\Huge\bf\sffamily\color{orange} #1}} ``` I appreciate that there are likely going to be issues with vertical alignment, due to the different fonts/sizes...
2012/06/02
[ "https://tex.stackexchange.com/questions/58352", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/15228/" ]
I would go about this a little differently. It seems to me that your 'Q' and 'A' could be wrapped up in a `list` environment, which makes me immediately think of the `enumitem` package. ![enter image description here](https://i.stack.imgur.com/1Exbe.png) Instead of using a `command` I have used an `environment`. Pe...
This one seems to work with marginpar: ``` \documentclass[11pt]{article} \usepackage{xcolor,blindtext} \newcommand*{\noPlace}{\hrule height0pt width 0pt} \reversemarginpar \newcommand{\QA}[2]{% \mbox{}\leavevmode\marginpar{\textcolor{orange}{% \noPlace\sffamily\Huge#1}}% {\noPlace#2}\par} \setlength{\marginp...
58,352
I have defined a command for a letter in the margin as follows (using marginnote because marginpar did not work at all): ``` \newcommand{\sideletter}[1]{\marginnote{\Huge\bf\sffamily\color{orange} #1}} ``` I appreciate that there are likely going to be issues with vertical alignment, due to the different fonts/sizes...
2012/06/02
[ "https://tex.stackexchange.com/questions/58352", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/15228/" ]
I would go about this a little differently. It seems to me that your 'Q' and 'A' could be wrapped up in a `list` environment, which makes me immediately think of the `enumitem` package. ![enter image description here](https://i.stack.imgur.com/1Exbe.png) Instead of using a `command` I have used an `environment`. Pe...
As far as I see, noone has explained the *reason* for your alignment problem yet. The bounding boxes mentioned by Frank Mittelbach do play a role (see below), but the more important point is that `\marginnote`s in the left margin are typeset `\raggedleft` (so that you have *right* alignment). So it's very much by desig...
58,352
I have defined a command for a letter in the margin as follows (using marginnote because marginpar did not work at all): ``` \newcommand{\sideletter}[1]{\marginnote{\Huge\bf\sffamily\color{orange} #1}} ``` I appreciate that there are likely going to be issues with vertical alignment, due to the different fonts/sizes...
2012/06/02
[ "https://tex.stackexchange.com/questions/58352", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/15228/" ]
``` \newcommand{\sideletter}[1]{\marginnote{\Huge\bf\sffamily\color{orange} #1}} ``` Here the letter will be the start of a paragraph in a fixed width parbox, so it will be flush *left* in that box and the distance between the letter and the main text will depend on the width and sidebearings of the letter. Also `\b...
This one seems to work with marginpar: ``` \documentclass[11pt]{article} \usepackage{xcolor,blindtext} \newcommand*{\noPlace}{\hrule height0pt width 0pt} \reversemarginpar \newcommand{\QA}[2]{% \mbox{}\leavevmode\marginpar{\textcolor{orange}{% \noPlace\sffamily\Huge#1}}% {\noPlace#2}\par} \setlength{\marginp...
58,352
I have defined a command for a letter in the margin as follows (using marginnote because marginpar did not work at all): ``` \newcommand{\sideletter}[1]{\marginnote{\Huge\bf\sffamily\color{orange} #1}} ``` I appreciate that there are likely going to be issues with vertical alignment, due to the different fonts/sizes...
2012/06/02
[ "https://tex.stackexchange.com/questions/58352", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/15228/" ]
Regardless of the method of alignment (e.g., `\marginpar`, list, etc.) by the end of the day alignment happens by pushing some material towards the edge of some box. This will do proper alignment as long as the material pushed doesn't have any white space included. With individual characters one may not expect this, b...
This one seems to work with marginpar: ``` \documentclass[11pt]{article} \usepackage{xcolor,blindtext} \newcommand*{\noPlace}{\hrule height0pt width 0pt} \reversemarginpar \newcommand{\QA}[2]{% \mbox{}\leavevmode\marginpar{\textcolor{orange}{% \noPlace\sffamily\Huge#1}}% {\noPlace#2}\par} \setlength{\marginp...
58,352
I have defined a command for a letter in the margin as follows (using marginnote because marginpar did not work at all): ``` \newcommand{\sideletter}[1]{\marginnote{\Huge\bf\sffamily\color{orange} #1}} ``` I appreciate that there are likely going to be issues with vertical alignment, due to the different fonts/sizes...
2012/06/02
[ "https://tex.stackexchange.com/questions/58352", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/15228/" ]
As far as I see, noone has explained the *reason* for your alignment problem yet. The bounding boxes mentioned by Frank Mittelbach do play a role (see below), but the more important point is that `\marginnote`s in the left margin are typeset `\raggedleft` (so that you have *right* alignment). So it's very much by desig...
This one seems to work with marginpar: ``` \documentclass[11pt]{article} \usepackage{xcolor,blindtext} \newcommand*{\noPlace}{\hrule height0pt width 0pt} \reversemarginpar \newcommand{\QA}[2]{% \mbox{}\leavevmode\marginpar{\textcolor{orange}{% \noPlace\sffamily\Huge#1}}% {\noPlace#2}\par} \setlength{\marginp...
67,613,974
I am a bit confused as I need to pass a value within one component to another component at the same level. My App.js has the following components: ``` return ( <ThemeProvider theme={theme}> <div className={classes.root}> <CssBaseline /> <nav className={classes.drawer}> </nav> ...
2021/05/20
[ "https://Stackoverflow.com/questions/67613974", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15958296/" ]
Try with string slicing: ``` df['new_col']=df['col_a'].str[4:] ``` **OR** Via re module: ``` import re df['new_col']=df['col_a'].apply(lambda x:re.findall('[0-9]+', x)[0]) ```
Another way; Extract alphanumerics left of the first 3 alphanumerics ``` df['new_col']= df.col_a.str.extract('((?<=^\w{3})\w+)') ```
67,613,974
I am a bit confused as I need to pass a value within one component to another component at the same level. My App.js has the following components: ``` return ( <ThemeProvider theme={theme}> <div className={classes.root}> <CssBaseline /> <nav className={classes.drawer}> </nav> ...
2021/05/20
[ "https://Stackoverflow.com/questions/67613974", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15958296/" ]
Try with string slicing: ``` df['new_col']=df['col_a'].str[4:] ``` **OR** Via re module: ``` import re df['new_col']=df['col_a'].apply(lambda x:re.findall('[0-9]+', x)[0]) ```
With your shown samples, could you please try following. Using [`str.extract`](https://pandas.pydata.org/docs/reference/api/pandas.Series.str.extract.html) function of Pandas. Simple explanation would be, using regex `^.{4}(.*)$` by which getting everything apart from 1st 4 characters into capturing group and saving it...
67,613,974
I am a bit confused as I need to pass a value within one component to another component at the same level. My App.js has the following components: ``` return ( <ThemeProvider theme={theme}> <div className={classes.root}> <CssBaseline /> <nav className={classes.drawer}> </nav> ...
2021/05/20
[ "https://Stackoverflow.com/questions/67613974", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15958296/" ]
With your shown samples, could you please try following. Using [`str.extract`](https://pandas.pydata.org/docs/reference/api/pandas.Series.str.extract.html) function of Pandas. Simple explanation would be, using regex `^.{4}(.*)$` by which getting everything apart from 1st 4 characters into capturing group and saving it...
Another way; Extract alphanumerics left of the first 3 alphanumerics ``` df['new_col']= df.col_a.str.extract('((?<=^\w{3})\w+)') ```
38,962,157
I've configured IAP for my project and It seems to work, so my app is live on app store but I've discovered that approximately 30% requests to iTunes returning invalidProductIdentifier for some reason, below is the complete code: ``` class IAP: NSObject, SKProductsRequestDelegate { static let sharedInstance = IAP...
2016/08/15
[ "https://Stackoverflow.com/questions/38962157", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5401878/" ]
If you receive invalidProductIdentifiers on your test device there may be tons of reasons why this happens. The most frequent cases are: * app was not reinstalled from scratch before checking: you need to delete app from device and install it again; * old product IDs: if you have product IDs that are invalid, they wil...
If you have appstore version of that application in your test device and you are trying to debug that IAP on same device, this may cause this. Please un-install apstore version of app before trying anything. Second possible problem is, you should check IAP with USB cable plugged in. You cant test it with Ad-hoc deploym...
17,411,106
I have this linecode ``` $media = $dc->thumbnail->attributes()['url']; ``` runs fine on my local (WAMP) php 5.4.3 but when i host it on my server cpanel then it gives this error ``` Parse error: syntax error, unexpected '[', expecting ')' ``` the php version on my server is 5.2.17 i dnt see any problem with it, ...
2013/07/01
[ "https://Stackoverflow.com/questions/17411106", "https://Stackoverflow.com", "https://Stackoverflow.com/users/725208/" ]
You need to be running PHP 5.4+ to use shorthand arrays
You can't have a php 5.4.3 and a 5.2.17 with a single WAMP installation, but from your error message, i think you are using the older one. I guess, you are working with SimplXML. In this case, you should not use that line, anyway: ``` $media = $dc->thumbnail[0]['url']; ``` Note: `$simpleXMLElement->childrenNodeList...
31,524,388
Goal ==== To upload a file in a Shiny app that reads the data, name the variables (columns) and do some data analysis before presenting plot output Reference Shiny App =================== I am using this app from Shiny gallery as a reference: [enter link description here](http://shiny.rstudio.com/gallery/file-upload...
2015/07/20
[ "https://Stackoverflow.com/questions/31524388", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2829961/" ]
You'd be better off assigning the column names during the `read.csv` ``` server <- function(input, output) { inFile <- reactive({input$file1}) sdf <- reactive({ read.csv(inFile()$datapath, header=F, col.names = c('Vehicle.ID', 'Time', 'Vehicle.class.no', 'Vehicle.type2', 'Vehicle.Length...
An alternative is to use an `actionButton` and then to check for the validity of the files when you upload them. Lots of `observeEvent` is probably appropriate for firing off when something is "triggered," like a file being uploaded or a button being pressed. In addition, to make a chain of changes, it's probably best ...
11,759,725
Recently I have started studying about memory leaks in C++, so I may ask a naive questions. I have a c++ library that is using OpenSSL - my task is to check if there are memory leaks in this lib. I have run Visual Leak Detector to check mem leaks. I see that the calls to `SSL_library_init();` and `SSL_load_error_...
2012/08/01
[ "https://Stackoverflow.com/questions/11759725", "https://Stackoverflow.com", "https://Stackoverflow.com/users/493371/" ]
As I understand all the memory which is allocated during `SSL_library_init()` and `SSL_load_error_strings()` are stored in global variables and so it comes under the category of "Memory in Use" rather under the category of Memory leak as the memory is still accessible when the program is dying out. One suggestion is t...
To get rid of the final two memory blocks allocated in SSL\_library\_init() try: ``` sk_free(SSL_COMP_get_compression_methods()); ```
11,759,725
Recently I have started studying about memory leaks in C++, so I may ask a naive questions. I have a c++ library that is using OpenSSL - my task is to check if there are memory leaks in this lib. I have run Visual Leak Detector to check mem leaks. I see that the calls to `SSL_library_init();` and `SSL_load_error_...
2012/08/01
[ "https://Stackoverflow.com/questions/11759725", "https://Stackoverflow.com", "https://Stackoverflow.com/users/493371/" ]
As I understand all the memory which is allocated during `SSL_library_init()` and `SSL_load_error_strings()` are stored in global variables and so it comes under the category of "Memory in Use" rather under the category of Memory leak as the memory is still accessible when the program is dying out. One suggestion is t...
To get rid of compilation error in Joe H's answer: ``` sk_SSL_COMP_free(SSL_COMP_get_compression_methods()); ```
11,759,725
Recently I have started studying about memory leaks in C++, so I may ask a naive questions. I have a c++ library that is using OpenSSL - my task is to check if there are memory leaks in this lib. I have run Visual Leak Detector to check mem leaks. I see that the calls to `SSL_library_init();` and `SSL_load_error_...
2012/08/01
[ "https://Stackoverflow.com/questions/11759725", "https://Stackoverflow.com", "https://Stackoverflow.com/users/493371/" ]
As I understand all the memory which is allocated during `SSL_library_init()` and `SSL_load_error_strings()` are stored in global variables and so it comes under the category of "Memory in Use" rather under the category of Memory leak as the memory is still accessible when the program is dying out. One suggestion is t...
Call `SSL_COMP_free_compression_methods();`.
11,759,725
Recently I have started studying about memory leaks in C++, so I may ask a naive questions. I have a c++ library that is using OpenSSL - my task is to check if there are memory leaks in this lib. I have run Visual Leak Detector to check mem leaks. I see that the calls to `SSL_library_init();` and `SSL_load_error_...
2012/08/01
[ "https://Stackoverflow.com/questions/11759725", "https://Stackoverflow.com", "https://Stackoverflow.com/users/493371/" ]
To get rid of the final two memory blocks allocated in SSL\_library\_init() try: ``` sk_free(SSL_COMP_get_compression_methods()); ```
Call `SSL_COMP_free_compression_methods();`.
11,759,725
Recently I have started studying about memory leaks in C++, so I may ask a naive questions. I have a c++ library that is using OpenSSL - my task is to check if there are memory leaks in this lib. I have run Visual Leak Detector to check mem leaks. I see that the calls to `SSL_library_init();` and `SSL_load_error_...
2012/08/01
[ "https://Stackoverflow.com/questions/11759725", "https://Stackoverflow.com", "https://Stackoverflow.com/users/493371/" ]
To get rid of compilation error in Joe H's answer: ``` sk_SSL_COMP_free(SSL_COMP_get_compression_methods()); ```
Call `SSL_COMP_free_compression_methods();`.
38,754,072
I am using Python 3.5, and I would like to split a string by the character `\n`, or new line. however if the line starts with a underscore, for example, it should put that line with the one above it. I need the solution to work for all characters, not just underscore. It should work like this: ``` a = '''red yellow gr...
2016/08/03
[ "https://Stackoverflow.com/questions/38754072", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6312416/" ]
It's pretty easy using regular expressions: ``` import re re.split('\n(?!_)', a) # ['red', 'yellow', 'green\n_surprise!', 'blue'] ``` This regex litterally means `split by \n not followed by _`.
You can repalce `\n_` with some characters and then split the string with delimiter `\n` ``` >>> a = '''red ... yellow ... green ... _surprise! ... blue''' >>> a 'red\nyellow\ngreen\n_surprise!\nblue' ``` Either: ``` >>> [x.replace("###", "\n_") for x in a.replace("\n_", "###").split()] ['red', 'yellow', 'green\n_s...
14,361,896
I'm trying to get my navigation bar to extend across the whole container of the 16 Column Grid . In Chrome is doesn't extend all the way across. In Firefox it shows up very weird. Which is telling me that I am breaking the grid some how. Can someone please help with this? Here is my code: ``` <div class="container_16...
2013/01/16
[ "https://Stackoverflow.com/questions/14361896", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1984147/" ]
This is optional typing in action. ```dart var x; // same as List<String> x List<String> y; main() { x = [1,2,3,4]; y = x; // valid x = y; // valid print(x); // [1,2,3,4] print(y); // [1,2,3,4] } ``` Whether you specify `List<String>` or `var`, your code will execute the same. The type annotations (`List<...
Dart types are optional not static. So on runtime all type annonations is essentially replaced with `var`
14,420,410
I have crawled around lots of various answers but am still a bit confused with how I should be dealing with facebook **access tokens**. One of the main problems I'm having is due to what information is being stored in my browser. For example, I log onto the app, the token expires, I can't logon again unless I clear coo...
2013/01/20
[ "https://Stackoverflow.com/questions/14420410", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1908629/" ]
Let's go through your questions: > > Do I need to store the access token anywhere? > > > This depends on your application. First of all ask yourself, do you need to perform actions on behalf of the user while he is **not** present (not logged in to your app)? If the answer is **yes**, then you need to extend ...
I just had the same issue, but i solve it with some of your help. I'm using the php-sdk to connect to the Facebook API, so i just made this. ``` $facebook = new Facebook(array( 'appId' => 'API_ID', 'secret' => 'SECRET', )); // Get User $user = $facebook->getUser(); // Verifing if user i...
8,929,986
I am attempting to build a Restful service that will allow me to do inline editing with the Kendo UI Grid. I am unfamiliar with both Kendo UI and Restful services, so I don't know where to begin. I am using <http://demos.kendoui.com/web/grid/editing.html> as a reference, but it doesn't show I can I do inline editing...
2012/01/19
[ "https://Stackoverflow.com/questions/8929986", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1040092/" ]
this should work for you... ``` var radio_value = $('input:radio[name=radio_group]:checked').val(); ```
Why not do the validation in javascript instead of bouncing too and from a php script. I'm a big fan of jQuery Validation plugin. <http://bassistance.de/jquery-plugins/jquery-plugin-validation/>
8,929,986
I am attempting to build a Restful service that will allow me to do inline editing with the Kendo UI Grid. I am unfamiliar with both Kendo UI and Restful services, so I don't know where to begin. I am using <http://demos.kendoui.com/web/grid/editing.html> as a reference, but it doesn't show I can I do inline editing...
2012/01/19
[ "https://Stackoverflow.com/questions/8929986", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1040092/" ]
this should work for you... ``` var radio_value = $('input:radio[name=radio_group]:checked').val(); ```
Can you try .is(':checked'), something like below should do the trick, ``` if ($('input[name=radio_group]').is(':checked')) ```
8,929,986
I am attempting to build a Restful service that will allow me to do inline editing with the Kendo UI Grid. I am unfamiliar with both Kendo UI and Restful services, so I don't know where to begin. I am using <http://demos.kendoui.com/web/grid/editing.html> as a reference, but it doesn't show I can I do inline editing...
2012/01/19
[ "https://Stackoverflow.com/questions/8929986", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1040092/" ]
this should work for you... ``` var radio_value = $('input:radio[name=radio_group]:checked').val(); ```
if ($('input:[name=radio\_group]').prop('checked')==true) { ``` var radio_value = $('input:radio[name=radio_group]:checked').val(); ``` } else { ``` var radio_value=0; ``` }
8,929,986
I am attempting to build a Restful service that will allow me to do inline editing with the Kendo UI Grid. I am unfamiliar with both Kendo UI and Restful services, so I don't know where to begin. I am using <http://demos.kendoui.com/web/grid/editing.html> as a reference, but it doesn't show I can I do inline editing...
2012/01/19
[ "https://Stackoverflow.com/questions/8929986", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1040092/" ]
Make sure all the radio buttons have the same name. May be they are not same that is the reason it is working only for the first radio button when it is checked. You can try this after ensuring the name of all the radio buttons ``` var radio_value = ($('input:radio[name=radio_group]:checked').val() || 0); ```
this should work for you... ``` var radio_value = $('input:radio[name=radio_group]:checked').val(); ```
8,929,986
I am attempting to build a Restful service that will allow me to do inline editing with the Kendo UI Grid. I am unfamiliar with both Kendo UI and Restful services, so I don't know where to begin. I am using <http://demos.kendoui.com/web/grid/editing.html> as a reference, but it doesn't show I can I do inline editing...
2012/01/19
[ "https://Stackoverflow.com/questions/8929986", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1040092/" ]
Make sure all the radio buttons have the same name. May be they are not same that is the reason it is working only for the first radio button when it is checked. You can try this after ensuring the name of all the radio buttons ``` var radio_value = ($('input:radio[name=radio_group]:checked').val() || 0); ```
Why not do the validation in javascript instead of bouncing too and from a php script. I'm a big fan of jQuery Validation plugin. <http://bassistance.de/jquery-plugins/jquery-plugin-validation/>
8,929,986
I am attempting to build a Restful service that will allow me to do inline editing with the Kendo UI Grid. I am unfamiliar with both Kendo UI and Restful services, so I don't know where to begin. I am using <http://demos.kendoui.com/web/grid/editing.html> as a reference, but it doesn't show I can I do inline editing...
2012/01/19
[ "https://Stackoverflow.com/questions/8929986", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1040092/" ]
Make sure all the radio buttons have the same name. May be they are not same that is the reason it is working only for the first radio button when it is checked. You can try this after ensuring the name of all the radio buttons ``` var radio_value = ($('input:radio[name=radio_group]:checked').val() || 0); ```
Can you try .is(':checked'), something like below should do the trick, ``` if ($('input[name=radio_group]').is(':checked')) ```
8,929,986
I am attempting to build a Restful service that will allow me to do inline editing with the Kendo UI Grid. I am unfamiliar with both Kendo UI and Restful services, so I don't know where to begin. I am using <http://demos.kendoui.com/web/grid/editing.html> as a reference, but it doesn't show I can I do inline editing...
2012/01/19
[ "https://Stackoverflow.com/questions/8929986", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1040092/" ]
Make sure all the radio buttons have the same name. May be they are not same that is the reason it is working only for the first radio button when it is checked. You can try this after ensuring the name of all the radio buttons ``` var radio_value = ($('input:radio[name=radio_group]:checked').val() || 0); ```
if ($('input:[name=radio\_group]').prop('checked')==true) { ``` var radio_value = $('input:radio[name=radio_group]:checked').val(); ``` } else { ``` var radio_value=0; ``` }
27,192,710
There are a lot of find/replace functions available on the internet, but i can't find why this is not working...( my own solution ) Here is what i tried ``` #include <stdio.h> #include <stdlib.h> #include <string.h> char* strrpl(char *str, char* find, char *replace) { int i; char *pt = strstr(str, find), *fir...
2014/11/28
[ "https://Stackoverflow.com/questions/27192710", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2997809/" ]
Here is the immediate problem: when `strstr` returns `NULL`, your code does not pay attention. Add this line: ``` char *pt = strstr(str, find), *firstStr; if (!pt) return str; ``` Another problem is that the call of `strncpy` is incorrect: ``` strncpy(firstStr, str, strlen(str) - strlen(pt)); ``` it will leave ...
You have not checked for the return value of strstr. Try the below code. ``` #include <stdio.h> #include <stdlib.h> #include <string.h> char* strrpl(char *str, char* find, char *replace) { int i; char *pt = strstr(str, find); char *firstStr; if(pt == NULL){ printf("cannot find string \n"); ...
27,192,710
There are a lot of find/replace functions available on the internet, but i can't find why this is not working...( my own solution ) Here is what i tried ``` #include <stdio.h> #include <stdlib.h> #include <string.h> char* strrpl(char *str, char* find, char *replace) { int i; char *pt = strstr(str, find), *fir...
2014/11/28
[ "https://Stackoverflow.com/questions/27192710", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2997809/" ]
> > I overrided a memory block or something? > > > You have: 1. A potential buffer overflow when you allocate `firstStr`. Who says the result will be less than 100 characters? 2. Another potential buffer overflow when you copy the answer back to the input string. Who says it will fit? 3. A potential buffer overf...
You have not checked for the return value of strstr. Try the below code. ``` #include <stdio.h> #include <stdlib.h> #include <string.h> char* strrpl(char *str, char* find, char *replace) { int i; char *pt = strstr(str, find); char *firstStr; if(pt == NULL){ printf("cannot find string \n"); ...
257,793
I recently switched my hosting provider and due to the time zone that the server is now in, my code has stopped working. The hosting server reports in Pacific time, However, my code needs to work with GMT as my site is for the UK market. So, all my displays and searches need to be in the format dd/MM/yyyy How can I ...
2008/11/03
[ "https://Stackoverflow.com/questions/257793", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26300/" ]
In your web.config file add `<globalization>` element under `<system.web>` node: ``` <system.web> <globalization culture="en-gb"/> <!-- ... --> </system.web> ```
Try ``` DateTime.Parse("28/11/2008", new CultureInfo("en-GB")) ``` Have a look at [the overload for DateTime.Parse on MSDN](http://msdn.microsoft.com/en-us/library/kc8s65zs.aspx). Also, be careful not to confuse time zones (pacific, GMT) with cultures. Cultures are your actual problem here.
257,793
I recently switched my hosting provider and due to the time zone that the server is now in, my code has stopped working. The hosting server reports in Pacific time, However, my code needs to work with GMT as my site is for the UK market. So, all my displays and searches need to be in the format dd/MM/yyyy How can I ...
2008/11/03
[ "https://Stackoverflow.com/questions/257793", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26300/" ]
Try ``` DateTime.Parse("28/11/2008", new CultureInfo("en-GB")) ``` Have a look at [the overload for DateTime.Parse on MSDN](http://msdn.microsoft.com/en-us/library/kc8s65zs.aspx). Also, be careful not to confuse time zones (pacific, GMT) with cultures. Cultures are your actual problem here.
In order to avoid dealing with these very boring issues, I advise you to allways parse your data following the standard and unique SQL/ISO date format which is YYYY-MM-DD. Your queries will then work internationally, whatever are the date parameters on your main server or on the querying clients (where local date setti...
257,793
I recently switched my hosting provider and due to the time zone that the server is now in, my code has stopped working. The hosting server reports in Pacific time, However, my code needs to work with GMT as my site is for the UK market. So, all my displays and searches need to be in the format dd/MM/yyyy How can I ...
2008/11/03
[ "https://Stackoverflow.com/questions/257793", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26300/" ]
Try ``` DateTime.Parse("28/11/2008", new CultureInfo("en-GB")) ``` Have a look at [the overload for DateTime.Parse on MSDN](http://msdn.microsoft.com/en-us/library/kc8s65zs.aspx). Also, be careful not to confuse time zones (pacific, GMT) with cultures. Cultures are your actual problem here.
I had this problem which the above answers didn't solve. So maybe this can help someone not to tear all their hair off.. I got NaN-NaN-Nan on the new server in my date-textbox. Found out that the new server had the internet explorer option "Display intranet sites in Compability Mode". Workaround here was to put ```...
257,793
I recently switched my hosting provider and due to the time zone that the server is now in, my code has stopped working. The hosting server reports in Pacific time, However, my code needs to work with GMT as my site is for the UK market. So, all my displays and searches need to be in the format dd/MM/yyyy How can I ...
2008/11/03
[ "https://Stackoverflow.com/questions/257793", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26300/" ]
In your web.config file add `<globalization>` element under `<system.web>` node: ``` <system.web> <globalization culture="en-gb"/> <!-- ... --> </system.web> ```
In order to avoid dealing with these very boring issues, I advise you to allways parse your data following the standard and unique SQL/ISO date format which is YYYY-MM-DD. Your queries will then work internationally, whatever are the date parameters on your main server or on the querying clients (where local date setti...
257,793
I recently switched my hosting provider and due to the time zone that the server is now in, my code has stopped working. The hosting server reports in Pacific time, However, my code needs to work with GMT as my site is for the UK market. So, all my displays and searches need to be in the format dd/MM/yyyy How can I ...
2008/11/03
[ "https://Stackoverflow.com/questions/257793", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26300/" ]
In your web.config file add `<globalization>` element under `<system.web>` node: ``` <system.web> <globalization culture="en-gb"/> <!-- ... --> </system.web> ```
I had this problem which the above answers didn't solve. So maybe this can help someone not to tear all their hair off.. I got NaN-NaN-Nan on the new server in my date-textbox. Found out that the new server had the internet explorer option "Display intranet sites in Compability Mode". Workaround here was to put ```...
257,793
I recently switched my hosting provider and due to the time zone that the server is now in, my code has stopped working. The hosting server reports in Pacific time, However, my code needs to work with GMT as my site is for the UK market. So, all my displays and searches need to be in the format dd/MM/yyyy How can I ...
2008/11/03
[ "https://Stackoverflow.com/questions/257793", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26300/" ]
In order to avoid dealing with these very boring issues, I advise you to allways parse your data following the standard and unique SQL/ISO date format which is YYYY-MM-DD. Your queries will then work internationally, whatever are the date parameters on your main server or on the querying clients (where local date setti...
I had this problem which the above answers didn't solve. So maybe this can help someone not to tear all their hair off.. I got NaN-NaN-Nan on the new server in my date-textbox. Found out that the new server had the internet explorer option "Display intranet sites in Compability Mode". Workaround here was to put ```...
38,621,884
I am trying to create view with 2 blocks. Each block had different real time data source. When I use Jade`s include within main view, : ``` extends ../layout block content link(rel='stylesheet', type='text/css', href='/stylesheets/people.css') include ../store/peopleTemplate.pug ``` I get error ``` Cannot read ...
2016/07/27
[ "https://Stackoverflow.com/questions/38621884", "https://Stackoverflow.com", "https://Stackoverflow.com/users/924485/" ]
You can achieve this with mixins. **layout.pug** ``` doctype html html head ... body block content ``` **pets-partial.pug** ``` mixin petslist(pets) ul each pet in pets li #{pet} ``` **pets.pug** ``` extends layout include pets-partial block content h1 Dogs +petslist(dogs) h1 C...
After extensive research, Pug/Jade Template engine does not support dynamic template rendering or usage of multiple partials within one view. Handlebars was recommended for this scenario.
31,779
In *Star Trek: Generations*, the actor Tim Russ plays an unnamed bridge officer (probably tactical/operations, as he's monitoring the ship's hull and systems integrity) on the Enterprise-B in the prelude. No pointy ears or eyebrows, so I must assume this character is not Vulcan and therefore not the Tuvok character tha...
2013/02/14
[ "https://scifi.stackexchange.com/questions/31779", "https://scifi.stackexchange.com", "https://scifi.stackexchange.com/users/2834/" ]
In most cases there is not - nor does there really need to be - any in-universe explanation for an actor playing multiple characters in the same universe, unless the characters themselves are specifically poised to have some connection. You should especially learn to disregard such coincidences if you really love the S...
Although this isn't an official piece, my favourite personal theory for Tim Russ' appearance elsewhere in Star Trek is because he's an undercover agent (he had previously infiltrated the Marquis and had been brainwashed during said stint in the official VOY diaglogue). Make-up and physical changes aren't uncommon in St...
31,779
In *Star Trek: Generations*, the actor Tim Russ plays an unnamed bridge officer (probably tactical/operations, as he's monitoring the ship's hull and systems integrity) on the Enterprise-B in the prelude. No pointy ears or eyebrows, so I must assume this character is not Vulcan and therefore not the Tuvok character tha...
2013/02/14
[ "https://scifi.stackexchange.com/questions/31779", "https://scifi.stackexchange.com", "https://scifi.stackexchange.com/users/2834/" ]
In most cases there is not - nor does there really need to be - any in-universe explanation for an actor playing multiple characters in the same universe, unless the characters themselves are specifically poised to have some connection. You should especially learn to disregard such coincidences if you really love the S...
There actually is, the VOY episode Flashback, as someone mentions here, retcons Tim Russ's human appearance during the original series movies and explains that Tuvok was in fact an ensign/lieutenant during that period of time --- Tuvok is show to have served on the Excelsior during Undiscovered Country as an Ensign and...
31,779
In *Star Trek: Generations*, the actor Tim Russ plays an unnamed bridge officer (probably tactical/operations, as he's monitoring the ship's hull and systems integrity) on the Enterprise-B in the prelude. No pointy ears or eyebrows, so I must assume this character is not Vulcan and therefore not the Tuvok character tha...
2013/02/14
[ "https://scifi.stackexchange.com/questions/31779", "https://scifi.stackexchange.com", "https://scifi.stackexchange.com/users/2834/" ]
In most cases there is not - nor does there really need to be - any in-universe explanation for an actor playing multiple characters in the same universe, unless the characters themselves are specifically poised to have some connection. You should especially learn to disregard such coincidences if you really love the S...
I also feel myself bugged by his appearance because it bring us automatically to Tuvok (Voyager). But there is not any relationship. First because the guy at Ent-B was an human and not a vulcan; second because the Ent-B was commissioned almost 80 years before Voyager. So...
31,779
In *Star Trek: Generations*, the actor Tim Russ plays an unnamed bridge officer (probably tactical/operations, as he's monitoring the ship's hull and systems integrity) on the Enterprise-B in the prelude. No pointy ears or eyebrows, so I must assume this character is not Vulcan and therefore not the Tuvok character tha...
2013/02/14
[ "https://scifi.stackexchange.com/questions/31779", "https://scifi.stackexchange.com", "https://scifi.stackexchange.com/users/2834/" ]
There actually is, the VOY episode Flashback, as someone mentions here, retcons Tim Russ's human appearance during the original series movies and explains that Tuvok was in fact an ensign/lieutenant during that period of time --- Tuvok is show to have served on the Excelsior during Undiscovered Country as an Ensign and...
Although this isn't an official piece, my favourite personal theory for Tim Russ' appearance elsewhere in Star Trek is because he's an undercover agent (he had previously infiltrated the Marquis and had been brainwashed during said stint in the official VOY diaglogue). Make-up and physical changes aren't uncommon in St...
31,779
In *Star Trek: Generations*, the actor Tim Russ plays an unnamed bridge officer (probably tactical/operations, as he's monitoring the ship's hull and systems integrity) on the Enterprise-B in the prelude. No pointy ears or eyebrows, so I must assume this character is not Vulcan and therefore not the Tuvok character tha...
2013/02/14
[ "https://scifi.stackexchange.com/questions/31779", "https://scifi.stackexchange.com", "https://scifi.stackexchange.com/users/2834/" ]
I also feel myself bugged by his appearance because it bring us automatically to Tuvok (Voyager). But there is not any relationship. First because the guy at Ent-B was an human and not a vulcan; second because the Ent-B was commissioned almost 80 years before Voyager. So...
Although this isn't an official piece, my favourite personal theory for Tim Russ' appearance elsewhere in Star Trek is because he's an undercover agent (he had previously infiltrated the Marquis and had been brainwashed during said stint in the official VOY diaglogue). Make-up and physical changes aren't uncommon in St...
31,779
In *Star Trek: Generations*, the actor Tim Russ plays an unnamed bridge officer (probably tactical/operations, as he's monitoring the ship's hull and systems integrity) on the Enterprise-B in the prelude. No pointy ears or eyebrows, so I must assume this character is not Vulcan and therefore not the Tuvok character tha...
2013/02/14
[ "https://scifi.stackexchange.com/questions/31779", "https://scifi.stackexchange.com", "https://scifi.stackexchange.com/users/2834/" ]
There actually is, the VOY episode Flashback, as someone mentions here, retcons Tim Russ's human appearance during the original series movies and explains that Tuvok was in fact an ensign/lieutenant during that period of time --- Tuvok is show to have served on the Excelsior during Undiscovered Country as an Ensign and...
I also feel myself bugged by his appearance because it bring us automatically to Tuvok (Voyager). But there is not any relationship. First because the guy at Ent-B was an human and not a vulcan; second because the Ent-B was commissioned almost 80 years before Voyager. So...
1,552,590
I need a straightforward, easy to understand answer on this one. I'm building a user control panel for administrative users to create/edit/delete users of the system through a web interface (on top Authlogic and rails-authorization). On the `/users` view, I list all the users, then I have them broken down by role. At...
2009/10/12
[ "https://Stackoverflow.com/questions/1552590", "https://Stackoverflow.com", "https://Stackoverflow.com/users/32154/" ]
As you haven't said otherwise and it looks right, I'm going to assume that clicking an "Add new #{type}" link works as it should. It also looks like you can successfully create Users. So I'm going to move on to address the problem with unsuccessful saves. The controller renders the new template on a failed create acti...
Basically everything EmFi suggested, plus a few tweaks: **app/views/users/new.html.haml** ``` - if @roles %li - @assigned_roles ||= [] - @roles.each do |role| = label_tag role = check_box_tag 'user[assigned_roles][]', role, (@roles & @assigned_roles ).include?(role) ``` **removed:** ``` = hi...
73,633,851
I wonder if there is a simpler way to pass the default style property (as it is a default property) to a custom component. I hope someone can just tell me how to improve the following code. Given: ``` const MyIcon= ()=>{ return <img src={GMNT_N_Black}/> } ``` The following style property is not being applied. ``...
2022/09/07
[ "https://Stackoverflow.com/questions/73633851", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10607591/" ]
I found the problem: I didn't add the `implements` keyword in the class definition of `ProductServiceImpl` so it was not connected to the bean, aka the interface, aka the service layer.
First of all you should not add annotation `@Service` for ProductService interface. Moreover this can happen when you have your Class `Application` in "another package". You can solve the problem using annotation `@ComponentScan (basePackages = {"your.company.domain.package"})`
22,370,102
What is difference between `kmem_cache_alloc` and `kmalloc()` in kernel memory allocation? which one is used when?
2014/03/13
[ "https://Stackoverflow.com/questions/22370102", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1737197/" ]
**Kmalloc** - allocates contiguous region from the physical memory. But keep in mind, allocating and free'ing memory is a lot of work. **Kmem\_cache\_alloc** - Here, your process keeps some copies of the some pre-defined size objects pre-allocated. Say you have struct that you know you will be requiring very frequentl...
**kmalloc:** It uses the generic slab caches available to any kernel code. so your module will share slab cache with other components in kernel. **kmem\_cache\_alloc:** It will allocate objects from a dedicated slab cache created by kmem\_cache\_create. If you specifically want a better slab cache management dedicated...
5,598,358
I would like to allow the user of my XULRunner based app to be able to do copy/paste via a context menu. Keyboard shortcuts Ctrl-C and Ctrl-V are already working fine
2011/04/08
[ "https://Stackoverflow.com/questions/5598358", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18027/" ]
Three best links I could find are : <http://www.mahalo.com/answers/what-is-the-process-to-submit-an-application-to-itunes> <http://help.appmakr.com/entries/218997-how-to-upload-your-app-to-itunes-connect-using-application-loader> <http://www.weston-fl.com/blog/?p=2442>
Go to developer.apple.com/ios, log in, look on the right for itunes connect, click on "manage apps", click "add new application" and follow directions for submission. You must be a registered apple developer and have already paid the developer fee.
5,598,358
I would like to allow the user of my XULRunner based app to be able to do copy/paste via a context menu. Keyboard shortcuts Ctrl-C and Ctrl-V are already working fine
2011/04/08
[ "https://Stackoverflow.com/questions/5598358", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18027/" ]
You'll find your detailed explanation in the [iOS Developer Program User Guide](http://adcdownload.apple.com/ios/ios_developer_program_user_guide/ios_developer_program_user_guide__standard_program_v2.7__final_9110.pdf).
Go to developer.apple.com/ios, log in, look on the right for itunes connect, click on "manage apps", click "add new application" and follow directions for submission. You must be a registered apple developer and have already paid the developer fee.
5,598,358
I would like to allow the user of my XULRunner based app to be able to do copy/paste via a context menu. Keyboard shortcuts Ctrl-C and Ctrl-V are already working fine
2011/04/08
[ "https://Stackoverflow.com/questions/5598358", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18027/" ]
Three best links I could find are : <http://www.mahalo.com/answers/what-is-the-process-to-submit-an-application-to-itunes> <http://help.appmakr.com/entries/218997-how-to-upload-your-app-to-itunes-connect-using-application-loader> <http://www.weston-fl.com/blog/?p=2442>
You'll find your detailed explanation in the [iOS Developer Program User Guide](http://adcdownload.apple.com/ios/ios_developer_program_user_guide/ios_developer_program_user_guide__standard_program_v2.7__final_9110.pdf).
5,598,358
I would like to allow the user of my XULRunner based app to be able to do copy/paste via a context menu. Keyboard shortcuts Ctrl-C and Ctrl-V are already working fine
2011/04/08
[ "https://Stackoverflow.com/questions/5598358", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18027/" ]
Three best links I could find are : <http://www.mahalo.com/answers/what-is-the-process-to-submit-an-application-to-itunes> <http://help.appmakr.com/entries/218997-how-to-upload-your-app-to-itunes-connect-using-application-loader> <http://www.weston-fl.com/blog/?p=2442>
Apple has excellent documentation: <http://developer.apple.com/library/ios/#documentation/Xcode/Conceptual/iphone_development/145-Distributing_Applications/distributing_applications.html> In summary: 1. Make sure your application is something of value. 2. Great a distribution provisioning profile in the developer po...
5,598,358
I would like to allow the user of my XULRunner based app to be able to do copy/paste via a context menu. Keyboard shortcuts Ctrl-C and Ctrl-V are already working fine
2011/04/08
[ "https://Stackoverflow.com/questions/5598358", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18027/" ]
You'll find your detailed explanation in the [iOS Developer Program User Guide](http://adcdownload.apple.com/ios/ios_developer_program_user_guide/ios_developer_program_user_guide__standard_program_v2.7__final_9110.pdf).
Apple has excellent documentation: <http://developer.apple.com/library/ios/#documentation/Xcode/Conceptual/iphone_development/145-Distributing_Applications/distributing_applications.html> In summary: 1. Make sure your application is something of value. 2. Great a distribution provisioning profile in the developer po...
25,370,570
I have a web page that uses a webmail service to send emails. This is on an company intranet using a Microsoft Exchange server. My website created an email with a link to an image handler on my website. In my code, I can print some debug messages and I see: ``` <img src='http://tav.target.com/VIBEHandler.ashx?id=z0644...
2014/08/18
[ "https://Stackoverflow.com/questions/25370570", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1743609/" ]
2 things... both simple :) 1. `ng-change=onSelectChange` should be `onSelectChange()` 2. `this.message` should be `this.scopeMessage`
Your problem is that you are passing in the function reference to the ng-change directive. However, that directive expects an expression which can evaluated. So attach the parentheses to the function so that it can be evaluated as a function call. Like here: <http://jsfiddle.net/MTfRD/1101/> ``` <select ng-model='fo...
2,847,945
Sorry if it might be simple but I basically can't get my head around it. The question asks me to: > > If exists, construct a bijection between the sets $\mathbb R$ and $\mathbb R - \{0\}$ > > > But I don't know how to handle it, I thought about the existence of a relationship but the absence of $\{0\}$ in the se...
2018/07/11
[ "https://math.stackexchange.com/questions/2847945", "https://math.stackexchange.com", "https://math.stackexchange.com/users/575603/" ]
Let's assume the set we're dealing with is finite. Let $S = \{s\_1, s\_2, \cdots, s\_n \}$, and fix the size we're considering as $k$. There are $\frac{n!}{k! (n-k)!}$ total subsets of size $k$. Now each element of $S$ will be a member of some (but not all) of these subsets. In particular, if we force $s\_j$ to be in ...
Consider the $k-$sets of $\{a\_1,\cdots,a\_n \}$ each element will occur $\binom{n-1}{k-1}$ times in a given set, so the product of the products of the sets will be $\color{red}{\left(\prod\_{i=1}^{n} a\_i \right)^{\binom{n-1}{k-1}}}$.
57,161,811
I have a database table with 33265902 (thirty-three million two hundred sixty-five thousand nine hundred two) records in it. Much of this is made up of duplicates. It is causing me issues as any website that queries this table is causing load on the server. What makes this table unique is two fields, email\_address ...
2019/07/23
[ "https://Stackoverflow.com/questions/57161811", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7698804/" ]
i would prefer creatin a new table from the existing one by using distinct value and then drop the old table then rename the new created table, so all the steps will be ``` 1. select distinct columns and insert into new_table 2. drop old_table 3. rename new_table to old_table ```
You can try this: (replace table\_name with your table name) ``` WITH cte AS ( SELECT job_id , email_address , row_number() OVER(PARTITION BY job_id , email_address order by job_id ) AS [rn] FROM table_name ) DELETE cte WHERE [rn] > 1 ``` another method using temp table : ```...
57,161,811
I have a database table with 33265902 (thirty-three million two hundred sixty-five thousand nine hundred two) records in it. Much of this is made up of duplicates. It is causing me issues as any website that queries this table is causing load on the server. What makes this table unique is two fields, email\_address ...
2019/07/23
[ "https://Stackoverflow.com/questions/57161811", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7698804/" ]
The most efficient way is probably to keep one row per table in a *new* table. Then truncate the old table and re-insert the values: ``` select t.* -- or select all columns except seqnum into temp_table from (select t.*, row_number() over (partition by email_address, job_id order by job_id) as seqnum ...
I went with Gordon Lindoffs suggestion the end and seems to have worked great. My issue now is I am left with loads of space I need to claim back for the os Is shrinking the dB the right thing?
57,161,811
I have a database table with 33265902 (thirty-three million two hundred sixty-five thousand nine hundred two) records in it. Much of this is made up of duplicates. It is causing me issues as any website that queries this table is causing load on the server. What makes this table unique is two fields, email\_address ...
2019/07/23
[ "https://Stackoverflow.com/questions/57161811", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7698804/" ]
i would prefer creatin a new table from the existing one by using distinct value and then drop the old table then rename the new created table, so all the steps will be ``` 1. select distinct columns and insert into new_table 2. drop old_table 3. rename new_table to old_table ```
I went with Gordon Lindoffs suggestion the end and seems to have worked great. My issue now is I am left with loads of space I need to claim back for the os Is shrinking the dB the right thing?
57,161,811
I have a database table with 33265902 (thirty-three million two hundred sixty-five thousand nine hundred two) records in it. Much of this is made up of duplicates. It is causing me issues as any website that queries this table is causing load on the server. What makes this table unique is two fields, email\_address ...
2019/07/23
[ "https://Stackoverflow.com/questions/57161811", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7698804/" ]
The most efficient way is probably to keep one row per table in a *new* table. Then truncate the old table and re-insert the values: ``` select t.* -- or select all columns except seqnum into temp_table from (select t.*, row_number() over (partition by email_address, job_id order by job_id) as seqnum ...
This may help... ``` ;WITH DuplicateData AS( SELECT *,DENSE_RANK() OVER(PARTITION BY email_address, job_id ORDER BY email_address, job_id ASC) [Rank] FROM TableName ) DELETE d FROM DuplicateData d WHERE Rank > 1 GO ``` Check this: <https://stackoverflow.com/a/56982523/5496498>
57,161,811
I have a database table with 33265902 (thirty-three million two hundred sixty-five thousand nine hundred two) records in it. Much of this is made up of duplicates. It is causing me issues as any website that queries this table is causing load on the server. What makes this table unique is two fields, email\_address ...
2019/07/23
[ "https://Stackoverflow.com/questions/57161811", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7698804/" ]
You can use limit DELETE FROM table [WHERE conditions] LIMIT row\_count call this query every 5mins. Just limit to 10000 data or add a little bit more
This may help... ``` ;WITH DuplicateData AS( SELECT *,DENSE_RANK() OVER(PARTITION BY email_address, job_id ORDER BY email_address, job_id ASC) [Rank] FROM TableName ) DELETE d FROM DuplicateData d WHERE Rank > 1 GO ``` Check this: <https://stackoverflow.com/a/56982523/5496498>
57,161,811
I have a database table with 33265902 (thirty-three million two hundred sixty-five thousand nine hundred two) records in it. Much of this is made up of duplicates. It is causing me issues as any website that queries this table is causing load on the server. What makes this table unique is two fields, email\_address ...
2019/07/23
[ "https://Stackoverflow.com/questions/57161811", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7698804/" ]
The most efficient way is probably to keep one row per table in a *new* table. Then truncate the old table and re-insert the values: ``` select t.* -- or select all columns except seqnum into temp_table from (select t.*, row_number() over (partition by email_address, job_id order by job_id) as seqnum ...
i would prefer creatin a new table from the existing one by using distinct value and then drop the old table then rename the new created table, so all the steps will be ``` 1. select distinct columns and insert into new_table 2. drop old_table 3. rename new_table to old_table ```
57,161,811
I have a database table with 33265902 (thirty-three million two hundred sixty-five thousand nine hundred two) records in it. Much of this is made up of duplicates. It is causing me issues as any website that queries this table is causing load on the server. What makes this table unique is two fields, email\_address ...
2019/07/23
[ "https://Stackoverflow.com/questions/57161811", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7698804/" ]
i would prefer creatin a new table from the existing one by using distinct value and then drop the old table then rename the new created table, so all the steps will be ``` 1. select distinct columns and insert into new_table 2. drop old_table 3. rename new_table to old_table ```
This may help... ``` ;WITH DuplicateData AS( SELECT *,DENSE_RANK() OVER(PARTITION BY email_address, job_id ORDER BY email_address, job_id ASC) [Rank] FROM TableName ) DELETE d FROM DuplicateData d WHERE Rank > 1 GO ``` Check this: <https://stackoverflow.com/a/56982523/5496498>
57,161,811
I have a database table with 33265902 (thirty-three million two hundred sixty-five thousand nine hundred two) records in it. Much of this is made up of duplicates. It is causing me issues as any website that queries this table is causing load on the server. What makes this table unique is two fields, email\_address ...
2019/07/23
[ "https://Stackoverflow.com/questions/57161811", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7698804/" ]
You can use limit DELETE FROM table [WHERE conditions] LIMIT row\_count call this query every 5mins. Just limit to 10000 data or add a little bit more
I went with Gordon Lindoffs suggestion the end and seems to have worked great. My issue now is I am left with loads of space I need to claim back for the os Is shrinking the dB the right thing?
57,161,811
I have a database table with 33265902 (thirty-three million two hundred sixty-five thousand nine hundred two) records in it. Much of this is made up of duplicates. It is causing me issues as any website that queries this table is causing load on the server. What makes this table unique is two fields, email\_address ...
2019/07/23
[ "https://Stackoverflow.com/questions/57161811", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7698804/" ]
The most efficient way is probably to keep one row per table in a *new* table. Then truncate the old table and re-insert the values: ``` select t.* -- or select all columns except seqnum into temp_table from (select t.*, row_number() over (partition by email_address, job_id order by job_id) as seqnum ...
You can use limit DELETE FROM table [WHERE conditions] LIMIT row\_count call this query every 5mins. Just limit to 10000 data or add a little bit more
57,161,811
I have a database table with 33265902 (thirty-three million two hundred sixty-five thousand nine hundred two) records in it. Much of this is made up of duplicates. It is causing me issues as any website that queries this table is causing load on the server. What makes this table unique is two fields, email\_address ...
2019/07/23
[ "https://Stackoverflow.com/questions/57161811", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7698804/" ]
You can use limit DELETE FROM table [WHERE conditions] LIMIT row\_count call this query every 5mins. Just limit to 10000 data or add a little bit more
You can try this: (replace table\_name with your table name) ``` WITH cte AS ( SELECT job_id , email_address , row_number() OVER(PARTITION BY job_id , email_address order by job_id ) AS [rn] FROM table_name ) DELETE cte WHERE [rn] > 1 ``` another method using temp table : ```...
5,353,507
When I open "Type Hierarchy" in Eclipse (either `F4` or `Ctrl+T`), is there any way to copy the result tree as text into the clipboard? P.S. Print Screen is not a solution.
2011/03/18
[ "https://Stackoverflow.com/questions/5353507", "https://Stackoverflow.com", "https://Stackoverflow.com/users/62192/" ]
I don't think this is available, either now or in the near future: The [bug 108320](https://bugs.eclipse.org/bugs/show_bug.cgi?id=108320) back in 2005 already mentioned that lack of feature and was asking for the ability to at least print the Type hierarchy... It has been closed as " RESOLVED WONTFIX".
Copying the hierarchy still doesn't seem to be possible in Eclipse Neon.3, but you can use "Java Search" to work around this: enter the top-level type as the "Search string" and limit the search to "Implementors". You can then copy the search results.
2,100,722
Here is Prob. 5, Chap. 4 in the book *Principles of Mathematical Analysis* by Walter Rudin, 3rd edition: > > If $f$ is a real continuous function defined on a closed set $E \subset \mathbb{R}^1$, prove that there exist real continuous functions $g$ on $\mathbb{R}^1$ such that $g(x) = f(x)$ for all $x \in E$. (Such fu...
2017/01/16
[ "https://math.stackexchange.com/questions/2100722", "https://math.stackexchange.com", "https://math.stackexchange.com/users/59734/" ]
Note that as $x\to \infty$, the asymptotic expansion of $e^{1/x}$ is $$e^{1/x}=1+\frac1x+\frac1{2x^2}+O\left(\frac1{x^3}\right)$$ Hence, $$\begin{align} \lim\_{x\to \infty}\left(\frac{1}{1-e^{1/x}}+x\right)&=\lim\_{x\to \infty}\left(\frac{1}{1-\left(1+\frac1x+\frac1{2x^2}+O\left(\frac1{x^3}\right)\right)}+x\right)...
Note that $$ \lim\_{x \to \infty} e^{\frac 1x}= e^0=1, $$ and that $(0, \infty) \ni x \mapsto 1-e^{\frac 1x}$ is non-positive. Therefore $$ \lim\_{x \to \infty} f(x) = - \infty. $$ Also, $\lim\_{x \to \infty} x = \infty$. Therefore by taking the limit $\lim\_{x \to \infty} f(x) +x$ you have an expression of the type ...
2,100,722
Here is Prob. 5, Chap. 4 in the book *Principles of Mathematical Analysis* by Walter Rudin, 3rd edition: > > If $f$ is a real continuous function defined on a closed set $E \subset \mathbb{R}^1$, prove that there exist real continuous functions $g$ on $\mathbb{R}^1$ such that $g(x) = f(x)$ for all $x \in E$. (Such fu...
2017/01/16
[ "https://math.stackexchange.com/questions/2100722", "https://math.stackexchange.com", "https://math.stackexchange.com/users/59734/" ]
Note that $$ \lim\_{x \to \infty} e^{\frac 1x}= e^0=1, $$ and that $(0, \infty) \ni x \mapsto 1-e^{\frac 1x}$ is non-positive. Therefore $$ \lim\_{x \to \infty} f(x) = - \infty. $$ Also, $\lim\_{x \to \infty} x = \infty$. Therefore by taking the limit $\lim\_{x \to \infty} f(x) +x$ you have an expression of the type ...
As mentioned, $\frac{1}{1-e^{\frac{1}{x}}} \xrightarrow[x \to \infty]{} -\infty$. As for the limit of $f(x) + x$, $\frac{1}{1-e^{\frac{1}{x}}} + x = \frac{1}{1-(1+\frac{1}{x} +\frac{1}{2x^2} +\mathcal{O}(\frac{1}{x^3}))} + x$ $= \frac{-x}{1+\frac{1}{2x} + \mathcal{O}(\frac{1}{x^2})} + x = -x(1-\frac{1}{2x} + \mathca...
2,100,722
Here is Prob. 5, Chap. 4 in the book *Principles of Mathematical Analysis* by Walter Rudin, 3rd edition: > > If $f$ is a real continuous function defined on a closed set $E \subset \mathbb{R}^1$, prove that there exist real continuous functions $g$ on $\mathbb{R}^1$ such that $g(x) = f(x)$ for all $x \in E$. (Such fu...
2017/01/16
[ "https://math.stackexchange.com/questions/2100722", "https://math.stackexchange.com", "https://math.stackexchange.com/users/59734/" ]
Note that $$ \lim\_{x \to \infty} e^{\frac 1x}= e^0=1, $$ and that $(0, \infty) \ni x \mapsto 1-e^{\frac 1x}$ is non-positive. Therefore $$ \lim\_{x \to \infty} f(x) = - \infty. $$ Also, $\lim\_{x \to \infty} x = \infty$. Therefore by taking the limit $\lim\_{x \to \infty} f(x) +x$ you have an expression of the type ...
In cases like these you can easily get tricked up, so it can be better to do $x=1/t$, whereupon the first limit becomes $$ \lim\_{x\to\infty}\frac{1}{1-e^{1/x}}= \lim\_{t\to0^+}\frac{1}{1-e^t}=-\infty $$ because $1-e^t<0$ for $t>0$. Also $$ \lim\_{x\to\infty}(f(x)+x)= \lim\_{t\to0^+}\left(\frac{1}{1-e^t}+\frac{1}{t}\r...
2,100,722
Here is Prob. 5, Chap. 4 in the book *Principles of Mathematical Analysis* by Walter Rudin, 3rd edition: > > If $f$ is a real continuous function defined on a closed set $E \subset \mathbb{R}^1$, prove that there exist real continuous functions $g$ on $\mathbb{R}^1$ such that $g(x) = f(x)$ for all $x \in E$. (Such fu...
2017/01/16
[ "https://math.stackexchange.com/questions/2100722", "https://math.stackexchange.com", "https://math.stackexchange.com/users/59734/" ]
Note that as $x\to \infty$, the asymptotic expansion of $e^{1/x}$ is $$e^{1/x}=1+\frac1x+\frac1{2x^2}+O\left(\frac1{x^3}\right)$$ Hence, $$\begin{align} \lim\_{x\to \infty}\left(\frac{1}{1-e^{1/x}}+x\right)&=\lim\_{x\to \infty}\left(\frac{1}{1-\left(1+\frac1x+\frac1{2x^2}+O\left(\frac1{x^3}\right)\right)}+x\right)...
As mentioned, $\frac{1}{1-e^{\frac{1}{x}}} \xrightarrow[x \to \infty]{} -\infty$. As for the limit of $f(x) + x$, $\frac{1}{1-e^{\frac{1}{x}}} + x = \frac{1}{1-(1+\frac{1}{x} +\frac{1}{2x^2} +\mathcal{O}(\frac{1}{x^3}))} + x$ $= \frac{-x}{1+\frac{1}{2x} + \mathcal{O}(\frac{1}{x^2})} + x = -x(1-\frac{1}{2x} + \mathca...
2,100,722
Here is Prob. 5, Chap. 4 in the book *Principles of Mathematical Analysis* by Walter Rudin, 3rd edition: > > If $f$ is a real continuous function defined on a closed set $E \subset \mathbb{R}^1$, prove that there exist real continuous functions $g$ on $\mathbb{R}^1$ such that $g(x) = f(x)$ for all $x \in E$. (Such fu...
2017/01/16
[ "https://math.stackexchange.com/questions/2100722", "https://math.stackexchange.com", "https://math.stackexchange.com/users/59734/" ]
Note that as $x\to \infty$, the asymptotic expansion of $e^{1/x}$ is $$e^{1/x}=1+\frac1x+\frac1{2x^2}+O\left(\frac1{x^3}\right)$$ Hence, $$\begin{align} \lim\_{x\to \infty}\left(\frac{1}{1-e^{1/x}}+x\right)&=\lim\_{x\to \infty}\left(\frac{1}{1-\left(1+\frac1x+\frac1{2x^2}+O\left(\frac1{x^3}\right)\right)}+x\right)...
In cases like these you can easily get tricked up, so it can be better to do $x=1/t$, whereupon the first limit becomes $$ \lim\_{x\to\infty}\frac{1}{1-e^{1/x}}= \lim\_{t\to0^+}\frac{1}{1-e^t}=-\infty $$ because $1-e^t<0$ for $t>0$. Also $$ \lim\_{x\to\infty}(f(x)+x)= \lim\_{t\to0^+}\left(\frac{1}{1-e^t}+\frac{1}{t}\r...
41,106,761
I have a method that I want to send several parameters or one or none ``` public void CalcBreakpoint(int tolerance, [I want to send several parameters or one or none]) { //my code } ``` for example something I want to call it as CalcBreakpoint(200, "string value1", "string value 2", "String Value 3") and in other o...
2016/12/12
[ "https://Stackoverflow.com/questions/41106761", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7071727/" ]
if they will always be strings you can do: ``` public void void CalcBreakpoint(int tolerance, params string[] args) { //my code } ``` if they are set parameters you use: ``` public void params void CalcBreakpoint(int tolerance, string arg1 = null, int? arg2 = null, object arg3 = null, decimal? arg4 = null) { ...
In addition to maksymiuk's excellent suggestions, I'd like to point out that you could also do one of the following: ``` // If you're using "mixed types" public void CalcBreakpoint(int tolerance, params object[] args) { //... } // The use of dynamic here is controversial but it can accomplish something similar to ...
3,870,057
I have a sliding panel set up on my website. When it finished animating, I set the hash like so ``` function() { window.location.hash = id; } ``` (this is a callback, and the `id` is assigned earlier). This works good, to allow the user to bookmark the panel, and also for the non JavaScript version to work. Ho...
2010/10/06
[ "https://Stackoverflow.com/questions/3870057", "https://Stackoverflow.com", "https://Stackoverflow.com/users/31671/" ]
I'm not sure if you can alter the original element but how about switch from using the id attr to something else like data-id? Then just read the value of data-id for your hash value and it won't jump.
When using laravel framework, I had some issues with using a route->back() function since it erased my hash. In order to keep my hash, I created a simple function: ``` $(function() { if (localStorage.getItem("hash") ){ location.hash = localStorage.getItem("hash"); } }); ``` and I set it in my oth...
3,870,057
I have a sliding panel set up on my website. When it finished animating, I set the hash like so ``` function() { window.location.hash = id; } ``` (this is a callback, and the `id` is assigned earlier). This works good, to allow the user to bookmark the panel, and also for the non JavaScript version to work. Ho...
2010/10/06
[ "https://Stackoverflow.com/questions/3870057", "https://Stackoverflow.com", "https://Stackoverflow.com/users/31671/" ]
This solution worked for me. The problem with setting `location.hash` is that the page will jump to that id if it's found on the page. The problem with `window.history.pushState` is that it adds an entry to the history for each tab the user clicks. Then when the user clicks the `back` button, they go to the previous...
I'm not sure if you can alter the original element but how about switch from using the id attr to something else like data-id? Then just read the value of data-id for your hash value and it won't jump.
3,870,057
I have a sliding panel set up on my website. When it finished animating, I set the hash like so ``` function() { window.location.hash = id; } ``` (this is a callback, and the `id` is assigned earlier). This works good, to allow the user to bookmark the panel, and also for the non JavaScript version to work. Ho...
2010/10/06
[ "https://Stackoverflow.com/questions/3870057", "https://Stackoverflow.com", "https://Stackoverflow.com/users/31671/" ]
Why dont you get the current scroll position, put it in a variable then assign the hash and put the page scroll back to where it was: ``` var yScroll=document.body.scrollTop; window.location.hash = id; document.body.scrollTop=yScroll; ``` this should work
This solution worked for me. The problem with setting `location.hash` is that the page will jump to that id if it's found on the page. The problem with `window.history.pushState` is that it adds an entry to the history for each tab the user clicks. Then when the user clicks the `back` button, they go to the previous...
3,870,057
I have a sliding panel set up on my website. When it finished animating, I set the hash like so ``` function() { window.location.hash = id; } ``` (this is a callback, and the `id` is assigned earlier). This works good, to allow the user to bookmark the panel, and also for the non JavaScript version to work. Ho...
2010/10/06
[ "https://Stackoverflow.com/questions/3870057", "https://Stackoverflow.com", "https://Stackoverflow.com/users/31671/" ]
The problem is you are setting the **window.location.hash** to an element's ID attribute. It is the expected behavior for the browser to jump to that element, regardless of whether you "preventDefault()" or not. One way to get around this is to prefix the hash with an arbitrary value like so: ``` window.location.hash...
Why dont you get the current scroll position, put it in a variable then assign the hash and put the page scroll back to where it was: ``` var yScroll=document.body.scrollTop; window.location.hash = id; document.body.scrollTop=yScroll; ``` this should work
3,870,057
I have a sliding panel set up on my website. When it finished animating, I set the hash like so ``` function() { window.location.hash = id; } ``` (this is a callback, and the `id` is assigned earlier). This works good, to allow the user to bookmark the panel, and also for the non JavaScript version to work. Ho...
2010/10/06
[ "https://Stackoverflow.com/questions/3870057", "https://Stackoverflow.com", "https://Stackoverflow.com/users/31671/" ]
Cheap and nasty solution.. Use the ugly #! style. To set it: ``` window.location.hash = '#!' + id; ``` To read it: ``` id = window.location.hash.replace(/^#!/, ''); ``` Since it doesn't match and anchor or id in the page, it won't jump.
Why dont you get the current scroll position, put it in a variable then assign the hash and put the page scroll back to where it was: ``` var yScroll=document.body.scrollTop; window.location.hash = id; document.body.scrollTop=yScroll; ``` this should work
3,870,057
I have a sliding panel set up on my website. When it finished animating, I set the hash like so ``` function() { window.location.hash = id; } ``` (this is a callback, and the `id` is assigned earlier). This works good, to allow the user to bookmark the panel, and also for the non JavaScript version to work. Ho...
2010/10/06
[ "https://Stackoverflow.com/questions/3870057", "https://Stackoverflow.com", "https://Stackoverflow.com/users/31671/" ]
The problem is you are setting the **window.location.hash** to an element's ID attribute. It is the expected behavior for the browser to jump to that element, regardless of whether you "preventDefault()" or not. One way to get around this is to prefix the hash with an arbitrary value like so: ``` window.location.hash...
This solution worked for me. The problem with setting `location.hash` is that the page will jump to that id if it's found on the page. The problem with `window.history.pushState` is that it adds an entry to the history for each tab the user clicks. Then when the user clicks the `back` button, they go to the previous...
3,870,057
I have a sliding panel set up on my website. When it finished animating, I set the hash like so ``` function() { window.location.hash = id; } ``` (this is a callback, and the `id` is assigned earlier). This works good, to allow the user to bookmark the panel, and also for the non JavaScript version to work. Ho...
2010/10/06
[ "https://Stackoverflow.com/questions/3870057", "https://Stackoverflow.com", "https://Stackoverflow.com/users/31671/" ]
This solution worked for me. The problem with setting `location.hash` is that the page will jump to that id if it's found on the page. The problem with `window.history.pushState` is that it adds an entry to the history for each tab the user clicks. Then when the user clicks the `back` button, they go to the previous...
When using laravel framework, I had some issues with using a route->back() function since it erased my hash. In order to keep my hash, I created a simple function: ``` $(function() { if (localStorage.getItem("hash") ){ location.hash = localStorage.getItem("hash"); } }); ``` and I set it in my oth...
3,870,057
I have a sliding panel set up on my website. When it finished animating, I set the hash like so ``` function() { window.location.hash = id; } ``` (this is a callback, and the `id` is assigned earlier). This works good, to allow the user to bookmark the panel, and also for the non JavaScript version to work. Ho...
2010/10/06
[ "https://Stackoverflow.com/questions/3870057", "https://Stackoverflow.com", "https://Stackoverflow.com/users/31671/" ]
I used a combination of Attila Fulop (Lea Verou) solution for modern browsers and Gavin Brock solution for old browsers as follows: ``` if (history.pushState) { // IE10, Firefox, Chrome, etc. window.history.pushState(null, null, '#' + id); } else { // IE9, IE8, etc window.location.hash = '#!' + id; } ...
This solution worked for me ``` // store the currently selected tab in the hash value if(history.pushState) { window.history.pushState(null, null, '#' + id); } else { window.location.hash = id; } // on load of the page: switch to the currently selected tab var hash = window.location.ha...
3,870,057
I have a sliding panel set up on my website. When it finished animating, I set the hash like so ``` function() { window.location.hash = id; } ``` (this is a callback, and the `id` is assigned earlier). This works good, to allow the user to bookmark the panel, and also for the non JavaScript version to work. Ho...
2010/10/06
[ "https://Stackoverflow.com/questions/3870057", "https://Stackoverflow.com", "https://Stackoverflow.com/users/31671/" ]
There is a workaround by using the history API on modern browsers with fallback on old ones: ``` if(history.pushState) { history.pushState(null, null, '#myhash'); } else { location.hash = '#myhash'; } ``` Credit goes to [Lea Verou](http://lea.verou.me/2011/05/change-url-hash-without-page-jump/)
This solution worked for me. The problem with setting `location.hash` is that the page will jump to that id if it's found on the page. The problem with `window.history.pushState` is that it adds an entry to the history for each tab the user clicks. Then when the user clicks the `back` button, they go to the previous...
3,870,057
I have a sliding panel set up on my website. When it finished animating, I set the hash like so ``` function() { window.location.hash = id; } ``` (this is a callback, and the `id` is assigned earlier). This works good, to allow the user to bookmark the panel, and also for the non JavaScript version to work. Ho...
2010/10/06
[ "https://Stackoverflow.com/questions/3870057", "https://Stackoverflow.com", "https://Stackoverflow.com/users/31671/" ]
I used a combination of Attila Fulop (Lea Verou) solution for modern browsers and Gavin Brock solution for old browsers as follows: ``` if (history.pushState) { // IE10, Firefox, Chrome, etc. window.history.pushState(null, null, '#' + id); } else { // IE9, IE8, etc window.location.hash = '#!' + id; } ...
I'm not sure if you can alter the original element but how about switch from using the id attr to something else like data-id? Then just read the value of data-id for your hash value and it won't jump.
129,001
(may be silly question but), Does there exist two fiber bundles (or in particular vector bundles) whose total spaces are the same but base spaces are different?
2012/04/07
[ "https://math.stackexchange.com/questions/129001", "https://math.stackexchange.com", "https://math.stackexchange.com/users/25520/" ]
Sure, consider the space $\mathbb{S}^1 \times \mathbb{R}$ with the projections $\pi\_1: \mathbb{S}^1 \times \mathbb{R} \to \mathbb{S}^1$ (a trivial fiber bundle with fiber $\mathbb{R}$) and $\pi\_2: \mathbb{S}^1 \times \mathbb{R} \to \mathbb{R}$ (a trivial fiber bundle with fiber $\mathbb{S}^1$). For an example of (tri...
Let $G$ be a topological group, $H$ and $K$ closed subgroups admitting a local cross section (see Steenrod, section 7). Then $H\rightarrow G\rightarrow G/H$ and $K\rightarrow G\rightarrow G/K$ are fibre bundles. In Martin Wanvik's example, our topological group is $\mathbb{R}^3$, which shares the very nice property th...
129,001
(may be silly question but), Does there exist two fiber bundles (or in particular vector bundles) whose total spaces are the same but base spaces are different?
2012/04/07
[ "https://math.stackexchange.com/questions/129001", "https://math.stackexchange.com", "https://math.stackexchange.com/users/25520/" ]
It seems to me that the question would be more interesting if we require the fiber, as well as the total space, to be the same (which might be hidden in the question). So let me present such an example. The fiber is the disjoint union of two points, let us say $G=\{\pm 1\}$, and the total space is the disjoint union o...
Let $G$ be a topological group, $H$ and $K$ closed subgroups admitting a local cross section (see Steenrod, section 7). Then $H\rightarrow G\rightarrow G/H$ and $K\rightarrow G\rightarrow G/K$ are fibre bundles. In Martin Wanvik's example, our topological group is $\mathbb{R}^3$, which shares the very nice property th...
129,001
(may be silly question but), Does there exist two fiber bundles (or in particular vector bundles) whose total spaces are the same but base spaces are different?
2012/04/07
[ "https://math.stackexchange.com/questions/129001", "https://math.stackexchange.com", "https://math.stackexchange.com/users/25520/" ]
To complement Samuel T's example, and to give an example of you's construction, here's a family of examples which came up a lot in my thesis. First, a general fact: If $H$ is a compact Lie group acting a manifold $M$ freely (i.e., the only element of $H$ which fixes any point of $M$ is the identity element), then the ...
Let $G$ be a topological group, $H$ and $K$ closed subgroups admitting a local cross section (see Steenrod, section 7). Then $H\rightarrow G\rightarrow G/H$ and $K\rightarrow G\rightarrow G/K$ are fibre bundles. In Martin Wanvik's example, our topological group is $\mathbb{R}^3$, which shares the very nice property th...
54,198,081
I want to display the contents of collection in list by foreach loop but variables (name) and (age) do not match in foreach loop. ``` string name; float age; List<universe> collection = new List<universe>(); universe main = new universe(); for (int i = 0; i < 10; i++) { Console.WriteLine("name"); name = Consol...
2019/01/15
[ "https://Stackoverflow.com/questions/54198081", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10915924/" ]
Try something like this: ``` string name; float age; List<universe> collection = new List<universe>(); for (int i = 0; i < 10; i++) { universe main = new universe(); Console.WriteLine("name"); name = Console.ReadLine(); Console.WriteLine("age"); age = float.Parse(Console.ReadLine()); main.Gal...
Use this ``` static void Main(string[] args) { string name; float age; List<universe> collection = new List<universe>(); universe main = new universe(); for (int i = 0; i < 2; i++) { Console.WriteLine("name"); name = Console.ReadLine(); ...
36,132,960
I want to set relative path to folder with my executive script that will works from any machine without hardcoding absolute path to file. So far I have following: ``` import os path_to_folder = os.path.realpath('.') ``` When I run my script from `PyCharm` calling `print(path_to_folder)` return correct path `C:\Use...
2016/03/21
[ "https://Stackoverflow.com/questions/36132960", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4549554/" ]
I used to use [Pathlib](https://docs.python.org/3/library/pathlib.html) ``` # get sibling file sib = Path(__file__).with_name(same_level_file) # get parent par = Path(__file__).parent # file in sibling parent sib2 = Path(__file__).parent.with_name(parent_folder).joinpath(file2) ```
You can also do this without Pathlib just using the \_\_file\_\_ variable that Python defines every module. In the parent script itself: ``` from os.path import dirname, abspath path_to_folder = abspath(dirname(__file__)) print(path_to_folder) ``` Or more generally if you just want to know where a module is locate...
41,537,817
How could I add a link to a page with SignIn via e-mail and then send a verification e-mail? I want to add a user to Wagtail, create group, site with name of the user. Why Wagtail doesn't have a module for that membership site?
2017/01/08
[ "https://Stackoverflow.com/questions/41537817", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7391866/" ]
I know this post is a bit old but it should be updated. Wagtail makes use of django's in-built auth views. > > Wagtail uses Django’s standard django.contrib.auth.views.LoginView > view here, and so the context variables available on the template are > as detailed in Django's login view documentation. > > > <htt...
Using [Django-registration](https://github.com/macropin/django-registration) is posible as explained here: [Django-registration setup without password](https://stackoverflow.com/q/5843319/3186190)
25,391,429
I'm trying to retrieve the certificate expiration date an application using the codesign command line tool, but I cannot seem to find the date that the certificate will expire. Any ideas?
2014/08/19
[ "https://Stackoverflow.com/questions/25391429", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3957701/" ]
Use codesign to extract the certificates to the current directory: ``` codesign --display --extract-certificates /Applications/Example.app ``` You can then use Quick Look to view them: ``` qlmanage -c public.x509-certificate -p codesign* ```
The selected answer did not quite work for me, but a slight variation found [here](https://github.com/hewigovens/hewigovens.github.com/wiki/codesign-extract-certificates) using `openssl` did the trick. In short, ``` codesign -dvvvv --extract-certificates /Applications/Example.app openssl x509 -inform DER -in codesign...
743,585
In Windows, how can I display the startup items from using a batch file?
2009/04/13
[ "https://Stackoverflow.com/questions/743585", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Your startup items are a combination of your own items and the "All Users" items. You can find your own with: ``` dir "%homedrive%%homepath%\start menu\progams\startup" ``` and the "All Users" ones (usually) with: ``` dir "%homedrive%%homepath%\..\all users\start menu\progams\startup" ``` All you have to do is ma...
The 'All Users' doesn't seem to display whats in the MSConfig. Is there anyway to query the registry to get the MSConfig StartUp entries?
743,585
In Windows, how can I display the startup items from using a batch file?
2009/04/13
[ "https://Stackoverflow.com/questions/743585", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Your startup items are a combination of your own items and the "All Users" items. You can find your own with: ``` dir "%homedrive%%homepath%\start menu\progams\startup" ``` and the "All Users" ones (usually) with: ``` dir "%homedrive%%homepath%\..\all users\start menu\progams\startup" ``` All you have to do is ma...
As already answered, the startup items are a combination of startup items for "All Users" and the current user. The startup items can either be placed as links in the Start Menu Startup folders, or as registry entries. For the startup folders, you have already been given the paths in Pax' answer, but do be aware that ...
743,585
In Windows, how can I display the startup items from using a batch file?
2009/04/13
[ "https://Stackoverflow.com/questions/743585", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Your startup items are a combination of your own items and the "All Users" items. You can find your own with: ``` dir "%homedrive%%homepath%\start menu\progams\startup" ``` and the "All Users" ones (usually) with: ``` dir "%homedrive%%homepath%\..\all users\start menu\progams\startup" ``` All you have to do is ma...
You can use [reg](http://www.ss64.com/nt/reg.html) command to query appropriate registry key: ``` reg QUERY HKCU\Software\Microsoft\Windows\CurrentVersion\Run > out ``` That will give you the list of keys in file "out", like this: ``` UIWatcher REG_SZ D:\Utils\Ashampoo UnInstaller\UIWatcher.exe Spybot...
743,585
In Windows, how can I display the startup items from using a batch file?
2009/04/13
[ "https://Stackoverflow.com/questions/743585", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
If you can use PowerShell, here is a bit of code that uses [AUTORUNSC](http://live.sysinternals.com/autorunsc.exe). ``` $autoruns = [xml](AUTORUNSC -x 2>$null) foreach ($item in $autoruns.autoruns.item) { If ($item.Description.Length -gt 0) { Write-Output $item.Description.Trim() } Else { Write-Output "n/a"} ...
The 'All Users' doesn't seem to display whats in the MSConfig. Is there anyway to query the registry to get the MSConfig StartUp entries?
743,585
In Windows, how can I display the startup items from using a batch file?
2009/04/13
[ "https://Stackoverflow.com/questions/743585", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
If you can use PowerShell, here is a bit of code that uses [AUTORUNSC](http://live.sysinternals.com/autorunsc.exe). ``` $autoruns = [xml](AUTORUNSC -x 2>$null) foreach ($item in $autoruns.autoruns.item) { If ($item.Description.Length -gt 0) { Write-Output $item.Description.Trim() } Else { Write-Output "n/a"} ...
As already answered, the startup items are a combination of startup items for "All Users" and the current user. The startup items can either be placed as links in the Start Menu Startup folders, or as registry entries. For the startup folders, you have already been given the paths in Pax' answer, but do be aware that ...
743,585
In Windows, how can I display the startup items from using a batch file?
2009/04/13
[ "https://Stackoverflow.com/questions/743585", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
If you can use PowerShell, here is a bit of code that uses [AUTORUNSC](http://live.sysinternals.com/autorunsc.exe). ``` $autoruns = [xml](AUTORUNSC -x 2>$null) foreach ($item in $autoruns.autoruns.item) { If ($item.Description.Length -gt 0) { Write-Output $item.Description.Trim() } Else { Write-Output "n/a"} ...
You can use [reg](http://www.ss64.com/nt/reg.html) command to query appropriate registry key: ``` reg QUERY HKCU\Software\Microsoft\Windows\CurrentVersion\Run > out ``` That will give you the list of keys in file "out", like this: ``` UIWatcher REG_SZ D:\Utils\Ashampoo UnInstaller\UIWatcher.exe Spybot...
276,342
I am in search for a database with translations so I can have comonly used phrases and words translated by a machine and not by an expensive translator. Is there such a thing as a translation database with words and often used phrases? If you don't know any would you use such a service? edit: the database should only...
2008/11/09
[ "https://Stackoverflow.com/questions/276342", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19929/" ]
> > edit: the database should only be monitored by people and not some automatic translater since they tend to be VERY bad > > > I don't think this is enough. If you're going to translate single words, you need to have some idea of the context in which the word will be used. For instance, consider the english wor...
<http://www.google.com/language_tools>
276,342
I am in search for a database with translations so I can have comonly used phrases and words translated by a machine and not by an expensive translator. Is there such a thing as a translation database with words and often used phrases? If you don't know any would you use such a service? edit: the database should only...
2008/11/09
[ "https://Stackoverflow.com/questions/276342", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19929/" ]
Check: [open-tran.eu](http://open-tran.eu/). It is a database of translations taken from various open source projects.
<http://www.google.com/language_tools>