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
21,221,876
I would like to split up text by comma - i.e. keywords are as the following: ``` keyword1, keyword2, keyword3, keyword4 ``` How can I have a the black style element for each and every keyword that is separated by a comma. Is there an easy way to do this? The text is always dynamic, so I never know exactly what those...
2014/01/19
[ "https://Stackoverflow.com/questions/21221876", "https://Stackoverflow.com", "https://Stackoverflow.com/users/673600/" ]
Using Django, I did it the following way. 1. Create a simple CSS class to perform the highlighting. 2. Create a custom tag that splits up data in template view into `<span class="keyword">A</span><span class="keyword">B</span>`. It takes the original view output and parses this into a format that already has the spans...
HTML and CSS are static. Since you don't know how many keywords are gonna be there, you need something dynamic. Depending on implementation, you can use JavaScript or any Back-end language you are using. Basically, you want to add a span tag around each keyword and style that span (span in one with class keyword-opt...
12,968
I have an SVG image with many objects, stacked. What I need is a final SVG, with the same visual result, but in a way that I could change the opacity of any object without revealing the hidden parts of underlying objects, revealing just the "hole" behind. I've done [this diagram](http://cl.ly/image/1G0k2f1w2k11) to il...
2012/11/26
[ "https://graphicdesign.stackexchange.com/questions/12968", "https://graphicdesign.stackexchange.com", "https://graphicdesign.stackexchange.com/users/8762/" ]
On Illustrator: **If there's no transparency...** --------------------------------- ...select the shapes, then use the `'Trim'` button in the `Pathfinder` window. ![enter image description here](https://i.stack.imgur.com/ZJNDu.png) Trim can act strangely with objects that have transparency, so... **If there *is* t...
I have an idea, though i'm sure there is a better way. Using Inkscape 1. Place your objects and make sure to set each object's color where none of the same color are touching, (use as few as colors as possible) you will change these later. 2. `Edit -> Preferences` near the bottom of the selection, select `Bitmaps` se...
12,968
I have an SVG image with many objects, stacked. What I need is a final SVG, with the same visual result, but in a way that I could change the opacity of any object without revealing the hidden parts of underlying objects, revealing just the "hole" behind. I've done [this diagram](http://cl.ly/image/1G0k2f1w2k11) to il...
2012/11/26
[ "https://graphicdesign.stackexchange.com/questions/12968", "https://graphicdesign.stackexchange.com", "https://graphicdesign.stackexchange.com/users/8762/" ]
On Illustrator: **If there's no transparency...** --------------------------------- ...select the shapes, then use the `'Trim'` button in the `Pathfinder` window. ![enter image description here](https://i.stack.imgur.com/ZJNDu.png) Trim can act strangely with objects that have transparency, so... **If there *is* t...
A problem with trying to do what you ask for in the first place is that your shapes will end up with coincident edges. When rendered, such edges will often appear as if there was a narrow gap between the shapes, allowing the background to shine through a little. There are two reasons why this happens — anti-aliasing a...
104,079
I have an old Sprint iPhone 4s that hasn't been under contract for around a year now and I have a friend on T-Mobile whose contract doesn't end for another year. He still has a flip phone so I want to give him the old iPhone. Is there a way to unlock the iPhone if it is no longer under contract?
2013/10/03
[ "https://apple.stackexchange.com/questions/104079", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/58643/" ]
Assuming your account was in good standing while the phone was under contract with Sprint, you would have to call Sprint Customer Care to get it unlocked. See [Sprint clarifies iPhone 4S unlocking policy](http://www.macworld.com/article/1163003/sprint_clarifies_iphone_4s_unlocking_policy.html) on Macworld. Sprint cust...
In order to unlock - you will need to jailbreak it first. If you did want to jailbreak your iphone 4s as well,then jailbreak gives you to complete control to download whatever apps you want. That information is best for you that have an to unlock their iPhone.
104,079
I have an old Sprint iPhone 4s that hasn't been under contract for around a year now and I have a friend on T-Mobile whose contract doesn't end for another year. He still has a flip phone so I want to give him the old iPhone. Is there a way to unlock the iPhone if it is no longer under contract?
2013/10/03
[ "https://apple.stackexchange.com/questions/104079", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/58643/" ]
Unlocking is trivial with carrier support. Here is Apple's article on how to proceed technically once your carrier has unlocked the device: * <http://support.apple.com/kb/HT5014> We have a nice thread on this Sprint to T-Mobile shift here: * [Getting an unlocked iPhone 4/4S to work on T-Mobile](https://apple.stacke...
Assuming your account was in good standing while the phone was under contract with Sprint, you would have to call Sprint Customer Care to get it unlocked. See [Sprint clarifies iPhone 4S unlocking policy](http://www.macworld.com/article/1163003/sprint_clarifies_iphone_4s_unlocking_policy.html) on Macworld. Sprint cust...
104,079
I have an old Sprint iPhone 4s that hasn't been under contract for around a year now and I have a friend on T-Mobile whose contract doesn't end for another year. He still has a flip phone so I want to give him the old iPhone. Is there a way to unlock the iPhone if it is no longer under contract?
2013/10/03
[ "https://apple.stackexchange.com/questions/104079", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/58643/" ]
Unlocking is trivial with carrier support. Here is Apple's article on how to proceed technically once your carrier has unlocked the device: * <http://support.apple.com/kb/HT5014> We have a nice thread on this Sprint to T-Mobile shift here: * [Getting an unlocked iPhone 4/4S to work on T-Mobile](https://apple.stacke...
In order to unlock - you will need to jailbreak it first. If you did want to jailbreak your iphone 4s as well,then jailbreak gives you to complete control to download whatever apps you want. That information is best for you that have an to unlock their iPhone.
45,870,878
Ive got multiple rows in a column that's 10 digits long, and need to take the 7 digits of the right and post in the next column/row beside it. Is there a way a generate this in a Macro? ``` 2300056711 0056711 2311080900 1080900 ```
2017/08/24
[ "https://Stackoverflow.com/questions/45870878", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8503682/" ]
Fairly simple RIGHT() function ``` =Right(A1,7) ``` [![enter image description here](https://i.stack.imgur.com/g77wc.png)](https://i.stack.imgur.com/g77wc.png)
Below formulas also retrieve the same 1) `=MID(A1,LEN(A1)-6,LEN(A1)-(LEN(A1)-7))` 2) `=SUBSTITUTE(A1,LEFT(A1,(LEN(A1)-7)),"")` **OP** [![enter image description here](https://i.stack.imgur.com/nW4ye.jpg)](https://i.stack.imgur.com/nW4ye.jpg)
32,089,741
Write a menu program in C++ that lets the user select from a list of options, and if the input is not one of the options, reprint the list. I have tried the following code but it is not giving the correct result. Please help. ``` #include <iostream> #include <string> using namespace std; int main() { string j; ...
2015/08/19
[ "https://Stackoverflow.com/questions/32089741", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
In line: ``` if(j == x) ``` you are comparing user input in `j` with entire string: ``` "1. Option 1" ``` What you want is to compare it with option number: ``` if(j == "1") ``` or: ``` else if(j.size() >= 1 && j[0] == x1[0]) { cout << "if - x1 = You have selected the option " << j; } ``` if you will ma...
Do something like ``` int MAX_OPTION = 3; // number of options int option = -1; while (option < 1 || option > MAX_OPTION) { // print the options... // get input and store into option } // continue with program after input checked ```
32,089,741
Write a menu program in C++ that lets the user select from a list of options, and if the input is not one of the options, reprint the list. I have tried the following code but it is not giving the correct result. Please help. ``` #include <iostream> #include <string> using namespace std; int main() { string j; ...
2015/08/19
[ "https://Stackoverflow.com/questions/32089741", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
In line: ``` if(j == x) ``` you are comparing user input in `j` with entire string: ``` "1. Option 1" ``` What you want is to compare it with option number: ``` if(j == "1") ``` or: ``` else if(j.size() >= 1 && j[0] == x1[0]) { cout << "if - x1 = You have selected the option " << j; } ``` if you will ma...
It can be something like that: ``` #include <iostream> using namespace std; int main() { cout << "Please choose one of them!" <<endl; cout << "asdf" << endl; cout << "sdfg" << endl; cout << "abcd" << endl; string choice; do { if ( choice == "" ) { cout << "Enter your choice: "; } else { ...
36,208,671
I am showing a content dialog on one of my sessionstateaware pages, I close the dialog fine and can reopen another on the same page as many times as I want. When I navigate away and come back and try to reopen my dialog, it blows up with this error: > > WinRT information: Only a single ContentDialog can be open at an...
2016/03/24
[ "https://Stackoverflow.com/questions/36208671", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3229682/" ]
You can traverse the list of arrays just once, **comparing the first array with all the other arrays**. If the first one is equal to all the others, then all arrays in the list are equal. Something like this will work: ``` arrays = [[1,3],[1,3],[1,3]] array0 = arrays.first arrays[1..-1].all? { |a| array0 == a } # => t...
``` [[1,3],[1,3],[1,3]].uniq.size == 1 #=> true [[1,3],[1,3],[1,4]].uniq.size == 1 #=> false ```
36,208,671
I am showing a content dialog on one of my sessionstateaware pages, I close the dialog fine and can reopen another on the same page as many times as I want. When I navigate away and come back and try to reopen my dialog, it blows up with this error: > > WinRT information: Only a single ContentDialog can be open at an...
2016/03/24
[ "https://Stackoverflow.com/questions/36208671", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3229682/" ]
You can traverse the list of arrays just once, **comparing the first array with all the other arrays**. If the first one is equal to all the others, then all arrays in the list are equal. Something like this will work: ``` arrays = [[1,3],[1,3],[1,3]] array0 = arrays.first arrays[1..-1].all? { |a| array0 == a } # => t...
``` array.each_cons(2).all?{|x, y| x == y} ```
36,208,671
I am showing a content dialog on one of my sessionstateaware pages, I close the dialog fine and can reopen another on the same page as many times as I want. When I navigate away and come back and try to reopen my dialog, it blows up with this error: > > WinRT information: Only a single ContentDialog can be open at an...
2016/03/24
[ "https://Stackoverflow.com/questions/36208671", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3229682/" ]
I was curious about the performance of each of the solutions here. Please be welcome to edit this post with your own results, if you like. In my tests, the difference between the approaches raised with the length of the list of arrays, so I preferably measured a long list of relatively short arrays. I always did a fe...
``` [[1,3],[1,3],[1,3]].uniq.size == 1 #=> true [[1,3],[1,3],[1,4]].uniq.size == 1 #=> false ```
36,208,671
I am showing a content dialog on one of my sessionstateaware pages, I close the dialog fine and can reopen another on the same page as many times as I want. When I navigate away and come back and try to reopen my dialog, it blows up with this error: > > WinRT information: Only a single ContentDialog can be open at an...
2016/03/24
[ "https://Stackoverflow.com/questions/36208671", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3229682/" ]
I was curious about the performance of each of the solutions here. Please be welcome to edit this post with your own results, if you like. In my tests, the difference between the approaches raised with the length of the list of arrays, so I preferably measured a long list of relatively short arrays. I always did a fe...
``` array.each_cons(2).all?{|x, y| x == y} ```
33,954,368
given an object file and address addr2line tool can relate it to a file and line number in the source code. I'd like to have the opposite. Given a line number and an object file I want to get a list of instruction addresses which correspond to a given line in the source code. I know that I can use objdump -DS and see...
2015/11/27
[ "https://Stackoverflow.com/questions/33954368", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1201416/" ]
The way to do it in a utility manner is with the following GDB cmd-line: ``` gdb ../main.o -ex "info line main.c:39" --batch Line 39 of "main.c" starts at address 0x36 <main+54> and ends at 0x5e <main+94>. ``` The GDB accepts either an object or an executable file compiled with debug info `(-g)`. Use GDB 7.6 and hi...
Read carefully the [documentation of *GDB*](https://sourceware.org/gdb/current/onlinedocs/gdb/index.html). If your executable has been built with debug information (all code compiled with `-g`), you could use [*stack* related](https://sourceware.org/gdb/current/onlinedocs/gdb/Stack.html) commands, [*machine code* relat...
876,887
I need to record a demo of our application. Can anyone recommend a good screen recorder? I have tried CamStudio, but it's throwing errors. Any other good free software I should try?
2009/05/18
[ "https://Stackoverflow.com/questions/876887", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22702/" ]
You can do it with [ScreenToaster](http://www.screentoaster.com/) without installing any software (kind of). Otherwise if you prefer a traditional application [Jing](http://www.jingproject.com/) and [Screen2EXE](http://www.screen-record.com/screen2exe.htm) are both free.
[Wink](http://www.debugmode.com/wink/) is freeware. From their homepage: > > Wink is a Tutorial and Presentation creation software, primarily aimed at creating tutorials on how to use software (like a tutor for MS-Word/Excel etc). Using Wink you can capture screenshots, add explanations boxes, buttons, titles etc and...
876,887
I need to record a demo of our application. Can anyone recommend a good screen recorder? I have tried CamStudio, but it's throwing errors. Any other good free software I should try?
2009/05/18
[ "https://Stackoverflow.com/questions/876887", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22702/" ]
try UVScreenCamera, i think it's normal
You can do it with [ScreenToaster](http://www.screentoaster.com/) without installing any software (kind of). Otherwise if you prefer a traditional application [Jing](http://www.jingproject.com/) and [Screen2EXE](http://www.screen-record.com/screen2exe.htm) are both free.
876,887
I need to record a demo of our application. Can anyone recommend a good screen recorder? I have tried CamStudio, but it's throwing errors. Any other good free software I should try?
2009/05/18
[ "https://Stackoverflow.com/questions/876887", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22702/" ]
try UVScreenCamera, i think it's normal
Camtasia studio does a great job. In the case the app is cross-platform (java, web-based) you can ask a pal with a Mac to use Screenium, Snapz Pro or ScreenFlow.
876,887
I need to record a demo of our application. Can anyone recommend a good screen recorder? I have tried CamStudio, but it's throwing errors. Any other good free software I should try?
2009/05/18
[ "https://Stackoverflow.com/questions/876887", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22702/" ]
Camtasia studio does a great job. In the case the app is cross-platform (java, web-based) you can ask a pal with a Mac to use Screenium, Snapz Pro or ScreenFlow.
You can do it with [ScreenToaster](http://www.screentoaster.com/) without installing any software (kind of). Otherwise if you prefer a traditional application [Jing](http://www.jingproject.com/) and [Screen2EXE](http://www.screen-record.com/screen2exe.htm) are both free.
876,887
I need to record a demo of our application. Can anyone recommend a good screen recorder? I have tried CamStudio, but it's throwing errors. Any other good free software I should try?
2009/05/18
[ "https://Stackoverflow.com/questions/876887", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22702/" ]
try UVScreenCamera, i think it's normal
[Wink](http://www.debugmode.com/wink/) is freeware. From their homepage: > > Wink is a Tutorial and Presentation creation software, primarily aimed at creating tutorials on how to use software (like a tutor for MS-Word/Excel etc). Using Wink you can capture screenshots, add explanations boxes, buttons, titles etc and...
876,887
I need to record a demo of our application. Can anyone recommend a good screen recorder? I have tried CamStudio, but it's throwing errors. Any other good free software I should try?
2009/05/18
[ "https://Stackoverflow.com/questions/876887", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22702/" ]
Camtasia studio does a great job. In the case the app is cross-platform (java, web-based) you can ask a pal with a Mac to use Screenium, Snapz Pro or ScreenFlow.
Static screen shots? Maybe Wink will work for you as well: [Problem‍​​ Steps Recorder tool to make tutorials](https://stackoverflow.com/questions/876889/steps-recorder-tool-to-make-tutorials)
876,887
I need to record a demo of our application. Can anyone recommend a good screen recorder? I have tried CamStudio, but it's throwing errors. Any other good free software I should try?
2009/05/18
[ "https://Stackoverflow.com/questions/876887", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22702/" ]
Camtasia studio does a great job. In the case the app is cross-platform (java, web-based) you can ask a pal with a Mac to use Screenium, Snapz Pro or ScreenFlow.
[Wink](http://www.debugmode.com/wink/) is freeware. From their homepage: > > Wink is a Tutorial and Presentation creation software, primarily aimed at creating tutorials on how to use software (like a tutor for MS-Word/Excel etc). Using Wink you can capture screenshots, add explanations boxes, buttons, titles etc and...
876,887
I need to record a demo of our application. Can anyone recommend a good screen recorder? I have tried CamStudio, but it's throwing errors. Any other good free software I should try?
2009/05/18
[ "https://Stackoverflow.com/questions/876887", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22702/" ]
Camtasia studio does a great job. In the case the app is cross-platform (java, web-based) you can ask a pal with a Mac to use Screenium, Snapz Pro or ScreenFlow.
There are lots of screen recording tools around, both free and professional ones, but I haven’t seen anything like ScreenToaster before. It's very nice applications for screen recording.
876,887
I need to record a demo of our application. Can anyone recommend a good screen recorder? I have tried CamStudio, but it's throwing errors. Any other good free software I should try?
2009/05/18
[ "https://Stackoverflow.com/questions/876887", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22702/" ]
You can do it with [ScreenToaster](http://www.screentoaster.com/) without installing any software (kind of). Otherwise if you prefer a traditional application [Jing](http://www.jingproject.com/) and [Screen2EXE](http://www.screen-record.com/screen2exe.htm) are both free.
There are lots of screen recording tools around, both free and professional ones, but I haven’t seen anything like ScreenToaster before. It's very nice applications for screen recording.
876,887
I need to record a demo of our application. Can anyone recommend a good screen recorder? I have tried CamStudio, but it's throwing errors. Any other good free software I should try?
2009/05/18
[ "https://Stackoverflow.com/questions/876887", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22702/" ]
try UVScreenCamera, i think it's normal
Static screen shots? Maybe Wink will work for you as well: [Problem‍​​ Steps Recorder tool to make tutorials](https://stackoverflow.com/questions/876889/steps-recorder-tool-to-make-tutorials)
60,222,371
I'm unable to click hyperlink in UIAlertController. I want to open the external browser on hyperlink click. ``` -(void)viewDidAppear:(BOOL) animated { NSString *htmlString = @"Welcom to AlertView for more information <A href=\"https://www.google.com\"> Click Here </A>"; UIAlertController *alert = [UIAlertContr...
2020/02/14
[ "https://Stackoverflow.com/questions/60222371", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1216094/" ]
> > How can I configure a board in ADO DevOps that behaves like the current board but at the task instead of the user story level? > > > The Boards and Backlogs are for Requirement backlog level work items which is the User Story in [Agile process](https://learn.microsoft.com/en-us/azure/devops/boards/get-started/...
Honestly if Task and User Story follow the basic same States and swim lanes in Agile Process, I dont see a point why they both cannot be present in the Taskboard. This might make sense, if the developer/QA is supposed to work at the Task level, and the Product Owner takes care of moving the User Story. But for someone...
60,222,371
I'm unable to click hyperlink in UIAlertController. I want to open the external browser on hyperlink click. ``` -(void)viewDidAppear:(BOOL) animated { NSString *htmlString = @"Welcom to AlertView for more information <A href=\"https://www.google.com\"> Click Here </A>"; UIAlertController *alert = [UIAlertContr...
2020/02/14
[ "https://Stackoverflow.com/questions/60222371", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1216094/" ]
> > How can I configure a board in ADO DevOps that behaves like the current board but at the task instead of the user story level? > > > The Boards and Backlogs are for Requirement backlog level work items which is the User Story in [Agile process](https://learn.microsoft.com/en-us/azure/devops/boards/get-started/...
There's no such thing as "The Agile Process". Agile is a set of principles for software development. <http://agilemanifesto.org/principles.html>. Several development methodologies exist that support these principles, including Scrum and Kanban. In their infinite wisdom, Microsoft decided to implement an "Agile Process...
7,381,865
I'm storing the user's timezone as a decimal in the session. For instance, if the user is in the EST timezone, I'd have ``` UserTimeZone = -5.00; ``` The data in the database is stored in UTC, so I want to calculate the beginning and the end of the day for that user so that when the user wants his data for a specif...
2011/09/11
[ "https://Stackoverflow.com/questions/7381865", "https://Stackoverflow.com", "https://Stackoverflow.com/users/565968/" ]
I would recommend adding a timezone to the users settings and storing that. Timezones have different times depending on the time of year. you can provide a list of time zones for the user to choose from by using the [TimeZoneInfo.GetSystemTimeZones](http://msdn.microsoft.com/en-us/library/system.timezoneinfo.getsystemt...
You need time-zone file <http://www.twinsun.com/tz/tz-link.htm> `Record all you time in UTC/GMT.` Day Light saving is not consistent, countries change their DLS rule. Hence your application will need up-to-date Tz file at all the time. Your user should choose `Time-Zone name` when signing up and not time-offset...
7,381,865
I'm storing the user's timezone as a decimal in the session. For instance, if the user is in the EST timezone, I'd have ``` UserTimeZone = -5.00; ``` The data in the database is stored in UTC, so I want to calculate the beginning and the end of the day for that user so that when the user wants his data for a specif...
2011/09/11
[ "https://Stackoverflow.com/questions/7381865", "https://Stackoverflow.com", "https://Stackoverflow.com/users/565968/" ]
The correct answer is what everyone has told you to do - use the TimeZone APIs in the framework. But prior to .NET 3.5 the TimeZoneInfo APIs didnt exist. If you really don't want to use the APIS, or you are using something prior to .NET 3.5, you can find all the timezone info in the registry at `HKLM/Software/Microso...
You shouldn't be doing any of this. You should just use the TimeZoneInfo built into .net. For example: ``` TimeZoneInfo.ConvertTimeToUtc(); TimeZoneInfo.ConvertTimeFromUtc(); ``` Since you don't seem able to lookup API Parameters, here you go: <http://msdn.microsoft.com/en-us/library/system.timezoneinfo.converttim...
7,381,865
I'm storing the user's timezone as a decimal in the session. For instance, if the user is in the EST timezone, I'd have ``` UserTimeZone = -5.00; ``` The data in the database is stored in UTC, so I want to calculate the beginning and the end of the day for that user so that when the user wants his data for a specif...
2011/09/11
[ "https://Stackoverflow.com/questions/7381865", "https://Stackoverflow.com", "https://Stackoverflow.com/users/565968/" ]
The accepted answer doesn't consider that there are time zones that have DST spring-forward transitions right at midnight, and thus the start of the day might not be `00:00` but rather `01:00`. Iran, Cuba, and Brazil (some parts) are good examples. Additionally, some time zones may have fall-back transitions that give...
You shouldn't be doing any of this. You should just use the TimeZoneInfo built into .net. For example: ``` TimeZoneInfo.ConvertTimeToUtc(); TimeZoneInfo.ConvertTimeFromUtc(); ``` Since you don't seem able to lookup API Parameters, here you go: <http://msdn.microsoft.com/en-us/library/system.timezoneinfo.converttim...
7,381,865
I'm storing the user's timezone as a decimal in the session. For instance, if the user is in the EST timezone, I'd have ``` UserTimeZone = -5.00; ``` The data in the database is stored in UTC, so I want to calculate the beginning and the end of the day for that user so that when the user wants his data for a specif...
2011/09/11
[ "https://Stackoverflow.com/questions/7381865", "https://Stackoverflow.com", "https://Stackoverflow.com/users/565968/" ]
To make such calculations you will need to use the `TimeZoneInfo` and `DateTimeOffset` classes. First of all, we need to get a `TimeZoneInfo` instance for both the local time and the user's local time: ``` var localTimezone = TimeZoneInfo.Local; var userTimezone = TimeZoneInfo.FindSystemTimeZoneById("Eastern Standard...
The correct answer is what everyone has told you to do - use the TimeZone APIs in the framework. But prior to .NET 3.5 the TimeZoneInfo APIs didnt exist. If you really don't want to use the APIS, or you are using something prior to .NET 3.5, you can find all the timezone info in the registry at `HKLM/Software/Microso...
7,381,865
I'm storing the user's timezone as a decimal in the session. For instance, if the user is in the EST timezone, I'd have ``` UserTimeZone = -5.00; ``` The data in the database is stored in UTC, so I want to calculate the beginning and the end of the day for that user so that when the user wants his data for a specif...
2011/09/11
[ "https://Stackoverflow.com/questions/7381865", "https://Stackoverflow.com", "https://Stackoverflow.com/users/565968/" ]
You will need to use JavaScript to gather the necessary information from the user's browser - for this part see <http://www.onlineaspect.com/2007/06/08/auto-detect-a-time-zone-with-javascript/> When you have this information you can setup `UserTimeZone` (btw this should NOT be an `int` as there are timezones with frac...
You need time-zone file <http://www.twinsun.com/tz/tz-link.htm> `Record all you time in UTC/GMT.` Day Light saving is not consistent, countries change their DLS rule. Hence your application will need up-to-date Tz file at all the time. Your user should choose `Time-Zone name` when signing up and not time-offset...
7,381,865
I'm storing the user's timezone as a decimal in the session. For instance, if the user is in the EST timezone, I'd have ``` UserTimeZone = -5.00; ``` The data in the database is stored in UTC, so I want to calculate the beginning and the end of the day for that user so that when the user wants his data for a specif...
2011/09/11
[ "https://Stackoverflow.com/questions/7381865", "https://Stackoverflow.com", "https://Stackoverflow.com/users/565968/" ]
As BrokenGlass mentioned, a simple offset is not enough information to determine the handling of daylight hours, since different countries in each zone might handle daylight savings differently. The C# `TimeZone` class is more specific, and has support for daylight savings (check details on [MSDN](http://msdn.microsoft...
You shouldn't be doing any of this. You should just use the TimeZoneInfo built into .net. For example: ``` TimeZoneInfo.ConvertTimeToUtc(); TimeZoneInfo.ConvertTimeFromUtc(); ``` Since you don't seem able to lookup API Parameters, here you go: <http://msdn.microsoft.com/en-us/library/system.timezoneinfo.converttim...
7,381,865
I'm storing the user's timezone as a decimal in the session. For instance, if the user is in the EST timezone, I'd have ``` UserTimeZone = -5.00; ``` The data in the database is stored in UTC, so I want to calculate the beginning and the end of the day for that user so that when the user wants his data for a specif...
2011/09/11
[ "https://Stackoverflow.com/questions/7381865", "https://Stackoverflow.com", "https://Stackoverflow.com/users/565968/" ]
To make such calculations you will need to use the `TimeZoneInfo` and `DateTimeOffset` classes. First of all, we need to get a `TimeZoneInfo` instance for both the local time and the user's local time: ``` var localTimezone = TimeZoneInfo.Local; var userTimezone = TimeZoneInfo.FindSystemTimeZoneById("Eastern Standard...
I would recommend adding a timezone to the users settings and storing that. Timezones have different times depending on the time of year. you can provide a list of time zones for the user to choose from by using the [TimeZoneInfo.GetSystemTimeZones](http://msdn.microsoft.com/en-us/library/system.timezoneinfo.getsystemt...
7,381,865
I'm storing the user's timezone as a decimal in the session. For instance, if the user is in the EST timezone, I'd have ``` UserTimeZone = -5.00; ``` The data in the database is stored in UTC, so I want to calculate the beginning and the end of the day for that user so that when the user wants his data for a specif...
2011/09/11
[ "https://Stackoverflow.com/questions/7381865", "https://Stackoverflow.com", "https://Stackoverflow.com/users/565968/" ]
To make such calculations you will need to use the `TimeZoneInfo` and `DateTimeOffset` classes. First of all, we need to get a `TimeZoneInfo` instance for both the local time and the user's local time: ``` var localTimezone = TimeZoneInfo.Local; var userTimezone = TimeZoneInfo.FindSystemTimeZoneById("Eastern Standard...
You will need to use JavaScript to gather the necessary information from the user's browser - for this part see <http://www.onlineaspect.com/2007/06/08/auto-detect-a-time-zone-with-javascript/> When you have this information you can setup `UserTimeZone` (btw this should NOT be an `int` as there are timezones with frac...
7,381,865
I'm storing the user's timezone as a decimal in the session. For instance, if the user is in the EST timezone, I'd have ``` UserTimeZone = -5.00; ``` The data in the database is stored in UTC, so I want to calculate the beginning and the end of the day for that user so that when the user wants his data for a specif...
2011/09/11
[ "https://Stackoverflow.com/questions/7381865", "https://Stackoverflow.com", "https://Stackoverflow.com/users/565968/" ]
You shouldn't be doing any of this. You should just use the TimeZoneInfo built into .net. For example: ``` TimeZoneInfo.ConvertTimeToUtc(); TimeZoneInfo.ConvertTimeFromUtc(); ``` Since you don't seem able to lookup API Parameters, here you go: <http://msdn.microsoft.com/en-us/library/system.timezoneinfo.converttim...
You need time-zone file <http://www.twinsun.com/tz/tz-link.htm> `Record all you time in UTC/GMT.` Day Light saving is not consistent, countries change their DLS rule. Hence your application will need up-to-date Tz file at all the time. Your user should choose `Time-Zone name` when signing up and not time-offset...
7,381,865
I'm storing the user's timezone as a decimal in the session. For instance, if the user is in the EST timezone, I'd have ``` UserTimeZone = -5.00; ``` The data in the database is stored in UTC, so I want to calculate the beginning and the end of the day for that user so that when the user wants his data for a specif...
2011/09/11
[ "https://Stackoverflow.com/questions/7381865", "https://Stackoverflow.com", "https://Stackoverflow.com/users/565968/" ]
To make such calculations you will need to use the `TimeZoneInfo` and `DateTimeOffset` classes. First of all, we need to get a `TimeZoneInfo` instance for both the local time and the user's local time: ``` var localTimezone = TimeZoneInfo.Local; var userTimezone = TimeZoneInfo.FindSystemTimeZoneById("Eastern Standard...
You shouldn't be doing any of this. You should just use the TimeZoneInfo built into .net. For example: ``` TimeZoneInfo.ConvertTimeToUtc(); TimeZoneInfo.ConvertTimeFromUtc(); ``` Since you don't seem able to lookup API Parameters, here you go: <http://msdn.microsoft.com/en-us/library/system.timezoneinfo.converttim...
57,216,162
I'm creating a custom plugin for WordPress and I'm trying to execute `javascript` file only once right after plugin activations. I'm using `register_activation_hook()` and `wp_enqueue_script()` to enqueue file only once when the plugin is activated. There are no errors in the code since the `javascript` code works ...
2019/07/26
[ "https://Stackoverflow.com/questions/57216162", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5666464/" ]
Depending upon the type of sharepoint api (Object model/csom/jsom) you are using you would form an appropriate caml query and pass it to sharepoint to get the results.
You did not mention a SharePoint version, so I'll assume it is not SharePoint Online using the Modern UI. I won't do your homework for you... but here's a hint: Web part page and Filter web parts.
44,090,137
In this example I just want to remove the word "a" not letter a in all words but regex doesn't seem to work. ``` var str = "A brown fox always jumps over the orange apple in a weird way"; var res = str.replace(/a/g, ""); ``` //result is brown fox lwys jumps over the ornge pple in a weird wy //but i'd just like br...
2017/05/20
[ "https://Stackoverflow.com/questions/44090137", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7517654/" ]
You can use [Word Boundaries](http://www.regular-expressions.info/wordboundaries.html) to find only the word "a". For example; ``` var str = "A brown fox always jumps over the orange apple in a weird way"; var res = str.replace(/\ba\b/g, ""); ```
``` var res = (str.charAt(0)); ``` With this, you select the first character of the string. Is that what you want ?
44,090,137
In this example I just want to remove the word "a" not letter a in all words but regex doesn't seem to work. ``` var str = "A brown fox always jumps over the orange apple in a weird way"; var res = str.replace(/a/g, ""); ``` //result is brown fox lwys jumps over the ornge pple in a weird wy //but i'd just like br...
2017/05/20
[ "https://Stackoverflow.com/questions/44090137", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7517654/" ]
You can use [Word Boundaries](http://www.regular-expressions.info/wordboundaries.html) to find only the word "a". For example; ``` var str = "A brown fox always jumps over the orange apple in a weird way"; var res = str.replace(/\ba\b/g, ""); ```
Use `\b` to check for word boundaries. Also use `i` switch to make case insensitive match. Try ```js var str = "A brown fox always jumps over the orange apple in a weird way"; console.log(str.replace(/\ba\b/ig, "").trim()); ```
44,090,137
In this example I just want to remove the word "a" not letter a in all words but regex doesn't seem to work. ``` var str = "A brown fox always jumps over the orange apple in a weird way"; var res = str.replace(/a/g, ""); ``` //result is brown fox lwys jumps over the ornge pple in a weird wy //but i'd just like br...
2017/05/20
[ "https://Stackoverflow.com/questions/44090137", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7517654/" ]
Use `\b` to check for word boundaries. Also use `i` switch to make case insensitive match. Try ```js var str = "A brown fox always jumps over the orange apple in a weird way"; console.log(str.replace(/\ba\b/ig, "").trim()); ```
``` var res = (str.charAt(0)); ``` With this, you select the first character of the string. Is that what you want ?
33,948,612
i have in a table of my database 100 records of locations, and i need for example divide in 4 columns with ul list where each ul/columns have 25 records, but im not quite getting it working, here is my code: ``` $sql = "SELECT * FROM districts"; $consulta = mysql_query($sql); $beginTag = ' <div class="four columns...
2015/11/26
[ "https://Stackoverflow.com/questions/33948612", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5103520/" ]
There is no attribute called `paragraph_id` in your button tags, so your `$(this).attr('paragraph_id')` returns `undefined`. Since `paragraph_id` is not a standard HTML attribute, I advise against simply adding it. Instead just add to each button a data-attribute like so: ``` <button class="learn-more" data-paragraph...
``` $(document).ready(function () { $('elem').click(function(){ var getIndex = $('elem').index(this); $('elem2').hide(); $('elem2:eq"' + getIndex + '"').show(); }); }); ``` Should work, hope it is exactly what you want :)
37,379,101
I want to read a String from database and replace the placeholder by converting it to a GString. Can I do this with Eval? Any other ideas? ``` String stringFromDatabase = 'Hello ${name}!' String name = 'world' assert 'Hello world!'== TODO ```
2016/05/22
[ "https://Stackoverflow.com/questions/37379101", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6368285/" ]
You can use the Template framework in Groovy, so doing this solves your problem: ``` String stringFromDatabase = 'Hello ${name}!' String name = 'world' def engine = new groovy.text.SimpleTemplateEngine() assert 'Hello world!'== engine.createTemplate(stringFromDatabase).make([name:name]).toString() ``` You can find ...
You should be using double quoted String literal if you want to use place holders. The following should work: ``` String name = 'world' String stringFromDatabase = "Hello ${name}!" //use double quotes assert 'Hello world!' == stringFromDatabase ``` See the [official Groovy documentation about Strings](http://docs....
37,379,101
I want to read a String from database and replace the placeholder by converting it to a GString. Can I do this with Eval? Any other ideas? ``` String stringFromDatabase = 'Hello ${name}!' String name = 'world' assert 'Hello world!'== TODO ```
2016/05/22
[ "https://Stackoverflow.com/questions/37379101", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6368285/" ]
I solved this with [Eval](http://docs.groovy-lang.org/latest/html/api/groovy/util/Eval.html): ``` String stringFromDatabase = 'Hello ${name}!' String name = 'world' assert 'Hello world!' == Eval.me('name', name, '"' + stringFromDatabase + '"') ```
You should be using double quoted String literal if you want to use place holders. The following should work: ``` String name = 'world' String stringFromDatabase = "Hello ${name}!" //use double quotes assert 'Hello world!' == stringFromDatabase ``` See the [official Groovy documentation about Strings](http://docs....
37,379,101
I want to read a String from database and replace the placeholder by converting it to a GString. Can I do this with Eval? Any other ideas? ``` String stringFromDatabase = 'Hello ${name}!' String name = 'world' assert 'Hello world!'== TODO ```
2016/05/22
[ "https://Stackoverflow.com/questions/37379101", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6368285/" ]
This also uses the Templates as Jacob's answer, but tries to resolve binding from current variables. Useful if you don't know what value you are replacing: ``` String stringFromDatabase = 'Hello ${name}!' // variables w/o type or def keyword end up in this.binding.variables name = 'world' def engine = new groovy.text...
You should be using double quoted String literal if you want to use place holders. The following should work: ``` String name = 'world' String stringFromDatabase = "Hello ${name}!" //use double quotes assert 'Hello world!' == stringFromDatabase ``` See the [official Groovy documentation about Strings](http://docs....
37,379,101
I want to read a String from database and replace the placeholder by converting it to a GString. Can I do this with Eval? Any other ideas? ``` String stringFromDatabase = 'Hello ${name}!' String name = 'world' assert 'Hello world!'== TODO ```
2016/05/22
[ "https://Stackoverflow.com/questions/37379101", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6368285/" ]
You can use the Template framework in Groovy, so doing this solves your problem: ``` String stringFromDatabase = 'Hello ${name}!' String name = 'world' def engine = new groovy.text.SimpleTemplateEngine() assert 'Hello world!'== engine.createTemplate(stringFromDatabase).make([name:name]).toString() ``` You can find ...
I solved this with [Eval](http://docs.groovy-lang.org/latest/html/api/groovy/util/Eval.html): ``` String stringFromDatabase = 'Hello ${name}!' String name = 'world' assert 'Hello world!' == Eval.me('name', name, '"' + stringFromDatabase + '"') ```
37,379,101
I want to read a String from database and replace the placeholder by converting it to a GString. Can I do this with Eval? Any other ideas? ``` String stringFromDatabase = 'Hello ${name}!' String name = 'world' assert 'Hello world!'== TODO ```
2016/05/22
[ "https://Stackoverflow.com/questions/37379101", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6368285/" ]
You can use the Template framework in Groovy, so doing this solves your problem: ``` String stringFromDatabase = 'Hello ${name}!' String name = 'world' def engine = new groovy.text.SimpleTemplateEngine() assert 'Hello world!'== engine.createTemplate(stringFromDatabase).make([name:name]).toString() ``` You can find ...
This also uses the Templates as Jacob's answer, but tries to resolve binding from current variables. Useful if you don't know what value you are replacing: ``` String stringFromDatabase = 'Hello ${name}!' // variables w/o type or def keyword end up in this.binding.variables name = 'world' def engine = new groovy.text...
37,379,101
I want to read a String from database and replace the placeholder by converting it to a GString. Can I do this with Eval? Any other ideas? ``` String stringFromDatabase = 'Hello ${name}!' String name = 'world' assert 'Hello world!'== TODO ```
2016/05/22
[ "https://Stackoverflow.com/questions/37379101", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6368285/" ]
I solved this with [Eval](http://docs.groovy-lang.org/latest/html/api/groovy/util/Eval.html): ``` String stringFromDatabase = 'Hello ${name}!' String name = 'world' assert 'Hello world!' == Eval.me('name', name, '"' + stringFromDatabase + '"') ```
This also uses the Templates as Jacob's answer, but tries to resolve binding from current variables. Useful if you don't know what value you are replacing: ``` String stringFromDatabase = 'Hello ${name}!' // variables w/o type or def keyword end up in this.binding.variables name = 'world' def engine = new groovy.text...
56,542
I have a Metz AF 52 flash and a Nikon D5200 camera, which has no wireless commander. Will a Yongnuo trigger work?
2014/11/08
[ "https://photo.stackexchange.com/questions/56542", "https://photo.stackexchange.com", "https://photo.stackexchange.com/users/34501/" ]
It depends on your definition of "work" and which Yongnuo triggers. If you are thinking of the "manual" triggers (RF-602, RF-603, RF-603II, RF-605), then yes, they will work, but all they can do is trigger the flash with correct timing. You won't have any of the other features that are probably why you're paying extra...
Please note that the Metz Mecablitz 64 AF-1 flash has a radio receiver, but it does NOT work with the YN transmitter. According to the flash manual (page 191, "Remote Slave Flash Mode"), it's compatible with the Nikon "Advanced Wireless Lighting" system, which apparently is different than the YN's system. BTW, th...
56,542
I have a Metz AF 52 flash and a Nikon D5200 camera, which has no wireless commander. Will a Yongnuo trigger work?
2014/11/08
[ "https://photo.stackexchange.com/questions/56542", "https://photo.stackexchange.com", "https://photo.stackexchange.com/users/34501/" ]
I'm using a Nikon 750 with a Yongnuo YN622n-TX transceiver attached to the hotshoe. I have a Metz 44 AF-1 attached to a YN622n II and set to TTL. When using Nikon cameras, the flash must be set to TTL! Everything works fine. I set the zoom on the TX to AU (automatic) and the zoom on the Metz matches the zoom on my le...
Please note that the Metz Mecablitz 64 AF-1 flash has a radio receiver, but it does NOT work with the YN transmitter. According to the flash manual (page 191, "Remote Slave Flash Mode"), it's compatible with the Nikon "Advanced Wireless Lighting" system, which apparently is different than the YN's system. BTW, th...
66,825,229
Here are some arrays of values: ``` values = [ [1,2,3], [2,3,4], [8,9,10], [9,10,11], [13,14,15] ]; ``` I want to create new numerically sorted arrays of the union of arrays' values when there is an intersection of the values of two or more arrays. Values in these new sorted arrays will be unique. If an ...
2021/03/26
[ "https://Stackoverflow.com/questions/66825229", "https://Stackoverflow.com", "https://Stackoverflow.com/users/62255/" ]
Here is an edited snippet in response to the comments using [`.reduceRight()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduceRight), seeding the accumulator with a copy of the passed array, and still using `some()` and `includes()` to find duplicates. `reduceRight()` iter...
To see if 2 arrays intersect, a nice an simple way is to compare the set of both arrays together's size, with each array's set size, and if there different we know they intersect. Below is an example.. ```js const values = [ [1,2,3], [8,9,10], [2,3,4], [9,10,11], [13,14,15] ]; function arrayItersect(a,b) {...
66,825,229
Here are some arrays of values: ``` values = [ [1,2,3], [2,3,4], [8,9,10], [9,10,11], [13,14,15] ]; ``` I want to create new numerically sorted arrays of the union of arrays' values when there is an intersection of the values of two or more arrays. Values in these new sorted arrays will be unique. If an ...
2021/03/26
[ "https://Stackoverflow.com/questions/66825229", "https://Stackoverflow.com", "https://Stackoverflow.com/users/62255/" ]
To see if 2 arrays intersect, a nice an simple way is to compare the set of both arrays together's size, with each array's set size, and if there different we know they intersect. Below is an example.. ```js const values = [ [1,2,3], [8,9,10], [2,3,4], [9,10,11], [13,14,15] ]; function arrayItersect(a,b) {...
Use `for-loop` and for each sub array check with previous array (last) whether it has intersection. If intersection, add the merged array to result. ```js values = [ [1, 2, 3], [2, 3, 4], [8, 9, 10], [9, 10, 11], [13, 14, 15], ]; const intersect = (arr1, arr2) => { const both = [...arr1, ...arr2]; const...
66,825,229
Here are some arrays of values: ``` values = [ [1,2,3], [2,3,4], [8,9,10], [9,10,11], [13,14,15] ]; ``` I want to create new numerically sorted arrays of the union of arrays' values when there is an intersection of the values of two or more arrays. Values in these new sorted arrays will be unique. If an ...
2021/03/26
[ "https://Stackoverflow.com/questions/66825229", "https://Stackoverflow.com", "https://Stackoverflow.com/users/62255/" ]
Here is an edited snippet in response to the comments using [`.reduceRight()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduceRight), seeding the accumulator with a copy of the passed array, and still using `some()` and `includes()` to find duplicates. `reduceRight()` iter...
Use `for-loop` and for each sub array check with previous array (last) whether it has intersection. If intersection, add the merged array to result. ```js values = [ [1, 2, 3], [2, 3, 4], [8, 9, 10], [9, 10, 11], [13, 14, 15], ]; const intersect = (arr1, arr2) => { const both = [...arr1, ...arr2]; const...
5,184,421
I am trying to provide custom views to a UIPickerView so that the entire background of each row is one of two colours (none of which are white). I have been able to provide these custom views ok, with the colours I want, but I can't make the view fill the entire 'space' for the row. The test code below is trying to a...
2011/03/03
[ "https://Stackoverflow.com/questions/5184421", "https://Stackoverflow.com", "https://Stackoverflow.com/users/643408/" ]
Ok, I have managed to at least 'center' the view. I had to add a subview to the view that is returned from viewForRow and try a few values for the origin.x value like so: ``` - (UIView *)pickerView:(UIPickerView *)pickerView viewForRow:(NSInteger)row forComponent:(NSInteger)component reusingView:(UIView *)view { ...
``` - (UIView *)pickerView:(UIPickerView *)apickerView viewForRow:(NSInteger)row forComponent:(NSInteger)component reusingView:(UIView *)view { UIView *rowView = nil; if(view==nil) { rowView = [[[UIView alloc] initWithFrame:CGRectMake(0, 0, 320, 44)] autorelease]; rowView.backgroundColor = [UI...
56,836,806
I'm trying to move a game object, pokemon, from the centre of the screen to the left of the screen (only along the horizontal axis), smoothly. However, it keeps teleporting instantly. **WHAT THE CODE DOES** = Changes from one sprite to another sprite in an endless loop. When it changes to another sprite, it also chang...
2019/07/01
[ "https://Stackoverflow.com/questions/56836806", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11724198/" ]
> > Is there a way, with local VSCode, to develop in a remote container, > without local installation of docker (obviously with docker installed > on the host)? > > > No. In the 'advanced containers' docs it says > > You can use the Docker CLI locally with a remote Docker host by > setting local environment ...
I just achieved this using the solution linked by @Tom (but with admin rights, I didn't test it without them) I downloaded the docker-cli from the [docker-cli-builder github repo](https://github.com/StefanScherer/docker-cli-builder/releases) and created the docker context successfully. After selecting it in VSCode, i...
56,836,806
I'm trying to move a game object, pokemon, from the centre of the screen to the left of the screen (only along the horizontal axis), smoothly. However, it keeps teleporting instantly. **WHAT THE CODE DOES** = Changes from one sprite to another sprite in an endless loop. When it changes to another sprite, it also chang...
2019/07/01
[ "https://Stackoverflow.com/questions/56836806", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11724198/" ]
> > Is there a way, with local VSCode, to develop in a remote container, > without local installation of docker (obviously with docker installed > on the host)? > > > No. In the 'advanced containers' docs it says > > You can use the Docker CLI locally with a remote Docker host by > setting local environment ...
We have build a small tool called [LiveSync](https://github.com/zauberzeug/livesync) which could solve your problem. You simply run ``` python3 -m pip install livesync livesync <virtual-machine> ``` from inside your vscode workspace. It will start watching for changes and push them immediately to the remote. Hence y...
50,851,167
The php below is run from a cronjob each night. BUT it is still sending mail despite having nothing to send. So, if the $initialsearch is empty then no mail should be send. I have tried different methods to stop this from reversing my if statement at the end to trying to count the rows from the initialsearch but every...
2018/06/14
[ "https://Stackoverflow.com/questions/50851167", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2599779/" ]
There is API to get the current folder of a Function: ``` public static HttpResponseMessage Run(HttpRequestMessage req, ExecutionContext context) { var message = $"You are in {context.FunctionDirectory}"; return req.CreateResponse(System.Net.HttpStatusCode.OK, message ); } ``` See [documentation](https://git...
To get the current folder of the function, we can do as below: ``` string currentDirectory = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); ``` Screenshot of result: [![enter image description here](https://i.stack.imgur.com/SGqQw.png)](https://i.stack.imgur.com/SGqQw.png)
38,685,151
I have a HashMap(String,HashMap(String,Object)) in one of my activity. How do I send this HashMap to another activity via intents How to add this HashMap to intent extras?
2016/07/31
[ "https://Stackoverflow.com/questions/38685151", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6645838/" ]
Sending HashMap ``` HashMap<String, Object> hashmapobject =new HashMap<>(); HashMap<String, Object> newhashMap=new HashMap<>(); hashmapobject.put("key",newhashMap); Intent intent = new Intent(SenderActivity.this, NextActivity.class); intent.putExtra("hashMapKey", hashmapobject); startActivity(intent); ``` Receiving...
There could be multiple approaches to your problem and each one depends on what datatype you are storing in `map`. Easiest approach is to use JSONObject from json.org pass it as String and while receiving convert it back to JSON. JSONObject uses a LinkedHashMap inside thus you will be able to use the features of `HashM...
38,685,151
I have a HashMap(String,HashMap(String,Object)) in one of my activity. How do I send this HashMap to another activity via intents How to add this HashMap to intent extras?
2016/07/31
[ "https://Stackoverflow.com/questions/38685151", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6645838/" ]
Sending HashMap ``` HashMap<String, Object> hashmapobject =new HashMap<>(); HashMap<String, Object> newhashMap=new HashMap<>(); hashmapobject.put("key",newhashMap); Intent intent = new Intent(SenderActivity.this, NextActivity.class); intent.putExtra("hashMapKey", hashmapobject); startActivity(intent); ``` Receiving...
Hi you can use Parcelable : Write class like this : ``` public class Person implements Parcelable { String name; int age; Date brithDate; public Person(String name, int age, Date brithDate) { this.name = name; this.age = age; this.brithDate = brithDate; } @Override public int describeContents() { re...
40,309,192
In spark2.0, I have two dataframes and I need to first join them and do a reduceByKey to aggregate the data. I always got OOM in executor. Thanks in advance. Data ---- d1 (1G, 500 million rows, cached, partitioned by col id2) ``` id1 id2 1 1 1 3 1 4 2 0 2 7 ... ``` d2 (160G, 2 million rows, cached, parti...
2016/10/28
[ "https://Stackoverflow.com/questions/40309192", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1865836/" ]
Here's something to try: reduce your executor size by a bit. You've currently got: ``` --executor-memory 48G --executor-cores 15 ``` Give this a go: ``` --executor-memory 16G --executor-cores 5 ``` Smaller executor size seems to be optimal for a variety of reasons. One of these is that java heap size greater than...
I got the same problem, but I searched many answers which can not solve my problem. eventually, I debug my code step by step. I find the problem that caused by the data size is not balanced for each partition. just do `df_rdd.repartition(nums)`
128,152
I recently discovered that an acquaintance of mine (Bob) might be applying for a position in the same group that I'm in. While I am on good terms with Bob, he is *not* very personable and I do *not* want to be working with him. Here is the situation: * Bob already works in the same (large) company as me, in a differ...
2019/02/05
[ "https://workplace.stackexchange.com/questions/128152", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/99171/" ]
> > Is it appropriate to approach my boss (or someone else? HR?) and express my concerns? > > > **In short, no.** Unless you are in a position to approve or make recommendations for new team members, I would stay out of it, especially since Bob has not officially applied. You may be entirely correct about Bob, b...
The answer is simple. * You never managed him, * you never worked with him in *professional capacity* ("We occasionally chat on the company messaging program. We talk outside of work every once in a while" is not "work") and * you are not in-charge of the hiring process. Thus ***you never get to pass comments, let a...
128,152
I recently discovered that an acquaintance of mine (Bob) might be applying for a position in the same group that I'm in. While I am on good terms with Bob, he is *not* very personable and I do *not* want to be working with him. Here is the situation: * Bob already works in the same (large) company as me, in a differ...
2019/02/05
[ "https://workplace.stackexchange.com/questions/128152", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/99171/" ]
> > Is it appropriate to approach my boss (or someone else? HR?) and express my concerns? > > > **In short, no.** Unless you are in a position to approve or make recommendations for new team members, I would stay out of it, especially since Bob has not officially applied. You may be entirely correct about Bob, b...
It would be very brave to do so, and I mean brave in the exact same way a British MP means it when referring to another MP. Not only would giving such an action be inappropriate, it would reflect far worse on you than on "bob". If I were approached by someone talking down about another employee, I'd lose all respect ...
128,152
I recently discovered that an acquaintance of mine (Bob) might be applying for a position in the same group that I'm in. While I am on good terms with Bob, he is *not* very personable and I do *not* want to be working with him. Here is the situation: * Bob already works in the same (large) company as me, in a differ...
2019/02/05
[ "https://workplace.stackexchange.com/questions/128152", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/99171/" ]
> > Is it appropriate to approach my boss (or someone else? HR?) and express my concerns? > > > **In short, no.** Unless you are in a position to approve or make recommendations for new team members, I would stay out of it, especially since Bob has not officially applied. You may be entirely correct about Bob, b...
Approaching your boss with this concern when you only speculate about him being interested in joining your team is a social no-go. However, in many companies the team is asked for an opinion on a new candidate to join them in the hope to keep team spirits high and have teams that like working with each other. If your ...
128,152
I recently discovered that an acquaintance of mine (Bob) might be applying for a position in the same group that I'm in. While I am on good terms with Bob, he is *not* very personable and I do *not* want to be working with him. Here is the situation: * Bob already works in the same (large) company as me, in a differ...
2019/02/05
[ "https://workplace.stackexchange.com/questions/128152", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/99171/" ]
The answer is simple. * You never managed him, * you never worked with him in *professional capacity* ("We occasionally chat on the company messaging program. We talk outside of work every once in a while" is not "work") and * you are not in-charge of the hiring process. Thus ***you never get to pass comments, let a...
It would be very brave to do so, and I mean brave in the exact same way a British MP means it when referring to another MP. Not only would giving such an action be inappropriate, it would reflect far worse on you than on "bob". If I were approached by someone talking down about another employee, I'd lose all respect ...
128,152
I recently discovered that an acquaintance of mine (Bob) might be applying for a position in the same group that I'm in. While I am on good terms with Bob, he is *not* very personable and I do *not* want to be working with him. Here is the situation: * Bob already works in the same (large) company as me, in a differ...
2019/02/05
[ "https://workplace.stackexchange.com/questions/128152", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/99171/" ]
The answer is simple. * You never managed him, * you never worked with him in *professional capacity* ("We occasionally chat on the company messaging program. We talk outside of work every once in a while" is not "work") and * you are not in-charge of the hiring process. Thus ***you never get to pass comments, let a...
Approaching your boss with this concern when you only speculate about him being interested in joining your team is a social no-go. However, in many companies the team is asked for an opinion on a new candidate to join them in the hope to keep team spirits high and have teams that like working with each other. If your ...
70,404
There are quite some houses and clothes for sale, but I do not have any money. What is the fastest way to get money in GTA San Andreas?
2012/05/27
[ "https://gaming.stackexchange.com/questions/70404", "https://gaming.stackexchange.com", "https://gaming.stackexchange.com/users/26351/" ]
Running taxi missions can get you a small nest egg, which you then want to invest in the horse races - the odds of winning are pretty unrealistic. I seem to remember it being the same odds of success regardless of the odds on the horse. Save your game before you start, and then bet the max you can on the longest-shot...
Two things I use to make money really quickly (other than what the other answers cover) are: * Burglary missions, and * Taking Gang Area **Burglary** If you park the van relatively near two houses/ apartment doors, you can alternate between them, as the state of a house is reset when you enter another one. * Only ...
70,404
There are quite some houses and clothes for sale, but I do not have any money. What is the fastest way to get money in GTA San Andreas?
2012/05/27
[ "https://gaming.stackexchange.com/questions/70404", "https://gaming.stackexchange.com", "https://gaming.stackexchange.com/users/26351/" ]
The fastest way is to steal a tank from the military base play the 'Vigilante' missions. I earned half a million in under half an hour doing this, without cheating.
The fastest way to get money in GTA Sa is: Roulette, of course. [![Fastest way to get money](https://i.stack.imgur.com/u0YEy.jpg)](https://i.stack.imgur.com/u0YEy.jpg) Put your bet in 50/50 like: Red/Black, Even/Odd. You can win 1 million dollar in 1 seconds. Here is the one million dollar trick: If you win, save ga...
70,404
There are quite some houses and clothes for sale, but I do not have any money. What is the fastest way to get money in GTA San Andreas?
2012/05/27
[ "https://gaming.stackexchange.com/questions/70404", "https://gaming.stackexchange.com", "https://gaming.stackexchange.com/users/26351/" ]
There aren't really more ways to earn lots of money as fast as possible. The most effective is the horse race technique. For users which don't know this trick: ``` 1. Go to a horse race bet machine. 2. Save the game. 3. Place the highest possible amount as a bet on a horse. 4. If your horse wins, save. If not load th...
I think this question needs answer that focuses on what is actually fast and efficient, not what is just fun or interesting way to get money. Missions to earn money ---------------------- ### 1. Firefighter missions ($45,000 for level 12 + Fireproof CJ) Reason why this is number one is that: * Firetruck is availabl...
70,404
There are quite some houses and clothes for sale, but I do not have any money. What is the fastest way to get money in GTA San Andreas?
2012/05/27
[ "https://gaming.stackexchange.com/questions/70404", "https://gaming.stackexchange.com", "https://gaming.stackexchange.com/users/26351/" ]
If you have no problem with using cheat codes, this cheat adds full health and armour, and gives you $250,000! > > HESOYAM > > >
If you start at the downtown hospital, head right, then turn right at the first road, on your left-hand side you'll find an outdoor "mall" or concourse. In here, you can hide from the police helicopter, and cars cannot get at you. There's also a soda machine that you can use to heal yourself. Run around in circles her...
70,404
There are quite some houses and clothes for sale, but I do not have any money. What is the fastest way to get money in GTA San Andreas?
2012/05/27
[ "https://gaming.stackexchange.com/questions/70404", "https://gaming.stackexchange.com", "https://gaming.stackexchange.com/users/26351/" ]
If you start at the downtown hospital, head right, then turn right at the first road, on your left-hand side you'll find an outdoor "mall" or concourse. In here, you can hide from the police helicopter, and cars cannot get at you. There's also a soda machine that you can use to heal yourself. Run around in circles her...
You can kill drug dealers for a quick influx of cash - They drop anything up to $2k. Note however that (despite cleaning up the streets) you actually lose a point in respect for each dealer you kill. This doesn't add up to much, you can kill enemy gang members to make up for it, but just be aware. The dealers that I k...
70,404
There are quite some houses and clothes for sale, but I do not have any money. What is the fastest way to get money in GTA San Andreas?
2012/05/27
[ "https://gaming.stackexchange.com/questions/70404", "https://gaming.stackexchange.com", "https://gaming.stackexchange.com/users/26351/" ]
Running taxi missions can get you a small nest egg, which you then want to invest in the horse races - the odds of winning are pretty unrealistic. I seem to remember it being the same odds of success regardless of the odds on the horse. Save your game before you start, and then bet the max you can on the longest-shot...
There aren't really more ways to earn lots of money as fast as possible. The most effective is the horse race technique. For users which don't know this trick: ``` 1. Go to a horse race bet machine. 2. Save the game. 3. Place the highest possible amount as a bet on a horse. 4. If your horse wins, save. If not load th...
70,404
There are quite some houses and clothes for sale, but I do not have any money. What is the fastest way to get money in GTA San Andreas?
2012/05/27
[ "https://gaming.stackexchange.com/questions/70404", "https://gaming.stackexchange.com", "https://gaming.stackexchange.com/users/26351/" ]
Running taxi missions can get you a small nest egg, which you then want to invest in the horse races - the odds of winning are pretty unrealistic. I seem to remember it being the same odds of success regardless of the odds on the horse. Save your game before you start, and then bet the max you can on the longest-shot...
The best way is in a place called "*Inside Track*" - The horseracing establishments. I started with $4000 and after an hour betting I ended with $5,510,028.
70,404
There are quite some houses and clothes for sale, but I do not have any money. What is the fastest way to get money in GTA San Andreas?
2012/05/27
[ "https://gaming.stackexchange.com/questions/70404", "https://gaming.stackexchange.com", "https://gaming.stackexchange.com/users/26351/" ]
If you have no problem with using cheat codes, this cheat adds full health and armour, and gives you $250,000! > > HESOYAM > > >
I think this question needs answer that focuses on what is actually fast and efficient, not what is just fun or interesting way to get money. Missions to earn money ---------------------- ### 1. Firefighter missions ($45,000 for level 12 + Fireproof CJ) Reason why this is number one is that: * Firetruck is availabl...
70,404
There are quite some houses and clothes for sale, but I do not have any money. What is the fastest way to get money in GTA San Andreas?
2012/05/27
[ "https://gaming.stackexchange.com/questions/70404", "https://gaming.stackexchange.com", "https://gaming.stackexchange.com/users/26351/" ]
Running taxi missions can get you a small nest egg, which you then want to invest in the horse races - the odds of winning are pretty unrealistic. I seem to remember it being the same odds of success regardless of the odds on the horse. Save your game before you start, and then bet the max you can on the longest-shot...
The fastest way is to steal a tank from the military base play the 'Vigilante' missions. I earned half a million in under half an hour doing this, without cheating.
70,404
There are quite some houses and clothes for sale, but I do not have any money. What is the fastest way to get money in GTA San Andreas?
2012/05/27
[ "https://gaming.stackexchange.com/questions/70404", "https://gaming.stackexchange.com", "https://gaming.stackexchange.com/users/26351/" ]
Running taxi missions can get you a small nest egg, which you then want to invest in the horse races - the odds of winning are pretty unrealistic. I seem to remember it being the same odds of success regardless of the odds on the horse. Save your game before you start, and then bet the max you can on the longest-shot...
I think this question needs answer that focuses on what is actually fast and efficient, not what is just fun or interesting way to get money. Missions to earn money ---------------------- ### 1. Firefighter missions ($45,000 for level 12 + Fireproof CJ) Reason why this is number one is that: * Firetruck is availabl...
15,366,677
I am working on a Sumifs that has 2 different criteria in Col B and the 3rd criteria in Col F. If all 3 criteria are met then I am going to sum the values in Col Q. I have this so far and it returns a 0. I tried to tweak it every way I am aware of and still no luck. ``` =SUMIFS($Q$4:$Q$2700, $B$4:$B$2700, "=AUS", $B$...
2013/03/12
[ "https://Stackoverflow.com/questions/15366677", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2138067/" ]
The formula you provided returns 0 every time because the value in `B` cannot be both `AUS` AND `VCO`, it's one or the other. As far as I know (someone correct me if I'm wrong), there's currently no way to have a conditional statement in a single criteria range (e.g. `"=AUS" OR "=VCO"`). A workaround could be the foll...
The problem is that you reference $B$4:$B$2700 twice. Because this column can not possibly be both AUS and VCO Column Q will never be summed. To make this work, add a new column next to column B. Make the value of cell C4 equal to the value of B4 (=B4) and drag this formula to cell B2700 (you can also just double clic...
10,571,114
Is there any iOS Storyboard equivalent for Android development? iOS Storyboard is fantastic that saves us a lot of time writing code. It is almost like a direct wireframe/prototype to final development too. Anything on Android development which can perform the same?
2012/05/13
[ "https://Stackoverflow.com/questions/10571114", "https://Stackoverflow.com", "https://Stackoverflow.com/users/919222/" ]
Honestly I dont think there is. Although I am sure you can find tools to allow you to create the workflow between screens of your application.
**UPDATE** > > Navigation Editor isn't available in Android Studio starting from > version 2.0. It was an experimental feature and we may re-visit it in > the future. Information on this page is left for archive purposes. > > > --- Android tools team just launched an early prototype of Navigation Editor for An...
519,004
I was inspired by considering the following: $$\left(\sum\_{i=1}^n i\right)^2=\sum\_{i=1}^n i^3$$ Are there exact formulas for the sums of the powers of the integers? For example, we have: $$\sum\_{i=1}^n i={n(n+1)\over 2}$$ $$\sum\_{i=1}^n i^2={n(n+1)(2n+1)\over 6}$$ Do we have more of these? Then I began to cons...
2013/10/08
[ "https://math.stackexchange.com/questions/519004", "https://math.stackexchange.com", "https://math.stackexchange.com/users/86846/" ]
Using $\def\falling#1{^{\underline#1}}x\falling k=k!\binom xk=x(x-1)\ldots(x-k+1)$ (also written as $(x)\_k$, but I find is unpleasant to read), one has $$ \def\stirs{\genfrac\{\}0{}}x^n=\sum\_{k=0}^n \stirs nk x\falling k, \qquad\text{and hence}\quad x^n=\sum\_{k=0}^n k!\stirs nk \binom xk $$ where $\stirs nk$ deno...
Have a look at $\sum\_{i=1}^{n}i\left(i-1\right)\cdots\left(i-k+1\right)$. They are easier to deal with and the $\sum\_{i=1}^{n}i^{k}$ can be deduced from them. It becomes something like $\left(n+1\right)n\cdots\left(n-k+1\right)$ preceded by a constant and it can easily be verified with induction.
12,186,699
I am trying to retrieve the title attribute and replace the current paragraph text with it. Everything else about my script is working perfectly. The title attribute is coming back as "undefined". I am new to javascript and I have looked all over for answers... nothing that I am seeing so far. **JS:** ``` $(document...
2012/08/29
[ "https://Stackoverflow.com/questions/12186699", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1560286/" ]
In your code, `this` references the `a` tag, not the image. Try: ``` $('img', this).attr('title'); ```
The title is on the image, not the `<a>` element: ``` var photo_caption = $('img', this).prop('title'); ```
12,186,699
I am trying to retrieve the title attribute and replace the current paragraph text with it. Everything else about my script is working perfectly. The title attribute is coming back as "undefined". I am new to javascript and I have looked all over for answers... nothing that I am seeing so far. **JS:** ``` $(document...
2012/08/29
[ "https://Stackoverflow.com/questions/12186699", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1560286/" ]
The title is on the image, not the `<a>` element: ``` var photo_caption = $('img', this).prop('title'); ```
You're using `this` but in the case of your code, `this` refers to the `<a>` which doesn't have the title attribute. You need to use `$(this).find('img').attr('title');`
12,186,699
I am trying to retrieve the title attribute and replace the current paragraph text with it. Everything else about my script is working perfectly. The title attribute is coming back as "undefined". I am new to javascript and I have looked all over for answers... nothing that I am seeing so far. **JS:** ``` $(document...
2012/08/29
[ "https://Stackoverflow.com/questions/12186699", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1560286/" ]
The title is on the image, not the `<a>` element: ``` var photo_caption = $('img', this).prop('title'); ```
`this` is your `a` tag, and `a` has no `title` (img does) try it through chrome and the f12 developer panel. You can set breakpoints in your javascript code and inspect what precisely `this` is at any time.
12,186,699
I am trying to retrieve the title attribute and replace the current paragraph text with it. Everything else about my script is working perfectly. The title attribute is coming back as "undefined". I am new to javascript and I have looked all over for answers... nothing that I am seeing so far. **JS:** ``` $(document...
2012/08/29
[ "https://Stackoverflow.com/questions/12186699", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1560286/" ]
In your code, `this` references the `a` tag, not the image. Try: ``` $('img', this).attr('title'); ```
You're using `this` but in the case of your code, `this` refers to the `<a>` which doesn't have the title attribute. You need to use `$(this).find('img').attr('title');`
12,186,699
I am trying to retrieve the title attribute and replace the current paragraph text with it. Everything else about my script is working perfectly. The title attribute is coming back as "undefined". I am new to javascript and I have looked all over for answers... nothing that I am seeing so far. **JS:** ``` $(document...
2012/08/29
[ "https://Stackoverflow.com/questions/12186699", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1560286/" ]
In your code, `this` references the `a` tag, not the image. Try: ``` $('img', this).attr('title'); ```
`this` is your `a` tag, and `a` has no `title` (img does) try it through chrome and the f12 developer panel. You can set breakpoints in your javascript code and inspect what precisely `this` is at any time.
12,186,699
I am trying to retrieve the title attribute and replace the current paragraph text with it. Everything else about my script is working perfectly. The title attribute is coming back as "undefined". I am new to javascript and I have looked all over for answers... nothing that I am seeing so far. **JS:** ``` $(document...
2012/08/29
[ "https://Stackoverflow.com/questions/12186699", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1560286/" ]
You're using `this` but in the case of your code, `this` refers to the `<a>` which doesn't have the title attribute. You need to use `$(this).find('img').attr('title');`
`this` is your `a` tag, and `a` has no `title` (img does) try it through chrome and the f12 developer panel. You can set breakpoints in your javascript code and inspect what precisely `this` is at any time.
55,953,490
It is known that we can find *head* of a list using `foldr` like this: ``` head'' :: [a] -> a head'' = foldr (\x _ -> x) undefined ``` but, is there any way to get the same result using ***`foldl`***? Similarly, we can find the *last* element of list using `foldl` like this: ``` last'' :: [a] -> a last'' = foldl (...
2019/05/02
[ "https://Stackoverflow.com/questions/55953490", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11441910/" ]
`head` cannot be written with `foldl`, because `foldl` goes into an infinite loop on infinite lists, while `head` doesn't. Otherwise, sure: ``` head' :: [a] -> a head' = fromJust . foldl (\y x -> y <|> Just x) Nothing ``` Drop the `fromJust` for a safe version. `last` can definitely be written as a `foldr`, in abou...
The first thing that springs to mind is to use `foldl1` instead of `foldl`, then: ``` head'' :: [a] -> a head'' = foldl1 (\x _ -> x) ``` and since `foldl1` is defined in terms of `foldl` if the list is non-empty (and crashes if the list is empty - but so does `head`): ``` foldl1 f (x:xs) = foldl f x xs ``` we can...
66,457,869
I would like from this tibble : ``` mydf <- tribble( ~siren_us, ~eff, "A", 3, "A", 2, "B", 1, "B", NA, "C", 3, "C", 5, "C", 4, "D", NA, "E", 1, "E", NA ) ``` get this one : more precisely, I want to retrieve the rows from `mydf` for which `siren_us` exists at least twice an...
2021/03/03
[ "https://Stackoverflow.com/questions/66457869", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12933738/" ]
Using `group_by` & `filter` from `dplyr` package ``` library(dplyr) mydf %>% group_by(siren_us) %>% filter( # group that have at least two records n() >= 2 & # and at least one eff is.na any(is.na(eff))) ``` Output ``` # A tibble: 4 x 2 # Groups: siren_us [2] siren_us eff <chr> <dbl> ...
Do this to get results as desired. Use `&` within the filter statement. **dplyr method** ``` mydf %>% group_by(siren_us) %>% filter(is.na(eff) & n() >1) # A tibble: 2 x 2 # Groups: siren_us [2] siren_us eff <chr> <dbl> 1 B NA 2 E NA ``` **base R menthod** ``` mydf[is.na(mydf$eff) &...
185,962
Given a table `my_data` like this: ``` id | name | surname | age ----+------+---------+------ 1 | john | smith | NULL 1 | NULL | smith | 32 1 | NULL | NULL | NULL 1 | john | smith | NULL 1 | john | NULL | 32 CREATE TABLE my_data(id,name,surname,age) AS ( VALUES (1::int, 'john', 'smith' ,NULL...
2017/09/14
[ "https://dba.stackexchange.com/questions/185962", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/124251/" ]
Using `percentile_disc` ======================= I would think something like this would be the fastest, ``` SELECT id, percentile_disc(0) WITHIN GROUP (ORDER BY name NULLS LAST) AS name, percentile_disc(0) WITHIN GROUP (ORDER BY surname NULLS LAST) AS surname, percentile_disc(0) WITHIN GROUP (ORDER BY age NU...
The interesting solution by Evan Carroll got a +1 (never even heard of `percentile_disc`!). However, I have another possible solution, which has the advantage of being generic (for those `RDBMS`s which have `CTE`s - i.e. the `WITH` clause). It does **NOT** require any special PostgreSQL specific functionality - othe...
3,251,921
I am doing this math question and i am really confused on how to approach it. This is the question: A retired mathematics professor has decided to raise a goat. He owns a silo and a barn. The barns front wall is tangent to the silo at the corner. The silo has a circular base with a radius of 10 feet. The professor ha...
2019/06/05
[ "https://math.stackexchange.com/questions/3251921", "https://math.stackexchange.com", "https://math.stackexchange.com/users/679877/" ]
You can't; that matrix has no inverse. On the other hand, you know that$$X.\begin{bmatrix}1\\0\\0\end{bmatrix}=\begin{bmatrix}0\\0\\1\end{bmatrix}$$and therefore the first column of $X$ will be $\left[\begin{smallmatrix}0\\0\\1\end{smallmatrix}\right]$. You can compute the other columns by the same method. You will ge...
I don't know how to put it, but it's basically a permutation matrix: $$X=\begin{pmatrix}0 & 1 & 0\\ 0 & 0 & 1 \\ 1 & 0 & 0\end{pmatrix}$$
3,251,921
I am doing this math question and i am really confused on how to approach it. This is the question: A retired mathematics professor has decided to raise a goat. He owns a silo and a barn. The barns front wall is tangent to the silo at the corner. The silo has a circular base with a radius of 10 feet. The professor ha...
2019/06/05
[ "https://math.stackexchange.com/questions/3251921", "https://math.stackexchange.com", "https://math.stackexchange.com/users/679877/" ]
You can't; that matrix has no inverse. On the other hand, you know that$$X.\begin{bmatrix}1\\0\\0\end{bmatrix}=\begin{bmatrix}0\\0\\1\end{bmatrix}$$and therefore the first column of $X$ will be $\left[\begin{smallmatrix}0\\0\\1\end{smallmatrix}\right]$. You can compute the other columns by the same method. You will ge...
$X$ belongs to a special family of matrices called permutation matrices, which swap elements of the input. For more information, see here: <https://en.wikipedia.org/wiki/Permutation_matrix>
33,023
How exactly is the interaction between two chiral compounds so they can tell the difference between S or R?
2015/06/17
[ "https://chemistry.stackexchange.com/questions/33023", "https://chemistry.stackexchange.com", "https://chemistry.stackexchange.com/users/16936/" ]
If the compounds have never been made before, then the enantiomers have to be separated prior to analysis. Then analytical and spectroscopic techniques must be used. The R and S configurations cannot even be assigned until the relative stereochemistry had been elucidated. This is usually done by specific NMR experiment...
The method used to determine whether a specific chiral molecule is the $S$ or $R$ enantiomer is determined according to the Cahn–Ingold–Prelog priority rules. The steps to this are: 1. Look at the four atoms directly attached to the chirality center, and rank them according to atomic number (1-4, 1 being highest ranki...
327,067
I am trying to visualize the volume generated by rotating two graphs around the xaxis. For example for the functions f(x) = x^3 + 1 and g(x) = x + 1 (over the interval [0,1]). Here is what I tried so far: ``` \begin{document} \begin{tikzpicture} \pgfmathsetmacro{\u}{1.5} \begin{axis}[ x={(3.2*\u cm,0.0cm)}, ...
2016/08/29
[ "https://tex.stackexchange.com/questions/327067", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/21557/" ]
I am not sure if I understand your question right, so this is just a "hope" that this is what you are searching for. **First a note:** Hopefully it is clear to you already, that currently there is no way that PGFPlots "combines" several `\addplot3`s to then have a real perspective view. `\addplot3`s are simply draw...
You could just split the outer plot in different parts, one in the foreground and one in the background, and then also use layers to enhance the 3D effect. ``` \documentclass[tikz,border=3.14mm]{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.16} \begin{document} \begin{tikzpicture} \pgfmathsetmacro{\u}{1...
19,603,362
I want to use closest to traverse select an item, my html as below : ``` <span id='target'></span> <a></a> ``` jquery ``` assume 'a' = $(this), then I do $(this).closest('#target'); ``` but it seem it doesn't select the #target.. what's wrong here?
2013/10/26
[ "https://Stackoverflow.com/questions/19603362", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2893234/" ]
`Closest('#target')` isn't going to work here since the `a` tag is a sibling to `span#target` not a parent. Use `Closest` to find the parent element for both of these and then do a find to get your `target` span, or just use `.prev` to get sibling `target` span. ``` $(this).closest("div").find("#target"); ``` or ``...
Since you have and id, you can use it as an id-selector because id will be unique in a document - there is no need to use any relational lookup in this case. ``` var target = $('#target') ``` If you have a pattern like above where a `anchor` element is followed by a `span` element then use a class attribute instead ...
19,603,362
I want to use closest to traverse select an item, my html as below : ``` <span id='target'></span> <a></a> ``` jquery ``` assume 'a' = $(this), then I do $(this).closest('#target'); ``` but it seem it doesn't select the #target.. what's wrong here?
2013/10/26
[ "https://Stackoverflow.com/questions/19603362", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2893234/" ]
Since you have and id, you can use it as an id-selector because id will be unique in a document - there is no need to use any relational lookup in this case. ``` var target = $('#target') ``` If you have a pattern like above where a `anchor` element is followed by a `span` element then use a class attribute instead ...
Closes does not check siblings, it check element and its parents [jQuery.closest](http://api.jquery.com/closest/) > > For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree. > > > In your case `<a>` and `<s...
19,603,362
I want to use closest to traverse select an item, my html as below : ``` <span id='target'></span> <a></a> ``` jquery ``` assume 'a' = $(this), then I do $(this).closest('#target'); ``` but it seem it doesn't select the #target.. what's wrong here?
2013/10/26
[ "https://Stackoverflow.com/questions/19603362", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2893234/" ]
`Closest('#target')` isn't going to work here since the `a` tag is a sibling to `span#target` not a parent. Use `Closest` to find the parent element for both of these and then do a find to get your `target` span, or just use `.prev` to get sibling `target` span. ``` $(this).closest("div").find("#target"); ``` or ``...
Closes does not check siblings, it check element and its parents [jQuery.closest](http://api.jquery.com/closest/) > > For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree. > > > In your case `<a>` and `<s...
815,228
Recently, I've got my Xubuntu to 16.04 and I found indicators in `xfce4-panel` have a problem. As shown in the picture below, volume indicator is missing. [![enter image description here](https://i.stack.imgur.com/Z9k7U.png)](https://i.stack.imgur.com/Z9k7U.png) As ugly background color, I don't want to use `xfce4-p...
2016/08/22
[ "https://askubuntu.com/questions/815228", "https://askubuntu.com", "https://askubuntu.com/users/585042/" ]
You might have indicator-plugin missing from the panel. Right click on the panel and select > > Panel -> Panel Preferences -> Items and click on the + button > > > Search for Indicator Plugin and add it. I hope that works.
All settings->Sound -> bottom checkbox "Show sound volume in the menu bar"
815,228
Recently, I've got my Xubuntu to 16.04 and I found indicators in `xfce4-panel` have a problem. As shown in the picture below, volume indicator is missing. [![enter image description here](https://i.stack.imgur.com/Z9k7U.png)](https://i.stack.imgur.com/Z9k7U.png) As ugly background color, I don't want to use `xfce4-p...
2016/08/22
[ "https://askubuntu.com/questions/815228", "https://askubuntu.com", "https://askubuntu.com/users/585042/" ]
You can still have `xfce4-mixer` in Xenial Xerus, though it was removed from official repository for some reasons. Go to this link of [ubuntuupdates.org](http://www.ubuntuupdates.org/package/mint_import/rafaela/import/base/xfce4-mixer) and download the mixer package's deb file. And then install it with `dpkg -i` comm...
All settings->Sound -> bottom checkbox "Show sound volume in the menu bar"
23,363,746
I've created simple implementation of Primefaces' `LazyDataModel`. Now paginator works right, but when I set `sortBy="..."` attribute on some Datatable's column and try to sort table by clicking the column header on my JSF page, in `LazyDataModel#load` method I'm still getting `sortField` set to `null` and `sortOrder` ...
2014/04/29
[ "https://Stackoverflow.com/questions/23363746", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2028789/" ]
try to override the other load(), getRowKey() and getRowData() too. this is mine, and it is working: ``` public class EntityDataModel<T extends AbstractEntity> extends LazyDataModel<T> { private static final long serialVersionUID = 1L; protected final Class<T> entityClass; protected final EntityConverter...
`p:dataTable` **MUST** be inside a `h:form` so that filters work properly.
37,067,253
**Below is the schema for tblagegroup** ``` CREATE TABLE `tblagegroup` ( `AgeGroupID` tinyint(3) UNSIGNED NOT NULL, `MinAge` int(11) NOT NULL, `MaxAge` int(11) NOT NULL ); ``` **Below is the schema for tblcontentlibrary** ``` CREATE TABLE `tblcontentlibrary` ( `ContentLibraryID` int(11) NOT NULL, `AgeGrou...
2016/05/06
[ "https://Stackoverflow.com/questions/37067253", "https://Stackoverflow.com", "https://Stackoverflow.com/users/726802/" ]
If your relations are correct, [this should work](https://laravel.com/docs/5.1/eloquent-relationships#constraining-eager-loads): ``` \App\Models\ContentLibraryModel::with(['AgeGroup' => function ($query) use ($years) { $query->where('MinAge', '>=', $years)->where('MaxAge', '<=', $years); }])->get(); ```
Use `whereHas` to condition a return based on a relation. ``` \App\Models\ContentLibraryModel::with('AgeGroup') ->whereHas('AgeGroup', function ($query) use ($years) { $query->where('MinAge', '>=', $years); $query->where('MaxAge', '<=', $years); }) ->get(); ``` This will only return model...
37,067,253
**Below is the schema for tblagegroup** ``` CREATE TABLE `tblagegroup` ( `AgeGroupID` tinyint(3) UNSIGNED NOT NULL, `MinAge` int(11) NOT NULL, `MaxAge` int(11) NOT NULL ); ``` **Below is the schema for tblcontentlibrary** ``` CREATE TABLE `tblcontentlibrary` ( `ContentLibraryID` int(11) NOT NULL, `AgeGrou...
2016/05/06
[ "https://Stackoverflow.com/questions/37067253", "https://Stackoverflow.com", "https://Stackoverflow.com/users/726802/" ]
If your relations are correct, [this should work](https://laravel.com/docs/5.1/eloquent-relationships#constraining-eager-loads): ``` \App\Models\ContentLibraryModel::with(['AgeGroup' => function ($query) use ($years) { $query->where('MinAge', '>=', $years)->where('MaxAge', '<=', $years); }])->get(); ```
My working query is below. ``` \App\Models\ContentLibraryModel ::selectRaw('CL.*, AG.MinAge, AG.MaxAge') ->from('tblcontentlibrary as CL') ->join('tblagegroup as AG', 'AG.AgeGroupID', '=', 'CL.AgeGroupID') ->where('AG.MinAge', '<=', $years) ->where('AG.MaxAge', '>=', $years) ->get(); ```
22,229,576
I'm writing a MIPS program to sort 8 ascii atrings, the addresses of which are in registers $t0-7. When comparing two strings, I need to pass the addresses into a function (by saving into $s0 and $s1). If I want to do this in a loop, how can I increment the register values? Can I do this? Or do I need to put the addres...
2014/03/06
[ "https://Stackoverflow.com/questions/22229576", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1362548/" ]
"Is there a way to use offset notation for registers like you can with memory locations?" No ! Access to registers are hardcoded in assembly instructions. You can't access to a computed register.
To increment a register, add 1 to it. Like this: ``` addiu $t0, $t0, 1 ``` There are many registers on MIPS. If you don't want to trash the base address in some register, use another register for the base+offset, and increment it as necessary. Or use a third register as loop counter, and recalculate base+offset as n...
22,229,576
I'm writing a MIPS program to sort 8 ascii atrings, the addresses of which are in registers $t0-7. When comparing two strings, I need to pass the addresses into a function (by saving into $s0 and $s1). If I want to do this in a loop, how can I increment the register values? Can I do this? Or do I need to put the addres...
2014/03/06
[ "https://Stackoverflow.com/questions/22229576", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1362548/" ]
"Is there a way to use offset notation for registers like you can with memory locations?" No ! Access to registers are hardcoded in assembly instructions. You can't access to a computed register.
You can if you really want to, by using self-modifying code. But I doubt you want to, would probably wreak havoc on the cache and produce overhead bit-twiddling the machine instructions.