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
2,213,433
I have this table: ``` option_values table: option_id (FK) value_id (PK) classified_id (FK) value ``` example: ``` option_id (FK) value_id (PK) classified_id (FK) value 1 1 22 'Petrol' 2 2 22 ...
2010/02/06
[ "https://Stackoverflow.com/questions/2213433", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Use this, you need to get an array of rows...they way you are doing it is giving you a single row's value in an array. ``` while ($row = mysql_fetch_array($result, MYSQL_NUM)) { printf("ID: %s Value: %s", $row[0], $row[3]); } ``` Source: [here](http://www.php.net/manual/en/function.mysql-fetch-array.php)
``` $res=mysql_query("SELECT * FROM option_values WHERE classified_id=22"); while(FALSE != ($row = mysql_fetch_row($res)) { echo $row[3]; } ```
2,213,433
I have this table: ``` option_values table: option_id (FK) value_id (PK) classified_id (FK) value ``` example: ``` option_id (FK) value_id (PK) classified_id (FK) value 1 1 22 'Petrol' 2 2 22 ...
2010/02/06
[ "https://Stackoverflow.com/questions/2213433", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Use this, you need to get an array of rows...they way you are doing it is giving you a single row's value in an array. ``` while ($row = mysql_fetch_array($result, MYSQL_NUM)) { printf("ID: %s Value: %s", $row[0], $row[3]); } ``` Source: [here](http://www.php.net/manual/en/function.mysql-fetch-array.php)
``` $res=mysql_query("SELECT * FROM option_values WHERE classified_id=22"); while($row = mysql_fetch_array($res)) { echo $row[1]; echo $row[2]; echo $row[3]; } ```
2,213,433
I have this table: ``` option_values table: option_id (FK) value_id (PK) classified_id (FK) value ``` example: ``` option_id (FK) value_id (PK) classified_id (FK) value 1 1 22 'Petrol' 2 2 22 ...
2010/02/06
[ "https://Stackoverflow.com/questions/2213433", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Use this, you need to get an array of rows...they way you are doing it is giving you a single row's value in an array. ``` while ($row = mysql_fetch_array($result, MYSQL_NUM)) { printf("ID: %s Value: %s", $row[0], $row[3]); } ``` Source: [here](http://www.php.net/manual/en/function.mysql-fetch-array.php)
Do yourself a favor and implement a helper function like so: ``` function fetch_multi_rows($query) { $rows = array(); while ( $row = mysql_fetch_array($result) ) $rows[] = $row; return $rows; } // Use it like this $my_rows = fetch_multi_rows(...your query...); foreach ( $my_rows as $row ) ec...
2,213,433
I have this table: ``` option_values table: option_id (FK) value_id (PK) classified_id (FK) value ``` example: ``` option_id (FK) value_id (PK) classified_id (FK) value 1 1 22 'Petrol' 2 2 22 ...
2010/02/06
[ "https://Stackoverflow.com/questions/2213433", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Use this, you need to get an array of rows...they way you are doing it is giving you a single row's value in an array. ``` while ($row = mysql_fetch_array($result, MYSQL_NUM)) { printf("ID: %s Value: %s", $row[0], $row[3]); } ``` Source: [here](http://www.php.net/manual/en/function.mysql-fetch-array.php)
You can write a "more object oriented" code like :) ``` // Execute the query $res = mysql_query("SELECT * FROM option_values WHERE classified_id=22"); // Check for empty result if (mysql_num_rows($result) == 0) { echo "No results."; exit; } // Fetch results as objects while ($row = mysql_fetch_object($re...
16,841,467
I have some strange behaviour with MigLayout. I have an SSCCE that reflects my problem. Basically, there is a gap between the top two panels (the gap belongs to the left cell). Everything else is just as I want it. The gap only occurs when the `JFrame` is large resized and large enough. ![SSCCE](https://i.stack.imgur....
2013/05/30
[ "https://Stackoverflow.com/questions/16841467", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1137043/" ]
A solution is to define the growing behaviour of the config-column in the column constraints: ``` frame.setLayout(new MigLayout("insets 10, hidemode 3, debug", "[][fill, grow][]", "")); frame.add(getMeasPanel(), "w 500!"); frame.add(getConfigPanel(), "left, grow"); frame.add(getMinimizeButton(), "right, top, w...
The problem is in fixed size of your `measurement panel`. You add `plot panel` in new row with attributes of `span, push, grow` and when you resize your frame both cells where `measurement` and `config` panel are will be resized too, but size of your `measurement` panel will remain fixed acording to `w 500!` attribute....
38,751,167
I have these 2 multi-select which works fine when comes to selecting/dis-selecting. PROBLEM: As long as all options are selected(Coloured blue) before submitting there is no problem but if any one of those selected option (right side) is clicked then only that option would be submitted along with the form while I need...
2016/08/03
[ "https://Stackoverflow.com/questions/38751167", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5626549/" ]
you can try using [Toro Library](https://github.com/eneim/Toro), which solves it very nicely with recyclerview
Look into creating a vertical ListView of VideoViews.
68,464,509
I wish to learn a more efficient to get averaged values that have different suffixes, such as \_L and \_R. For every brain region, I would like to create a new variable that is the averaged between the left and right hemispheres. This is denoted by the suffix `_L` and `_R`. I am doing this manually in excel but it co...
2021/07/21
[ "https://Stackoverflow.com/questions/68464509", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16454501/" ]
Do you have a trigger set up for it? The function you have only shows a simple trigger `onEdit()` which cannot send emails. [See Restrictions here.](https://developers.google.com/apps-script/guides/triggers#restrictions)
Vytautas is right. It says that: *They cannot access services that require authorization. For example, a simple trigger cannot send an email because the Gmail service requires authorization, but a simple trigger can translate a phrase with the Language service, which is anonymous.*
65,041,443
Here in section tag(id="title") I used the tag div in which I define the class="container-fluid" for this website and since I want padding of 3% from top and bottom and 15% from left and right I applied CSS with .container-fluid in which I wrote padding 3% 15%; and save the changes but the left and right padding(15%) i...
2020/11/27
[ "https://Stackoverflow.com/questions/65041443", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13655755/" ]
To perform actions on a message which is sent by the bot, you need to assign the message to a variable like so. ```cs IUserMessage sentMessage = await Context.Channel.SendMessageAsync(...); ``` In your case you want to add a reaction, so you can use the AddReactionAsync method in the same way that you used it on Con...
In your case this should work. ``` var msg = await Context.Channel.SendFileAsync(filename, embed: embed); msg.AddReactionAsync(new Emoji("")); ```
582,782
I am working on a photo site and one of more active users asked about pushing content to cell phones. The site is built on django, and I was wondering if anyone knows a **good way of allowing users to download and store content (images) on their cell phones**? As a side question... is it possible to accept payment for...
2009/02/24
[ "https://Stackoverflow.com/questions/582782", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2908/" ]
I enjoyed [these dot net rocks tv videos by Mark Miller on The Science of a Great User Experience](http://www.dnrtv.com/default.aspx?showNum=112) really got me thinking about good ui: <http://www.dnrtv.com/default.aspx?showNum=112> <http://www.dnrtv.com/default.aspx?showNum=123>
If you want to concentrate on just one feature, have a look at ITunes' search box which filters as you type. Other software may have had this before, but this was I think the first place I encountered it. The difference between this and classic search was an eye opener for me in terms of readability. Auto-complete wh...
582,782
I am working on a photo site and one of more active users asked about pushing content to cell phones. The site is built on django, and I was wondering if anyone knows a **good way of allowing users to download and store content (images) on their cell phones**? As a side question... is it possible to accept payment for...
2009/02/24
[ "https://Stackoverflow.com/questions/582782", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2908/" ]
I enjoyed [these dot net rocks tv videos by Mark Miller on The Science of a Great User Experience](http://www.dnrtv.com/default.aspx?showNum=112) really got me thinking about good ui: <http://www.dnrtv.com/default.aspx?showNum=112> <http://www.dnrtv.com/default.aspx?showNum=123>
Google for HIG. Human Interface Guidelines typically include lots of research into best-practice in user interfaces, and explain in great detail how to design each aspect of a program. Also, have a google for "user-interface hall of shame" or something like that.
582,782
I am working on a photo site and one of more active users asked about pushing content to cell phones. The site is built on django, and I was wondering if anyone knows a **good way of allowing users to download and store content (images) on their cell phones**? As a side question... is it possible to accept payment for...
2009/02/24
[ "https://Stackoverflow.com/questions/582782", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2908/" ]
If you want to concentrate on just one feature, have a look at ITunes' search box which filters as you type. Other software may have had this before, but this was I think the first place I encountered it. The difference between this and classic search was an eye opener for me in terms of readability. Auto-complete wh...
You can check case studys on websites of GUI companys. I fund few at [www.puzzlehead.com](http://www.puzzlehead.com) Check there and also other sites.
582,782
I am working on a photo site and one of more active users asked about pushing content to cell phones. The site is built on django, and I was wondering if anyone knows a **good way of allowing users to download and store content (images) on their cell phones**? As a side question... is it possible to accept payment for...
2009/02/24
[ "https://Stackoverflow.com/questions/582782", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2908/" ]
You can look at [Thirteen23 Experiences](http://www.thirteen23.com/experiences/)
You can check case studys on websites of GUI companys. I fund few at [www.puzzlehead.com](http://www.puzzlehead.com) Check there and also other sites.
582,782
I am working on a photo site and one of more active users asked about pushing content to cell phones. The site is built on django, and I was wondering if anyone knows a **good way of allowing users to download and store content (images) on their cell phones**? As a side question... is it possible to accept payment for...
2009/02/24
[ "https://Stackoverflow.com/questions/582782", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2908/" ]
Where you can really make a difference with GUI design is if you are addressing a difficult to understand concept in a GUI. When you are doing that, creativity is critical. When dealing with complex hardware configurations (something I had to do a lot, but probably doesn't apply to you), I've had good luck going to te...
To make things usable, you need to make sure that you follow existing conventions for your target platform and application type. For example, if you're developing a Windows App you'd better make sure that control-c copies, control-v pastes, control-s saves, etc. The File menu better be the leftmost item in the menu ba...
582,782
I am working on a photo site and one of more active users asked about pushing content to cell phones. The site is built on django, and I was wondering if anyone knows a **good way of allowing users to download and store content (images) on their cell phones**? As a side question... is it possible to accept payment for...
2009/02/24
[ "https://Stackoverflow.com/questions/582782", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2908/" ]
Where you can really make a difference with GUI design is if you are addressing a difficult to understand concept in a GUI. When you are doing that, creativity is critical. When dealing with complex hardware configurations (something I had to do a lot, but probably doesn't apply to you), I've had good luck going to te...
You can check case studys on websites of GUI companys. I fund few at [www.puzzlehead.com](http://www.puzzlehead.com) Check there and also other sites.
582,782
I am working on a photo site and one of more active users asked about pushing content to cell phones. The site is built on django, and I was wondering if anyone knows a **good way of allowing users to download and store content (images) on their cell phones**? As a side question... is it possible to accept payment for...
2009/02/24
[ "https://Stackoverflow.com/questions/582782", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2908/" ]
Google for HIG. Human Interface Guidelines typically include lots of research into best-practice in user interfaces, and explain in great detail how to design each aspect of a program. Also, have a google for "user-interface hall of shame" or something like that.
You can check case studys on websites of GUI companys. I fund few at [www.puzzlehead.com](http://www.puzzlehead.com) Check there and also other sites.
582,782
I am working on a photo site and one of more active users asked about pushing content to cell phones. The site is built on django, and I was wondering if anyone knows a **good way of allowing users to download and store content (images) on their cell phones**? As a side question... is it possible to accept payment for...
2009/02/24
[ "https://Stackoverflow.com/questions/582782", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2908/" ]
Where you can really make a difference with GUI design is if you are addressing a difficult to understand concept in a GUI. When you are doing that, creativity is critical. When dealing with complex hardware configurations (something I had to do a lot, but probably doesn't apply to you), I've had good luck going to te...
Google for HIG. Human Interface Guidelines typically include lots of research into best-practice in user interfaces, and explain in great detail how to design each aspect of a program. Also, have a google for "user-interface hall of shame" or something like that.
582,782
I am working on a photo site and one of more active users asked about pushing content to cell phones. The site is built on django, and I was wondering if anyone knows a **good way of allowing users to download and store content (images) on their cell phones**? As a side question... is it possible to accept payment for...
2009/02/24
[ "https://Stackoverflow.com/questions/582782", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2908/" ]
I enjoyed [these dot net rocks tv videos by Mark Miller on The Science of a Great User Experience](http://www.dnrtv.com/default.aspx?showNum=112) really got me thinking about good ui: <http://www.dnrtv.com/default.aspx?showNum=112> <http://www.dnrtv.com/default.aspx?showNum=123>
To make things usable, you need to make sure that you follow existing conventions for your target platform and application type. For example, if you're developing a Windows App you'd better make sure that control-c copies, control-v pastes, control-s saves, etc. The File menu better be the leftmost item in the menu ba...
582,782
I am working on a photo site and one of more active users asked about pushing content to cell phones. The site is built on django, and I was wondering if anyone knows a **good way of allowing users to download and store content (images) on their cell phones**? As a side question... is it possible to accept payment for...
2009/02/24
[ "https://Stackoverflow.com/questions/582782", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2908/" ]
Where you can really make a difference with GUI design is if you are addressing a difficult to understand concept in a GUI. When you are doing that, creativity is critical. When dealing with complex hardware configurations (something I had to do a lot, but probably doesn't apply to you), I've had good luck going to te...
If you want to concentrate on just one feature, have a look at ITunes' search box which filters as you type. Other software may have had this before, but this was I think the first place I encountered it. The difference between this and classic search was an eye opener for me in terms of readability. Auto-complete wh...
30,482,330
The following is the piece of code that I am trying to execute ```java protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); InputStream is = this.getResources().openRawResource(R.drawable.cat); Bitmap footbm = BitmapFactory...
2015/05/27
[ "https://Stackoverflow.com/questions/30482330", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4944564/" ]
You can also add an error message to the model state like: ``` ModelState.AddModelError("Day", "Something is wrong with Day"); ``` To bind the above error to a specific property you specify the property name as the first parameter => "Day".
``` in the class model for Register,add [Required(ErrorMessage = "required")] public int Day { get; set; } to get [Required(ErrorMessage = "required")] this add namespace using System.ComponentModel.DataAnnotations; in controller,also check if(modelstate.isvalid==true) ```
30,482,330
The following is the piece of code that I am trying to execute ```java protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); InputStream is = this.getResources().openRawResource(R.drawable.cat); Bitmap footbm = BitmapFactory...
2015/05/27
[ "https://Stackoverflow.com/questions/30482330", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4944564/" ]
You can also add an error message to the model state like: ``` ModelState.AddModelError("Day", "Something is wrong with Day"); ``` To bind the above error to a specific property you specify the property name as the first parameter => "Day".
Model: ``` [Required(ErrorMessage = "required")] public int? Day { get; set; } [Required(ErrorMessage = "required")] public int? Month { get; set; } [Required(ErrorMessage = "required")] public int? Year { get; set; } ```
30,482,330
The following is the piece of code that I am trying to execute ```java protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); InputStream is = this.getResources().openRawResource(R.drawable.cat); Bitmap footbm = BitmapFactory...
2015/05/27
[ "https://Stackoverflow.com/questions/30482330", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4944564/" ]
You can also add an error message to the model state like: ``` ModelState.AddModelError("Day", "Something is wrong with Day"); ``` To bind the above error to a specific property you specify the property name as the first parameter => "Day".
First you need to specify in your model which fields are required. ``` [Required] public int? Day { get; set; } [Required] public int? Month { get; set; } [Required] public int? Year { get; set; } ``` \*you need to import namespace `System.ComponentModel.DataAnnotations` to get `[Required]` then in view you n...
11,529,070
I would like to center a `div` by clicking it. So if I'm clicking a `div` I want it to scroll to the center of the browser viewport. I don't want to use anchor points like the guides and examples I've seen. How can I achieve this?
2012/07/17
[ "https://Stackoverflow.com/questions/11529070", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1532592/" ]
In some way you have to identify the clickable elements. I build an example, that uses the `class`-attribute for that. ### Step 1 This is the script, that does the work: ```js $('html,body').animate({ scrollTop: $(this).offset().top - ( $(window).height() - $(this).outerHeight(true) ) / 2 }, 200); ``` What you...
I've got one slight modification to offer. If the "adjustment factor" i.e. `( $(window).height() - $(this).outerHeight(true) ) / 2` is `< 0` you can get undesirable results whereby you overshoot that element in the viewport with your scroll. I added a `max(0,adjustment factor)` to correct : ``` function scroll...
11,529,070
I would like to center a `div` by clicking it. So if I'm clicking a `div` I want it to scroll to the center of the browser viewport. I don't want to use anchor points like the guides and examples I've seen. How can I achieve this?
2012/07/17
[ "https://Stackoverflow.com/questions/11529070", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1532592/" ]
In some way you have to identify the clickable elements. I build an example, that uses the `class`-attribute for that. ### Step 1 This is the script, that does the work: ```js $('html,body').animate({ scrollTop: $(this).offset().top - ( $(window).height() - $(this).outerHeight(true) ) / 2 }, 200); ``` What you...
``` HTMLElement.prototype.scrollToCenter = function(){ window.scrollBy(0, this.getBoundingClientRect().top - (window.innerHeight>>1)); } ``` Achieved with pure JavaScript for Scrolling to Center in the vertical direction. And it's similar in the horizontal direction. I don't take elements' height into considerati...
11,529,070
I would like to center a `div` by clicking it. So if I'm clicking a `div` I want it to scroll to the center of the browser viewport. I don't want to use anchor points like the guides and examples I've seen. How can I achieve this?
2012/07/17
[ "https://Stackoverflow.com/questions/11529070", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1532592/" ]
In some way you have to identify the clickable elements. I build an example, that uses the `class`-attribute for that. ### Step 1 This is the script, that does the work: ```js $('html,body').animate({ scrollTop: $(this).offset().top - ( $(window).height() - $(this).outerHeight(true) ) / 2 }, 200); ``` What you...
I know this question is old, but right now, you can use [scrollIntoView](https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView): For example: ```js document.body.scrollIntoView({ behavior: 'smooth', inline: 'center', block: 'center' }); ```
11,529,070
I would like to center a `div` by clicking it. So if I'm clicking a `div` I want it to scroll to the center of the browser viewport. I don't want to use anchor points like the guides and examples I've seen. How can I achieve this?
2012/07/17
[ "https://Stackoverflow.com/questions/11529070", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1532592/" ]
``` HTMLElement.prototype.scrollToCenter = function(){ window.scrollBy(0, this.getBoundingClientRect().top - (window.innerHeight>>1)); } ``` Achieved with pure JavaScript for Scrolling to Center in the vertical direction. And it's similar in the horizontal direction. I don't take elements' height into considerati...
I've got one slight modification to offer. If the "adjustment factor" i.e. `( $(window).height() - $(this).outerHeight(true) ) / 2` is `< 0` you can get undesirable results whereby you overshoot that element in the viewport with your scroll. I added a `max(0,adjustment factor)` to correct : ``` function scroll...
11,529,070
I would like to center a `div` by clicking it. So if I'm clicking a `div` I want it to scroll to the center of the browser viewport. I don't want to use anchor points like the guides and examples I've seen. How can I achieve this?
2012/07/17
[ "https://Stackoverflow.com/questions/11529070", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1532592/" ]
I know this question is old, but right now, you can use [scrollIntoView](https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView): For example: ```js document.body.scrollIntoView({ behavior: 'smooth', inline: 'center', block: 'center' }); ```
I've got one slight modification to offer. If the "adjustment factor" i.e. `( $(window).height() - $(this).outerHeight(true) ) / 2` is `< 0` you can get undesirable results whereby you overshoot that element in the viewport with your scroll. I added a `max(0,adjustment factor)` to correct : ``` function scroll...
13,175
Please have look at this table: ``` mysql> desc s_p; +-------------------------+------------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +-------------------------+------------------+------+-----+---------+----------------+ ...
2012/02/16
[ "https://dba.stackexchange.com/questions/13175", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/6781/" ]
Try the query ``` select * from s_p where estimated_date is null and estimated_date is not null limit 5; ```
This is expected. For a column that is nullable a 0==NULL="" and so on. So the first check actually returns rows where no date was set or its perceived analogous to "0/NULL"
13,175
Please have look at this table: ``` mysql> desc s_p; +-------------------------+------------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +-------------------------+------------------+------+-----+---------+----------------+ ...
2012/02/16
[ "https://dba.stackexchange.com/questions/13175", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/6781/" ]
Do you have some zero dates? Datetime values of `0000-00-00 00:00:00` are considered by MySQL to simultaneously satisfy `is null` and `is not null`: ``` steve@steve@localhost > create temporary table _tmp (a datetime not null); Query OK, 0 rows affected (0.02 sec) steve@steve@localhost > insert into _tmp values ('');...
Try the query ``` select * from s_p where estimated_date is null and estimated_date is not null limit 5; ```
13,175
Please have look at this table: ``` mysql> desc s_p; +-------------------------+------------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +-------------------------+------------------+------+-----+---------+----------------+ ...
2012/02/16
[ "https://dba.stackexchange.com/questions/13175", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/6781/" ]
@ypercube: I was recently asked if I thought the regression bug "SELECT COUNT(DISTINCT) crashes InnoDB when WHERE operand is in Primary Key or Unique Index" could be at the root of this. Here is my reply (originally here): <http://www.chriscalender.com/?p=315&cpage=1#comment-1460> I don’t think this is the same bug...
Try the query ``` select * from s_p where estimated_date is null and estimated_date is not null limit 5; ```
13,175
Please have look at this table: ``` mysql> desc s_p; +-------------------------+------------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +-------------------------+------------------+------+-----+---------+----------------+ ...
2012/02/16
[ "https://dba.stackexchange.com/questions/13175", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/6781/" ]
Do you have some zero dates? Datetime values of `0000-00-00 00:00:00` are considered by MySQL to simultaneously satisfy `is null` and `is not null`: ``` steve@steve@localhost > create temporary table _tmp (a datetime not null); Query OK, 0 rows affected (0.02 sec) steve@steve@localhost > insert into _tmp values ('');...
This is expected. For a column that is nullable a 0==NULL="" and so on. So the first check actually returns rows where no date was set or its perceived analogous to "0/NULL"
13,175
Please have look at this table: ``` mysql> desc s_p; +-------------------------+------------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +-------------------------+------------------+------+-----+---------+----------------+ ...
2012/02/16
[ "https://dba.stackexchange.com/questions/13175", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/6781/" ]
I see something interesting in the table layout that cries out 'I don't feel like counting'. What I am about to say is only a hunch. You ran this query before ``` select distinct date(estimated_date) from s_p; ``` Run it as a COUNT/GROUP BY ``` select count(1) rowcount,date(estimated_date) from s_p group by date(e...
This is expected. For a column that is nullable a 0==NULL="" and so on. So the first check actually returns rows where no date was set or its perceived analogous to "0/NULL"
13,175
Please have look at this table: ``` mysql> desc s_p; +-------------------------+------------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +-------------------------+------------------+------+-----+---------+----------------+ ...
2012/02/16
[ "https://dba.stackexchange.com/questions/13175", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/6781/" ]
@ypercube: I was recently asked if I thought the regression bug "SELECT COUNT(DISTINCT) crashes InnoDB when WHERE operand is in Primary Key or Unique Index" could be at the root of this. Here is my reply (originally here): <http://www.chriscalender.com/?p=315&cpage=1#comment-1460> I don’t think this is the same bug...
This is expected. For a column that is nullable a 0==NULL="" and so on. So the first check actually returns rows where no date was set or its perceived analogous to "0/NULL"
13,175
Please have look at this table: ``` mysql> desc s_p; +-------------------------+------------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +-------------------------+------------------+------+-----+---------+----------------+ ...
2012/02/16
[ "https://dba.stackexchange.com/questions/13175", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/6781/" ]
Do you have some zero dates? Datetime values of `0000-00-00 00:00:00` are considered by MySQL to simultaneously satisfy `is null` and `is not null`: ``` steve@steve@localhost > create temporary table _tmp (a datetime not null); Query OK, 0 rows affected (0.02 sec) steve@steve@localhost > insert into _tmp values ('');...
I see something interesting in the table layout that cries out 'I don't feel like counting'. What I am about to say is only a hunch. You ran this query before ``` select distinct date(estimated_date) from s_p; ``` Run it as a COUNT/GROUP BY ``` select count(1) rowcount,date(estimated_date) from s_p group by date(e...
13,175
Please have look at this table: ``` mysql> desc s_p; +-------------------------+------------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +-------------------------+------------------+------+-----+---------+----------------+ ...
2012/02/16
[ "https://dba.stackexchange.com/questions/13175", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/6781/" ]
Do you have some zero dates? Datetime values of `0000-00-00 00:00:00` are considered by MySQL to simultaneously satisfy `is null` and `is not null`: ``` steve@steve@localhost > create temporary table _tmp (a datetime not null); Query OK, 0 rows affected (0.02 sec) steve@steve@localhost > insert into _tmp values ('');...
@ypercube: I was recently asked if I thought the regression bug "SELECT COUNT(DISTINCT) crashes InnoDB when WHERE operand is in Primary Key or Unique Index" could be at the root of this. Here is my reply (originally here): <http://www.chriscalender.com/?p=315&cpage=1#comment-1460> I don’t think this is the same bug...
13,175
Please have look at this table: ``` mysql> desc s_p; +-------------------------+------------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +-------------------------+------------------+------+-----+---------+----------------+ ...
2012/02/16
[ "https://dba.stackexchange.com/questions/13175", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/6781/" ]
@ypercube: I was recently asked if I thought the regression bug "SELECT COUNT(DISTINCT) crashes InnoDB when WHERE operand is in Primary Key or Unique Index" could be at the root of this. Here is my reply (originally here): <http://www.chriscalender.com/?p=315&cpage=1#comment-1460> I don’t think this is the same bug...
I see something interesting in the table layout that cries out 'I don't feel like counting'. What I am about to say is only a hunch. You ran this query before ``` select distinct date(estimated_date) from s_p; ``` Run it as a COUNT/GROUP BY ``` select count(1) rowcount,date(estimated_date) from s_p group by date(e...
44,333,834
Suddenly, from one command to the next, the Heroic CLI stopped working. No matter what I type into the command line, I get the same error. See below. ``` $heroku help ▸ commands is not a heroku command. ▸ Perhaps you meant domains ▸ Run heroku help for a list of available commands. ! error getting comm...
2017/06/02
[ "https://Stackoverflow.com/questions/44333834", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5494251/" ]
this problem just happened with me after the last update of heroku CLI, heroku CLI check if there is updates after execute any command related with and when run updates the problem occurs because is not working with root permissions. to fix this you need to reinstall heroku CLI ``` sudo apt-get remove heroku sudo ad...
This just happened to me. I fixed it by removing the heroku app the same way i installed it. I had the gem installed, so i uninstalled that. `gem uninstall heroku` Then i used homebrew to reinstall it. `brew install heroku` and it worked.
44,333,834
Suddenly, from one command to the next, the Heroic CLI stopped working. No matter what I type into the command line, I get the same error. See below. ``` $heroku help ▸ commands is not a heroku command. ▸ Perhaps you meant domains ▸ Run heroku help for a list of available commands. ! error getting comm...
2017/06/02
[ "https://Stackoverflow.com/questions/44333834", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5494251/" ]
this problem just happened with me after the last update of heroku CLI, heroku CLI check if there is updates after execute any command related with and when run updates the problem occurs because is not working with root permissions. to fix this you need to reinstall heroku CLI ``` sudo apt-get remove heroku sudo ad...
Something similar (although with a different error message) happened to me after updating my OS. On a Mac, make sure to install the CommandLineTools (with Xcode) after a major OS update!
4,562,502
I have seen similar posts but couldn't find any answer.. Kindly advise whether its possible or not?
2010/12/30
[ "https://Stackoverflow.com/questions/4562502", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Are you talking about 3rd party applications or the inbuilt applications of the iPhone? If you are talking about 3rd party application then forget it.. As told by @KingOfBliss apple restricts it. And if you want to open inbuilt applications like camera, photo, contacts,safari web then you can do it. You can get samp...
Apple restrict you to open 3rd party application, but you can open some application like safari,contacts,etc.,
4,562,502
I have seen similar posts but couldn't find any answer.. Kindly advise whether its possible or not?
2010/12/30
[ "https://Stackoverflow.com/questions/4562502", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Applications can register a custom URL format, and then other applications can call that URL to trigger that application, pass it data, etc. Some of Apple's built-ins have URL formats that they've published, and some 3rd party apps have (and advertise) them too. If you're building more than one app, you can obviously c...
Apple restrict you to open 3rd party application, but you can open some application like safari,contacts,etc.,
4,562,502
I have seen similar posts but couldn't find any answer.. Kindly advise whether its possible or not?
2010/12/30
[ "https://Stackoverflow.com/questions/4562502", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Are you talking about 3rd party applications or the inbuilt applications of the iPhone? If you are talking about 3rd party application then forget it.. As told by @KingOfBliss apple restricts it. And if you want to open inbuilt applications like camera, photo, contacts,safari web then you can do it. You can get samp...
Applications can register a custom URL format, and then other applications can call that URL to trigger that application, pass it data, etc. Some of Apple's built-ins have URL formats that they've published, and some 3rd party apps have (and advertise) them too. If you're building more than one app, you can obviously c...
15,927
I already tried this <http://hg.orfeo-toolbox.org/OTB-Qgis-plugins/> repository and couldn't get it... This guy seems to have it: <http://www.elance.com/samples/orfeo-toolbox-qgis/24111664/>
2011/10/19
[ "https://gis.stackexchange.com/questions/15927", "https://gis.stackexchange.com", "https://gis.stackexchange.com/users/3530/" ]
This is how I installed it on Windows 8.1 running QGIS 2.18.16: * Download zip file for Windows 64bit version from <https://www.orfeo-toolbox.org/download/> * Unzipped it to a sensible location (i.e. not a temporary location) * Start QGIS * Go to menu option Processing > Options * Expand Providers > Orfeo Toolbox * Fo...
I tried installing Orfeo Toolbox in QGIS on Mac and struggled a lot but eventually managed it. Here's how for any beginners confused by terminology: <https://www.orfeo-toolbox.org/download/> (download MacOS) Make sure the file does not end in .txt, if it does, remove this so it just ends in .run (On recent Mac OS, yo...
15,927
I already tried this <http://hg.orfeo-toolbox.org/OTB-Qgis-plugins/> repository and couldn't get it... This guy seems to have it: <http://www.elance.com/samples/orfeo-toolbox-qgis/24111664/>
2011/10/19
[ "https://gis.stackexchange.com/questions/15927", "https://gis.stackexchange.com", "https://gis.stackexchange.com/users/3530/" ]
Since QGIS 3.8, the OTB provider plugin is part of QGIS core but disabled by default (enable it under Options->Processing->Providers). Install OTB (download from <https://www.orfeo-toolbox.org/download/>) before enabling the plugin. Prior to QGIS 3.8, install OTB and add the plugin repository <http://orfeo-toolbox.org...
Figured I'd leave this answer in case someone sees it now. It seems like they've cleaned this up since it was asked, and that old wiki doesn't link well to the current website: <https://www.orfeo-toolbox.org/download/> There are full installation instructions as well here <https://www.orfeo-toolbox.org/CookBook/Insta...
15,927
I already tried this <http://hg.orfeo-toolbox.org/OTB-Qgis-plugins/> repository and couldn't get it... This guy seems to have it: <http://www.elance.com/samples/orfeo-toolbox-qgis/24111664/>
2011/10/19
[ "https://gis.stackexchange.com/questions/15927", "https://gis.stackexchange.com", "https://gis.stackexchange.com/users/3530/" ]
I did it following this: <http://wiki.orfeo-toolbox.org/index.php/Quantum_GIS_access_to_OTB_applications>
Figured I'd leave this answer in case someone sees it now. It seems like they've cleaned this up since it was asked, and that old wiki doesn't link well to the current website: <https://www.orfeo-toolbox.org/download/> There are full installation instructions as well here <https://www.orfeo-toolbox.org/CookBook/Insta...
15,927
I already tried this <http://hg.orfeo-toolbox.org/OTB-Qgis-plugins/> repository and couldn't get it... This guy seems to have it: <http://www.elance.com/samples/orfeo-toolbox-qgis/24111664/>
2011/10/19
[ "https://gis.stackexchange.com/questions/15927", "https://gis.stackexchange.com", "https://gis.stackexchange.com/users/3530/" ]
Figured I'd leave this answer in case someone sees it now. It seems like they've cleaned this up since it was asked, and that old wiki doesn't link well to the current website: <https://www.orfeo-toolbox.org/download/> There are full installation instructions as well here <https://www.orfeo-toolbox.org/CookBook/Insta...
I tried installing Orfeo Toolbox in QGIS on Mac and struggled a lot but eventually managed it. Here's how for any beginners confused by terminology: <https://www.orfeo-toolbox.org/download/> (download MacOS) Make sure the file does not end in .txt, if it does, remove this so it just ends in .run (On recent Mac OS, yo...
15,927
I already tried this <http://hg.orfeo-toolbox.org/OTB-Qgis-plugins/> repository and couldn't get it... This guy seems to have it: <http://www.elance.com/samples/orfeo-toolbox-qgis/24111664/>
2011/10/19
[ "https://gis.stackexchange.com/questions/15927", "https://gis.stackexchange.com", "https://gis.stackexchange.com/users/3530/" ]
Since QGIS 3.8, the OTB provider plugin is part of QGIS core but disabled by default (enable it under Options->Processing->Providers). Install OTB (download from <https://www.orfeo-toolbox.org/download/>) before enabling the plugin. Prior to QGIS 3.8, install OTB and add the plugin repository <http://orfeo-toolbox.org...
I've been struggling trying to make OTB work on QGIS 3.18.1-Zürich running on a GNU/Linux Debian machine. I finally succeeded, so I guess I'll share my experience here, since it wasn't really obvious. I have all OTB packages installed by the apt package management system, and the binaries and libraries are located in ...
15,927
I already tried this <http://hg.orfeo-toolbox.org/OTB-Qgis-plugins/> repository and couldn't get it... This guy seems to have it: <http://www.elance.com/samples/orfeo-toolbox-qgis/24111664/>
2011/10/19
[ "https://gis.stackexchange.com/questions/15927", "https://gis.stackexchange.com", "https://gis.stackexchange.com/users/3530/" ]
I did it following this: <http://wiki.orfeo-toolbox.org/index.php/Quantum_GIS_access_to_OTB_applications>
Here are some resources that answer your question: <http://wiki.orfeo-toolbox.org/index.php/Quantum_GIS_plugins> <http://osgeo-org.1803224.n2.nabble.com/Is-there-a-way-of-installing-the-qgis-plugin-for-ORFEO-Toolbox-OTB-td5963420.html>
15,927
I already tried this <http://hg.orfeo-toolbox.org/OTB-Qgis-plugins/> repository and couldn't get it... This guy seems to have it: <http://www.elance.com/samples/orfeo-toolbox-qgis/24111664/>
2011/10/19
[ "https://gis.stackexchange.com/questions/15927", "https://gis.stackexchange.com", "https://gis.stackexchange.com/users/3530/" ]
I did it following this: <http://wiki.orfeo-toolbox.org/index.php/Quantum_GIS_access_to_OTB_applications>
I've been struggling trying to make OTB work on QGIS 3.18.1-Zürich running on a GNU/Linux Debian machine. I finally succeeded, so I guess I'll share my experience here, since it wasn't really obvious. I have all OTB packages installed by the apt package management system, and the binaries and libraries are located in ...
15,927
I already tried this <http://hg.orfeo-toolbox.org/OTB-Qgis-plugins/> repository and couldn't get it... This guy seems to have it: <http://www.elance.com/samples/orfeo-toolbox-qgis/24111664/>
2011/10/19
[ "https://gis.stackexchange.com/questions/15927", "https://gis.stackexchange.com", "https://gis.stackexchange.com/users/3530/" ]
Here are some resources that answer your question: <http://wiki.orfeo-toolbox.org/index.php/Quantum_GIS_plugins> <http://osgeo-org.1803224.n2.nabble.com/Is-there-a-way-of-installing-the-qgis-plugin-for-ORFEO-Toolbox-OTB-td5963420.html>
The right way is to install the new analysis framework and then the (new) plugins for Orfeo (and SAGA). Announcement and instructions: <http://lists.osgeo.org/pipermail/qgis-user/2011-October/013923.html>
15,927
I already tried this <http://hg.orfeo-toolbox.org/OTB-Qgis-plugins/> repository and couldn't get it... This guy seems to have it: <http://www.elance.com/samples/orfeo-toolbox-qgis/24111664/>
2011/10/19
[ "https://gis.stackexchange.com/questions/15927", "https://gis.stackexchange.com", "https://gis.stackexchange.com/users/3530/" ]
This is how I installed it on Windows 8.1 running QGIS 2.18.16: * Download zip file for Windows 64bit version from <https://www.orfeo-toolbox.org/download/> * Unzipped it to a sensible location (i.e. not a temporary location) * Start QGIS * Go to menu option Processing > Options * Expand Providers > Orfeo Toolbox * Fo...
Here are some resources that answer your question: <http://wiki.orfeo-toolbox.org/index.php/Quantum_GIS_plugins> <http://osgeo-org.1803224.n2.nabble.com/Is-there-a-way-of-installing-the-qgis-plugin-for-ORFEO-Toolbox-OTB-td5963420.html>
15,927
I already tried this <http://hg.orfeo-toolbox.org/OTB-Qgis-plugins/> repository and couldn't get it... This guy seems to have it: <http://www.elance.com/samples/orfeo-toolbox-qgis/24111664/>
2011/10/19
[ "https://gis.stackexchange.com/questions/15927", "https://gis.stackexchange.com", "https://gis.stackexchange.com/users/3530/" ]
I've been struggling trying to make OTB work on QGIS 3.18.1-Zürich running on a GNU/Linux Debian machine. I finally succeeded, so I guess I'll share my experience here, since it wasn't really obvious. I have all OTB packages installed by the apt package management system, and the binaries and libraries are located in ...
I tried installing Orfeo Toolbox in QGIS on Mac and struggled a lot but eventually managed it. Here's how for any beginners confused by terminology: <https://www.orfeo-toolbox.org/download/> (download MacOS) Make sure the file does not end in .txt, if it does, remove this so it just ends in .run (On recent Mac OS, yo...
40,359,471
I did an exercise today in college, and it was a JavaScript program to calculate the average score of pupils in a test. Here is my code: ``` <!DOCtype html> <html> <head> <title>While loop</title> </head> <body> <script> //The total score of all pupils var total = 0; //The number of scores var count...
2016/11/01
[ "https://Stackoverflow.com/questions/40359471", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6839113/" ]
`grade = prompt("Insert the grade:");` is the problem. The prompt is taking your input as a string, and in JS, adding two strings just concatenates the values. So parse your inputs: ``` grade = +prompt("Insert the grade:"); //+ is shorthand for casting to a number ``` Or use `parseInt` ``` grade = prompt("Insert th...
Change `total = total + grade;` to `total = total + parseInt(grade);` when you write `total = total + grade` js concatenate total and grade as strings
22,722,159
I read that an expression is anything that gives some value, like `2 + X`, while a statement is any instruction to the computer to execute something, like `print("hi")`. What about the following line of code? `X = someFunction() + 2` `someFunction()` returns some numerical value (I think a lot of languages wouldn't ...
2014/03/28
[ "https://Stackoverflow.com/questions/22722159", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3284878/" ]
tldr; It is a statement *when* it is parsed as statement, and an expression *when* it is parsed as an expression. The rules of which depend upon the particular language in question. Expressions and statements should *not* be confused with "what actually happens" underneath, but merely as describing the [*syntax* const...
I would say that the "someFunction() + 2" is an expression being evaluated. Then I would say that "x = someFunction() + 2" is a statement, because most languages would generally evaluate the function's return plus two, and then assign that value to x.
22,722,159
I read that an expression is anything that gives some value, like `2 + X`, while a statement is any instruction to the computer to execute something, like `print("hi")`. What about the following line of code? `X = someFunction() + 2` `someFunction()` returns some numerical value (I think a lot of languages wouldn't ...
2014/03/28
[ "https://Stackoverflow.com/questions/22722159", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3284878/" ]
In certain computer languages called "functional languages", everything--including the code that prints "hi"--is an expression. At the other extreme, you can write code in machine language (so you, not a compiler, are deciding exactly what sequence of bytes should compose the executable program), and at that level prac...
tldr; It is a statement *when* it is parsed as statement, and an expression *when* it is parsed as an expression. The rules of which depend upon the particular language in question. Expressions and statements should *not* be confused with "what actually happens" underneath, but merely as describing the [*syntax* const...
22,722,159
I read that an expression is anything that gives some value, like `2 + X`, while a statement is any instruction to the computer to execute something, like `print("hi")`. What about the following line of code? `X = someFunction() + 2` `someFunction()` returns some numerical value (I think a lot of languages wouldn't ...
2014/03/28
[ "https://Stackoverflow.com/questions/22722159", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3284878/" ]
In certain computer languages called "functional languages", everything--including the code that prints "hi"--is an expression. At the other extreme, you can write code in machine language (so you, not a compiler, are deciding exactly what sequence of bytes should compose the executable program), and at that level prac...
I would say that the "someFunction() + 2" is an expression being evaluated. Then I would say that "x = someFunction() + 2" is a statement, because most languages would generally evaluate the function's return plus two, and then assign that value to x.
22,722,159
I read that an expression is anything that gives some value, like `2 + X`, while a statement is any instruction to the computer to execute something, like `print("hi")`. What about the following line of code? `X = someFunction() + 2` `someFunction()` returns some numerical value (I think a lot of languages wouldn't ...
2014/03/28
[ "https://Stackoverflow.com/questions/22722159", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3284878/" ]
It varies by language, but ultimately: a statement is anything you can't embed inside another (simple, i.e. not a block) statement. In C, your example is an expression, because you can do this: ``` while (X = someFunction() + 2) { // ... } ``` But in Python, the same thing is a syntax error, because `=` can *on...
I would say that the "someFunction() + 2" is an expression being evaluated. Then I would say that "x = someFunction() + 2" is a statement, because most languages would generally evaluate the function's return plus two, and then assign that value to x.
22,722,159
I read that an expression is anything that gives some value, like `2 + X`, while a statement is any instruction to the computer to execute something, like `print("hi")`. What about the following line of code? `X = someFunction() + 2` `someFunction()` returns some numerical value (I think a lot of languages wouldn't ...
2014/03/28
[ "https://Stackoverflow.com/questions/22722159", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3284878/" ]
In certain computer languages called "functional languages", everything--including the code that prints "hi"--is an expression. At the other extreme, you can write code in machine language (so you, not a compiler, are deciding exactly what sequence of bytes should compose the executable program), and at that level prac...
It varies by language, but ultimately: a statement is anything you can't embed inside another (simple, i.e. not a block) statement. In C, your example is an expression, because you can do this: ``` while (X = someFunction() + 2) { // ... } ``` But in Python, the same thing is a syntax error, because `=` can *on...
8,794,520
in my cocoa application I want to change the tab order of the controls so I can switch from a textfield to a button. I did connect the nextKeyView property of the textfield with the button but it seems to have no effect at all. I already activated the appropriate system settings for Keyboard so I can tab to all contro...
2012/01/09
[ "https://Stackoverflow.com/questions/8794520", "https://Stackoverflow.com", "https://Stackoverflow.com/users/70414/" ]
you may need to use a [Custom ToastView](http://developer.android.com/guide/topics/ui/notifiers/toasts.html#CustomToastView)
Maybe this is a theme problem... Can you try to implement **Using Holo while supporting Android 2.x** in this [post](http://android-developers.blogspot.com/2012/01/holo-everywhere.html) ?
8,794,520
in my cocoa application I want to change the tab order of the controls so I can switch from a textfield to a button. I did connect the nextKeyView property of the textfield with the button but it seems to have no effect at all. I already activated the appropriate system settings for Keyboard so I can tab to all contro...
2012/01/09
[ "https://Stackoverflow.com/questions/8794520", "https://Stackoverflow.com", "https://Stackoverflow.com/users/70414/" ]
you may need to use a [Custom ToastView](http://developer.android.com/guide/topics/ui/notifiers/toasts.html#CustomToastView)
I finally fixed this by removing android:anyDensity="false" from my supports-screens element in my manifest. I'm not sure why I had it there in the first place, except that I started that app from one of my rather old apps instead of from scratch. That setting also caused my activity to be realllllly small (order the ...
8,794,520
in my cocoa application I want to change the tab order of the controls so I can switch from a textfield to a button. I did connect the nextKeyView property of the textfield with the button but it seems to have no effect at all. I already activated the appropriate system settings for Keyboard so I can tab to all contro...
2012/01/09
[ "https://Stackoverflow.com/questions/8794520", "https://Stackoverflow.com", "https://Stackoverflow.com/users/70414/" ]
Thank you ! (x1000) Adding ``` <supports-screens android:resizeable="true" android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:anyDensity="true"/> ``` to my manifest, solved my problem...
you may need to use a [Custom ToastView](http://developer.android.com/guide/topics/ui/notifiers/toasts.html#CustomToastView)
8,794,520
in my cocoa application I want to change the tab order of the controls so I can switch from a textfield to a button. I did connect the nextKeyView property of the textfield with the button but it seems to have no effect at all. I already activated the appropriate system settings for Keyboard so I can tab to all contro...
2012/01/09
[ "https://Stackoverflow.com/questions/8794520", "https://Stackoverflow.com", "https://Stackoverflow.com/users/70414/" ]
Thank you ! (x1000) Adding ``` <supports-screens android:resizeable="true" android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:anyDensity="true"/> ``` to my manifest, solved my problem...
Maybe this is a theme problem... Can you try to implement **Using Holo while supporting Android 2.x** in this [post](http://android-developers.blogspot.com/2012/01/holo-everywhere.html) ?
8,794,520
in my cocoa application I want to change the tab order of the controls so I can switch from a textfield to a button. I did connect the nextKeyView property of the textfield with the button but it seems to have no effect at all. I already activated the appropriate system settings for Keyboard so I can tab to all contro...
2012/01/09
[ "https://Stackoverflow.com/questions/8794520", "https://Stackoverflow.com", "https://Stackoverflow.com/users/70414/" ]
Thank you ! (x1000) Adding ``` <supports-screens android:resizeable="true" android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:anyDensity="true"/> ``` to my manifest, solved my problem...
I finally fixed this by removing android:anyDensity="false" from my supports-screens element in my manifest. I'm not sure why I had it there in the first place, except that I started that app from one of my rather old apps instead of from scratch. That setting also caused my activity to be realllllly small (order the ...
13,526,008
I have been making a little holiday website and I have been modifying an existing word press theme. However, the website looks fine in Chrome but when I went to check it in Firefox, ouch! I have no idea what happened. <http://rita.adsa.co.uk/> Could someone please point me in the right direction? It's baffling my min...
2012/11/23
[ "https://Stackoverflow.com/questions/13526008", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1594966/" ]
1. Make a backport of AutoCloseable 2. Make a 2nd Version of your library using the backport instead of the real thing 3. Either make the user choose which library to use by actually publishing it as two artifacts, or build a common facade which loads the correct version using reflection. For backporting: AutoClosabl...
You need two versions of your lib, but if you want to have only one source code, take a look at AspectJ , which modifies the byte code after compilation. Thatcway you could get two libs using one sozrce code, but two build targets with different AspectJ options.
47,871,264
I have below code: ``` declare @error varchar(max) set @error = 'Invalid content. Error ids=[3001]' select substring(@error, charindex('[', @error)+1, charindex(']', @error)-1) ``` I want to get number: 3001, but current result is ``` 3001] ``` Anyone can explain, why still have bracket ']' ?
2017/12/18
[ "https://Stackoverflow.com/questions/47871264", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4645227/" ]
Because the third parameter of `substring` means `length of substring`, not from index to index Reference: <https://learn.microsoft.com/en-us/sql/t-sql/functions/substring-transact-sql> You can try this ``` select substring(@error, charindex('[', @error)+1, charindex(']', @error) - charindex('[', @error) - 1) ```
The third parameter of [SUBSTRING](https://learn.microsoft.com/en-us/sql/t-sql/functions/substring-transact-sql) is length. You are passing `charindex(']', @error)-1` which equals 32. So therefore it will gather 32 characters from the indicated starting position. What it looks like you are trying to do is determine th...
47,871,264
I have below code: ``` declare @error varchar(max) set @error = 'Invalid content. Error ids=[3001]' select substring(@error, charindex('[', @error)+1, charindex(']', @error)-1) ``` I want to get number: 3001, but current result is ``` 3001] ``` Anyone can explain, why still have bracket ']' ?
2017/12/18
[ "https://Stackoverflow.com/questions/47871264", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4645227/" ]
This'll more easily be explained by splitting out the query into parts. Firstly: ``` SELECT charindex('[', @error)+1; ``` This returns 29. Seems correct. Next: ``` SELECT charindex(']', @error) -1; ``` This returns 32. This means you're therefore doing: ``` SELECT SUBSTRING(@error, 29, 32); ``` See where you'...
The third parameter of [SUBSTRING](https://learn.microsoft.com/en-us/sql/t-sql/functions/substring-transact-sql) is length. You are passing `charindex(']', @error)-1` which equals 32. So therefore it will gather 32 characters from the indicated starting position. What it looks like you are trying to do is determine th...
38,007,306
i have 2 tables `user` and `tn_user`, table `user` is a table containing information to log in, i made it by tutorial from <https://laravel.com/> so basically it was automatically created, while `tn_user` is a table that i make by myself > > USER TABLE > ![image alt](https://s31.postimg.org/past57amj/user.png "image...
2016/06/24
[ "https://Stackoverflow.com/questions/38007306", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5701713/" ]
You should know that in the `UserCompany` class, by setting the `fillable`, It means you are setting table column which you want to alter, in this case `tn_user` table. So this means, by setting ``` protected $fillable = []; ``` It means, that you are making no table columns should undergo modification when you are ...
You Create 2 objects ``` $user = new User() $user->username = INPUT::get('username'); $user->password = $password // Hashed $user->save(); $user_detail = new UserCompany() // Your detail table modal. $user_detail->cv_name = Input::get('cv_name'); //etc $user_detail->save() ```
74,614
I'm having a major headache inducing issue with iCloud sync. My wife and I have shared calendars for a long time and it has helped us a great deal. The problem now is that my wife's iPhone has stopped syncing it's calendar with iCloud. If we log onto her account at iCloud.com and add somehting, it syncs to my iPhone a...
2012/12/12
[ "https://apple.stackexchange.com/questions/74614", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/36462/" ]
Try creating a new calendar within her iCloud account. Don't share it yet. Add, edit, and delete events both on her iPhone and iCloud.com through a browser. If this works as expected, share the new calendar with your iCloud account. Repeat the add/edit/delete cycle to see if changes propagate across all devices now. If...
I discovered what the problem was on my husband's iPhone 4. He uses iCloud as well as Gmail calendars. When he was creating a calendar event, he didn't realize that the Gmail calendar was being used. He could see the event on his Gmail calendar but it wouldn't sync to my iCloud calendar. When creating an event, check b...
74,495,142
i have the following code data... ``` import pandas as pd, numpy as np from datetime import datetime end_dt = datetime.today() st_dt = (end_dt + pd.DateOffset(-10)).date() df_index = pd.date_range(st_dt, end_dt) df = pd.DataFrame(index=df_index, columns=['in_range']) data = [pd.to_datetime(['2022-11-08','2022-11-10']...
2022/11/18
[ "https://Stackoverflow.com/questions/74495142", "https://Stackoverflow.com", "https://Stackoverflow.com/users/480118/" ]
Use [`merge_asof`](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.merge_asof.html) and [boolean indexing](https://pandas.pydata.org/docs/user_guide/indexing.html#boolean-indexing): ``` s = df.index.to_series() m = (pd.merge_asof(s.rename('st_dt'), dt_ranges) ['end_dt'].ge(s.to_numpy()).to_numpy...
One option is to compute the non-equi join is with [conditional\_join](https://pyjanitor-devs.github.io/pyjanitor/api/functions/#janitor.functions.conditional_join), which can handle overlaps: ```py # pip install pyjanitor import pandas as pd import janitor ( df .reset_index() .conditional_join( dt_ranges, ('...
60,352,278
I am trying to reload the previous page from where I opened a popup (a php file) with window.open function. I was able to close the popup with self.close() function, but previous page from where I opened the popup is not auto refreshing. ``` <script type='text/javascript'> location.replace(document.referrer); ...
2020/02/22
[ "https://Stackoverflow.com/questions/60352278", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12943943/" ]
if you entered your `client_id` and `secret_id` **config/services.php** then run `php artisan config:clear`
I had faced the same issue and I finally came to a solution. The problem is probably due to the depreciation of app['request'] in *SocialiteManager.php* file located in *Vendor/Laravel/Socialite/src/SocialiteManager.php*. The solution to this problem is by following the following steps: > > **Step 1:** Go to *Vendor...
60,352,278
I am trying to reload the previous page from where I opened a popup (a php file) with window.open function. I was able to close the popup with self.close() function, but previous page from where I opened the popup is not auto refreshing. ``` <script type='text/javascript'> location.replace(document.referrer); ...
2020/02/22
[ "https://Stackoverflow.com/questions/60352278", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12943943/" ]
probably you forgot to add services to you services.php so go to config/services and add ``` 'github' => [ 'client_id' => env('GITHUB_CLIENT_ID'), 'client_secret' => env('GITHUB_CLIENT_SECRET'), 'redirect' => env('GITHUB_REDIRECT'), ], 'google' => [ 'client_id' => env('GOOGLE_CLIEN...
I had faced the same issue and I finally came to a solution. The problem is probably due to the depreciation of app['request'] in *SocialiteManager.php* file located in *Vendor/Laravel/Socialite/src/SocialiteManager.php*. The solution to this problem is by following the following steps: > > **Step 1:** Go to *Vendor...
60,352,278
I am trying to reload the previous page from where I opened a popup (a php file) with window.open function. I was able to close the popup with self.close() function, but previous page from where I opened the popup is not auto refreshing. ``` <script type='text/javascript'> location.replace(document.referrer); ...
2020/02/22
[ "https://Stackoverflow.com/questions/60352278", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12943943/" ]
if you entered your `client_id` and `secret_id` **config/services.php** then run `php artisan config:clear`
probably you forgot to add services to you services.php so go to config/services and add ``` 'github' => [ 'client_id' => env('GITHUB_CLIENT_ID'), 'client_secret' => env('GITHUB_CLIENT_SECRET'), 'redirect' => env('GITHUB_REDIRECT'), ], 'google' => [ 'client_id' => env('GOOGLE_CLIEN...
32,368,616
I have a list of strings (both strings and list can be large). I want to build dictionary out of only certain elements from the list. ``` l = ['aaa 0','bbb 1','ccc 2','ddd 3','abc 1'] wanted = set(['aaa','abc']) dict([x.split() for x in l if x.split()[0] in wanted]) {'aaa': '0', 'abc': '1'} ``` Can this be done wit...
2015/09/03
[ "https://Stackoverflow.com/questions/32368616", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2353472/" ]
Using nested generator expression (`(x.split() for x in l)`) to yield key, value pairs: ``` >>> l = ['aaa 0', 'bbb 1', 'ccc 2', 'ddd 3', 'abc 1'] >>> wanted = {'aaa', 'abc'} >>> {key: value for key, value in (x.split() for x in l) if key in wanted} {'abc': '1', 'aaa': '0'} ```
I don't know if is more efficient but the following statement uses `split` once: ``` {k: n for k, n in dict([x.split() for x in l]).iteritems() if k in wanted} ```
32,368,616
I have a list of strings (both strings and list can be large). I want to build dictionary out of only certain elements from the list. ``` l = ['aaa 0','bbb 1','ccc 2','ddd 3','abc 1'] wanted = set(['aaa','abc']) dict([x.split() for x in l if x.split()[0] in wanted]) {'aaa': '0', 'abc': '1'} ``` Can this be done wit...
2015/09/03
[ "https://Stackoverflow.com/questions/32368616", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2353472/" ]
I don't know if is more efficient but the following statement uses `split` once: ``` {k: n for k, n in dict([x.split() for x in l]).iteritems() if k in wanted} ```
You can reduce the split() operation to one. ``` l = ['aaa 0','bdb 1','ccc 2','ddd 3','abc 1'] dict = { } s = set(['aaa','abc']) for elem in l: nl = elem.split() if nl[0] in s: dict[nl[0]] = nl[1] for elm in dict: print elm,dict[elm] ```
32,368,616
I have a list of strings (both strings and list can be large). I want to build dictionary out of only certain elements from the list. ``` l = ['aaa 0','bbb 1','ccc 2','ddd 3','abc 1'] wanted = set(['aaa','abc']) dict([x.split() for x in l if x.split()[0] in wanted]) {'aaa': '0', 'abc': '1'} ``` Can this be done wit...
2015/09/03
[ "https://Stackoverflow.com/questions/32368616", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2353472/" ]
Using nested generator expression (`(x.split() for x in l)`) to yield key, value pairs: ``` >>> l = ['aaa 0', 'bbb 1', 'ccc 2', 'ddd 3', 'abc 1'] >>> wanted = {'aaa', 'abc'} >>> {key: value for key, value in (x.split() for x in l) if key in wanted} {'abc': '1', 'aaa': '0'} ```
You can reduce the split() operation to one. ``` l = ['aaa 0','bdb 1','ccc 2','ddd 3','abc 1'] dict = { } s = set(['aaa','abc']) for elem in l: nl = elem.split() if nl[0] in s: dict[nl[0]] = nl[1] for elm in dict: print elm,dict[elm] ```
436,120
How to prove that the sequence $\{a\_n\}$ has no convergent subsequence if and only if $|a\_n|$ approaches infinity? The forward direction is obvious, how to prove the other direction?
2013/07/04
[ "https://math.stackexchange.com/questions/436120", "https://math.stackexchange.com", "https://math.stackexchange.com/users/85017/" ]
Use these two facts: * Every sequence has a monotone subsequence. * Every bounded monotone sequence converges.
**Hint** If this result not true then [weierstrass sequence theorem](http://en.wikipedia.org/wiki/Bolzano%E2%80%93Weierstrass_theorem) is false. **Up date** Imitate this [proof](http://en.wikipedia.org/wiki/Bolzano%E2%80%93Weierstrass_theorem#Proof) of [weierstrass sequence theorem](http://en.wikipedia.org/wiki/Bolza...
436,120
How to prove that the sequence $\{a\_n\}$ has no convergent subsequence if and only if $|a\_n|$ approaches infinity? The forward direction is obvious, how to prove the other direction?
2013/07/04
[ "https://math.stackexchange.com/questions/436120", "https://math.stackexchange.com", "https://math.stackexchange.com/users/85017/" ]
Use these two facts: * Every sequence has a monotone subsequence. * Every bounded monotone sequence converges.
First show that, if $|a\_n|$ doesn't approach $\infty$, then $a\_n$ has a bounded subsequence; then invoke the fact that a bounded sequence of real numbers has a convergent subsequence.
436,120
How to prove that the sequence $\{a\_n\}$ has no convergent subsequence if and only if $|a\_n|$ approaches infinity? The forward direction is obvious, how to prove the other direction?
2013/07/04
[ "https://math.stackexchange.com/questions/436120", "https://math.stackexchange.com", "https://math.stackexchange.com/users/85017/" ]
Use these two facts: * Every sequence has a monotone subsequence. * Every bounded monotone sequence converges.
Assume $\lim\_{n\to\infty}|a\_n|=\infty$ and consider an $\alpha\in{\mathbb R}$. There is an $n\_0$ such that $|a\_n|>|\alpha|+1$ for all $n>n\_0$. Therefore $|a\_n-\alpha|\geq|a\_n|-|\alpha|>1$ for all $n>n\_0$, and this implies that the sequence $(a\_n)\_{n\geq1}$ cannot have a subsequence converging to $\alpha$. Fo...
436,120
How to prove that the sequence $\{a\_n\}$ has no convergent subsequence if and only if $|a\_n|$ approaches infinity? The forward direction is obvious, how to prove the other direction?
2013/07/04
[ "https://math.stackexchange.com/questions/436120", "https://math.stackexchange.com", "https://math.stackexchange.com/users/85017/" ]
Use these two facts: * Every sequence has a monotone subsequence. * Every bounded monotone sequence converges.
As others have stated, you need a theorem of Bolzano (proved below), usually known as the Bolzano$-$Weierstrass theorem, that a bounded sequence has a *cluster point*: a point such that an infinite number of terms of the sequence lie within any given neighbourhood of the point. First note that, if the terms do not appr...
436,120
How to prove that the sequence $\{a\_n\}$ has no convergent subsequence if and only if $|a\_n|$ approaches infinity? The forward direction is obvious, how to prove the other direction?
2013/07/04
[ "https://math.stackexchange.com/questions/436120", "https://math.stackexchange.com", "https://math.stackexchange.com/users/85017/" ]
First show that, if $|a\_n|$ doesn't approach $\infty$, then $a\_n$ has a bounded subsequence; then invoke the fact that a bounded sequence of real numbers has a convergent subsequence.
**Hint** If this result not true then [weierstrass sequence theorem](http://en.wikipedia.org/wiki/Bolzano%E2%80%93Weierstrass_theorem) is false. **Up date** Imitate this [proof](http://en.wikipedia.org/wiki/Bolzano%E2%80%93Weierstrass_theorem#Proof) of [weierstrass sequence theorem](http://en.wikipedia.org/wiki/Bolza...
436,120
How to prove that the sequence $\{a\_n\}$ has no convergent subsequence if and only if $|a\_n|$ approaches infinity? The forward direction is obvious, how to prove the other direction?
2013/07/04
[ "https://math.stackexchange.com/questions/436120", "https://math.stackexchange.com", "https://math.stackexchange.com/users/85017/" ]
Assume $\lim\_{n\to\infty}|a\_n|=\infty$ and consider an $\alpha\in{\mathbb R}$. There is an $n\_0$ such that $|a\_n|>|\alpha|+1$ for all $n>n\_0$. Therefore $|a\_n-\alpha|\geq|a\_n|-|\alpha|>1$ for all $n>n\_0$, and this implies that the sequence $(a\_n)\_{n\geq1}$ cannot have a subsequence converging to $\alpha$. Fo...
**Hint** If this result not true then [weierstrass sequence theorem](http://en.wikipedia.org/wiki/Bolzano%E2%80%93Weierstrass_theorem) is false. **Up date** Imitate this [proof](http://en.wikipedia.org/wiki/Bolzano%E2%80%93Weierstrass_theorem#Proof) of [weierstrass sequence theorem](http://en.wikipedia.org/wiki/Bolza...
436,120
How to prove that the sequence $\{a\_n\}$ has no convergent subsequence if and only if $|a\_n|$ approaches infinity? The forward direction is obvious, how to prove the other direction?
2013/07/04
[ "https://math.stackexchange.com/questions/436120", "https://math.stackexchange.com", "https://math.stackexchange.com/users/85017/" ]
First show that, if $|a\_n|$ doesn't approach $\infty$, then $a\_n$ has a bounded subsequence; then invoke the fact that a bounded sequence of real numbers has a convergent subsequence.
As others have stated, you need a theorem of Bolzano (proved below), usually known as the Bolzano$-$Weierstrass theorem, that a bounded sequence has a *cluster point*: a point such that an infinite number of terms of the sequence lie within any given neighbourhood of the point. First note that, if the terms do not appr...
436,120
How to prove that the sequence $\{a\_n\}$ has no convergent subsequence if and only if $|a\_n|$ approaches infinity? The forward direction is obvious, how to prove the other direction?
2013/07/04
[ "https://math.stackexchange.com/questions/436120", "https://math.stackexchange.com", "https://math.stackexchange.com/users/85017/" ]
Assume $\lim\_{n\to\infty}|a\_n|=\infty$ and consider an $\alpha\in{\mathbb R}$. There is an $n\_0$ such that $|a\_n|>|\alpha|+1$ for all $n>n\_0$. Therefore $|a\_n-\alpha|\geq|a\_n|-|\alpha|>1$ for all $n>n\_0$, and this implies that the sequence $(a\_n)\_{n\geq1}$ cannot have a subsequence converging to $\alpha$. Fo...
As others have stated, you need a theorem of Bolzano (proved below), usually known as the Bolzano$-$Weierstrass theorem, that a bounded sequence has a *cluster point*: a point such that an infinite number of terms of the sequence lie within any given neighbourhood of the point. First note that, if the terms do not appr...
9,390
I'm trying to get rid of some of the horrible nested loops in the following code. Essentially is moving TDs to top rows based on whether the current row has the current cell. You can see the execution here: <http://jsfiddle.net/Jq8sk/> How can I clean it up and avoid this level of depth. Any help is appreciated. ```...
2012/02/24
[ "https://codereview.stackexchange.com/questions/9390", "https://codereview.stackexchange.com", "https://codereview.stackexchange.com/users/11361/" ]
A singleton is an object which is the only instance of its type. Therefore, it makes most sense to define all non-function properties and methods directly on that singleton: ``` var singleton = { prop1: ..., prop2: ..., method1: function () { ... }, method2: function () { ... } }; ``` Extending the s...
If you want you constructor function to be a singleton, you are going to have to make a few tweaks to your code: ``` var Mui = function () { //the cached instance var instance; //rewrite the constructor Mui = function Mui() { return instance; }; //carry over the prototype properties ...
9,390
I'm trying to get rid of some of the horrible nested loops in the following code. Essentially is moving TDs to top rows based on whether the current row has the current cell. You can see the execution here: <http://jsfiddle.net/Jq8sk/> How can I clean it up and avoid this level of depth. Any help is appreciated. ```...
2012/02/24
[ "https://codereview.stackexchange.com/questions/9390", "https://codereview.stackexchange.com", "https://codereview.stackexchange.com/users/11361/" ]
A singleton is an object which is the only instance of its type. Therefore, it makes most sense to define all non-function properties and methods directly on that singleton: ``` var singleton = { prop1: ..., prop2: ..., method1: function () { ... }, method2: function () { ... } }; ``` Extending the s...
I agree with Šime Vidas; simplicity is best here. ``` var mui = { version: { major : '0', minor : '1', bugfix : '0' }, sayHi : function () { alert('hi'); } }; ``` There is no reason to use a constructor, since it will only construct a single object. Best to create...
5,606,047
I'm defining a real type and I'm using strtod for the exponential way even though is untested and don't really know if it works but more imporantly I would like to know if there is any built in function like strtod for engineering notation and if there isn't, how can I do it? Thanks in advance, Martin
2011/04/09
[ "https://Stackoverflow.com/questions/5606047", "https://Stackoverflow.com", "https://Stackoverflow.com/users/360224/" ]
You aren't defining an operator << anywhere. You should define it like this out of your class : ``` template <typename VertexType, typename EdgeType> std::ostream& operator << (std::ostream& out, const Vertex<VertexType,EdgeType>& v); // implementation template <typename VertexType, typename EdgeType> std::ostream& op...
Well, implement `template <class V, class E> std::ostream& operator<<(std::ostream& os, const Vertex<V,E> &vertex)` as a static friend of Vertex. It's pretty much what the compiler tells you...
996,553
I tried setting up a mailman server recently, to try hosting some mailing lists. I did add the DMARC, DKIM and SPF records btw. Recently, I saw that a lot (A LOT) of spam was being sent from my server (the queue grew to thousands, with emails being sent to so many random email addresses). Is their any way that I can o...
2019/12/23
[ "https://serverfault.com/questions/996553", "https://serverfault.com", "https://serverfault.com/users/536375/" ]
The `dc_relay_nets='0.0.0.0/0'` allows relay from any IP address making your mail server an *open relay*. You should limit that to your internal / trusted networks. SPF/DKIM/DMARC won't protect you from internal configuration errors. In worst case the server DKIM signs unauthorized mail. Eventually your IP address ge...
As Esa pointed out, `dc_relay_nets` is the problem here. Run `dpkg-reconfigure exim4-config` to run through the configuration wizard again and change the value, or edit the file and reload Exim to reprocess it into a new Exim config file. Exim has a handy `exim4 -d -bh 1.2.3.4` command that simulates an SMTP session a...
12,229,943
I'm trying to use a little helper to generate some random placeholder text in the title input, but I'm running into trouble. Here's the view code: ``` <%= form.input :title, :placeholder => "<%= random_title %>".html_safe %> ``` And here is the error I'm receiving: ``` /posts/_form.html.erb:9: syntax error, unexpe...
2012/09/01
[ "https://Stackoverflow.com/questions/12229943", "https://Stackoverflow.com", "https://Stackoverflow.com/users/967434/" ]
`random_title` is a variable, right? ``` <%= form.input :title, :placeholder => random_title.html_safe %> ``` The problem was that you used `<%= %>` within another `<%= %>`.
Try this: ``` <%= form.input :title, :placeholder => "#{random_title}".html_safe %> ``` this should work.
39,540
The formula $\mathcal{L}\_X\omega = i\_Xd\omega + d(i\_X \omega)$ is sometimes attributed to Henri Cartan (e.g. Peter Petersen; Riemannian Geometry 2nd ed.; p.380) and sometimes to his father Élie (e.g. Berline, Getzler, Vergne; Heat Kernels and Dirac Operators, p.17), and often just to "Cartan" (e.g. <https://en.wikip...
2010/09/21
[ "https://mathoverflow.net/questions/39540", "https://mathoverflow.net", "https://mathoverflow.net/users/9161/" ]
Élie for sure. The formula is derived in *Les systèmes differentiels extérieurs et leur applications géométriques* which was probably written before Henri was born. BTW, here is a very short proof that Chern showed me long ago. * The exterior derivative is an anti-derivation of the exterior algebra and so is the inte...
Certainly Henri Cartan was too young to contribute to this formula and his father Elie played a decisive role, but it is not clear to decide who invented it. Indeed the formula can also be found in the Théophile De Donder's book "Théorie des invariants intégraux" published in 1927. Exterior differential forms are calle...
39,540
The formula $\mathcal{L}\_X\omega = i\_Xd\omega + d(i\_X \omega)$ is sometimes attributed to Henri Cartan (e.g. Peter Petersen; Riemannian Geometry 2nd ed.; p.380) and sometimes to his father Élie (e.g. Berline, Getzler, Vergne; Heat Kernels and Dirac Operators, p.17), and often just to "Cartan" (e.g. <https://en.wikip...
2010/09/21
[ "https://mathoverflow.net/questions/39540", "https://mathoverflow.net", "https://mathoverflow.net/users/9161/" ]
Élie for sure. The formula is derived in *Les systèmes differentiels extérieurs et leur applications géométriques* which was probably written before Henri was born. BTW, here is a very short proof that Chern showed me long ago. * The exterior derivative is an anti-derivation of the exterior algebra and so is the inte...
It is due to Henri Cartan according to 3), Page 193 of: S.S. Chern, et al, Lectures on Differential Geometry, World Sci, Singapore, 2000.
39,540
The formula $\mathcal{L}\_X\omega = i\_Xd\omega + d(i\_X \omega)$ is sometimes attributed to Henri Cartan (e.g. Peter Petersen; Riemannian Geometry 2nd ed.; p.380) and sometimes to his father Élie (e.g. Berline, Getzler, Vergne; Heat Kernels and Dirac Operators, p.17), and often just to "Cartan" (e.g. <https://en.wikip...
2010/09/21
[ "https://mathoverflow.net/questions/39540", "https://mathoverflow.net", "https://mathoverflow.net/users/9161/" ]
Élie for sure. The formula is derived in *Les systèmes differentiels extérieurs et leur applications géométriques* which was probably written before Henri was born. BTW, here is a very short proof that Chern showed me long ago. * The exterior derivative is an anti-derivation of the exterior algebra and so is the inte...
Actually it seems that this formula was proved by Théophile De Donder in 1911, as you can see in his paper in Bulletins de la Classe des Sciences de l'Académie Royale de Belgique : <https://www.biodiversitylibrary.org/item/273691#page/11/mode/1up> , pages 50 to 70. The interior product is denoted by E there.
39,540
The formula $\mathcal{L}\_X\omega = i\_Xd\omega + d(i\_X \omega)$ is sometimes attributed to Henri Cartan (e.g. Peter Petersen; Riemannian Geometry 2nd ed.; p.380) and sometimes to his father Élie (e.g. Berline, Getzler, Vergne; Heat Kernels and Dirac Operators, p.17), and often just to "Cartan" (e.g. <https://en.wikip...
2010/09/21
[ "https://mathoverflow.net/questions/39540", "https://mathoverflow.net", "https://mathoverflow.net/users/9161/" ]
Certainly Henri Cartan was too young to contribute to this formula and his father Elie played a decisive role, but it is not clear to decide who invented it. Indeed the formula can also be found in the Théophile De Donder's book "Théorie des invariants intégraux" published in 1927. Exterior differential forms are calle...
It is due to Henri Cartan according to 3), Page 193 of: S.S. Chern, et al, Lectures on Differential Geometry, World Sci, Singapore, 2000.
39,540
The formula $\mathcal{L}\_X\omega = i\_Xd\omega + d(i\_X \omega)$ is sometimes attributed to Henri Cartan (e.g. Peter Petersen; Riemannian Geometry 2nd ed.; p.380) and sometimes to his father Élie (e.g. Berline, Getzler, Vergne; Heat Kernels and Dirac Operators, p.17), and often just to "Cartan" (e.g. <https://en.wikip...
2010/09/21
[ "https://mathoverflow.net/questions/39540", "https://mathoverflow.net", "https://mathoverflow.net/users/9161/" ]
Certainly Henri Cartan was too young to contribute to this formula and his father Elie played a decisive role, but it is not clear to decide who invented it. Indeed the formula can also be found in the Théophile De Donder's book "Théorie des invariants intégraux" published in 1927. Exterior differential forms are calle...
Actually it seems that this formula was proved by Théophile De Donder in 1911, as you can see in his paper in Bulletins de la Classe des Sciences de l'Académie Royale de Belgique : <https://www.biodiversitylibrary.org/item/273691#page/11/mode/1up> , pages 50 to 70. The interior product is denoted by E there.
39,540
The formula $\mathcal{L}\_X\omega = i\_Xd\omega + d(i\_X \omega)$ is sometimes attributed to Henri Cartan (e.g. Peter Petersen; Riemannian Geometry 2nd ed.; p.380) and sometimes to his father Élie (e.g. Berline, Getzler, Vergne; Heat Kernels and Dirac Operators, p.17), and often just to "Cartan" (e.g. <https://en.wikip...
2010/09/21
[ "https://mathoverflow.net/questions/39540", "https://mathoverflow.net", "https://mathoverflow.net/users/9161/" ]
Actually it seems that this formula was proved by Théophile De Donder in 1911, as you can see in his paper in Bulletins de la Classe des Sciences de l'Académie Royale de Belgique : <https://www.biodiversitylibrary.org/item/273691#page/11/mode/1up> , pages 50 to 70. The interior product is denoted by E there.
It is due to Henri Cartan according to 3), Page 193 of: S.S. Chern, et al, Lectures on Differential Geometry, World Sci, Singapore, 2000.
19,433,130
I have a strange problem that Im having trouble both duplicating and solving. Im using the pyodbc library in Python to access a MS Access 2007 database. The script is basically just importing a csv file into Access plus a few other tricks. I am trying to first save a 'Gift Header' - then get the auto-incrmented id (G...
2013/10/17
[ "https://Stackoverflow.com/questions/19433130", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1057549/" ]
In Access SQL the `LAST()` function does not *necessarily* return the most recently created AutoNumber value. (See [here](http://office.microsoft.com/en-ca/access-help/first-last-functions-HP001032232.aspx) for details.) What you want is to do a `SELECT @@IDENTITY` immediately after you commit your INSERT, like this: ...
Yep! That seems to be a much more reliable way of getting the last id. I believe my initial code was based on the example here <http://www.w3schools.com/sql/sql_func_last.asp> which I suppose I took out of context. Thanks for the assist! Here is the updated version of my original code (with connection string): ``` M...
37,367,484
I need to pass an array from one function to another. I tried with session variables. ``` $array; $this->session->set_userdata('array',array); $array = $this->session->userdata('array'); ``` but it does not work for older arrangements 2KB. I read that you can not spend such a long array, that session variables ar...
2016/05/21
[ "https://Stackoverflow.com/questions/37367484", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6005187/" ]
Switch sessions to database, then you can store larger amount of data. See <http://www.codeigniter.com/user_guide/libraries/sessions.html#database-driver> for details.
You have two option on this issue. 1. Don't store every data in session. Store somthing unique. > > **Explenation:** if your database having all the user data and you are trying to store all the in session. Its worthless. ***Just store user id with session time So when ever you need and user data you can call the se...
67,292,973
As the title suggests I'm having trouble figuring out why this mute/unmute button doesn't work. The code is below, but basically it's built with a v-hide directive that changes with an @click. When I use it on local host it works but when it is deployed on netlify it still mute/unmutes the video but the icon only chang...
2021/04/28
[ "https://Stackoverflow.com/questions/67292973", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10102113/" ]
You need to define an id for the input. and pass the id through onclick, like: ``` <input type = "number" name = "bidAmount" id= "bid-amount" placeholder = "Bid Amount" required > <button type="button" onclick="placeBid('bid-amount')">Submit</button> ``` and get the value with javascript inside your function: ``` ...
Use an event listener instead. [EventTarget.addEventListener()](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener) ```html <input type = "number" name = "bidAmount" id="bidAmount" placeholder = "Bid Amount" required > <input type = "submit" name = "submit" id="placeBidBtn" value = "PLACE...
40,030,865
I really hope someone can help me with this Javascript issue I've been fighting for the past couple of days. I'm trying to get 2 divs to either show or hide depending on a dropdown selection. I have looked at various code examples here, jFiddle and other resources but all of the scripts dont work and I'm not sure why....
2016/10/13
[ "https://Stackoverflow.com/questions/40030865", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7016020/" ]
You are doing the sequencial mistakes with logic and sintaxe. When some option of div is selected, the correct is to show one and hide another. ```js $("#dropdown").change(function() { if ( $("#dropdown").val() == 'sd' ) { $("#div1").show(); $("#div2").hide(); } else if ( $("#dropdown").va...
First of all the negativity here is ridiculous! This guy is obviously learning and kudos to that... Welcome kjones :) I recommend you continue with jQuery learn what you can, but I warn you jQuery is not the answer for everything it will in fact make you a worse programmer. Learning actual javascript touch me so much s...
53,882,757
I am trying to create a div with a width of 60% of its parent div, and a height that is 40% of its own width. The div must keep this aspect ratio. The div should contain text (more than one line) that is both vertically and horizontally centered. *I cannot use JS for this, only HTML and CSS.* I have tried the top/bo...
2018/12/21
[ "https://Stackoverflow.com/questions/53882757", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10819575/" ]
You can use the `padding` trick and then make the element out of the flow so it won't get affect by the padding: ```css .container { width: 80%; background: grey; } .ratio { background: white; margin: 0px auto 0px auto; width: 60%; padding-top:40%; position:relative; } .text { text-align:...
You can use javascript/jQuery to set that specific height: ``` $('.ratio').height($('.ratio').width()*.4); ```
9,515,859
I have a page with a data grid and when I print it i want only the data grid to be printed. On clicking print all other elements in the page (left nav, header, footer etc) are removed and only the necessary part(which is in a div called printdiv) is displayed. But unfortunately I can't get it to display the background ...
2012/03/01
[ "https://Stackoverflow.com/questions/9515859", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1242577/" ]
you could use [boost tokenizer](http://www.boost.org/doc/libs/1_49_0/libs/tokenizer/index.html): it's a header only library, handy to use
``` #include <string> #include <vector> using namespace std; int main() { //This is your source string string Source = "foo $RESULT :(0.2374742, 0.267722) $STATES :{1, 3, 5} fo0"; //Get the $RESULT section of the string, encapsulated by ( ) string Results = Source .substr(Source .find("(") + 1, (Source .find("...
9,515,859
I have a page with a data grid and when I print it i want only the data grid to be printed. On clicking print all other elements in the page (left nav, header, footer etc) are removed and only the necessary part(which is in a div called printdiv) is displayed. But unfortunately I can't get it to display the background ...
2012/03/01
[ "https://Stackoverflow.com/questions/9515859", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1242577/" ]
you could use [boost tokenizer](http://www.boost.org/doc/libs/1_49_0/libs/tokenizer/index.html): it's a header only library, handy to use
Find the first acurance of the '(' and then the first of ')' sign and get the substring between the two indexes (first is the start and the length is end - start) and then you can do the same for the substring after the first ')' sign (for the states). ``` temp_str = input_str do twice { start = findChar(temp_...
9,515,859
I have a page with a data grid and when I print it i want only the data grid to be printed. On clicking print all other elements in the page (left nav, header, footer etc) are removed and only the necessary part(which is in a div called printdiv) is displayed. But unfortunately I can't get it to display the background ...
2012/03/01
[ "https://Stackoverflow.com/questions/9515859", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1242577/" ]
``` int index = s.find("RESULT: ("); int index2 = s.find("$STATE"); int length = index2 - index; if (index != string::npos) { temp = s.substr(index + 7, length - 8); } typedef tokenizer<char_separator<char> > tokenizer; char_separator<char> sep(",() "); tokenizer tokens(temp, sep); for (tokenizer::iterator tok_it...
``` #include <string> #include <vector> using namespace std; int main() { //This is your source string string Source = "foo $RESULT :(0.2374742, 0.267722) $STATES :{1, 3, 5} fo0"; //Get the $RESULT section of the string, encapsulated by ( ) string Results = Source .substr(Source .find("(") + 1, (Source .find("...