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
223,400
I hit an error where a field/property name wasn't available when trying to look up the value. The field was something like, `id` (or `Id` or `ID`) -- I forget. It would be great if I could programmatically display all the fields that might be used. ``` var ctx = SP.ClientContext.get_current(); var oDocumentSet = ctx.g...
2017/08/15
[ "https://sharepoint.stackexchange.com/questions/223400", "https://sharepoint.stackexchange.com", "https://sharepoint.stackexchange.com/users/61617/" ]
var context = new SP.ClientContext.get\_current(); var web = context.get\_web(); var list = web.get\_lists().getByTitle(listTitle); // Use createAllItemsQuery to get items inside subfolders as well. Otherwise use new SP.CamlQuery() to get items from a single folder only var query = SP.CamlQuery.createAllItemsQuery(...
It was more an order of operation issue. Hopefully, this may help someone in the future: ``` var ctx = SP.ClientContext.get_current(); var oDocumentSet = ctx.get_web().getFolderByServerRelativeUrl('/sites/<sitename>/Documents/<docsetname>'); ctx.load(oDocumentSet, 'ListItemAllFields'); // could also include 'Properti...
353,764
I know that tensors are object we use in general relativity to describe phenomenon. They have the property to have the same expression in various coordinates systems. For example if I take : $\partial\_{x\_i} A\_{j} - \partial\_{x\_j} A\_i$ it is a tensor because if I change the system of coordinates from $\{x\}$ to $...
2017/08/25
[ "https://physics.stackexchange.com/questions/353764", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/75085/" ]
If you do want to track the change in one component, like the $x$-component, you need to include the one-form that you would use to extract it from the vector explicitly. I.e. to properly talk about the x-component of a vector field $v$ you'd need to take $dx(v)$, which is a properly invariant scalar, and then take the...
A vector can be introduced in two ways, either as a quantity that has magnitude and direction, or as the coordinates of a position in space after we have imposed a coordinate system to measure our coordinates. The advantage of the former is that we do not need to specify a coordinate system, whereas in the latter, we...
1,590,155
Is there a way to hook into the Windows File Copy API from C#? I'm aware this would require unmanaged code, but a code sample or starter would be helpful. I've already seen the C++ code, but it's all greek. **UPDATE:** I apologize, I should have been more clear about my intentions. I wish to actually change the copy f...
2009/10/19
[ "https://Stackoverflow.com/questions/1590155", "https://Stackoverflow.com", "https://Stackoverflow.com/users/135952/" ]
**Update:** As others have stated, why not just use `System.IO.File.Copy(...)`? It calls this same underlying API. As Michael G points out, perhaps you intend to call the the FileCopyEx API that allows you to hook progress-indication callbacks(???) That's really the only reason to P/Invoke file-copy stuff in .NET. Deta...
You can do so by calling `System.IO.File.Copy`. Its internal implementation already uses the Windows API. Edit: `File.Copy` also handles permissions correctly and has the benefit of throwing an exception with meaningful data if something fails, so you don't have to manually check and analyze the return status.
1,590,155
Is there a way to hook into the Windows File Copy API from C#? I'm aware this would require unmanaged code, but a code sample or starter would be helpful. I've already seen the C++ code, but it's all greek. **UPDATE:** I apologize, I should have been more clear about my intentions. I wish to actually change the copy f...
2009/10/19
[ "https://Stackoverflow.com/questions/1590155", "https://Stackoverflow.com", "https://Stackoverflow.com/users/135952/" ]
**Update:** As others have stated, why not just use `System.IO.File.Copy(...)`? It calls this same underlying API. As Michael G points out, perhaps you intend to call the the FileCopyEx API that allows you to hook progress-indication callbacks(???) That's really the only reason to P/Invoke file-copy stuff in .NET. Deta...
The other benefit of using unmanaged [Copy File](http://pinvoke.net/default.aspx/kernel32/CopyFile.html) API is the ability to have a progress callback. Note: as stated in other answers, I would use the managed version of File.Copy as it's safer, and can usually do everything you require.
1,590,155
Is there a way to hook into the Windows File Copy API from C#? I'm aware this would require unmanaged code, but a code sample or starter would be helpful. I've already seen the C++ code, but it's all greek. **UPDATE:** I apologize, I should have been more clear about my intentions. I wish to actually change the copy f...
2009/10/19
[ "https://Stackoverflow.com/questions/1590155", "https://Stackoverflow.com", "https://Stackoverflow.com/users/135952/" ]
**Update:** As others have stated, why not just use `System.IO.File.Copy(...)`? It calls this same underlying API. As Michael G points out, perhaps you intend to call the the FileCopyEx API that allows you to hook progress-indication callbacks(???) That's really the only reason to P/Invoke file-copy stuff in .NET. Deta...
You can use [Deviare API Hook](http://www.nektra.com/products/deviare-api-hook-windows/) that lets you intercept any API from .NET and read parameters using VARIANT types. There is a full example very easy to follow in C#.
1,590,155
Is there a way to hook into the Windows File Copy API from C#? I'm aware this would require unmanaged code, but a code sample or starter would be helpful. I've already seen the C++ code, but it's all greek. **UPDATE:** I apologize, I should have been more clear about my intentions. I wish to actually change the copy f...
2009/10/19
[ "https://Stackoverflow.com/questions/1590155", "https://Stackoverflow.com", "https://Stackoverflow.com/users/135952/" ]
*I wish to actually change the copy feature of Windows to be more rigid* You shouldn't do that in managed code, because of the same reasons you should not [write managed shell extensions](http://social.msdn.microsoft.com/forums/en-US/netfxbcl/thread/1428326d-7950-42b4-ad94-8e962124043e/).
You can do so by calling `System.IO.File.Copy`. Its internal implementation already uses the Windows API. Edit: `File.Copy` also handles permissions correctly and has the benefit of throwing an exception with meaningful data if something fails, so you don't have to manually check and analyze the return status.
1,590,155
Is there a way to hook into the Windows File Copy API from C#? I'm aware this would require unmanaged code, but a code sample or starter would be helpful. I've already seen the C++ code, but it's all greek. **UPDATE:** I apologize, I should have been more clear about my intentions. I wish to actually change the copy f...
2009/10/19
[ "https://Stackoverflow.com/questions/1590155", "https://Stackoverflow.com", "https://Stackoverflow.com/users/135952/" ]
*I wish to actually change the copy feature of Windows to be more rigid* You shouldn't do that in managed code, because of the same reasons you should not [write managed shell extensions](http://social.msdn.microsoft.com/forums/en-US/netfxbcl/thread/1428326d-7950-42b4-ad94-8e962124043e/).
The other benefit of using unmanaged [Copy File](http://pinvoke.net/default.aspx/kernel32/CopyFile.html) API is the ability to have a progress callback. Note: as stated in other answers, I would use the managed version of File.Copy as it's safer, and can usually do everything you require.
1,590,155
Is there a way to hook into the Windows File Copy API from C#? I'm aware this would require unmanaged code, but a code sample or starter would be helpful. I've already seen the C++ code, but it's all greek. **UPDATE:** I apologize, I should have been more clear about my intentions. I wish to actually change the copy f...
2009/10/19
[ "https://Stackoverflow.com/questions/1590155", "https://Stackoverflow.com", "https://Stackoverflow.com/users/135952/" ]
*I wish to actually change the copy feature of Windows to be more rigid* You shouldn't do that in managed code, because of the same reasons you should not [write managed shell extensions](http://social.msdn.microsoft.com/forums/en-US/netfxbcl/thread/1428326d-7950-42b4-ad94-8e962124043e/).
You can use [Deviare API Hook](http://www.nektra.com/products/deviare-api-hook-windows/) that lets you intercept any API from .NET and read parameters using VARIANT types. There is a full example very easy to follow in C#.
9,495,069
I want to hide a div with jQuery... But i am confused that what is the best way to do this? 1. I can hide the div by changing its css display property to none. ``` $("#header-link1").click(function(){ $("#header2").css({ 'display': 'none' }); } ``` or, 2. I can do the same thing with jQuery hide() funct...
2012/02/29
[ "https://Stackoverflow.com/questions/9495069", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1174872/" ]
**You should use method 2** since if you want to `show()` it again, it will take care of setting the `display` to the correct value, meaning `inline` for inline elements and `block` for block elements, whereas if you use method 1 you will have to choose for yourself what is the correct `display` even tho' usually it is...
If you look at the jQuery API for .hide() (<http://api.jquery.com/hide/>) you will notice that .hide() utilizes the css display attribute as its method to hide a page element. Thus, they serve the exact same purpose, but one is just a bit cleaner. I personally would go with $("#div").hide() because it is much cleaner ...
9,495,069
I want to hide a div with jQuery... But i am confused that what is the best way to do this? 1. I can hide the div by changing its css display property to none. ``` $("#header-link1").click(function(){ $("#header2").css({ 'display': 'none' }); } ``` or, 2. I can do the same thing with jQuery hide() funct...
2012/02/29
[ "https://Stackoverflow.com/questions/9495069", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1174872/" ]
**You should use method 2** since if you want to `show()` it again, it will take care of setting the `display` to the correct value, meaning `inline` for inline elements and `block` for block elements, whereas if you use method 1 you will have to choose for yourself what is the correct `display` even tho' usually it is...
They are the same, technically. If you see the source code of jQuery, this is what happens when you call hide(): <https://github.com/jquery/jquery/blob/master/src/effects.js#L66> There are two differences: 1. There is support for animation in `hide()` 2. There is a data parameter set called 'olddisplay', so you can ...
9,495,069
I want to hide a div with jQuery... But i am confused that what is the best way to do this? 1. I can hide the div by changing its css display property to none. ``` $("#header-link1").click(function(){ $("#header2").css({ 'display': 'none' }); } ``` or, 2. I can do the same thing with jQuery hide() funct...
2012/02/29
[ "https://Stackoverflow.com/questions/9495069", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1174872/" ]
**You should use method 2** since if you want to `show()` it again, it will take care of setting the `display` to the correct value, meaning `inline` for inline elements and `block` for block elements, whereas if you use method 1 you will have to choose for yourself what is the correct `display` even tho' usually it is...
try this script ``` <script type="text/javascript"> $(document).ready(function(){ $("#header-link1").click(function(){ $("#header2").hide(); }); }); </script> ```
25,818,708
I have the following from a XIB file ``` <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="OGN-yD-hzb"> <rect key="frame" x="4" y="21" width="36" he...
2014/09/13
[ "https://Stackoverflow.com/questions/25818708", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1058543/" ]
Rather than deal with arithmetic in the loop, have the loop iteration handle it: ``` for (int i = 1; i < list.size(); i+=2) w.println(list.get(i)); for (int i = 0; i < list.size(); i+=2) w.println(list.get(i)); ``` I recommend you delete the x variable and use list.size() instead
Use @Bohemian method. But if you want to make use of your code, just add an else to your for: ``` for (int i = 1; i < list.size(); i++) { if (i % 2 == 0 && x < 1) { w.println(list.get(i)); x++; } else if (i % 2 == 1 && x >= 1) { w.println(list.get(i)); } ...
13,734,982
Recently, I have been working on a CredentialProvider in order to unlock automatically (the trigger can be any event, so let’s say the end of a timer) a Windows Vista (or more recent version) user session. For that I read some useful articles on the subject, the change between GINA and this new architecture. <http://m...
2012/12/06
[ "https://Stackoverflow.com/questions/13734982", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1880642/" ]
First of all - you need to set autologon flag to true in your implementation of the `ICredentialProviderCredential::SetSelected(BOOL *pbAutoLogon)` and `ICredentialProvider::GetCredentialCount` methods. Next, you need to call `ICredentialProviderEvents::CredentialsChanged` when your timer is hit. LogonUI will recreate...
`SetSerialization` and `GetSerialization` functions are called from your provider by `LogonUI`. After user enters username/password and presses ENTER button, LogonUI calls `GetSerialization` function and provides a pointer, as one of the four parameters, that will point in future to `CREDENTIAL_PROVIDER_CREDENTIAL_...
67,377,584
I need to loop over about 10 strings, which are all known to me in advance -- I don't need to `SELECT` them from anywhere. I attempted: ```sql BEGIN FOR tab IN ('one', 'two', 'three') LOOP EXECUTE IMMEDIATE 'DROP TABLE ' || tab; END LOOP; END; ``` But that does not work (`LOOP` is unexpected)......
2021/05/04
[ "https://Stackoverflow.com/questions/67377584", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1747834/" ]
```sql declare type t_strings is table of varchar2(100); strings t_strings:=t_strings('one','two','three'); begin for i in 1..strings.count loop dbms_output.put_line(strings(i)); end loop; end; / ``` Results: ``` one two three ``` Or you can use your own short-cut functions: <http://orasql.org/20...
``` begin for tab_rec in ( select 'abc' val from dual union select '123' val from dual ) loop EXECUTE IMMEDIATE 'DROP TABLE ' || tab_rec.val; end loop; end; ```
67,377,584
I need to loop over about 10 strings, which are all known to me in advance -- I don't need to `SELECT` them from anywhere. I attempted: ```sql BEGIN FOR tab IN ('one', 'two', 'three') LOOP EXECUTE IMMEDIATE 'DROP TABLE ' || tab; END LOOP; END; ``` But that does not work (`LOOP` is unexpected)......
2021/05/04
[ "https://Stackoverflow.com/questions/67377584", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1747834/" ]
```sql declare type t_strings is table of varchar2(100); strings t_strings:=t_strings('one','two','three'); begin for i in 1..strings.count loop dbms_output.put_line(strings(i)); end loop; end; / ``` Results: ``` one two three ``` Or you can use your own short-cut functions: <http://orasql.org/20...
"almost real" foreach loop: ``` declare type tabList is table of varchar2(32); tabs tabList := tabList ('one', 'two', 'three'); curr varchar2(32) := tabs.first; begin <<foreach>> loop exit foreach when curr is null; execute immediate 'create table '||tabs(curr)||' (col char(1))'; execu...
18,191,259
I am customizing Rails Admin : <https://github.com/sferik/rails_admin> , i need to disable/hide "Add new" option for some model. ![enter image description here](https://i.stack.imgur.com/BnswF.png) Any help will save lot time for me. Thanks in advance
2013/08/12
[ "https://Stackoverflow.com/questions/18191259", "https://Stackoverflow.com", "https://Stackoverflow.com/users/769491/" ]
The answer is in the [configuration documentation for actions](https://github.com/sferik/rails_admin/wiki/Actions). By default, all actions are possible, including `new`. To customize the possible actions, in `config.actions` in `config/initilizers/rails_admin.rb`, list all the actions you want to support, leaving out ...
Implemented it with Cancan. You can refer to above answer to do it in rails admin way. URL : <https://github.com/sferik/rails_admin/wiki/CanCan>
18,191,259
I am customizing Rails Admin : <https://github.com/sferik/rails_admin> , i need to disable/hide "Add new" option for some model. ![enter image description here](https://i.stack.imgur.com/BnswF.png) Any help will save lot time for me. Thanks in advance
2013/08/12
[ "https://Stackoverflow.com/questions/18191259", "https://Stackoverflow.com", "https://Stackoverflow.com/users/769491/" ]
I use the following to achieve this on a specific model. Hopefully, this helps: ``` config.actions do new do except ['Some Model'] end end ```
The answer is in the [configuration documentation for actions](https://github.com/sferik/rails_admin/wiki/Actions). By default, all actions are possible, including `new`. To customize the possible actions, in `config.actions` in `config/initilizers/rails_admin.rb`, list all the actions you want to support, leaving out ...
18,191,259
I am customizing Rails Admin : <https://github.com/sferik/rails_admin> , i need to disable/hide "Add new" option for some model. ![enter image description here](https://i.stack.imgur.com/BnswF.png) Any help will save lot time for me. Thanks in advance
2013/08/12
[ "https://Stackoverflow.com/questions/18191259", "https://Stackoverflow.com", "https://Stackoverflow.com/users/769491/" ]
The answer is in the [configuration documentation for actions](https://github.com/sferik/rails_admin/wiki/Actions). By default, all actions are possible, including `new`. To customize the possible actions, in `config.actions` in `config/initilizers/rails_admin.rb`, list all the actions you want to support, leaving out ...
To have multiple models, you must put each model in single quotes. For example, consider the following configuration: ``` config.actions do dashboard index do except ['Address'] end new do except ['Address', 'Employee', 'Setting'] end export show edit do except ['Employee'] end end ``` ...
18,191,259
I am customizing Rails Admin : <https://github.com/sferik/rails_admin> , i need to disable/hide "Add new" option for some model. ![enter image description here](https://i.stack.imgur.com/BnswF.png) Any help will save lot time for me. Thanks in advance
2013/08/12
[ "https://Stackoverflow.com/questions/18191259", "https://Stackoverflow.com", "https://Stackoverflow.com/users/769491/" ]
I use the following to achieve this on a specific model. Hopefully, this helps: ``` config.actions do new do except ['Some Model'] end end ```
Implemented it with Cancan. You can refer to above answer to do it in rails admin way. URL : <https://github.com/sferik/rails_admin/wiki/CanCan>
18,191,259
I am customizing Rails Admin : <https://github.com/sferik/rails_admin> , i need to disable/hide "Add new" option for some model. ![enter image description here](https://i.stack.imgur.com/BnswF.png) Any help will save lot time for me. Thanks in advance
2013/08/12
[ "https://Stackoverflow.com/questions/18191259", "https://Stackoverflow.com", "https://Stackoverflow.com/users/769491/" ]
To have multiple models, you must put each model in single quotes. For example, consider the following configuration: ``` config.actions do dashboard index do except ['Address'] end new do except ['Address', 'Employee', 'Setting'] end export show edit do except ['Employee'] end end ``` ...
Implemented it with Cancan. You can refer to above answer to do it in rails admin way. URL : <https://github.com/sferik/rails_admin/wiki/CanCan>
18,191,259
I am customizing Rails Admin : <https://github.com/sferik/rails_admin> , i need to disable/hide "Add new" option for some model. ![enter image description here](https://i.stack.imgur.com/BnswF.png) Any help will save lot time for me. Thanks in advance
2013/08/12
[ "https://Stackoverflow.com/questions/18191259", "https://Stackoverflow.com", "https://Stackoverflow.com/users/769491/" ]
I use the following to achieve this on a specific model. Hopefully, this helps: ``` config.actions do new do except ['Some Model'] end end ```
To have multiple models, you must put each model in single quotes. For example, consider the following configuration: ``` config.actions do dashboard index do except ['Address'] end new do except ['Address', 'Employee', 'Setting'] end export show edit do except ['Employee'] end end ``` ...
50,018,549
I have created a login form ``` <form class="login100-form validate-form p-b-33 p-t-5" method="POST"> <div class="wrap-input100 validate-input" data-validate = "Enter username"> <input class="input100" type="text" name="username" placeholder="User name"> <span class="focus-input100" data-placeholder="&#xe82a;"...
2018/04/25
[ "https://Stackoverflow.com/questions/50018549", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7421068/" ]
Update the line: ``` <input class="login100-form-btn" type="button" onclick="location.href='eLibrary/login'" value="Login" > ``` with remove the onclick: ``` <input class="login100-form-btn" type="submit" value="Login" > ``` and update the FORM line to: ``` <form class="login100-form validate-form p-b-33 p-t-5" ...
Update below line ``` <input class="login100-form-btn" type="button" onclick="location.href='eLibrary/login'" value="Login" > ``` with `<input class="login100-form-btn" type="submit" onclick="location.href='eLibrary/login'" value="Login" >`
52,421,879
I'm new to WordPress. I just successfully installed it on my site. Now I'm trying to toy with creating my own custom theme. I created one with a custom index.php and a style.css. I zipped the folder, and uploaded it successfully from my WordPress admin by going to `Themes > Appearance > Add New > Upload Theme`, then ...
2018/09/20
[ "https://Stackoverflow.com/questions/52421879", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2253568/" ]
try this: assume Post is your model ``` $posts = Post::where('is_public', 1); if (isset($date)) { $posts->where('created_at', '>', $date); } if (isset($search)) { $posts->where(function($query) use ($search) { $query->where('title', 'like', "%'.$search.'%") ->orWhere('body'...
This is Example code : assume Post is your model ``` $getPosts=Post::query()->where('is_public',1); $getPosts->when(isset($date),function($q) use ($date){ $q->where('created_at','>',$date); }); $getPosts->when(isset($search),function($q) use ($search){ $q->where('title','like','%'.$search.'%'); $q->orW...
52,421,879
I'm new to WordPress. I just successfully installed it on my site. Now I'm trying to toy with creating my own custom theme. I created one with a custom index.php and a style.css. I zipped the folder, and uploaded it successfully from my WordPress admin by going to `Themes > Appearance > Add New > Upload Theme`, then ...
2018/09/20
[ "https://Stackoverflow.com/questions/52421879", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2253568/" ]
try this: assume Post is your model ``` $posts = Post::where('is_public', 1); if (isset($date)) { $posts->where('created_at', '>', $date); } if (isset($search)) { $posts->where(function($query) use ($search) { $query->where('title', 'like', "%'.$search.'%") ->orWhere('body'...
You should try this: ``` $query = Post::where('is_public', '1'); if (isset($date)){ //$date format is '2018-09-01 00:00:00' $query->where('created_at', '>', $date); } if (isset($search)){ $query->whereRaw('title LIKE "%'.$search.'%" OR body LIKE "%'.$search.'%"'); } $posts = $query->get(); ```
52,421,879
I'm new to WordPress. I just successfully installed it on my site. Now I'm trying to toy with creating my own custom theme. I created one with a custom index.php and a style.css. I zipped the folder, and uploaded it successfully from my WordPress admin by going to `Themes > Appearance > Add New > Upload Theme`, then ...
2018/09/20
[ "https://Stackoverflow.com/questions/52421879", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2253568/" ]
This is Example code : assume Post is your model ``` $getPosts=Post::query()->where('is_public',1); $getPosts->when(isset($date),function($q) use ($date){ $q->where('created_at','>',$date); }); $getPosts->when(isset($search),function($q) use ($search){ $q->where('title','like','%'.$search.'%'); $q->orW...
You should try this: ``` $query = Post::where('is_public', '1'); if (isset($date)){ //$date format is '2018-09-01 00:00:00' $query->where('created_at', '>', $date); } if (isset($search)){ $query->whereRaw('title LIKE "%'.$search.'%" OR body LIKE "%'.$search.'%"'); } $posts = $query->get(); ```
7,928,353
I want use many bitmap for my game canvas. I can't `Recycle` bitmaps, because I have to use bitmaps for the whole section. Do mention some guidelines to optimize the code to handle many bitmap also faster performance for my canvas based Game Application. Currently i am using the following code to get bitmap from dra...
2011/10/28
[ "https://Stackoverflow.com/questions/7928353", "https://Stackoverflow.com", "https://Stackoverflow.com/users/510491/" ]
Select the appropriate elements, then select the parent `tr`s and finally remove them: <http://jsfiddle.net/pimvdb/RYrA4/3/>. ``` $('#delete').click(function(){ $(":checkbox[name='yes[]']:not(:checked)") // select non-checked checkboxes .parent() // <td>s (parents of checkboxes) .parent() // <tr>...
The super simple way: ``` $('#delete').click(function(){ $(":checkbox[name='yes[]']:not(:checked)").parents('tr').remove(); }) ``` You could do an "each" loop, if you want to achieve more, change something :)
7,928,353
I want use many bitmap for my game canvas. I can't `Recycle` bitmaps, because I have to use bitmaps for the whole section. Do mention some guidelines to optimize the code to handle many bitmap also faster performance for my canvas based Game Application. Currently i am using the following code to get bitmap from dra...
2011/10/28
[ "https://Stackoverflow.com/questions/7928353", "https://Stackoverflow.com", "https://Stackoverflow.com/users/510491/" ]
Select the appropriate elements, then select the parent `tr`s and finally remove them: <http://jsfiddle.net/pimvdb/RYrA4/3/>. ``` $('#delete').click(function(){ $(":checkbox[name='yes[]']:not(:checked)") // select non-checked checkboxes .parent() // <td>s (parents of checkboxes) .parent() // <tr>...
jQuery's [closest](http://api.jquery.com/closest/) method finds the nearest tag defined by the selector starting at the current element and progressing up the tree: ``` $('#delete').click(function(){ $("input:checkbox[name='yes[]']:not(:checked)").closest('tr').remove(); }) ```
7,928,353
I want use many bitmap for my game canvas. I can't `Recycle` bitmaps, because I have to use bitmaps for the whole section. Do mention some guidelines to optimize the code to handle many bitmap also faster performance for my canvas based Game Application. Currently i am using the following code to get bitmap from dra...
2011/10/28
[ "https://Stackoverflow.com/questions/7928353", "https://Stackoverflow.com", "https://Stackoverflow.com/users/510491/" ]
Select the appropriate elements, then select the parent `tr`s and finally remove them: <http://jsfiddle.net/pimvdb/RYrA4/3/>. ``` $('#delete').click(function(){ $(":checkbox[name='yes[]']:not(:checked)") // select non-checked checkboxes .parent() // <td>s (parents of checkboxes) .parent() // <tr>...
Do you wish to show alerts for each checked checkbox or one alert will suffice? For individual alerts: ``` $("#delete").click(function() { var allCheckBoxes = $("input:checkbox[name='yes[]']"), selectedCheckBoxes = allCheckBoxes.filter(":checked"), unselectedCheckboxes = allCheckBoxes.not(":checked"); ...
7,928,353
I want use many bitmap for my game canvas. I can't `Recycle` bitmaps, because I have to use bitmaps for the whole section. Do mention some guidelines to optimize the code to handle many bitmap also faster performance for my canvas based Game Application. Currently i am using the following code to get bitmap from dra...
2011/10/28
[ "https://Stackoverflow.com/questions/7928353", "https://Stackoverflow.com", "https://Stackoverflow.com/users/510491/" ]
The super simple way: ``` $('#delete').click(function(){ $(":checkbox[name='yes[]']:not(:checked)").parents('tr').remove(); }) ``` You could do an "each" loop, if you want to achieve more, change something :)
Do you wish to show alerts for each checked checkbox or one alert will suffice? For individual alerts: ``` $("#delete").click(function() { var allCheckBoxes = $("input:checkbox[name='yes[]']"), selectedCheckBoxes = allCheckBoxes.filter(":checked"), unselectedCheckboxes = allCheckBoxes.not(":checked"); ...
7,928,353
I want use many bitmap for my game canvas. I can't `Recycle` bitmaps, because I have to use bitmaps for the whole section. Do mention some guidelines to optimize the code to handle many bitmap also faster performance for my canvas based Game Application. Currently i am using the following code to get bitmap from dra...
2011/10/28
[ "https://Stackoverflow.com/questions/7928353", "https://Stackoverflow.com", "https://Stackoverflow.com/users/510491/" ]
jQuery's [closest](http://api.jquery.com/closest/) method finds the nearest tag defined by the selector starting at the current element and progressing up the tree: ``` $('#delete').click(function(){ $("input:checkbox[name='yes[]']:not(:checked)").closest('tr').remove(); }) ```
Do you wish to show alerts for each checked checkbox or one alert will suffice? For individual alerts: ``` $("#delete").click(function() { var allCheckBoxes = $("input:checkbox[name='yes[]']"), selectedCheckBoxes = allCheckBoxes.filter(":checked"), unselectedCheckboxes = allCheckBoxes.not(":checked"); ...
10,012,650
Have upgraded to eclipse.indigo using a new installation. Added m2e. Maven shows up under Windows>Preferences. File>New>Other>Maven gets the following options: Checkout ..., Maven Module, Maven Project. The Maven POM file option is missing. I'm trying to add Maven support to an existing Java project. Have read the manu...
2012/04/04
[ "https://Stackoverflow.com/questions/10012650", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1313023/" ]
I don't have this option either, seems to have disappeared with the latest version. This bug report seems to point in this direction as well: <https://issues.sonatype.org/browse/MNGECLIPSE-2709> The standard way should be to create a new Maven project through the wizard, which will then also contain a POM file. You co...
Quick workaround: Adding a POM by hand. (Also I'm not sure that I've ever seen an "Add POM" option.) Simply add a file to your project (New > General > File), and name it *pom.xml*. On double-click on this file, the POM Editor will open.
10,012,650
Have upgraded to eclipse.indigo using a new installation. Added m2e. Maven shows up under Windows>Preferences. File>New>Other>Maven gets the following options: Checkout ..., Maven Module, Maven Project. The Maven POM file option is missing. I'm trying to add Maven support to an existing Java project. Have read the manu...
2012/04/04
[ "https://Stackoverflow.com/questions/10012650", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1313023/" ]
In order to create a POM on your project, and also change the project structure to Maven default, **right-click on your project > Configure > Convert to Maven Project**. Don't forget to choose the correct *Packaging* type (in your case I guess it will be POM).
Quick workaround: Adding a POM by hand. (Also I'm not sure that I've ever seen an "Add POM" option.) Simply add a file to your project (New > General > File), and name it *pom.xml*. On double-click on this file, the POM Editor will open.
10,012,650
Have upgraded to eclipse.indigo using a new installation. Added m2e. Maven shows up under Windows>Preferences. File>New>Other>Maven gets the following options: Checkout ..., Maven Module, Maven Project. The Maven POM file option is missing. I'm trying to add Maven support to an existing Java project. Have read the manu...
2012/04/04
[ "https://Stackoverflow.com/questions/10012650", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1313023/" ]
In order to create a POM on your project, and also change the project structure to Maven default, **right-click on your project > Configure > Convert to Maven Project**. Don't forget to choose the correct *Packaging* type (in your case I guess it will be POM).
I don't have this option either, seems to have disappeared with the latest version. This bug report seems to point in this direction as well: <https://issues.sonatype.org/browse/MNGECLIPSE-2709> The standard way should be to create a new Maven project through the wizard, which will then also contain a POM file. You co...
12,568,765
I'm looking at Apple's example code from the ScrollViewSuite. I must be doing something wrong in comparison. In their RootViewController, they do: ``` - (void)loadView { [super loadView]; // set the tag for the image view [imageView setTag:ZOOM_VIEW_TAG]; // add gesture recognizers to the image view ...
2012/09/24
[ "https://Stackoverflow.com/questions/12568765", "https://Stackoverflow.com", "https://Stackoverflow.com/users/207524/" ]
Try to add: ``` self.imageView.userInteractionEnabled = YES; ``` by default `UIImageView`s have that property set to `NO` (apple may have changed it in XIB file, and you may have lost that...)
``` #import "RootViewController.h" #define ZOOM_VIEW_TAG 100 #define ZOOM_STEP 1.5 @interface RootViewController (UtilityMethods) - (CGRect)zoomRectForScale:(float)scale withCenter:(CGPoint)center; @end @implementation RootViewController @synthesize imageScrollView, imageView, mySlider; - (IBAction) sliderValueCha...
237,714
[![Wikipedia graph - Water in Air at 100% RH](https://i.stack.imgur.com/0KOC1.png)](https://i.stack.imgur.com/0KOC1.png) *Figure 1. Source: [Wikipedia Commons](https://commons.wikimedia.org/wiki/File:Relative_Humidity.png).* The Wikipedia article on [relative humidity](https://en.wikipedia.org/wiki/Relative_humidity#...
2016/02/16
[ "https://physics.stackexchange.com/questions/237714", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/74041/" ]
Very roughly, the shape relates to the energy needed to escape from the water surface, and the energy distribution of molecules in the water. When the water gets hotter, more molecules can escape. The math can be complex, but the relationship is called the [Clausius-Clapeyron equation](http://www.sjsu.edu/faculty/watki...
Simple answer: 100% relative humidity corresponds to the maximum concentration of water that will evaporate into air at the given temperature. This concentration is directly related to water's vapor pressure at the given temperature (see Raoult's Law <https://en.wikipedia.org/wiki/Raoult%27s_law>). Since water's vapor ...
6,908,252
My method is as follows ``` def myMethod(myDouble: Double): Double = myDouble match { case Double.NaN => ... case _ => ... } ``` The IntelliJ debugger is showing NaN but this is not being picked up in my pattern matching. Are there possible cases I am omitting
2011/08/02
[ "https://Stackoverflow.com/questions/6908252", "https://Stackoverflow.com", "https://Stackoverflow.com/users/144152/" ]
It is a general rule how 64-bit floating point numbers are compared according to IEEE 754 (not Scala or even Java related, see [NaN](http://en.wikipedia.org/wiki/NaN)): ``` double n1 = Double.NaN; double n2 = Double.NaN; System.out.println(n1 == n2); //false ``` The idea is that `NaN` is a marker value for *unkn...
Tomasz is correct. You should use `isNaN` instead. ``` scala> Double.NaN.isNaN res0: Boolean = true ```
6,908,252
My method is as follows ``` def myMethod(myDouble: Double): Double = myDouble match { case Double.NaN => ... case _ => ... } ``` The IntelliJ debugger is showing NaN but this is not being picked up in my pattern matching. Are there possible cases I am omitting
2011/08/02
[ "https://Stackoverflow.com/questions/6908252", "https://Stackoverflow.com", "https://Stackoverflow.com/users/144152/" ]
It is a general rule how 64-bit floating point numbers are compared according to IEEE 754 (not Scala or even Java related, see [NaN](http://en.wikipedia.org/wiki/NaN)): ``` double n1 = Double.NaN; double n2 = Double.NaN; System.out.println(n1 == n2); //false ``` The idea is that `NaN` is a marker value for *unkn...
You can write an extractor (updated according to bse's comment): ``` object NaN { def unapply(d:Double) = d.isNaN } 0.0/0.0 match { case NaN() => println("NaN") case x => println("boring " + x) } //--> NaN ```
6,908,252
My method is as follows ``` def myMethod(myDouble: Double): Double = myDouble match { case Double.NaN => ... case _ => ... } ``` The IntelliJ debugger is showing NaN but this is not being picked up in my pattern matching. Are there possible cases I am omitting
2011/08/02
[ "https://Stackoverflow.com/questions/6908252", "https://Stackoverflow.com", "https://Stackoverflow.com/users/144152/" ]
You can write an extractor (updated according to bse's comment): ``` object NaN { def unapply(d:Double) = d.isNaN } 0.0/0.0 match { case NaN() => println("NaN") case x => println("boring " + x) } //--> NaN ```
Tomasz is correct. You should use `isNaN` instead. ``` scala> Double.NaN.isNaN res0: Boolean = true ```
260,137
Do the yellow bars on the top/bottom/left/right of map points of interest signify anything? I've noticed 0, 1 and 2 bars. As seen in the highlighted encounter (blue triangle) shown in the screenshot below, as well as the Phone Recording to the right. [![enter image description here](https://i.stack.imgur.com/snKYr.jpg...
2016/03/24
[ "https://gaming.stackexchange.com/questions/260137", "https://gaming.stackexchange.com", "https://gaming.stackexchange.com/users/43393/" ]
It appears to be markers to that show up opposite the POI from the center of your screen (at least on the PC version.) I took a short video of it, here, that you can see. Watch as I move the map around, the dots move around, so that they are always on the opposite side of the POI from the center of my screen. They do...
Tldr :Those are markers to help you navigate. Use the corresponding arrow keys (bar on right = right arrow, etc.) to select that icon. Info : You will probably encounter icons that you can't reach using the mouse from time to time. It can be frustrating if you want to fast travel to them. Fortunately, using the arrows ...
36,208,347
I have a MongoDB collection called `test` with the following two simple documents: ``` { "first_name" : "John", "last_name" : "Smith", "age" : 25 } { "first_name" : "James", "last_name" : "Bond", "age" : 31 } ``` I also created the following indexes for...
2016/03/24
[ "https://Stackoverflow.com/questions/36208347", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1222409/" ]
`MongoDB` query planner decides which index is the most effective for a given query (also, starting from MongoDB 2.6 it can pick up more than one). [Query planner documentation](https://docs.mongodb.org/manual/core/query-plans/) explanes it in detail. If you want it to pick up your 3-keys compound index for the last ...
It seems that the **order of defining** the indexes is also effective in selecting it, for example : ``` { "first_name" : 1, "last_name" : 1, "age" : 1 } { "first_name" : 1 } { "last_name" : 1 } { "age" : 1 } ``` also you can use [Partial Indexes](https://www.mongodb.com/docs/manual/core/inde...
92,916
Challenge --------- Given a time and a timezone as input, output the time in that timezone. Time ---- The time will be given in 24 hour format like so: ``` hh:mm ``` Where hh is the two digit hour and mm is the two digit minute. Note that the hour and the minute will always be padded with zeroes like so: ``` 06:...
2016/09/11
[ "https://codegolf.stackexchange.com/questions/92916", "https://codegolf.stackexchange.com", "https://codegolf.stackexchange.com/users/30525/" ]
[APL (Dyalog APL)](https://www.dyalog.com/), 45 [bytes](http://meta.codegolf.stackexchange.com/a/9429/43319) ============================================================================================================ ### Expression Takes two strings as right argument. ```apl 24 60⊤∘⍎∘⍕('+-'∩⍕),'/',(0 60⊥2⊃':'⎕VFI ¯...
[Retina](https://github.com/m-ender/retina), 100 bytes ------------------------------------------------------ ``` : 59$*:, +`(\d+): $1,$1 \d+ $* T`1`0`-.+ ^ 1440$* +`10|\D 1{1440} ^(1{60})*(.*) $#1:$.2 \b\d\b 0$& ``` [Try it online!](https://tio.run/nexus/retina#LcpBDoIwEAXQ/T@FiaMpLZCZ2qLMVhMvgLvGNIRbIGfHIm4m8/7/...
92,916
Challenge --------- Given a time and a timezone as input, output the time in that timezone. Time ---- The time will be given in 24 hour format like so: ``` hh:mm ``` Where hh is the two digit hour and mm is the two digit minute. Note that the hour and the minute will always be padded with zeroes like so: ``` 06:...
2016/09/11
[ "https://codegolf.stackexchange.com/questions/92916", "https://codegolf.stackexchange.com", "https://codegolf.stackexchange.com/users/30525/" ]
Python 2, 84 bytes ================== ```python def f(t,z):i=int;r=60*(i(t[:2])+i(z[3:6]))+i(t[3:])+i(z[3]+z[7:]);print r/60%24,r%60 ``` All test cases are at [**ideone**](http://ideone.com/vsxuOa) Output format is space separated, with no leading zeros.
Java ~~156~~ ~~150~~ ~~149~~ ~~147~~ 142 bytes ============================================== ``` t->z->{Integer H=100,T=H.valueOf(t.replace(":","")),Z=H.valueOf(z.replace(":","").substring(3)),c=(T/H+Z/H+24)*60+T%H+Z%H;return c/60%24+":"+c%60;} ``` Test cases & ungolfed --------------------- ``` import java.util.f...
92,916
Challenge --------- Given a time and a timezone as input, output the time in that timezone. Time ---- The time will be given in 24 hour format like so: ``` hh:mm ``` Where hh is the two digit hour and mm is the two digit minute. Note that the hour and the minute will always be padded with zeroes like so: ``` 06:...
2016/09/11
[ "https://codegolf.stackexchange.com/questions/92916", "https://codegolf.stackexchange.com", "https://codegolf.stackexchange.com/users/30525/" ]
Ruby, 95 bytes -------------- ``` g=->s{"60*"+s.scan(/\d+/).map(&:to_i)*?+} f=->t,z{r=eval(g[t]+z[3]+g[z]);print r/60%24,?:,r%60} ``` Usage ----- ``` f[gets,gets] ``` ### Inputs(example) ``` 08:50 UTC-06:00 ```
[CJam](https://sourceforge.net/p/cjam), 40 bytes ------------------------------------------------ ``` r{':/60b}:F~r3>(\F\~1440,=60b{s2Te[}%':* ``` [Try it online!](https://tio.run/nexus/cjam#Lco/C8IwFATwvZ/CRSr@IS@vedFe0UXoKLS2k3URXAVxDMlXj6lxOfjd3fui3FUFdA36JvauhLL08GhDV51WUzsFbQxtj6l0Hx6eN78ssY73l1eRCGIX43DeEUOooE...
92,916
Challenge --------- Given a time and a timezone as input, output the time in that timezone. Time ---- The time will be given in 24 hour format like so: ``` hh:mm ``` Where hh is the two digit hour and mm is the two digit minute. Note that the hour and the minute will always be padded with zeroes like so: ``` 06:...
2016/09/11
[ "https://codegolf.stackexchange.com/questions/92916", "https://codegolf.stackexchange.com", "https://codegolf.stackexchange.com/users/30525/" ]
Ruby, 95 bytes -------------- ``` g=->s{"60*"+s.scan(/\d+/).map(&:to_i)*?+} f=->t,z{r=eval(g[t]+z[3]+g[z]);print r/60%24,?:,r%60} ``` Usage ----- ``` f[gets,gets] ``` ### Inputs(example) ``` 08:50 UTC-06:00 ```
C# 214 205 183 Bytes ==================== ``` string f(char[]t,char[]u){int s=~(u[3]-45),z=48,m=(t[3]-z)*10+t[4]-z+((u[7]-z)*10+u[8]-z)*s,h=(t[0]-z)*10+t[1]-z+((u[4]-z)*10+u[5]-z)*s+m/60+(m>>8)+24;return$"{h%24}:{(m+60)%60:D2}";} ``` 205 byte version ``` string f(string t,string u){Func<string,int>P=int.Parse;var T...
92,916
Challenge --------- Given a time and a timezone as input, output the time in that timezone. Time ---- The time will be given in 24 hour format like so: ``` hh:mm ``` Where hh is the two digit hour and mm is the two digit minute. Note that the hour and the minute will always be padded with zeroes like so: ``` 06:...
2016/09/11
[ "https://codegolf.stackexchange.com/questions/92916", "https://codegolf.stackexchange.com", "https://codegolf.stackexchange.com/users/30525/" ]
[APL (Dyalog APL)](https://www.dyalog.com/), 45 [bytes](http://meta.codegolf.stackexchange.com/a/9429/43319) ============================================================================================================ ### Expression Takes two strings as right argument. ```apl 24 60⊤∘⍎∘⍕('+-'∩⍕),'/',(0 60⊥2⊃':'⎕VFI ¯...
JavaScript (ES6), 101 bytes --------------------------- ``` (t,z,g=s=>+(s[3]+s[7]+s[8])+s.slice(3,6)*60,m=g('UTC+'+t)+g(z)+1440)=>(m/60%24|0)+':'+(m/10%6|0)+m%10 ``` Would be 121 bytes if I padded the hours.
92,916
Challenge --------- Given a time and a timezone as input, output the time in that timezone. Time ---- The time will be given in 24 hour format like so: ``` hh:mm ``` Where hh is the two digit hour and mm is the two digit minute. Note that the hour and the minute will always be padded with zeroes like so: ``` 06:...
2016/09/11
[ "https://codegolf.stackexchange.com/questions/92916", "https://codegolf.stackexchange.com", "https://codegolf.stackexchange.com/users/30525/" ]
Java 201 bytes ============== ``` String T(String t,String z){return(24+Integer.valueOf(t.substring(0,2))+Integer.valueOf((String)z.subSequence(3,6)))%24+":"+(60+Integer.valueOf(t.substring(3,5))+Integer.valueOf(z.substring(7,9)))%60;} ``` Called as T("12:00", "UTC+02:40") Unglolfed for the logic, ``` String T(S...
[Retina](https://github.com/m-ender/retina), 100 bytes ------------------------------------------------------ ``` : 59$*:, +`(\d+): $1,$1 \d+ $* T`1`0`-.+ ^ 1440$* +`10|\D 1{1440} ^(1{60})*(.*) $#1:$.2 \b\d\b 0$& ``` [Try it online!](https://tio.run/nexus/retina#LcpBDoIwEAXQ/T@FiaMpLZCZ2qLMVhMvgLvGNIRbIGfHIm4m8/7/...
92,916
Challenge --------- Given a time and a timezone as input, output the time in that timezone. Time ---- The time will be given in 24 hour format like so: ``` hh:mm ``` Where hh is the two digit hour and mm is the two digit minute. Note that the hour and the minute will always be padded with zeroes like so: ``` 06:...
2016/09/11
[ "https://codegolf.stackexchange.com/questions/92916", "https://codegolf.stackexchange.com", "https://codegolf.stackexchange.com/users/30525/" ]
Python 2, 84 bytes ================== ```python def f(t,z):i=int;r=60*(i(t[:2])+i(z[3:6]))+i(t[3:])+i(z[3]+z[7:]);print r/60%24,r%60 ``` All test cases are at [**ideone**](http://ideone.com/vsxuOa) Output format is space separated, with no leading zeros.
C# 214 205 183 Bytes ==================== ``` string f(char[]t,char[]u){int s=~(u[3]-45),z=48,m=(t[3]-z)*10+t[4]-z+((u[7]-z)*10+u[8]-z)*s,h=(t[0]-z)*10+t[1]-z+((u[4]-z)*10+u[5]-z)*s+m/60+(m>>8)+24;return$"{h%24}:{(m+60)%60:D2}";} ``` 205 byte version ``` string f(string t,string u){Func<string,int>P=int.Parse;var T...
92,916
Challenge --------- Given a time and a timezone as input, output the time in that timezone. Time ---- The time will be given in 24 hour format like so: ``` hh:mm ``` Where hh is the two digit hour and mm is the two digit minute. Note that the hour and the minute will always be padded with zeroes like so: ``` 06:...
2016/09/11
[ "https://codegolf.stackexchange.com/questions/92916", "https://codegolf.stackexchange.com", "https://codegolf.stackexchange.com/users/30525/" ]
Python 2, 129 bytes =================== ``` def T(t,a):f=[int.__add__,int.__sub__]["-"in a];m=f(int(t[3:5]),int(a[7:9]));print`f(int(t[0:2])+m/60,int(a[4:6]))%24`+":"+`m%60` ``` Call as `T("02:45", "UTC-05:33")`
Ruby, 95 bytes -------------- ``` g=->s{"60*"+s.scan(/\d+/).map(&:to_i)*?+} f=->t,z{r=eval(g[t]+z[3]+g[z]);print r/60%24,?:,r%60} ``` Usage ----- ``` f[gets,gets] ``` ### Inputs(example) ``` 08:50 UTC-06:00 ```
92,916
Challenge --------- Given a time and a timezone as input, output the time in that timezone. Time ---- The time will be given in 24 hour format like so: ``` hh:mm ``` Where hh is the two digit hour and mm is the two digit minute. Note that the hour and the minute will always be padded with zeroes like so: ``` 06:...
2016/09/11
[ "https://codegolf.stackexchange.com/questions/92916", "https://codegolf.stackexchange.com", "https://codegolf.stackexchange.com/users/30525/" ]
Javascript (ES6), ~~93~~ 92 bytes --------------------------------- ``` t=>((t=eval(t.replace(/.*?(.)?(..):(..)/g,'$1($2*60+$3)+720')))/60%24|0)+':'+(t/10%6|0)+t%10 ``` ### Test cases ```js let f = t=>((t=eval(t.replace(/.*?(.)?(..):(..)/g,'$1($2*60+$3)+720')))/60%24|0)+':'+(t/10%6|0)+t%10 console.log(f("08:50 U...
Ruby, 95 bytes -------------- ``` g=->s{"60*"+s.scan(/\d+/).map(&:to_i)*?+} f=->t,z{r=eval(g[t]+z[3]+g[z]);print r/60%24,?:,r%60} ``` Usage ----- ``` f[gets,gets] ``` ### Inputs(example) ``` 08:50 UTC-06:00 ```
92,916
Challenge --------- Given a time and a timezone as input, output the time in that timezone. Time ---- The time will be given in 24 hour format like so: ``` hh:mm ``` Where hh is the two digit hour and mm is the two digit minute. Note that the hour and the minute will always be padded with zeroes like so: ``` 06:...
2016/09/11
[ "https://codegolf.stackexchange.com/questions/92916", "https://codegolf.stackexchange.com", "https://codegolf.stackexchange.com/users/30525/" ]
Python 2, 84 bytes ================== ```python def f(t,z):i=int;r=60*(i(t[:2])+i(z[3:6]))+i(t[3:])+i(z[3]+z[7:]);print r/60%24,r%60 ``` All test cases are at [**ideone**](http://ideone.com/vsxuOa) Output format is space separated, with no leading zeros.
[Retina](https://github.com/m-ender/retina), 100 bytes ------------------------------------------------------ ``` : 59$*:, +`(\d+): $1,$1 \d+ $* T`1`0`-.+ ^ 1440$* +`10|\D 1{1440} ^(1{60})*(.*) $#1:$.2 \b\d\b 0$& ``` [Try it online!](https://tio.run/nexus/retina#LcpBDoIwEAXQ/T@FiaMpLZCZ2qLMVhMvgLvGNIRbIGfHIm4m8/7/...
192,836
I am looking for a process or a tool that would allow me to migrate data from an ESRI SDE Database to a SQL Spatial Database. This would include converting the ESRI geometry to SQL geometry types, as well as potentially having to convert ESRI domains to lookup tables. I have seen some tools out there that will take sha...
2016/05/09
[ "https://gis.stackexchange.com/questions/192836", "https://gis.stackexchange.com", "https://gis.stackexchange.com/users/72839/" ]
If you have ArcGIS now, you should use the FME Workbench found in the Data Interoperability Extension to 'read' your SDE data and 'write' it as SQL Server Spatial. Or, get a trial version and migrate all your data over before the trial runs out. In terms of the domains, If there is an opposite of 'table to domain', us...
Why not use GDAL/OGR? You should be able to convert directly from your sde database to sql server. Here are some links that might help: This one should give you the syntax for your sql server connection: <https://alastaira.wordpress.com/ogr2ogr-patterns-for-sql-server/> This helps with the syntax for your sde connect...
100,103
In Magento 1.9 I would like to filter the products returned by the layered navigation. The collection should be filtered if the name contains a string passed through a parameter in the querystring, if present. How can I achieve this results? Should I extend some layered navigation classes?
2016/02/02
[ "https://magento.stackexchange.com/questions/100103", "https://magento.stackexchange.com", "https://magento.stackexchange.com/users/16534/" ]
You cannot filter by names because Layer navigation only support attributes such as prices, drop-down or multi select.
You would have to write your own filter model that extends `Mage_Catalog_Model_Layer_Filter_Abstract`. You can not use the core implementation for dropdown/multiselect attributes (`Mage_Catalog_Model_Layer_Filter_Attribute`) because it relies on the attribute index and exact matching. To display the filter, you need ...
100,103
In Magento 1.9 I would like to filter the products returned by the layered navigation. The collection should be filtered if the name contains a string passed through a parameter in the querystring, if present. How can I achieve this results? Should I extend some layered navigation classes?
2016/02/02
[ "https://magento.stackexchange.com/questions/100103", "https://magento.stackexchange.com", "https://magento.stackexchange.com/users/16534/" ]
You cannot filter by names because Layer navigation only support attributes such as prices, drop-down or multi select.
This can be achieved by extending Mage\_Catalog\_Block\_Product\_List class. This is my extended class ``` class Custom_Catalog_Block_Product_List extends Mage_Catalog_Block_Product_List{ protected function _getProductCollection(){ parent::_getProductCollection(); $this->_productCollection->addAtt...
32,237,563
I have this String array: ``` String[] spltstr = {"a","b","c","d","e","f",...,"z"}; ``` And I need to place every value there into an array like this: ``` String[][] matrix; ``` I know the dimensions of both arrays, and as an output I need my matrix to look like: ``` matrix={{"a","b","c","d","e","f"}, {"...
2015/08/26
[ "https://Stackoverflow.com/questions/32237563", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4961879/" ]
It is possible. Think about the mapping. ``` n (i,j) 0->(0,0) 1->(0,1) 2->(0,2) 3->(0,3) 4->(0,4) 5->(1,0) 6->(1,1) 7->(1,2) ``` etc... So the idea is to transform n into a pair of (i,j)
well, if you know the sizes of the array, you can write a while loop to populate matrix. Have 3 variables outside the loop called Row, and Col, and Out. You know that there are X letters per row. So you check in your while loop if you have populated the (X-1)th index of matrix, you update row to row++, and col to 0. E...
15,013,403
I have a function that changes an image that takes a long time to finish (on the order of 10s). This image changes each iteration, and I would like to display it each time. I would like ``` self.imageView.image = [ /* function that changes image */ ]; ``` but I accept why that won't work. I've also tried the follo...
2013/02/21
[ "https://Stackoverflow.com/questions/15013403", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1141256/" ]
You may try this code to set the animation on your image array ``` if(imageArray.count>0) { self.imageView.animationImages= imageArray; self.imageView.animationDuration = 1/20; self.imageView.animationRepeatCount =1; [self.imageView startAnimating]; [UIView beginAnimations:nil context:nil]; [UI...
If the `animationImages` approach is fine with you, you can make it start faster by creating in advance the images: ``` //-- preload images (e.g., while the app is loading) NSArray* images = [NSArray arrayWithObjects:[self.brain newImage], [self.brain newImage], ...
15,013,403
I have a function that changes an image that takes a long time to finish (on the order of 10s). This image changes each iteration, and I would like to display it each time. I would like ``` self.imageView.image = [ /* function that changes image */ ]; ``` but I accept why that won't work. I've also tried the follo...
2013/02/21
[ "https://Stackoverflow.com/questions/15013403", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1141256/" ]
You may try this code to set the animation on your image array ``` if(imageArray.count>0) { self.imageView.animationImages= imageArray; self.imageView.animationDuration = 1/20; self.imageView.animationRepeatCount =1; [self.imageView startAnimating]; [UIView beginAnimations:nil context:nil]; [UI...
Consider adding a block parameter to your `-newImage` method: ``` - (void)newImageWithSuccessBlock:(void (^)(UIImage *newImage))successBlock { // generate the image on a background thread UIImage *brainImage = ... // if successful and the completion block isn't nil, run it if (successBlock) { ...
91,776
<https://www.musicnotes.com/sheetmusic/green-onions/7837> Which one of these transcriptions is more correct; the first one or second one? It seems the key isn't written correctly in the HD piano version but they sound similar. The HD piano version sounds more correct for the 4 + to end the measure but I kinda like the...
2019/11/10
[ "https://music.stackexchange.com/questions/91776", "https://music.stackexchange.com", "https://music.stackexchange.com/users/64353/" ]
You're right about that key signature. And I agree about those bare-fifths in the bass. AND I agree with PiedPiper about combining bits you like. Perhaps arranging the left-hand notes into this pattern [![enter image description here](https://i.stack.imgur.com/y2HSg.jpg)](https://i.stack.imgur.com/y2HSg.jpg) Etc. mi...
Played this recently, and the chart was in 3♭s. Were it in F minor, 4♭s would be appropriate. However, were it in F Dorian, 3♭s would be correct.
29,143,041
I am new to programming and I created a Simple mp3 player. There is a textbox **txtCount** and when enter 4 in that text box need to play mp3 4 times.. Here my code It always play one time and for loop does not work also. If I entered 4 in the textbox when mp3 file play at fist time it shows as **3 times playd** and ...
2015/03/19
[ "https://Stackoverflow.com/questions/29143041", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3257430/" ]
``` from pyspark.sql import * from pyspark.sql.types import * from pyspark.sql import SQLContext def dummy_function(parameter_key): return "abc" sqlContext.udf.register("dummy_function", dummy_function) ``` This is how we can define a function and register to use in any spark-sql query
Given that the latest implementation of Spark UDFs ([2.3.1 documentation](http://spark.apache.org/docs/2.3.1/api/java/org/apache/spark/sql/UDFRegistration.html)) doesn't include any python UDF registration functionality (scala and Java only), I'd recommend [leveraging Jython to call your Python functions](https://stack...
69,581,339
How C for loop having cond-expression expressed as an expression which is contextually convertible to bool work ? Why loop stops when x is got assigned value Zero ? ``` #include <stdio.h> int decreaseVal(int i){ printf("deccrease val: %d \n",i); return --i; } int main () { // for loop execution i...
2021/10/15
[ "https://Stackoverflow.com/questions/69581339", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2916322/" ]
As you said: count distinct values up to 5th underline: ``` SQL> with test (col) as 2 (select '2020/2021_A22_3_1_10_ACP302_0082' from dual union all 3 select '2020/2021_A22_3_1_10_ACR301_01' from dual union all 4 select '2020/2021_A22_3_1_10_ACR302_01' from dual 5 ) 6 select count(distinct...
We can use `REGEXP_REPLACE` here as one option: ```sql SELECT REGEXP_REPLACE(MARKSHEET_ID, '_[^_]+_[^_]+$', '') AS NEW_MARKSHEET_ID FROM yourTable; ```
60,005,291
I retrieve some data on init from an API and display them in my view to prefill some fields. I'm a form view which contains : ``` <ion-textarea formControlName="job_description" class="form-control desc" value="{{resDesc?.job_description}}"></ion-textarea> ``` And when I submit the form, I try to get datas with : ...
2020/01/31
[ "https://Stackoverflow.com/questions/60005291", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4904541/" ]
Instead of setting the value in the tag you can set it in your TS file, like this: ``` this.form = this.formBuilder.group({ job_description: new FormControl("YOUR VALUE HERE") }); ``` It works in my computer ...
You can also use `patchValue` or `setValue` to set the default values of all the fields in your model. See Angular docs on [patchValue and setValue](https://angular.io/guide/reactive-forms#partial-model-updates). I like `patchValue` for this use case. **setValue():** > > Use the `setValue()` method to set a new valu...
22,954,394
Below is the error message when I run "scons" to compiler in windows7: ``` ----------------------------------------------------------------------------------- 'cl' is not recognized as an internal or external command, operable program or batch file. scons: *** [out\windows-x86-MD-unicode-vs2008-rel\obj-static\src\feat...
2014/04/09
[ "https://Stackoverflow.com/questions/22954394", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3513844/" ]
The location of the cl.exe executable is not in the system **PATH** environment variable. In other words the cmd.exe command line processor has been asked to run the cl.exe executable but it can't find it. It is either not in the **PATH** or not installed. > > I have added path to environment variables already, but ...
Simply do window search for cl.exe, and add that path to PATH variable, save it. Close the existing open command and reopen it it before executing cl.exe. Hope this will work.
22,954,394
Below is the error message when I run "scons" to compiler in windows7: ``` ----------------------------------------------------------------------------------- 'cl' is not recognized as an internal or external command, operable program or batch file. scons: *** [out\windows-x86-MD-unicode-vs2008-rel\obj-static\src\feat...
2014/04/09
[ "https://Stackoverflow.com/questions/22954394", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3513844/" ]
The location of the cl.exe executable is not in the system **PATH** environment variable. In other words the cmd.exe command line processor has been asked to run the cl.exe executable but it can't find it. It is either not in the **PATH** or not installed. > > I have added path to environment variables already, but ...
SCons has logic to find the location of the visual studio install and set the path and other environment variables needed by visual studio tools by inspecting the registry and also default install locations. If it's failing for you then you should produce a debug log and pastebin it somewhere for us to see. use: ```...
22,954,394
Below is the error message when I run "scons" to compiler in windows7: ``` ----------------------------------------------------------------------------------- 'cl' is not recognized as an internal or external command, operable program or batch file. scons: *** [out\windows-x86-MD-unicode-vs2008-rel\obj-static\src\feat...
2014/04/09
[ "https://Stackoverflow.com/questions/22954394", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3513844/" ]
The location of the cl.exe executable is not in the system **PATH** environment variable. In other words the cmd.exe command line processor has been asked to run the cl.exe executable but it can't find it. It is either not in the **PATH** or not installed. > > I have added path to environment variables already, but ...
I was having the same issue and found a better way to fix it from @bdbaddog answer to get the debug log from `set SCONS_MSCOMMON_DEBUG=%TEMP%\SCONS_MSVS_DEBUG.log` SCons seem to find the cl.exe ``` 00073ms:MSCommon/vc.py:_check_cl_exists_in_vc_dir#588:checking for cl.exe at C:\Program Files (x86)\Microsoft Visual Stud...
22,954,394
Below is the error message when I run "scons" to compiler in windows7: ``` ----------------------------------------------------------------------------------- 'cl' is not recognized as an internal or external command, operable program or batch file. scons: *** [out\windows-x86-MD-unicode-vs2008-rel\obj-static\src\feat...
2014/04/09
[ "https://Stackoverflow.com/questions/22954394", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3513844/" ]
SCons has logic to find the location of the visual studio install and set the path and other environment variables needed by visual studio tools by inspecting the registry and also default install locations. If it's failing for you then you should produce a debug log and pastebin it somewhere for us to see. use: ```...
Simply do window search for cl.exe, and add that path to PATH variable, save it. Close the existing open command and reopen it it before executing cl.exe. Hope this will work.
22,954,394
Below is the error message when I run "scons" to compiler in windows7: ``` ----------------------------------------------------------------------------------- 'cl' is not recognized as an internal or external command, operable program or batch file. scons: *** [out\windows-x86-MD-unicode-vs2008-rel\obj-static\src\feat...
2014/04/09
[ "https://Stackoverflow.com/questions/22954394", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3513844/" ]
Simply do window search for cl.exe, and add that path to PATH variable, save it. Close the existing open command and reopen it it before executing cl.exe. Hope this will work.
I was having the same issue and found a better way to fix it from @bdbaddog answer to get the debug log from `set SCONS_MSCOMMON_DEBUG=%TEMP%\SCONS_MSVS_DEBUG.log` SCons seem to find the cl.exe ``` 00073ms:MSCommon/vc.py:_check_cl_exists_in_vc_dir#588:checking for cl.exe at C:\Program Files (x86)\Microsoft Visual Stud...
22,954,394
Below is the error message when I run "scons" to compiler in windows7: ``` ----------------------------------------------------------------------------------- 'cl' is not recognized as an internal or external command, operable program or batch file. scons: *** [out\windows-x86-MD-unicode-vs2008-rel\obj-static\src\feat...
2014/04/09
[ "https://Stackoverflow.com/questions/22954394", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3513844/" ]
SCons has logic to find the location of the visual studio install and set the path and other environment variables needed by visual studio tools by inspecting the registry and also default install locations. If it's failing for you then you should produce a debug log and pastebin it somewhere for us to see. use: ```...
I was having the same issue and found a better way to fix it from @bdbaddog answer to get the debug log from `set SCONS_MSCOMMON_DEBUG=%TEMP%\SCONS_MSVS_DEBUG.log` SCons seem to find the cl.exe ``` 00073ms:MSCommon/vc.py:_check_cl_exists_in_vc_dir#588:checking for cl.exe at C:\Program Files (x86)\Microsoft Visual Stud...
48,624,696
I am having trouble approaching a necessary element in my program: Given a set of points of the form ( x, y, a ) produce a gaussian function of the form: ![f(x,y)](https://latex.codecogs.com/gif.latex?f%28x%2Cy%29%3Dpoint.a*e%5E%7B-%28x-point.x%29%5E2-%28y-point.y%29%5E2%7D) ... from each point. Then produce a funct...
2018/02/05
[ "https://Stackoverflow.com/questions/48624696", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7663763/" ]
``` from math import exp, pow class AllPoint: def __init__(self, array):#give the set of points self.points = array def applyGaussianFunction(self, x, y): #for each point sum the gaussian function result if(len(self.points) == 0): #if there is no point launch an error raise Asserti...
``` from math import exp, pow from collections import namedtuple Point = namedtuple('Point', 'x y a') def sum_function(x, y, points): # use list comprehension to loop over the points and calculate the gaussian, # then use the sum function to compute the sum of the list elements return sum([p.a * exp(-pow(x - p...
688,097
This question have been closed, without giving any valid reason! The ad hominem attacks made by some users are, however, simply ignored. It seems that decisions are politically motivated, instead of scientifically investigated. So far not one answer have shown how a spherical wave can transform in a spherical wave! Yet...
2022/01/11
[ "https://physics.stackexchange.com/questions/688097", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/279161/" ]
Editing my answer to better address the original question. It is mainly an algebra difficulty, and albeit the math is a bit subtle. I will show you the algebra Einstein left out in his paper. I'll go the opposite way starting with the moving frame because the algebra is slightly easier. $\xi^2+\eta^2+\zeta^2=c^2\tau^...
Einstein in his 1905 paper was not content to simply say “…is no less an ellipsoidal wave with velocity of propagation c when viewed in the moving system”. Einstein have indeed set a high bar by saying “…is no less a spherical wave”! It goes against every physical intuition we have. Einstein must therefore prove that ...
688,097
This question have been closed, without giving any valid reason! The ad hominem attacks made by some users are, however, simply ignored. It seems that decisions are politically motivated, instead of scientifically investigated. So far not one answer have shown how a spherical wave can transform in a spherical wave! Yet...
2022/01/11
[ "https://physics.stackexchange.com/questions/688097", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/279161/" ]
--- (update 1/21/2022) [![robphy-CircularLightClock-VisualizingProperTimeInSpecialRelativity](https://i.stack.imgur.com/KZIMM.png)](https://i.stack.imgur.com/KZIMM.png) Play with my visualization at <https://www.geogebra.org/m/pr63mk3j> (a variant of my <https://www.geogebra.org/m/XFXzXGTq> , the one linked belo...
As explained in the previous answers, the elliptical shape is simply the result of non-simultaneous measurement in the moving frame. However, if we measure them **simultaneously**, it will become spherical as required by Einstein. We can check this by simply showing that the rays indeed propagate at the same speed in a...
688,097
This question have been closed, without giving any valid reason! The ad hominem attacks made by some users are, however, simply ignored. It seems that decisions are politically motivated, instead of scientifically investigated. So far not one answer have shown how a spherical wave can transform in a spherical wave! Yet...
2022/01/11
[ "https://physics.stackexchange.com/questions/688097", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/279161/" ]
I have not tried to follow your equations in detail, but I suspect you have made the mistake of neglecting to take the relativity of simultaneity into account in the right way. In my explanation, I will take the speed of light to be 300,000,000 m/s, which will make it easier to follow... If you and I stand together an...
The following claim is made: “The light forms a sphere at any fixed value of tau. It also forms a sphere at any fixed value of t. “, How can a sphere transform to a sphere? Simple logic tells us it is impossible, a sphere transforms to an ellipsoid! It is easy to show the fallacy of the argument based on freezing ti...
688,097
This question have been closed, without giving any valid reason! The ad hominem attacks made by some users are, however, simply ignored. It seems that decisions are politically motivated, instead of scientifically investigated. So far not one answer have shown how a spherical wave can transform in a spherical wave! Yet...
2022/01/11
[ "https://physics.stackexchange.com/questions/688097", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/279161/" ]
--- (update 1/21/2022) [![robphy-CircularLightClock-VisualizingProperTimeInSpecialRelativity](https://i.stack.imgur.com/KZIMM.png)](https://i.stack.imgur.com/KZIMM.png) Play with my visualization at <https://www.geogebra.org/m/pr63mk3j> (a variant of my <https://www.geogebra.org/m/XFXzXGTq> , the one linked belo...
Einstein in his 1905 paper was not content to simply say “…is no less an ellipsoidal wave with velocity of propagation c when viewed in the moving system”. Einstein have indeed set a high bar by saying “…is no less a spherical wave”! It goes against every physical intuition we have. Einstein must therefore prove that ...
688,097
This question have been closed, without giving any valid reason! The ad hominem attacks made by some users are, however, simply ignored. It seems that decisions are politically motivated, instead of scientifically investigated. So far not one answer have shown how a spherical wave can transform in a spherical wave! Yet...
2022/01/11
[ "https://physics.stackexchange.com/questions/688097", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/279161/" ]
Editing my answer to better address the original question. It is mainly an algebra difficulty, and albeit the math is a bit subtle. I will show you the algebra Einstein left out in his paper. I'll go the opposite way starting with the moving frame because the algebra is slightly easier. $\xi^2+\eta^2+\zeta^2=c^2\tau^...
The following claim is made: “The light forms a sphere at any fixed value of tau. It also forms a sphere at any fixed value of t. “, How can a sphere transform to a sphere? Simple logic tells us it is impossible, a sphere transforms to an ellipsoid! It is easy to show the fallacy of the argument based on freezing ti...
688,097
This question have been closed, without giving any valid reason! The ad hominem attacks made by some users are, however, simply ignored. It seems that decisions are politically motivated, instead of scientifically investigated. So far not one answer have shown how a spherical wave can transform in a spherical wave! Yet...
2022/01/11
[ "https://physics.stackexchange.com/questions/688097", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/279161/" ]
The following claim is made: “The light forms a sphere at any fixed value of tau. It also forms a sphere at any fixed value of t. “, How can a sphere transform to a sphere? Simple logic tells us it is impossible, a sphere transforms to an ellipsoid! It is easy to show the fallacy of the argument based on freezing ti...
Einstein in his 1905 paper was not content to simply say “…is no less an ellipsoidal wave with velocity of propagation c when viewed in the moving system”. Einstein have indeed set a high bar by saying “…is no less a spherical wave”! It goes against every physical intuition we have. Einstein must therefore prove that ...
688,097
This question have been closed, without giving any valid reason! The ad hominem attacks made by some users are, however, simply ignored. It seems that decisions are politically motivated, instead of scientifically investigated. So far not one answer have shown how a spherical wave can transform in a spherical wave! Yet...
2022/01/11
[ "https://physics.stackexchange.com/questions/688097", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/279161/" ]
--- (update 1/21/2022) [![robphy-CircularLightClock-VisualizingProperTimeInSpecialRelativity](https://i.stack.imgur.com/KZIMM.png)](https://i.stack.imgur.com/KZIMM.png) Play with my visualization at <https://www.geogebra.org/m/pr63mk3j> (a variant of my <https://www.geogebra.org/m/XFXzXGTq> , the one linked belo...
The following claim is made: “The light forms a sphere at any fixed value of tau. It also forms a sphere at any fixed value of t. “, How can a sphere transform to a sphere? Simple logic tells us it is impossible, a sphere transforms to an ellipsoid! It is easy to show the fallacy of the argument based on freezing ti...
688,097
This question have been closed, without giving any valid reason! The ad hominem attacks made by some users are, however, simply ignored. It seems that decisions are politically motivated, instead of scientifically investigated. So far not one answer have shown how a spherical wave can transform in a spherical wave! Yet...
2022/01/11
[ "https://physics.stackexchange.com/questions/688097", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/279161/" ]
I have not tried to follow your equations in detail, but I suspect you have made the mistake of neglecting to take the relativity of simultaneity into account in the right way. In my explanation, I will take the speed of light to be 300,000,000 m/s, which will make it easier to follow... If you and I stand together an...
As explained in the previous answers, the elliptical shape is simply the result of non-simultaneous measurement in the moving frame. However, if we measure them **simultaneously**, it will become spherical as required by Einstein. We can check this by simply showing that the rays indeed propagate at the same speed in a...
688,097
This question have been closed, without giving any valid reason! The ad hominem attacks made by some users are, however, simply ignored. It seems that decisions are politically motivated, instead of scientifically investigated. So far not one answer have shown how a spherical wave can transform in a spherical wave! Yet...
2022/01/11
[ "https://physics.stackexchange.com/questions/688097", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/279161/" ]
Editing my answer to better address the original question. It is mainly an algebra difficulty, and albeit the math is a bit subtle. I will show you the algebra Einstein left out in his paper. I'll go the opposite way starting with the moving frame because the algebra is slightly easier. $\xi^2+\eta^2+\zeta^2=c^2\tau^...
--- (update 1/21/2022) [![robphy-CircularLightClock-VisualizingProperTimeInSpecialRelativity](https://i.stack.imgur.com/KZIMM.png)](https://i.stack.imgur.com/KZIMM.png) Play with my visualization at <https://www.geogebra.org/m/pr63mk3j> (a variant of my <https://www.geogebra.org/m/XFXzXGTq> , the one linked belo...
688,097
This question have been closed, without giving any valid reason! The ad hominem attacks made by some users are, however, simply ignored. It seems that decisions are politically motivated, instead of scientifically investigated. So far not one answer have shown how a spherical wave can transform in a spherical wave! Yet...
2022/01/11
[ "https://physics.stackexchange.com/questions/688097", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/279161/" ]
Editing my answer to better address the original question. It is mainly an algebra difficulty, and albeit the math is a bit subtle. I will show you the algebra Einstein left out in his paper. I'll go the opposite way starting with the moving frame because the algebra is slightly easier. $\xi^2+\eta^2+\zeta^2=c^2\tau^...
As explained in the previous answers, the elliptical shape is simply the result of non-simultaneous measurement in the moving frame. However, if we measure them **simultaneously**, it will become spherical as required by Einstein. We can check this by simply showing that the rays indeed propagate at the same speed in a...
26,541,013
I am trying to solve a problem using java where I have to print the number the same number of time as the number itself. For example 1 will be printed once 2 twice 3 thrice and so on. I tried to attempt the question using nested loop but it is going into infinite loop. Please pinpoint the mistake in the code. Thanks! ...
2014/10/24
[ "https://Stackoverflow.com/questions/26541013", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3378637/" ]
**The problem is in the second loop.** Making progress as **j=i** and checking for **j<=i** will always give the **true** result. So there is the infinite loop. You may want to change the progress to something like `j= j+1` **Edit:** You need to do this ``` for (int i=1;i<=10;i=i+1) { for (int j=1;j<=i; j++) { ...
The problem caused in second loop during initialize `j = i`. This interrupt the var `j` to be increment. It should be `j++` or `j += 1` or `j = j + 1`. Example here... ``` for (int i = 1; i <= 10; i++) { for (int j = 1; j <= i ; j++) { jTextArea1.append(" "+i); } } ```
26,541,013
I am trying to solve a problem using java where I have to print the number the same number of time as the number itself. For example 1 will be printed once 2 twice 3 thrice and so on. I tried to attempt the question using nested loop but it is going into infinite loop. Please pinpoint the mistake in the code. Thanks! ...
2014/10/24
[ "https://Stackoverflow.com/questions/26541013", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3378637/" ]
**The problem is in the second loop.** Making progress as **j=i** and checking for **j<=i** will always give the **true** result. So there is the infinite loop. You may want to change the progress to something like `j= j+1` **Edit:** You need to do this ``` for (int i=1;i<=10;i=i+1) { for (int j=1;j<=i; j++) { ...
Use this see what is happening. I've simplified your code a bit: ``` for (int i=1; i<=10; i++){ for (int j=1; j<i; j=i){ System.out.println("j=" + j + ", i=" + i); } } ```
28,892,353
I trying to make two conditional statement with jQuery like this. ```js $('#user_name, #user_email, #user_password').keyup(function () { if ($('#output-name').is('.field-output-comple') && $('#output-email').is('.field-output-comple') && $('#output-password').is('.field-output-comple') && ...
2015/03/06
[ "https://Stackoverflow.com/questions/28892353", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3910390/" ]
This isn't doing what you think: ``` .keyup(isValidPassword()) ``` This doesn't pass the `isValidPassword` function itself to `keyup`, it *executes* the function and passes the *result* of that function. And that function doesn't return anything, so its result is `undefined`. Don't execute the function, just pass t...
You need to pass the function reference to the event handlers, you are calling the function `isValidPassword` and is passing the value returned by it `undefined` as the event handler. ``` $('#user_name, #user_email, #user_password').keyup(isValidPassword) $('#confirm-terms-of-use').change(isValidPassword) ```
1,213,589
I am curious to know why should a Database person learn LINQ. How can it be useful.
2009/07/31
[ "https://Stackoverflow.com/questions/1213589", "https://Stackoverflow.com", "https://Stackoverflow.com/users/102041/" ]
"Know your enemy" ? OTOH, out of interest. I'm learning more about XMl, XSLT, XSDs etc because I can see a use for them as a database developer.
This question also prompts me to ask, if LINQ becomes immensely popular, will server side developers know SQL as well as their predecessors did?
1,213,589
I am curious to know why should a Database person learn LINQ. How can it be useful.
2009/07/31
[ "https://Stackoverflow.com/questions/1213589", "https://Stackoverflow.com", "https://Stackoverflow.com/users/102041/" ]
LINQ has one big advantage over most other data access methods: it centers around the '**query expression**' metaphor, meaning that queries can be passed around like objects and be altered and modified, all *before* they are executed (iterated). In practice what that means is that code can be modular and better isolate...
"Know your enemy" ? OTOH, out of interest. I'm learning more about XMl, XSLT, XSDs etc because I can see a use for them as a database developer.
1,213,589
I am curious to know why should a Database person learn LINQ. How can it be useful.
2009/07/31
[ "https://Stackoverflow.com/questions/1213589", "https://Stackoverflow.com", "https://Stackoverflow.com/users/102041/" ]
LINQ has one big advantage over most other data access methods: it centers around the '**query expression**' metaphor, meaning that queries can be passed around like objects and be altered and modified, all *before* they are executed (iterated). In practice what that means is that code can be modular and better isolate...
I think one of the many reasons why one could consider linq it because linq is big productivity boost and huge time saver
1,213,589
I am curious to know why should a Database person learn LINQ. How can it be useful.
2009/07/31
[ "https://Stackoverflow.com/questions/1213589", "https://Stackoverflow.com", "https://Stackoverflow.com/users/102041/" ]
Linq provides "first class" access to your data. Meaning that your queries are now part of the programming language. Linq provides a common way to access data objects of all kinds. For example, the same syntax that is used to access your database queries can also be used to access lists, arrays, and XML files. Learni...
I think one of the many reasons why one could consider linq it because linq is big productivity boost and huge time saver
1,213,589
I am curious to know why should a Database person learn LINQ. How can it be useful.
2009/07/31
[ "https://Stackoverflow.com/questions/1213589", "https://Stackoverflow.com", "https://Stackoverflow.com/users/102041/" ]
LINQ has one big advantage over most other data access methods: it centers around the '**query expression**' metaphor, meaning that queries can be passed around like objects and be altered and modified, all *before* they are executed (iterated). In practice what that means is that code can be modular and better isolate...
Is this a real question? It can't be answered with a code snippet. Most of these discussion type questions get closed quickly.
1,213,589
I am curious to know why should a Database person learn LINQ. How can it be useful.
2009/07/31
[ "https://Stackoverflow.com/questions/1213589", "https://Stackoverflow.com", "https://Stackoverflow.com/users/102041/" ]
Linq provides "first class" access to your data. Meaning that your queries are now part of the programming language. Linq provides a common way to access data objects of all kinds. For example, the same syntax that is used to access your database queries can also be used to access lists, arrays, and XML files. Learni...
This question also prompts me to ask, if LINQ becomes immensely popular, will server side developers know SQL as well as their predecessors did?
1,213,589
I am curious to know why should a Database person learn LINQ. How can it be useful.
2009/07/31
[ "https://Stackoverflow.com/questions/1213589", "https://Stackoverflow.com", "https://Stackoverflow.com/users/102041/" ]
"Know your enemy" ? OTOH, out of interest. I'm learning more about XMl, XSLT, XSDs etc because I can see a use for them as a database developer.
I think one of the many reasons why one could consider linq it because linq is big productivity boost and huge time saver
1,213,589
I am curious to know why should a Database person learn LINQ. How can it be useful.
2009/07/31
[ "https://Stackoverflow.com/questions/1213589", "https://Stackoverflow.com", "https://Stackoverflow.com/users/102041/" ]
"Know your enemy" ? OTOH, out of interest. I'm learning more about XMl, XSLT, XSDs etc because I can see a use for them as a database developer.
Is this a real question? It can't be answered with a code snippet. Most of these discussion type questions get closed quickly.
1,213,589
I am curious to know why should a Database person learn LINQ. How can it be useful.
2009/07/31
[ "https://Stackoverflow.com/questions/1213589", "https://Stackoverflow.com", "https://Stackoverflow.com/users/102041/" ]
Linq provides "first class" access to your data. Meaning that your queries are now part of the programming language. Linq provides a common way to access data objects of all kinds. For example, the same syntax that is used to access your database queries can also be used to access lists, arrays, and XML files. Learni...
"Know your enemy" ? OTOH, out of interest. I'm learning more about XMl, XSLT, XSDs etc because I can see a use for them as a database developer.
1,213,589
I am curious to know why should a Database person learn LINQ. How can it be useful.
2009/07/31
[ "https://Stackoverflow.com/questions/1213589", "https://Stackoverflow.com", "https://Stackoverflow.com/users/102041/" ]
I think a better question is why would one replace SQL with LINQ when querying a database?
I think one of the many reasons why one could consider linq it because linq is big productivity boost and huge time saver
12,993,102
this is my first post so go easy on me. Basically I am doing some rewrites in my htaccess file to change my made up search friendly URLs into actual URLs, and for the most part they are working. For instance this: <http://www.negativeworld.org/7849/news/nintendo-download-for-may-24-2012> Will turn into this: <http:...
2012/10/20
[ "https://Stackoverflow.com/questions/12993102", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1744167/" ]
Your thoughts aren't wrong. For a wrong ID there is a double redirection which is OK. The problem is how the second redirection happens. Try ``` header("Location: http://www.negativeworld.org/boarderror.php"); ``` or ``` header("Location: /boarderror.php"); ``` With your redirection the browser is trying `http://...
The redirect rule is fine, the issue is in your header function call. When you only provide a file name, the header redirect will send the user to the file in the same folder, much like creating an html link using only the filename. Let's say i try to load <http://www.negativeworld.org/99999/news/nintendo-download-fo...
53,582,445
The official docs for Microsoft bot-framework [SDK v4](https://learn.microsoft.com/en-us/azure/bot-service/?view=azure-bot-service-4.0) do not demonstrate how to send a typing indicator (whereas [v3 has these instructions](https://learn.microsoft.com/en-us/azure/bot-service/nodejs/bot-builder-nodejs-send-typing-indicat...
2018/12/02
[ "https://Stackoverflow.com/questions/53582445", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2765983/" ]
You can send a typing indicator by sending an activity with the `typing` type. Read more about how to [send a typing indicator](https://learn.microsoft.com/en-us/azure/bot-service/bot-builder-howto-send-messages?view=azure-bot-service-4.0&tabs=javascript#send-a-typing-indicator). ```js await context.sendActivities([ ...
I believe you should do something like this ``` await context.sendActivities([ { type: 'typing' }, { type: 'delay', value: 2000 }, { type: 'message', text: 'Your message here' } ]); ```
53,582,445
The official docs for Microsoft bot-framework [SDK v4](https://learn.microsoft.com/en-us/azure/bot-service/?view=azure-bot-service-4.0) do not demonstrate how to send a typing indicator (whereas [v3 has these instructions](https://learn.microsoft.com/en-us/azure/bot-service/nodejs/bot-builder-nodejs-send-typing-indicat...
2018/12/02
[ "https://Stackoverflow.com/questions/53582445", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2765983/" ]
You can send a typing indicator by sending an activity with the `typing` type. Read more about how to [send a typing indicator](https://learn.microsoft.com/en-us/azure/bot-service/bot-builder-howto-send-messages?view=azure-bot-service-4.0&tabs=javascript#send-a-typing-indicator). ```js await context.sendActivities([ ...
I think you can just add in OnTurnAsync function before await base.OnTurnAsync(turnContext, cancellationToken); : ``` await turnContext.SendActivityAsync(new Activity { Type = ActivityTypes.Typing }, cancellationToken); ```
53,582,445
The official docs for Microsoft bot-framework [SDK v4](https://learn.microsoft.com/en-us/azure/bot-service/?view=azure-bot-service-4.0) do not demonstrate how to send a typing indicator (whereas [v3 has these instructions](https://learn.microsoft.com/en-us/azure/bot-service/nodejs/bot-builder-nodejs-send-typing-indicat...
2018/12/02
[ "https://Stackoverflow.com/questions/53582445", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2765983/" ]
I believe you should do something like this ``` await context.sendActivities([ { type: 'typing' }, { type: 'delay', value: 2000 }, { type: 'message', text: 'Your message here' } ]); ```
I think you can just add in OnTurnAsync function before await base.OnTurnAsync(turnContext, cancellationToken); : ``` await turnContext.SendActivityAsync(new Activity { Type = ActivityTypes.Typing }, cancellationToken); ```
21,063,426
i will extract sting from editText to TextView,, but i have problem,,, this my code : ``` public class M_bab4_a1_panc extends Activity { String s1; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.m_bab4_a1_panc); final EditText et...
2014/01/11
[ "https://Stackoverflow.com/questions/21063426", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2513267/" ]
Simply use this one.. ``` s1 = et.getText().toString(); tv.setText(s1); ``` and if you want to get from string.xml then use ``` tv.setText(getResources().getString(R.string.ok1)); ``` **NOTE:** Remember one thing when you extract value from ***EditText*** or ***TextView*** and take that value in String then yo...
Simply do this to set text on Textview - ``` s1 = et.getText().toString(); tv.setText(s1); ```
21,063,426
i will extract sting from editText to TextView,, but i have problem,,, this my code : ``` public class M_bab4_a1_panc extends Activity { String s1; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.m_bab4_a1_panc); final EditText et...
2014/01/11
[ "https://Stackoverflow.com/questions/21063426", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2513267/" ]
Simply use this one.. ``` s1 = et.getText().toString(); tv.setText(s1); ``` and if you want to get from string.xml then use ``` tv.setText(getResources().getString(R.string.ok1)); ``` **NOTE:** Remember one thing when you extract value from ***EditText*** or ***TextView*** and take that value in String then yo...
You store the value of the `EditText` view in the string variable `s1`. ``` @Override public void onClick(View v) { // TODO Auto-generated method stub s1 = (String) et.getText().toString(); tv.setText(getBaseContext().getString(R.id.ok1)); } ``` So just insert it, like so: ``` ...
21,063,426
i will extract sting from editText to TextView,, but i have problem,,, this my code : ``` public class M_bab4_a1_panc extends Activity { String s1; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.m_bab4_a1_panc); final EditText et...
2014/01/11
[ "https://Stackoverflow.com/questions/21063426", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2513267/" ]
Simply do this to set text on Textview - ``` s1 = et.getText().toString(); tv.setText(s1); ```
You store the value of the `EditText` view in the string variable `s1`. ``` @Override public void onClick(View v) { // TODO Auto-generated method stub s1 = (String) et.getText().toString(); tv.setText(getBaseContext().getString(R.id.ok1)); } ``` So just insert it, like so: ``` ...
7,335,871
If I'm running the same binary (which implies the same architecture) on multiple nodes of a Beowulf cluster in an MPI configuration, is it safe to pass function pointers via MPI as a way of telling another node to call a function? Under what circumstances, if any, can the same function in the same binary have different...
2011/09/07
[ "https://Stackoverflow.com/questions/7335871", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23903/" ]
in my experience I found everything seemed to work better if you tied it in through a binding scource, then set the ``` bindingScource.dataScource.Rows.Add( dr[0].ToString(), dr[1].ToString(), dr[2].ToStri...
Select the correct row? you mean select from the dropdown to see the row inside the datagrid? ``` int index = dropdown.SelectedIndex(); for(int count = 0; count < dgvEenheden.Rows.Count; count ++) { if (dgvEenheden.Rows[count].Cells["<enter col name here>"].Value.ToString().equals(dropdown.Items[index].Text)) { ...
71,401
I am in a position where I might have to prove that I made a certain amount of MB downloads from the Internet including webpages browsed to a court of law. Is there a way of finding this out from Windows Vista Ultimate. If I need to do this in the future is there a way of setting up Ultimate to audit my account to prov...
2009/11/16
[ "https://superuser.com/questions/71401", "https://superuser.com", "https://superuser.com/users/18259/" ]
I am not a lawyer... but from what I know of the Windows auditing sub-system, you're not going to be able to track downloads. The particular browser (IE, Firefox, Safari) you used likely contains history that will show these downloads. What will probably be of more value is working with your Internet Service Provider ...
It completely depends on what you are using to download. Can you give us a bit more information about your environment? What browser(s)? Do you use download managers? What kind of downloads are you talking about? etc... Your best bet is to set up some kind of logging proxy to run your Internet traffic through. This wo...
71,401
I am in a position where I might have to prove that I made a certain amount of MB downloads from the Internet including webpages browsed to a court of law. Is there a way of finding this out from Windows Vista Ultimate. If I need to do this in the future is there a way of setting up Ultimate to audit my account to prov...
2009/11/16
[ "https://superuser.com/questions/71401", "https://superuser.com", "https://superuser.com/users/18259/" ]
It completely depends on what you are using to download. Can you give us a bit more information about your environment? What browser(s)? Do you use download managers? What kind of downloads are you talking about? etc... Your best bet is to set up some kind of logging proxy to run your Internet traffic through. This wo...
Your ISP should have a log with your visited sites and all of your network transfers. Try contacting them.