qid
int64
1
74.7M
question
stringlengths
15
58.3k
date
stringlengths
10
10
metadata
list
response_j
stringlengths
4
30.2k
response_k
stringlengths
11
36.5k
74,170
I'm attempting to take faster linear algebra notes within org-mode. The latex of a matrix is complex to write, so I'm trying to develop a shorthand expansion. My current workflow is to highlight a shorthand and run `M-x latex-matrixify`. Unfortunately, it seems to complain: ``` let: Invalid search bound (wrong side o...
2022/10/20
[ "https://emacs.stackexchange.com/questions/74170", "https://emacs.stackexchange.com", "https://emacs.stackexchange.com/users/8777/" ]
EDIT There is/was a bug in the `replace-string-in-region` function. Using the newest version of that function, your code works alright, except for some unwanted newlines due to the first backslash in the double backslash functioning as an escape character. To fix it, just replace the double backslashes `\\` by quadrup...
There is really no need to write any `elisp`. ***The `name-last-kbd-macro` and `insert-kbd-macro` will write the `elisp` for you.*** 1. `emacs -Q` **(`-Q` here is important)** 2. Copy the following to `*scratch*` buffer ```lisp [1,2,3\\4,5,6\\7,8,9] ``` 3. Install the following snippet ```lisp (defalias 'latex-m...
74,170
I'm attempting to take faster linear algebra notes within org-mode. The latex of a matrix is complex to write, so I'm trying to develop a shorthand expansion. My current workflow is to highlight a shorthand and run `M-x latex-matrixify`. Unfortunately, it seems to complain: ``` let: Invalid search bound (wrong side o...
2022/10/20
[ "https://emacs.stackexchange.com/questions/74170", "https://emacs.stackexchange.com", "https://emacs.stackexchange.com/users/8777/" ]
I suggest you use Calc. You can set `language mode` to `latex`, temporarily by opening a Calc session, or permanently by saving the configuration in the `calc.el` file. Enable `calc-embedded` when the point is on this formula ``` [1,2,3\\4,5,6\\7,8,9] ``` results in ``` \begin{pmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \\ ...
There is really no need to write any `elisp`. ***The `name-last-kbd-macro` and `insert-kbd-macro` will write the `elisp` for you.*** 1. `emacs -Q` **(`-Q` here is important)** 2. Copy the following to `*scratch*` buffer ```lisp [1,2,3\\4,5,6\\7,8,9] ``` 3. Install the following snippet ```lisp (defalias 'latex-m...
22,836,350
I have a large database in SQL Server of over a million lines of data, and 30+ columns (fields). I have run a routine to find 97 specific lines of particular interest to me from a single table. I have not included the various logical steps I took to isolate those 97 lines. What I now need to do, is to sort my table in...
2014/04/03
[ "https://Stackoverflow.com/questions/22836350", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1109750/" ]
Use LAG and LEAD to get previous and following records and their ids: ``` with wanted_ids as (select list of 97 IDs) select * from ( select thetable.*, lag(id,1) over (order by thedate, thetime) as lag1, lag(id,2) over (order by thedate, thetime) as lag2, lag(id,3) over (order by thedate, thetime) as...
Try this LOGIC, it differs from you table, but you can use same LOGIC & achive what you want. ``` ;With CTE as ( select * ,ROW_NUMBER() OVER (ORDER BY DateDt) AS RowNumber from mtT ), CTETop as ( select top 5 *,'top' as section from CTE order by RowNumber asc ),CTEBottom as ( select top 5 *,'bottom' as section f...
49,437,336
I've been spending the last week or so attempting to learn docker and all the things it can do, however one thing I'm struggling to get my head around is the best practice on how to manage secrets, especially around database connection strings and how these should be stored. I have a plan in my head where I want to ha...
2018/03/22
[ "https://Stackoverflow.com/questions/49437336", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1798229/" ]
If you are using Docker Swarm then you can take advantage of the secrets feature and store all your sensitive information like passwords or even the whole connection string as docker secret. For each secret that is created Docker will mount a file inside the container. By default it will mount all the secrets in /run/...
Secrets are complicated. I will say that pulling them out into environment variables kicks the problem down the road a bit, especially when you are only using docker-compose (and not something fancier like kubernetes or swarm). Your docker-compose.yaml file would look something like this: ``` environment: - MYSQL_ROOT...
783,000
When using public wifi spots that requires acceptance of terms of use, the network notification icon in the Windows taskbar shows a balloon that says "Additional logon information may be required". Clicking this opens my browser to the appropriate page, so that I can accept the terms of use. **How does Windows know wh...
2014/07/14
[ "https://superuser.com/questions/783000", "https://superuser.com", "https://superuser.com/users/135473/" ]
It's not just a Windows thing, but a networking thing. Your system will try to access a generic website it knows to always be up, and checks the result. If it gets a success code (ie HTTP 200), it knows it has permission to access the internet, and lets you go on your way. This sort of system is known as a [Captive P...
The network tells Windows that it needs some sort of Authentication, so the info it receives is that it needs to go to a website to authenticate.
35,568,725
I have a function like this ``` public Response intercept(Chain chain) throws IOException { Request request = chain.request(); Response response = chain.proceed(request); try{ Utilities.showRequestLog(request,response,TAG); ...
2016/02/23
[ "https://Stackoverflow.com/questions/35568725", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5966446/" ]
Use listview's **OnItemClickListener** ``` lv.setOnItemClickListener(new OnItemClickListener() { @Override public void onItemClick(AdapterView<?> adapter, View v, int position, long arg3) { // based on the item clicked go to the relevant activity String clicked...
Use this code make clickable listview. ``` lv = (ListView) findViewById(R.id.listView); lv.setOnItemClickListener(new AdapterView.OnItemClickListener() { public void onItemClick(AdapterView <? > arg0, View view, int position, long id) { // When clicked, show a toast with the Tex...
18,181
I've changed SD cards, printed from USB connection, upgraded/reloaded firmware and attempted using different software packages. Nothing has worked yet. When connected via USB, I get a "disconnected" error after a few minutes into the print. Also, the LED lights now either don't work at all or will randomly go out after...
2021/10/03
[ "https://3dprinting.stackexchange.com/questions/18181", "https://3dprinting.stackexchange.com", "https://3dprinting.stackexchange.com/users/31432/" ]
I recently had this problem and narrowed it down to the part cooling fan (on the side of the extruder head). I diagnosed the problem by noticing that the printer would reboot shortly after the second layer started, only on PLA prints. Of course, the part cooling fan is not usually started until after the first layer. I...
I had a similar problem with my Ender 3 that started after relocating the power supply to a (3D printed) bracket to give additional clearance from the edge of the bed (it was touching the magnetic build sheet, potentially causing prints to lift or warp at +X +Y corner). What I found was that the brackets I had printed...
1,035,987
I have updated config of my dhcp server, so that server should get a new ipmi address. But the server stay at its old address for some time. If I do not want to wait, I want to go to the server and force it to ask for the dhcp address. Is there a special command for that? I know I can make ``` ipmitool bmc reset cold...
2020/10/01
[ "https://serverfault.com/questions/1035987", "https://serverfault.com", "https://serverfault.com/users/484655/" ]
If you don't want to reboot the BMC, you could set it to an invalid static IP and then reset it to DHCP using an OS based tool. How to actually do that depends on the motherboard/BMC and the OS and if special tools are needed by the manufacturer.
Normally change in setting need cold or warm reset for ipmi but conceptually in network You when one network card down and up setting must will be renew. A Trick is set IP addr to static and back to dhcp setting again
1,035,987
I have updated config of my dhcp server, so that server should get a new ipmi address. But the server stay at its old address for some time. If I do not want to wait, I want to go to the server and force it to ask for the dhcp address. Is there a special command for that? I know I can make ``` ipmitool bmc reset cold...
2020/10/01
[ "https://serverfault.com/questions/1035987", "https://serverfault.com", "https://serverfault.com/users/484655/" ]
I have found a solution to rerequest an address for ipmi (at least I have tested it working on Supermicro server). The trick is to set ip address source to static and then back to dhcp. For example: ``` ipmitool lan set 1 ipsrc static ipmitool lan set 1 ipsrc dhcp ``` This way is faster than resetting bmc. Note: a...
Normally change in setting need cold or warm reset for ipmi but conceptually in network You when one network card down and up setting must will be renew. A Trick is set IP addr to static and back to dhcp setting again
1,035,987
I have updated config of my dhcp server, so that server should get a new ipmi address. But the server stay at its old address for some time. If I do not want to wait, I want to go to the server and force it to ask for the dhcp address. Is there a special command for that? I know I can make ``` ipmitool bmc reset cold...
2020/10/01
[ "https://serverfault.com/questions/1035987", "https://serverfault.com", "https://serverfault.com/users/484655/" ]
I have found a solution to rerequest an address for ipmi (at least I have tested it working on Supermicro server). The trick is to set ip address source to static and then back to dhcp. For example: ``` ipmitool lan set 1 ipsrc static ipmitool lan set 1 ipsrc dhcp ``` This way is faster than resetting bmc. Note: a...
If you don't want to reboot the BMC, you could set it to an invalid static IP and then reset it to DHCP using an OS based tool. How to actually do that depends on the motherboard/BMC and the OS and if special tools are needed by the manufacturer.
329,824
I get following error message when I try to play `file_name.avi` file using default video player or VLC: ``` Required plugin could not be found Videos requires to install plugins to play media files of the following type: application/x-rar decoder ``` How to install those plugins?
2013/08/07
[ "https://askubuntu.com/questions/329824", "https://askubuntu.com", "https://askubuntu.com/users/132277/" ]
You can download and install the **Ubuntu Restricted Extras** directly from the **Ubuntu Software Center** which provides support for most video and audio formats (mp3,avi,mpeg,Java Flash, TrueType,Codecs).
You need to install the restricted formats codecs. The documentation can be found [here](https://help.ubuntu.com/community/RestrictedFormats).
28,529,085
Using ng-repeat, I want to have the ability to "break" out of the loop to display parts of the data in different column layouts. Here is the start of the ng-repeat I have as pseudo code. I am not sure how to "chunk" out my data, other than perhaps a filer or custom directive? ``` var items= [1,2,3,4,5,6,7,8,9]; <div...
2015/02/15
[ "https://Stackoverflow.com/questions/28529085", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4569341/" ]
As explain in the link you provide, you could chunk your array in the controller before `ngRepeat`: ``` app.controller('MainCtrl', function($scope) { $scope.myArray = [1,2,3,4,5,6,7,8,9]; $scope.rowFilter = function (data) { var rows = []; var slices = [3,2,1,3]; slices.forEach(function (s) { ...
``` <div class="row"> <% var data = [1,2,3,4,5,6,7,8,9]; var columnClass = 'md-4'; for(var i=0; data.length; i++) { %> <div class="col-<%=columnClass%>"><%=data[i]%></div><% if(i == 2) { %> </div> <div class="row"> <% var columnClass = 'md-6'; } if(i == 4) { %> </div> <div class="row"> <% var columnClass = 'md-1...
25,182,336
I have been looking into using MS Coded-UI as part of a new testing initative. We have exisitng UI automation using the HP stack QC/QTP but have found this to be very heavy weight and error prone, and as a result are looking to coded-ui in a bit to move our automation stack closer to the dev stack. I am testing a wpf ...
2014/08/07
[ "https://Stackoverflow.com/questions/25182336", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2018753/" ]
Regarding your first question, you can create Coded UI tests manually by recording your actions through Visual Studio or by using an existing action recording from [Microsoft Test Manager.](http://msdn.microsoft.com/en-us/library/jj635157.aspx) Since a Coded UI tests is just plain code (C# or VB) you an easily edit it...
First question: there is not functionality to discover all children of some top-level parent control. But you can start Coded UI Builder, star recording and click or interact in another way with all controls you are interested in(it takes like a minute even for a window with a lot of children controls). That click Gene...
35,458,294
I need the following architecture: ``` scheduling-thread(S): - push scheduling event to "schedule" queue, with `data` and a `deadline` scheduler-thread: - forever loop - process scheduling events from the "schedule" queue - push event to a "deadlines-met" queue when deadline is met customer-thread(S): ...
2016/02/17
[ "https://Stackoverflow.com/questions/35458294", "https://Stackoverflow.com", "https://Stackoverflow.com/users/647991/" ]
The other way to do this is with a priority queue. I've not done this in Python, but the idea is to keep the deadlines sorted and to wait for the shortest. If you use a [condition object](https://stackoverflow.com/a/22939538/4834) you can `wait()` for the shortest, but when another event is posted, then a `notify()` w...
make the queue object in your "main" program start both threads with Threading.thread from the "main" program check the queues from each thread You could block on read from the queues or you could sleep and check every second with Queue.empty() See this example [How to use threading in Python?](https://stackoverflo...
52,808
In the assignment **Omega: Packages for Ish**, I picked up the packages he wanted from Illium and from the Citadel, and then I delivered them to him. I then chose the paragon option of talking him into not using them, at which point he thanked me for probably saving his life and left. ![enter image description here](h...
2012/02/29
[ "https://gaming.stackexchange.com/questions/52808", "https://gaming.stackexchange.com", "https://gaming.stackexchange.com/users/3062/" ]
This is a known bug in Mass Effect 2, and as of the most recent patch/steam version, is still in effect. There is no current solution. These are the possible paths to take when starting this mission for the first time. Bringing the package to Anto will allow the quest to properly close, but locks you into the rewards ...
If you don't mind messing around with save files, there is an out-of-game solution for marking this assignment complete. You will need [Mass Effect 2 Save Editor](https://www.nexusmods.com/masseffect2/mods/170). Not my solution. I found it [elsewhere](http://fextralife.com/forums/p5385009/packages-for-ish-hex-editing/...
29,608,510
I cannot get the Round() function to behave properly using the same logic. Code: ``` Declare @Cycle AS INT; SELECT @Cycle = CycleTime FROM MachineStatus WHERE MachineNumber = @MN; UPDATE Job_Op_Time SET Act_Run_Qty = Act_Run_Qty + 1, Act_Run_Hrs = ROUND(CAST(((Act_Run_Qty + 1) * @Cycle) AS FLOAT)/3600,2), Act_Run_...
2015/04/13
[ "https://Stackoverflow.com/questions/29608510", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4297046/" ]
You should also take a look at round function on [MSDN](https://msdn.microsoft.com/en-us/library/ms175003.aspx) which has a third optional parameter `function` which by default is 0 performs a rounding however when any value other than 0 truncates the result after specified value. ``` ROUND ( numeric_expression , leng...
SQL Server has a concept of deterministic which means that given the same inputs you always get the same exact results. On the list (at <https://technet.microsoft.com/en-us/library/aa214775%28v=sql.80%29.aspx>) of deterministic functions SQL Server includes the round function. If it did not work as advertised (round is...
29,608,510
I cannot get the Round() function to behave properly using the same logic. Code: ``` Declare @Cycle AS INT; SELECT @Cycle = CycleTime FROM MachineStatus WHERE MachineNumber = @MN; UPDATE Job_Op_Time SET Act_Run_Qty = Act_Run_Qty + 1, Act_Run_Hrs = ROUND(CAST(((Act_Run_Qty + 1) * @Cycle) AS FLOAT)/3600,2), Act_Run_...
2015/04/13
[ "https://Stackoverflow.com/questions/29608510", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4297046/" ]
You should also take a look at round function on [MSDN](https://msdn.microsoft.com/en-us/library/ms175003.aspx) which has a third optional parameter `function` which by default is 0 performs a rounding however when any value other than 0 truncates the result after specified value. ``` ROUND ( numeric_expression , leng...
What you are suggesting does not make a lot of sense so there must be something outside the query that is causing this. My guess is that the types of the columns are: * Act\_Run\_Hrs integer * Act\_Run\_Labor\_Hrs float In this case sql sever will do an implicit cast (like the following) from float to integer for A...
2,584,456
I want to search for the occurrence of string1 OR string2 OR string3, etc. in a file, and print only those lines (to stdout or a file, either one). How can I easily do this in bash?
2010/04/06
[ "https://Stackoverflow.com/questions/2584456", "https://Stackoverflow.com", "https://Stackoverflow.com/users/309970/" ]
``` grep "string1\|string2\|string3" file_to_search_in ```
Also: ``` grep -e 'string1' -e 'string2' -e 'string3' ```
2,584,456
I want to search for the occurrence of string1 OR string2 OR string3, etc. in a file, and print only those lines (to stdout or a file, either one). How can I easily do this in bash?
2010/04/06
[ "https://Stackoverflow.com/questions/2584456", "https://Stackoverflow.com", "https://Stackoverflow.com/users/309970/" ]
you can also use awk ``` awk '/string1|string2|string3/' file ``` With awk, you can also easily use AND logic if needed. ``` awk '/string1/ && /string2/ && /string3/' file ```
``` grep "string1\|string2\|string3" file_to_search_in ```
2,584,456
I want to search for the occurrence of string1 OR string2 OR string3, etc. in a file, and print only those lines (to stdout or a file, either one). How can I easily do this in bash?
2010/04/06
[ "https://Stackoverflow.com/questions/2584456", "https://Stackoverflow.com", "https://Stackoverflow.com/users/309970/" ]
``` grep "string1\|string2\|string3" file_to_search_in ```
With Perl: ``` perl -lne 'print if /string1|string2|string3/;' file1 file2 *.fileext ``` With Bash one liner: ``` while read line; do if [[ $line =~ string1|string2 ]]; then echo $line; fi; done < file ``` With Bash script: ``` #!/bin/bash while read line do if [[ $line =~ string1|string2|string3 ]]; then ...
2,584,456
I want to search for the occurrence of string1 OR string2 OR string3, etc. in a file, and print only those lines (to stdout or a file, either one). How can I easily do this in bash?
2010/04/06
[ "https://Stackoverflow.com/questions/2584456", "https://Stackoverflow.com", "https://Stackoverflow.com/users/309970/" ]
``` grep "string1\|string2\|string3" file_to_search_in ```
One other choice, especially if the number of strings you want to search is large, is to put those strings into a file delimited by newlines and use: ``` grep -f file_of_strings file_to_search ```
2,584,456
I want to search for the occurrence of string1 OR string2 OR string3, etc. in a file, and print only those lines (to stdout or a file, either one). How can I easily do this in bash?
2010/04/06
[ "https://Stackoverflow.com/questions/2584456", "https://Stackoverflow.com", "https://Stackoverflow.com/users/309970/" ]
you can also use awk ``` awk '/string1|string2|string3/' file ``` With awk, you can also easily use AND logic if needed. ``` awk '/string1/ && /string2/ && /string3/' file ```
Also: ``` grep -e 'string1' -e 'string2' -e 'string3' ```
2,584,456
I want to search for the occurrence of string1 OR string2 OR string3, etc. in a file, and print only those lines (to stdout or a file, either one). How can I easily do this in bash?
2010/04/06
[ "https://Stackoverflow.com/questions/2584456", "https://Stackoverflow.com", "https://Stackoverflow.com/users/309970/" ]
With Perl: ``` perl -lne 'print if /string1|string2|string3/;' file1 file2 *.fileext ``` With Bash one liner: ``` while read line; do if [[ $line =~ string1|string2 ]]; then echo $line; fi; done < file ``` With Bash script: ``` #!/bin/bash while read line do if [[ $line =~ string1|string2|string3 ]]; then ...
Also: ``` grep -e 'string1' -e 'string2' -e 'string3' ```
2,584,456
I want to search for the occurrence of string1 OR string2 OR string3, etc. in a file, and print only those lines (to stdout or a file, either one). How can I easily do this in bash?
2010/04/06
[ "https://Stackoverflow.com/questions/2584456", "https://Stackoverflow.com", "https://Stackoverflow.com/users/309970/" ]
One other choice, especially if the number of strings you want to search is large, is to put those strings into a file delimited by newlines and use: ``` grep -f file_of_strings file_to_search ```
Also: ``` grep -e 'string1' -e 'string2' -e 'string3' ```
2,584,456
I want to search for the occurrence of string1 OR string2 OR string3, etc. in a file, and print only those lines (to stdout or a file, either one). How can I easily do this in bash?
2010/04/06
[ "https://Stackoverflow.com/questions/2584456", "https://Stackoverflow.com", "https://Stackoverflow.com/users/309970/" ]
you can also use awk ``` awk '/string1|string2|string3/' file ``` With awk, you can also easily use AND logic if needed. ``` awk '/string1/ && /string2/ && /string3/' file ```
With Perl: ``` perl -lne 'print if /string1|string2|string3/;' file1 file2 *.fileext ``` With Bash one liner: ``` while read line; do if [[ $line =~ string1|string2 ]]; then echo $line; fi; done < file ``` With Bash script: ``` #!/bin/bash while read line do if [[ $line =~ string1|string2|string3 ]]; then ...
2,584,456
I want to search for the occurrence of string1 OR string2 OR string3, etc. in a file, and print only those lines (to stdout or a file, either one). How can I easily do this in bash?
2010/04/06
[ "https://Stackoverflow.com/questions/2584456", "https://Stackoverflow.com", "https://Stackoverflow.com/users/309970/" ]
you can also use awk ``` awk '/string1|string2|string3/' file ``` With awk, you can also easily use AND logic if needed. ``` awk '/string1/ && /string2/ && /string3/' file ```
One other choice, especially if the number of strings you want to search is large, is to put those strings into a file delimited by newlines and use: ``` grep -f file_of_strings file_to_search ```
2,584,456
I want to search for the occurrence of string1 OR string2 OR string3, etc. in a file, and print only those lines (to stdout or a file, either one). How can I easily do this in bash?
2010/04/06
[ "https://Stackoverflow.com/questions/2584456", "https://Stackoverflow.com", "https://Stackoverflow.com/users/309970/" ]
One other choice, especially if the number of strings you want to search is large, is to put those strings into a file delimited by newlines and use: ``` grep -f file_of_strings file_to_search ```
With Perl: ``` perl -lne 'print if /string1|string2|string3/;' file1 file2 *.fileext ``` With Bash one liner: ``` while read line; do if [[ $line =~ string1|string2 ]]; then echo $line; fi; done < file ``` With Bash script: ``` #!/bin/bash while read line do if [[ $line =~ string1|string2|string3 ]]; then ...
44,222,547
I am trying to install QuantLib Python. So, I followed through and installed: 1) Anaconda3, boost\_1\_64\_0, QuantLib-1.10, QuantLib-SWIG-1.10,swigwin-3.0.12. 2) I installed using Visual Studio 2017, QuantLib. I followed a youtube video and managed to install it correctly and run an example. 3) Then I switched bac...
2017/05/27
[ "https://Stackoverflow.com/questions/44222547", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1848624/" ]
``` val l: List[List[Person]] = ... l.foldLeft(List.empty[Person]) { case (acc, el) => el.find(x => !acc.contains(x)).fold(acc)(acc.::) } ```
I was able to achieve this with recursion and `foldLeft`: ``` val allLists: List[List[Person]] = ... allLists.foldLeft(List.empty[Person]){ case(outputList, list) => def loop(innerList: List[Person], newPerson: Person): Person = { if(innerList.isEmpty) newPerson else if(!outputList.contains(innerList.head))...
55,580,211
I have six elements and they should change in colors when I hover into the three buttons at the bottom. Not only when I hover onto them, but when I click on to the button, the elements should stay changed in color, and on next click, I want it to go back to black. I succeeded that the elements change colors when hove...
2019/04/08
[ "https://Stackoverflow.com/questions/55580211", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11323778/" ]
The problem is you are using `@RequestParam` which takes parameters from the url, you should be using `@RequestBody` for POST requests I would recommend creating a DTO object which you can use to read body of the POST request, like this: ``` public ResponseEntity<String> checkLogin(@RequestBody UserDTO userDTO){ ```...
You can either follow the below approaches: 1. Use the contentType: "application/json; charset=utf-8", 2. Create a domain object which is a wrapper of email and password and read the json using the @RequestBody ``` public class Login{ private String email; private String password; //Getters and Setters } @Reques...
7,173,570
I have a code in vb, and I'm trying convert it to c#. ``` _nextContactDate.ToShortDateString > New Date(1900, 1, 1) ``` This is \_nexContractDate declaration: ``` Private _nextContactDate As DateTime ``` It's weird for me. Comapre datetime to string?
2011/08/24
[ "https://Stackoverflow.com/questions/7173570", "https://Stackoverflow.com", "https://Stackoverflow.com/users/278618/" ]
I'm not sure I understand your question entirely, but why compare a `DateTime` to a `string` anyway, why not just compare dates? ``` if (_nextContactDate > new DateTime(1900, 1, 1)) { } ``` As noted by Greg, currently the `ToShortDateString` removes some parts of the date (specifically, the time units), but upon co...
no, you don't need to compare DataTime variable in string format. you can compare like below: ``` DateTime myDate = new DateTime(2011,8,24); if(myDate > DateTime.MinValue) DoSomething(); ```
7,173,570
I have a code in vb, and I'm trying convert it to c#. ``` _nextContactDate.ToShortDateString > New Date(1900, 1, 1) ``` This is \_nexContractDate declaration: ``` Private _nextContactDate As DateTime ``` It's weird for me. Comapre datetime to string?
2011/08/24
[ "https://Stackoverflow.com/questions/7173570", "https://Stackoverflow.com", "https://Stackoverflow.com/users/278618/" ]
What this code is doing is extracting the date part (i.e. removing the time part) and using VB's loose nature to allow a date represented as a string to be implicitly converted back to a date for the purposes of comparison with an actual date. The correct way to remove the time part would be to check as follows: ``` ...
no, you don't need to compare DataTime variable in string format. you can compare like below: ``` DateTime myDate = new DateTime(2011,8,24); if(myDate > DateTime.MinValue) DoSomething(); ```
7,173,570
I have a code in vb, and I'm trying convert it to c#. ``` _nextContactDate.ToShortDateString > New Date(1900, 1, 1) ``` This is \_nexContractDate declaration: ``` Private _nextContactDate As DateTime ``` It's weird for me. Comapre datetime to string?
2011/08/24
[ "https://Stackoverflow.com/questions/7173570", "https://Stackoverflow.com", "https://Stackoverflow.com/users/278618/" ]
What this code is doing is extracting the date part (i.e. removing the time part) and using VB's loose nature to allow a date represented as a string to be implicitly converted back to a date for the purposes of comparison with an actual date. The correct way to remove the time part would be to check as follows: ``` ...
I'm not sure I understand your question entirely, but why compare a `DateTime` to a `string` anyway, why not just compare dates? ``` if (_nextContactDate > new DateTime(1900, 1, 1)) { } ``` As noted by Greg, currently the `ToShortDateString` removes some parts of the date (specifically, the time units), but upon co...
7,173,570
I have a code in vb, and I'm trying convert it to c#. ``` _nextContactDate.ToShortDateString > New Date(1900, 1, 1) ``` This is \_nexContractDate declaration: ``` Private _nextContactDate As DateTime ``` It's weird for me. Comapre datetime to string?
2011/08/24
[ "https://Stackoverflow.com/questions/7173570", "https://Stackoverflow.com", "https://Stackoverflow.com/users/278618/" ]
I'm not sure I understand your question entirely, but why compare a `DateTime` to a `string` anyway, why not just compare dates? ``` if (_nextContactDate > new DateTime(1900, 1, 1)) { } ``` As noted by Greg, currently the `ToShortDateString` removes some parts of the date (specifically, the time units), but upon co...
In many databases, time is stored as the minimum date + the time value. So assuming the minimum date is 31 Dec 1899 2359H (if I reckon right, that's the minimum for Access) then 1300H will be stored as 01 Jan 1900 1300H. Dates are stored as 'usual'. And dates with time components have the date value with the time c...
7,173,570
I have a code in vb, and I'm trying convert it to c#. ``` _nextContactDate.ToShortDateString > New Date(1900, 1, 1) ``` This is \_nexContractDate declaration: ``` Private _nextContactDate As DateTime ``` It's weird for me. Comapre datetime to string?
2011/08/24
[ "https://Stackoverflow.com/questions/7173570", "https://Stackoverflow.com", "https://Stackoverflow.com/users/278618/" ]
What this code is doing is extracting the date part (i.e. removing the time part) and using VB's loose nature to allow a date represented as a string to be implicitly converted back to a date for the purposes of comparison with an actual date. The correct way to remove the time part would be to check as follows: ``` ...
In many databases, time is stored as the minimum date + the time value. So assuming the minimum date is 31 Dec 1899 2359H (if I reckon right, that's the minimum for Access) then 1300H will be stored as 01 Jan 1900 1300H. Dates are stored as 'usual'. And dates with time components have the date value with the time c...
47,498,019
I am trying to make it so I can check whether a string is in a json. The way I am doing it is putting the values of the json into an array, then seeing if it contains the value. The issue is that it checks it all one by one. This causes it to say the user isn't working the shift, when they are. Then on the next loop, i...
2017/11/26
[ "https://Stackoverflow.com/questions/47498019", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8992977/" ]
[Aliaksandr Kavalenka](https://stackoverflow.com/users/7697901/aliaksandr-kavalenka) came up with a neat workaround, which was for a date picker. I formatted his idea to work with a time picker: ``` fun getTime(textView: TextView, context: Context){ val cal = Calendar.getInstance() val timeSetListener = Time...
Maybe that helps you I have a function **getDate()** ``` fun getDate(textView: TextView, context: Context){ val cal = Calendar.getInstance() val dateSetListener = DatePickerDialog.OnDateSetListener { view, year, monthOfYear, dayOfMonth -> cal.set(Calendar.YEAR, year) cal.set(...
47,498,019
I am trying to make it so I can check whether a string is in a json. The way I am doing it is putting the values of the json into an array, then seeing if it contains the value. The issue is that it checks it all one by one. This causes it to say the user isn't working the shift, when they are. Then on the next loop, i...
2017/11/26
[ "https://Stackoverflow.com/questions/47498019", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8992977/" ]
Maybe that helps you I have a function **getDate()** ``` fun getDate(textView: TextView, context: Context){ val cal = Calendar.getInstance() val dateSetListener = DatePickerDialog.OnDateSetListener { view, year, monthOfYear, dayOfMonth -> cal.set(Calendar.YEAR, year) cal.set(...
Looks like you are mixing Regular DialogFragment with Support Lib Fragment. You should extend "android.support.v4.app.DialogFragment" instead of "import android.app.DialogFragment". Support lib uses support library version FragmentManager not regular Fragment Manager. Hope this helps.
47,498,019
I am trying to make it so I can check whether a string is in a json. The way I am doing it is putting the values of the json into an array, then seeing if it contains the value. The issue is that it checks it all one by one. This causes it to say the user isn't working the shift, when they are. Then on the next loop, i...
2017/11/26
[ "https://Stackoverflow.com/questions/47498019", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8992977/" ]
Maybe that helps you I have a function **getDate()** ``` fun getDate(textView: TextView, context: Context){ val cal = Calendar.getInstance() val dateSetListener = DatePickerDialog.OnDateSetListener { view, year, monthOfYear, dayOfMonth -> cal.set(Calendar.YEAR, year) cal.set(...
``` private var date: DatePickerDialog.OnDateSetListener? = null date = DatePickerDialog.OnDateSetListener { view, year, monthOfYear, dayOfMonth -> myCalendar?.set(Calendar.YEAR, year) myCalendar?.set(Calendar.MONTH, monthOfYear) myCalendar?.set(Calendar.DAY_OF_MONTH, dayOfMonth)...
47,498,019
I am trying to make it so I can check whether a string is in a json. The way I am doing it is putting the values of the json into an array, then seeing if it contains the value. The issue is that it checks it all one by one. This causes it to say the user isn't working the shift, when they are. Then on the next loop, i...
2017/11/26
[ "https://Stackoverflow.com/questions/47498019", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8992977/" ]
[Aliaksandr Kavalenka](https://stackoverflow.com/users/7697901/aliaksandr-kavalenka) came up with a neat workaround, which was for a date picker. I formatted his idea to work with a time picker: ``` fun getTime(textView: TextView, context: Context){ val cal = Calendar.getInstance() val timeSetListener = Time...
Looks like you are mixing Regular DialogFragment with Support Lib Fragment. You should extend "android.support.v4.app.DialogFragment" instead of "import android.app.DialogFragment". Support lib uses support library version FragmentManager not regular Fragment Manager. Hope this helps.
47,498,019
I am trying to make it so I can check whether a string is in a json. The way I am doing it is putting the values of the json into an array, then seeing if it contains the value. The issue is that it checks it all one by one. This causes it to say the user isn't working the shift, when they are. Then on the next loop, i...
2017/11/26
[ "https://Stackoverflow.com/questions/47498019", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8992977/" ]
[Aliaksandr Kavalenka](https://stackoverflow.com/users/7697901/aliaksandr-kavalenka) came up with a neat workaround, which was for a date picker. I formatted his idea to work with a time picker: ``` fun getTime(textView: TextView, context: Context){ val cal = Calendar.getInstance() val timeSetListener = Time...
``` private var date: DatePickerDialog.OnDateSetListener? = null date = DatePickerDialog.OnDateSetListener { view, year, monthOfYear, dayOfMonth -> myCalendar?.set(Calendar.YEAR, year) myCalendar?.set(Calendar.MONTH, monthOfYear) myCalendar?.set(Calendar.DAY_OF_MONTH, dayOfMonth)...
23,689,965
Let's say I have the following classes: ``` public class MyClass1{ MyClass2 obj1; MyClass3 obj2; } public class MyClass2{ MyClass4 obj;//May or may not be referencing the same MyClass4 object in MyClass3. } public class MyClass3{ MyClass4 obj;//May or may not be referencing the same MyClass4 object ...
2014/05/15
[ "https://Stackoverflow.com/questions/23689965", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2646894/" ]
The reason your code didn't work is that `data$list[i]` should be replaced with `data[[list[i]]]`. However, this whole code could be rewritten in two lines, which will make it both shorter and more efficient. I've changed your variable names so you're not overwriting the `list` and `data` functions: ``` dat <- data.fr...
There is a problem with your indexing operation. You use the `$` operator, where in this case you should use `[]`. In general, you wouldnt have to use a for loop to achieve this, because many operations in R can be vectorized. But to show you how you could do it with a for loop: ``` output.id<- numeric(length(list)) ...
9,752,167
I want to add all the keys from the dictionary to the array. This is what I am doing right now.As code below: ``` for (NSString * akey in _groups ) { NSLog(@"%@",akey); [_groupArray addObject:akey]; NSLog(@"%@",_groupArray); } ``` The log is showing Null for \_groupArray. I even tried using `insertObjec...
2012/03/17
[ "https://Stackoverflow.com/questions/9752167", "https://Stackoverflow.com", "https://Stackoverflow.com/users/893217/" ]
You should initialize the array before starting to add values to it. Otherwise it is initially `nil` and will remain `nil`. You can use `allKeys` to get all the keys of the array. But since `_groupArray` is an `NSMutableArray`, you have to do that like this: ``` _groupArray = [NSMutableArray arrayWithArray:[_groups a...
this is how you should do it.... ``` _groupsArray=[dict allKeys]; ``` don't forget to allocate memory to your \_groupsArray.. :)
9,752,167
I want to add all the keys from the dictionary to the array. This is what I am doing right now.As code below: ``` for (NSString * akey in _groups ) { NSLog(@"%@",akey); [_groupArray addObject:akey]; NSLog(@"%@",_groupArray); } ``` The log is showing Null for \_groupArray. I even tried using `insertObjec...
2012/03/17
[ "https://Stackoverflow.com/questions/9752167", "https://Stackoverflow.com", "https://Stackoverflow.com/users/893217/" ]
You should initialize the array before starting to add values to it. Otherwise it is initially `nil` and will remain `nil`. You can use `allKeys` to get all the keys of the array. But since `_groupArray` is an `NSMutableArray`, you have to do that like this: ``` _groupArray = [NSMutableArray arrayWithArray:[_groups a...
Have you checked you've alloc'd and init'd your mutable array. Unless there's already stuff in it that you're adding to - and even then - consider using the NSDictiomary allKeys method rather than iterating through the dictionary. From the docs **allKeys** Returns a new array containing the dictionary’s keys. ``` -...
9,752,167
I want to add all the keys from the dictionary to the array. This is what I am doing right now.As code below: ``` for (NSString * akey in _groups ) { NSLog(@"%@",akey); [_groupArray addObject:akey]; NSLog(@"%@",_groupArray); } ``` The log is showing Null for \_groupArray. I even tried using `insertObjec...
2012/03/17
[ "https://Stackoverflow.com/questions/9752167", "https://Stackoverflow.com", "https://Stackoverflow.com/users/893217/" ]
You should initialize the array before starting to add values to it. Otherwise it is initially `nil` and will remain `nil`. You can use `allKeys` to get all the keys of the array. But since `_groupArray` is an `NSMutableArray`, you have to do that like this: ``` _groupArray = [NSMutableArray arrayWithArray:[_groups a...
If \_groupsArray is new or empty anyway then you can use ``` _gropusArray = [NSMutableArray arrayWithArray:[dict allKeys]]; ``` That should release you from the compiler warning. If \_groupsArray was not empty before and you need to addValues then go for: ``` [_groupsArray addObjectsFromArray:[dict allKeys]]; `...
9,752,167
I want to add all the keys from the dictionary to the array. This is what I am doing right now.As code below: ``` for (NSString * akey in _groups ) { NSLog(@"%@",akey); [_groupArray addObject:akey]; NSLog(@"%@",_groupArray); } ``` The log is showing Null for \_groupArray. I even tried using `insertObjec...
2012/03/17
[ "https://Stackoverflow.com/questions/9752167", "https://Stackoverflow.com", "https://Stackoverflow.com/users/893217/" ]
If \_groupsArray is new or empty anyway then you can use ``` _gropusArray = [NSMutableArray arrayWithArray:[dict allKeys]]; ``` That should release you from the compiler warning. If \_groupsArray was not empty before and you need to addValues then go for: ``` [_groupsArray addObjectsFromArray:[dict allKeys]]; `...
this is how you should do it.... ``` _groupsArray=[dict allKeys]; ``` don't forget to allocate memory to your \_groupsArray.. :)
9,752,167
I want to add all the keys from the dictionary to the array. This is what I am doing right now.As code below: ``` for (NSString * akey in _groups ) { NSLog(@"%@",akey); [_groupArray addObject:akey]; NSLog(@"%@",_groupArray); } ``` The log is showing Null for \_groupArray. I even tried using `insertObjec...
2012/03/17
[ "https://Stackoverflow.com/questions/9752167", "https://Stackoverflow.com", "https://Stackoverflow.com/users/893217/" ]
If \_groupsArray is new or empty anyway then you can use ``` _gropusArray = [NSMutableArray arrayWithArray:[dict allKeys]]; ``` That should release you from the compiler warning. If \_groupsArray was not empty before and you need to addValues then go for: ``` [_groupsArray addObjectsFromArray:[dict allKeys]]; `...
Have you checked you've alloc'd and init'd your mutable array. Unless there's already stuff in it that you're adding to - and even then - consider using the NSDictiomary allKeys method rather than iterating through the dictionary. From the docs **allKeys** Returns a new array containing the dictionary’s keys. ``` -...
4,374
I'm trying to find an efficient way of calculating an inverse on an AVR (or approximating it). I'm trying to calculate the pulse period for a stepper motor so that I can vary the speed linearly. The period is proportional to the inverse of the speed (`p = K/v`), but I can't think of a good way of calculating this on t...
2010/09/13
[ "https://electronics.stackexchange.com/questions/4374", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/554/" ]
There are some very good techniques mentioned in the book ["Hackers Delight](http://rads.stackoverflow.com/amzn/click/0201914654 "Hacker's Delight") by Henry Warren and on his website [hackersdelight.org](http://www.hackersdelight.org/ "Hackers Delight"). For a technique that works well with smaller microcontrollers wh...
This process [here](http://www.bearcave.com/software/divide.htm) looks mcu-friendly, though it might need a bit of porting. Though it seems as if the LUT would be easier. You would only need 100 bytes, less if you used some interpolation, and since the LUT is filled with constants then the compiler might even locate i...
4,374
I'm trying to find an efficient way of calculating an inverse on an AVR (or approximating it). I'm trying to calculate the pulse period for a stepper motor so that I can vary the speed linearly. The period is proportional to the inverse of the speed (`p = K/v`), but I can't think of a good way of calculating this on t...
2010/09/13
[ "https://electronics.stackexchange.com/questions/4374", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/554/" ]
On another note if you are trying to do a divide on a CPU that doesn't support divide there's a really cool way to do it in this Wiki article. <http://en.wikipedia.org/wiki/Multiplicative_inverse> > > To approximate the reciprocal of x, > using only multiplication and > subtraction, one can guess a number y, > an...
``` p = 202/v + 298; // p in us; v varies from 1->100 ``` The return value of your equation already is `p=298` since the compiler divides first then add, use integer muldiv resolution that is: ``` p = ((202*100)/v + (298*100))/100 ``` Using this is same multiply `a*f`, with a=integer f=fraction. That yield `r=a*...
4,374
I'm trying to find an efficient way of calculating an inverse on an AVR (or approximating it). I'm trying to calculate the pulse period for a stepper motor so that I can vary the speed linearly. The period is proportional to the inverse of the speed (`p = K/v`), but I can't think of a good way of calculating this on t...
2010/09/13
[ "https://electronics.stackexchange.com/questions/4374", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/554/" ]
Your function doesn't seem like it would give the result you want. For example, the value 50 returns roughly 302, while 100 returns roughly 300. Those two results will cause almost no change in the speed of the motor. If I understand you correctly, you're really looking for a fast way to map the numbers 1-100 to the r...
``` p = 202/v + 298; // p in us; v varies from 1->100 ``` The return value of your equation already is `p=298` since the compiler divides first then add, use integer muldiv resolution that is: ``` p = ((202*100)/v + (298*100))/100 ``` Using this is same multiply `a*f`, with a=integer f=fraction. That yield `r=a*...
4,374
I'm trying to find an efficient way of calculating an inverse on an AVR (or approximating it). I'm trying to calculate the pulse period for a stepper motor so that I can vary the speed linearly. The period is proportional to the inverse of the speed (`p = K/v`), but I can't think of a good way of calculating this on t...
2010/09/13
[ "https://electronics.stackexchange.com/questions/4374", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/554/" ]
One nice thing about division is that more or less everyone is doing it. It is a pretty core feature of the C language, and compilers like AVR-GCC (called by the Arduino IDE) will choose the best division algorithm available, even when the microcontroller does not have a hardware division instruction. In other words, ...
You want fast so here goes..... Since the AVR cant do normalisation efficiently (shifting left until you cant shift anymore), ignore any pseudo floating point algorithms. The simplest way for very accurate and fastest integer division in an AVR is via a reciprocal look-up table. The table will store reciprocals scaled ...
4,374
I'm trying to find an efficient way of calculating an inverse on an AVR (or approximating it). I'm trying to calculate the pulse period for a stepper motor so that I can vary the speed linearly. The period is proportional to the inverse of the speed (`p = K/v`), but I can't think of a good way of calculating this on t...
2010/09/13
[ "https://electronics.stackexchange.com/questions/4374", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/554/" ]
One nice thing about division is that more or less everyone is doing it. It is a pretty core feature of the C language, and compilers like AVR-GCC (called by the Arduino IDE) will choose the best division algorithm available, even when the microcontroller does not have a hardware division instruction. In other words, ...
This process [here](http://www.bearcave.com/software/divide.htm) looks mcu-friendly, though it might need a bit of porting. Though it seems as if the LUT would be easier. You would only need 100 bytes, less if you used some interpolation, and since the LUT is filled with constants then the compiler might even locate i...
4,374
I'm trying to find an efficient way of calculating an inverse on an AVR (or approximating it). I'm trying to calculate the pulse period for a stepper motor so that I can vary the speed linearly. The period is proportional to the inverse of the speed (`p = K/v`), but I can't think of a good way of calculating this on t...
2010/09/13
[ "https://electronics.stackexchange.com/questions/4374", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/554/" ]
There are some very good techniques mentioned in the book ["Hackers Delight](http://rads.stackoverflow.com/amzn/click/0201914654 "Hacker's Delight") by Henry Warren and on his website [hackersdelight.org](http://www.hackersdelight.org/ "Hackers Delight"). For a technique that works well with smaller microcontrollers wh...
Check to make sure that the division is being performed as floating point. I use Microchip not AVR, but when using C18 you need to force your literals to be treated as floating point. Eg. Try changing your formula to:`p = 202.0/v + 298.0;`
4,374
I'm trying to find an efficient way of calculating an inverse on an AVR (or approximating it). I'm trying to calculate the pulse period for a stepper motor so that I can vary the speed linearly. The period is proportional to the inverse of the speed (`p = K/v`), but I can't think of a good way of calculating this on t...
2010/09/13
[ "https://electronics.stackexchange.com/questions/4374", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/554/" ]
One nice thing about division is that more or less everyone is doing it. It is a pretty core feature of the C language, and compilers like AVR-GCC (called by the Arduino IDE) will choose the best division algorithm available, even when the microcontroller does not have a hardware division instruction. In other words, ...
There are some very good techniques mentioned in the book ["Hackers Delight](http://rads.stackoverflow.com/amzn/click/0201914654 "Hacker's Delight") by Henry Warren and on his website [hackersdelight.org](http://www.hackersdelight.org/ "Hackers Delight"). For a technique that works well with smaller microcontrollers wh...
4,374
I'm trying to find an efficient way of calculating an inverse on an AVR (or approximating it). I'm trying to calculate the pulse period for a stepper motor so that I can vary the speed linearly. The period is proportional to the inverse of the speed (`p = K/v`), but I can't think of a good way of calculating this on t...
2010/09/13
[ "https://electronics.stackexchange.com/questions/4374", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/554/" ]
On another note if you are trying to do a divide on a CPU that doesn't support divide there's a really cool way to do it in this Wiki article. <http://en.wikipedia.org/wiki/Multiplicative_inverse> > > To approximate the reciprocal of x, > using only multiplication and > subtraction, one can guess a number y, > an...
You want fast so here goes..... Since the AVR cant do normalisation efficiently (shifting left until you cant shift anymore), ignore any pseudo floating point algorithms. The simplest way for very accurate and fastest integer division in an AVR is via a reciprocal look-up table. The table will store reciprocals scaled ...
4,374
I'm trying to find an efficient way of calculating an inverse on an AVR (or approximating it). I'm trying to calculate the pulse period for a stepper motor so that I can vary the speed linearly. The period is proportional to the inverse of the speed (`p = K/v`), but I can't think of a good way of calculating this on t...
2010/09/13
[ "https://electronics.stackexchange.com/questions/4374", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/554/" ]
There are some very good techniques mentioned in the book ["Hackers Delight](http://rads.stackoverflow.com/amzn/click/0201914654 "Hacker's Delight") by Henry Warren and on his website [hackersdelight.org](http://www.hackersdelight.org/ "Hackers Delight"). For a technique that works well with smaller microcontrollers wh...
You want fast so here goes..... Since the AVR cant do normalisation efficiently (shifting left until you cant shift anymore), ignore any pseudo floating point algorithms. The simplest way for very accurate and fastest integer division in an AVR is via a reciprocal look-up table. The table will store reciprocals scaled ...
4,374
I'm trying to find an efficient way of calculating an inverse on an AVR (or approximating it). I'm trying to calculate the pulse period for a stepper motor so that I can vary the speed linearly. The period is proportional to the inverse of the speed (`p = K/v`), but I can't think of a good way of calculating this on t...
2010/09/13
[ "https://electronics.stackexchange.com/questions/4374", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/554/" ]
On another note if you are trying to do a divide on a CPU that doesn't support divide there's a really cool way to do it in this Wiki article. <http://en.wikipedia.org/wiki/Multiplicative_inverse> > > To approximate the reciprocal of x, > using only multiplication and > subtraction, one can guess a number y, > an...
This process [here](http://www.bearcave.com/software/divide.htm) looks mcu-friendly, though it might need a bit of porting. Though it seems as if the LUT would be easier. You would only need 100 bytes, less if you used some interpolation, and since the LUT is filled with constants then the compiler might even locate i...
71,618,972
I am making a post request from my ESP32 S2 Kaluga kit. I have tested the HTTP request while running a server program in my LAN. I am using `esp_http_client_handle_t` and `esp_http_client_config_t` from `esp_http_client.h` to do this. Now, I have a HTTPS api setup in AWS API gateway. I get following error with https ...
2022/03/25
[ "https://Stackoverflow.com/questions/71618972", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4726258/" ]
You need certificate to make https requests. In case you dont want to implement this, just edit your sdkconfig "Allow potentially insecure options" -> true "Skip server certificate verification by default" -> true Careful, this is unsafe.
Additionally, you may choose to include the certificates to make sure that your transfer is safe (valid server). You can obtain the root SSL certificate of your host [like so](https://youtu.be/44Kqyphvlxk?t=2848_) watch through till 56 minute mark for a complete explanation. OR you may use the included certificate bu...
63,532,068
I have my python3 path under `/usr/bin`, any my pip path under `/.local/bin` of my local repository. With some pip modules installed, I can run my code successfully through `python3 mycode.py`. But I tried to run the shell script: ``` #!/usr/bin echo "starting now..." nohup python3 mycode.py > log.txt 2>&1 & echo $! ...
2020/08/22
[ "https://Stackoverflow.com/questions/63532068", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9207332/" ]
Just use: ``` msgbox Range("B1:B19").SpecialCells(xlCellTypeBlanks).Address ```
This solution adapts your code. ``` Dim cell As Range Dim emptyStr As String emptyStr = "" For Each cell In Range("B1:B19") If IsEmpty(cell) Then _ emptyStr = emptyStr & cell.Address(0, 0) & ", " Next cell If emptyStr <> "" Then MsgBox Left(emptyStr, Len(emptyStr) - 2) ``` If the `cell` is empty, it st...
63,532,068
I have my python3 path under `/usr/bin`, any my pip path under `/.local/bin` of my local repository. With some pip modules installed, I can run my code successfully through `python3 mycode.py`. But I tried to run the shell script: ``` #!/usr/bin echo "starting now..." nohup python3 mycode.py > log.txt 2>&1 & echo $! ...
2020/08/22
[ "https://Stackoverflow.com/questions/63532068", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9207332/" ]
Just use: ``` msgbox Range("B1:B19").SpecialCells(xlCellTypeBlanks).Address ```
Please try this code. ``` Sub ListEmptyCells() Dim Rng As Range Dim List As Variant Dim Txt As String Set Rng = Range("B1:B19") On Error Resume Next List = Rng.SpecialCells(xlCellTypeBlanks).Address(0, 0) If Err Then Txt = "There are no empty cells in" & vbCr & _ ...
63,532,068
I have my python3 path under `/usr/bin`, any my pip path under `/.local/bin` of my local repository. With some pip modules installed, I can run my code successfully through `python3 mycode.py`. But I tried to run the shell script: ``` #!/usr/bin echo "starting now..." nohup python3 mycode.py > log.txt 2>&1 & echo $! ...
2020/08/22
[ "https://Stackoverflow.com/questions/63532068", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9207332/" ]
Just use: ``` msgbox Range("B1:B19").SpecialCells(xlCellTypeBlanks).Address ```
Find Blank Cells Using 'SpecialCells' ------------------------------------- * The 2nd Sub (`listBlanks`) is the main Sub. * The 1st Sub shows how to use the main Sub. * The 3rd Sub shows how `SpecialCells` works, which on one hand might be considered unreliable or on the other hand could be used to one's advantage. * ...
63,532,068
I have my python3 path under `/usr/bin`, any my pip path under `/.local/bin` of my local repository. With some pip modules installed, I can run my code successfully through `python3 mycode.py`. But I tried to run the shell script: ``` #!/usr/bin echo "starting now..." nohup python3 mycode.py > log.txt 2>&1 & echo $! ...
2020/08/22
[ "https://Stackoverflow.com/questions/63532068", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9207332/" ]
Just use: ``` msgbox Range("B1:B19").SpecialCells(xlCellTypeBlanks).Address ```
**List blanks via dynamic arrays and spill range reference** Using the new dynamic array possibilities of **Microsoft 365** (writing e.g. to target `C1:C?` in section `b)`) ``` =$B$1:$B$19="" ``` and a so called ►**spill range** reference (as argument in the function `Textjoin()`, vers. 2019+ in section `c)`) ...
350,580
I am running Ubuntu 12.04 and having various problems. I have traced it back to the fact that my user's home directory (/home/user) is owned by root. The /home directory is actually mounted on another drive, but I can see that in fstab I am mounting only /home and not /home/user: ``` UUID=DC56D19E56DX3233 /home ntfs...
2013/09/27
[ "https://askubuntu.com/questions/350580", "https://askubuntu.com", "https://askubuntu.com/users/195898/" ]
NTFS doesn't support Unix-style 'owners', so the Linux kernel is forced to assign an owner for the entire volume - normally, root. As an alternative to moving your entire home directory to EXT4, you could also give ownership of the entire partition to a specific user or group using the 'uid' or 'gid' options for `mount...
The issue, as mentioned in the comments, was that my home directory was mounted on a different hard drive with an NTFS filesystem. I backed up my home directory with Deja Dup to an external drive. Then used gparted to format the internal NTFS drive and change the filesystem to EXT4. Next I changed /etc/fstab to match...
4,037,565
We are given $G=\{a+b\sqrt{2}: a,b\in\mathbb{Q}\}$ and asked to show that $G-\{0+0\sqrt{2}\}$ is a group under multiplication. Let us first specify that multiplication takes place as expected: $$(a+b\sqrt{2})(c+d\sqrt{2})=a(c+d\sqrt{2})+b\sqrt{2}(c+d\sqrt{2})=ac+2bd+(ad+bc)\sqrt{2}$$ It is clear that $1+0\sqrt{2}$ i...
2021/02/24
[ "https://math.stackexchange.com/questions/4037565", "https://math.stackexchange.com", "https://math.stackexchange.com/users/847166/" ]
Well, for any $a+b\sqrt{2}$ you have to find an inverse $c+d\sqrt{2}$, so your setup is actually *pretty nice*: it consists of a linear system $$ \begin{pmatrix} a & 2b\\ b & a \end{pmatrix} \cdot \begin{pmatrix} c\\ d\\ \end{pmatrix} = \begin{pmatrix} 1\\ 0 \end{pmatrix}. $$ You can compute the inverse of the matr...
**Hint:** Multiply top and bottom of $\;\dfrac1{a+b\sqrt2}\;$ by $\;{a-b\sqrt2}$
4,037,565
We are given $G=\{a+b\sqrt{2}: a,b\in\mathbb{Q}\}$ and asked to show that $G-\{0+0\sqrt{2}\}$ is a group under multiplication. Let us first specify that multiplication takes place as expected: $$(a+b\sqrt{2})(c+d\sqrt{2})=a(c+d\sqrt{2})+b\sqrt{2}(c+d\sqrt{2})=ac+2bd+(ad+bc)\sqrt{2}$$ It is clear that $1+0\sqrt{2}$ i...
2021/02/24
[ "https://math.stackexchange.com/questions/4037565", "https://math.stackexchange.com", "https://math.stackexchange.com/users/847166/" ]
**Hint:** Multiply top and bottom of $\;\dfrac1{a+b\sqrt2}\;$ by $\;{a-b\sqrt2}$
It suffices to show that $G\le (\Bbb R^\*, \times)$, since any subgroup of a group is itself a group. I will use the [one-step subgroup test](https://en.m.wikipedia.org/wiki/Subgroup_test). Clearly $1\in G$, so $G\neq \varnothing$. Let $x=a+b\sqrt{2}, y=c+d\sqrt{2}\in G$. Then $a,b,c,d\in \Bbb Q$, so, in particular,...
4,037,565
We are given $G=\{a+b\sqrt{2}: a,b\in\mathbb{Q}\}$ and asked to show that $G-\{0+0\sqrt{2}\}$ is a group under multiplication. Let us first specify that multiplication takes place as expected: $$(a+b\sqrt{2})(c+d\sqrt{2})=a(c+d\sqrt{2})+b\sqrt{2}(c+d\sqrt{2})=ac+2bd+(ad+bc)\sqrt{2}$$ It is clear that $1+0\sqrt{2}$ i...
2021/02/24
[ "https://math.stackexchange.com/questions/4037565", "https://math.stackexchange.com", "https://math.stackexchange.com/users/847166/" ]
**Hint:** Multiply top and bottom of $\;\dfrac1{a+b\sqrt2}\;$ by $\;{a-b\sqrt2}$
Bear in mind the multiplication in $G$ is the same as the multiplication of the reals so whatever is true about multiplication of $\mathbb R$ will still be true of the multiplication of $G$. Multiplication is associative. We don't have to prove that. We do have to prove that mulitplicaition is closed on $G$. That is:...
4,037,565
We are given $G=\{a+b\sqrt{2}: a,b\in\mathbb{Q}\}$ and asked to show that $G-\{0+0\sqrt{2}\}$ is a group under multiplication. Let us first specify that multiplication takes place as expected: $$(a+b\sqrt{2})(c+d\sqrt{2})=a(c+d\sqrt{2})+b\sqrt{2}(c+d\sqrt{2})=ac+2bd+(ad+bc)\sqrt{2}$$ It is clear that $1+0\sqrt{2}$ i...
2021/02/24
[ "https://math.stackexchange.com/questions/4037565", "https://math.stackexchange.com", "https://math.stackexchange.com/users/847166/" ]
**Hint:** Multiply top and bottom of $\;\dfrac1{a+b\sqrt2}\;$ by $\;{a-b\sqrt2}$
We have $$ac+2bd=1,ad+bc=0$$ and that is nice because it is a system of linear equations in two variables. Multiplying first equation by $b$ and second one by $a$ and subtracting the two we get $$(2b^2-a^2)d=b$$ ie $$d=\frac{b} {2b^2-a^2}$$ and $$c=-ad/b=\frac{a} {a^2-2b^2}$$ thus $$c+d\sqrt {2}=\frac{a}{a^2-2b^2}+\fra...
4,037,565
We are given $G=\{a+b\sqrt{2}: a,b\in\mathbb{Q}\}$ and asked to show that $G-\{0+0\sqrt{2}\}$ is a group under multiplication. Let us first specify that multiplication takes place as expected: $$(a+b\sqrt{2})(c+d\sqrt{2})=a(c+d\sqrt{2})+b\sqrt{2}(c+d\sqrt{2})=ac+2bd+(ad+bc)\sqrt{2}$$ It is clear that $1+0\sqrt{2}$ i...
2021/02/24
[ "https://math.stackexchange.com/questions/4037565", "https://math.stackexchange.com", "https://math.stackexchange.com/users/847166/" ]
Well, for any $a+b\sqrt{2}$ you have to find an inverse $c+d\sqrt{2}$, so your setup is actually *pretty nice*: it consists of a linear system $$ \begin{pmatrix} a & 2b\\ b & a \end{pmatrix} \cdot \begin{pmatrix} c\\ d\\ \end{pmatrix} = \begin{pmatrix} 1\\ 0 \end{pmatrix}. $$ You can compute the inverse of the matr...
It suffices to show that $G\le (\Bbb R^\*, \times)$, since any subgroup of a group is itself a group. I will use the [one-step subgroup test](https://en.m.wikipedia.org/wiki/Subgroup_test). Clearly $1\in G$, so $G\neq \varnothing$. Let $x=a+b\sqrt{2}, y=c+d\sqrt{2}\in G$. Then $a,b,c,d\in \Bbb Q$, so, in particular,...
4,037,565
We are given $G=\{a+b\sqrt{2}: a,b\in\mathbb{Q}\}$ and asked to show that $G-\{0+0\sqrt{2}\}$ is a group under multiplication. Let us first specify that multiplication takes place as expected: $$(a+b\sqrt{2})(c+d\sqrt{2})=a(c+d\sqrt{2})+b\sqrt{2}(c+d\sqrt{2})=ac+2bd+(ad+bc)\sqrt{2}$$ It is clear that $1+0\sqrt{2}$ i...
2021/02/24
[ "https://math.stackexchange.com/questions/4037565", "https://math.stackexchange.com", "https://math.stackexchange.com/users/847166/" ]
Well, for any $a+b\sqrt{2}$ you have to find an inverse $c+d\sqrt{2}$, so your setup is actually *pretty nice*: it consists of a linear system $$ \begin{pmatrix} a & 2b\\ b & a \end{pmatrix} \cdot \begin{pmatrix} c\\ d\\ \end{pmatrix} = \begin{pmatrix} 1\\ 0 \end{pmatrix}. $$ You can compute the inverse of the matr...
Bear in mind the multiplication in $G$ is the same as the multiplication of the reals so whatever is true about multiplication of $\mathbb R$ will still be true of the multiplication of $G$. Multiplication is associative. We don't have to prove that. We do have to prove that mulitplicaition is closed on $G$. That is:...
4,037,565
We are given $G=\{a+b\sqrt{2}: a,b\in\mathbb{Q}\}$ and asked to show that $G-\{0+0\sqrt{2}\}$ is a group under multiplication. Let us first specify that multiplication takes place as expected: $$(a+b\sqrt{2})(c+d\sqrt{2})=a(c+d\sqrt{2})+b\sqrt{2}(c+d\sqrt{2})=ac+2bd+(ad+bc)\sqrt{2}$$ It is clear that $1+0\sqrt{2}$ i...
2021/02/24
[ "https://math.stackexchange.com/questions/4037565", "https://math.stackexchange.com", "https://math.stackexchange.com/users/847166/" ]
Well, for any $a+b\sqrt{2}$ you have to find an inverse $c+d\sqrt{2}$, so your setup is actually *pretty nice*: it consists of a linear system $$ \begin{pmatrix} a & 2b\\ b & a \end{pmatrix} \cdot \begin{pmatrix} c\\ d\\ \end{pmatrix} = \begin{pmatrix} 1\\ 0 \end{pmatrix}. $$ You can compute the inverse of the matr...
We have $$ac+2bd=1,ad+bc=0$$ and that is nice because it is a system of linear equations in two variables. Multiplying first equation by $b$ and second one by $a$ and subtracting the two we get $$(2b^2-a^2)d=b$$ ie $$d=\frac{b} {2b^2-a^2}$$ and $$c=-ad/b=\frac{a} {a^2-2b^2}$$ thus $$c+d\sqrt {2}=\frac{a}{a^2-2b^2}+\fra...
4,037,565
We are given $G=\{a+b\sqrt{2}: a,b\in\mathbb{Q}\}$ and asked to show that $G-\{0+0\sqrt{2}\}$ is a group under multiplication. Let us first specify that multiplication takes place as expected: $$(a+b\sqrt{2})(c+d\sqrt{2})=a(c+d\sqrt{2})+b\sqrt{2}(c+d\sqrt{2})=ac+2bd+(ad+bc)\sqrt{2}$$ It is clear that $1+0\sqrt{2}$ i...
2021/02/24
[ "https://math.stackexchange.com/questions/4037565", "https://math.stackexchange.com", "https://math.stackexchange.com/users/847166/" ]
It suffices to show that $G\le (\Bbb R^\*, \times)$, since any subgroup of a group is itself a group. I will use the [one-step subgroup test](https://en.m.wikipedia.org/wiki/Subgroup_test). Clearly $1\in G$, so $G\neq \varnothing$. Let $x=a+b\sqrt{2}, y=c+d\sqrt{2}\in G$. Then $a,b,c,d\in \Bbb Q$, so, in particular,...
Bear in mind the multiplication in $G$ is the same as the multiplication of the reals so whatever is true about multiplication of $\mathbb R$ will still be true of the multiplication of $G$. Multiplication is associative. We don't have to prove that. We do have to prove that mulitplicaition is closed on $G$. That is:...
4,037,565
We are given $G=\{a+b\sqrt{2}: a,b\in\mathbb{Q}\}$ and asked to show that $G-\{0+0\sqrt{2}\}$ is a group under multiplication. Let us first specify that multiplication takes place as expected: $$(a+b\sqrt{2})(c+d\sqrt{2})=a(c+d\sqrt{2})+b\sqrt{2}(c+d\sqrt{2})=ac+2bd+(ad+bc)\sqrt{2}$$ It is clear that $1+0\sqrt{2}$ i...
2021/02/24
[ "https://math.stackexchange.com/questions/4037565", "https://math.stackexchange.com", "https://math.stackexchange.com/users/847166/" ]
It suffices to show that $G\le (\Bbb R^\*, \times)$, since any subgroup of a group is itself a group. I will use the [one-step subgroup test](https://en.m.wikipedia.org/wiki/Subgroup_test). Clearly $1\in G$, so $G\neq \varnothing$. Let $x=a+b\sqrt{2}, y=c+d\sqrt{2}\in G$. Then $a,b,c,d\in \Bbb Q$, so, in particular,...
We have $$ac+2bd=1,ad+bc=0$$ and that is nice because it is a system of linear equations in two variables. Multiplying first equation by $b$ and second one by $a$ and subtracting the two we get $$(2b^2-a^2)d=b$$ ie $$d=\frac{b} {2b^2-a^2}$$ and $$c=-ad/b=\frac{a} {a^2-2b^2}$$ thus $$c+d\sqrt {2}=\frac{a}{a^2-2b^2}+\fra...
2,495,789
I have a rather large amount of data (100 MB or so), that I would like to present to a user. The format of the data is similar to the following... Date              Location      Log File          Link 03/21/2010   San Diego   some\_log.txt   <http://somelink.com> etc My problem is that I would like to have som...
2010/03/22
[ "https://Stackoverflow.com/questions/2495789", "https://Stackoverflow.com", "https://Stackoverflow.com/users/252808/" ]
100MB is pretty huge. You don't want to transfer all that data at once to the client side on a single request and then do the paging/filtering/sorting actions over there. It would take ages to transfer it and it would eat all the client's memory. Rather do that entirely at the server side on every request using SQL pow...
Use paging. (Maybe a little ajax).
2,495,789
I have a rather large amount of data (100 MB or so), that I would like to present to a user. The format of the data is similar to the following... Date              Location      Log File          Link 03/21/2010   San Diego   some\_log.txt   <http://somelink.com> etc My problem is that I would like to have som...
2010/03/22
[ "https://Stackoverflow.com/questions/2495789", "https://Stackoverflow.com", "https://Stackoverflow.com/users/252808/" ]
100MB is pretty huge. You don't want to transfer all that data at once to the client side on a single request and then do the paging/filtering/sorting actions over there. It would take ages to transfer it and it would eat all the client's memory. Rather do that entirely at the server side on every request using SQL pow...
If the browser has Google Gears installed for its [DB API](http://code.google.com/apis/gears/api_database.html) or supports HTML5's [Web SQL Database](http://dev.w3.org/html5/webdatabase/) (e.g. Opera 10.5+), you can import all the data into a client-side SQL database and perform the sorting+paging queries with SQL.
38,495,755
In android , i want to fill only a part of the background (for example 70% from right or left) of a view by a color like black programitically. How can I do that?
2016/07/21
[ "https://Stackoverflow.com/questions/38495755", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6197166/" ]
Follow this example: ``` import Foundation import RealmSwift class Dog : Object { dynamic var name = "" dynamic var age = "" } ```
Wrap your write code as follow: ``` try! realm.write { realm.add(myDog) } ``` This should fix the problem
68,837,104
I am new to tensorflow I was trying to build a simple model that would output the probability of installation (install colum). Here a subset of the dataset: ``` {'A': {0: 12, 2: 28, 3: 26, 4: 9, 5: 36}, 'B': {0: 10, 2: 17, 3: 22, 4: 2, 5: 31}, 'C': {0: 1, 2: 0, 3: 5, 4: 0, 5: 1}, 'D': {0: 5, 2: 0, 3: 0, 4: 0, 5: 0...
2021/08/18
[ "https://Stackoverflow.com/questions/68837104", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11796478/" ]
As written now, you create test labels `y_train` with shape `(3,)` and each train label is just `0` or `1`. The network is setup to take training labels from 10 categories. That's what this line does in the model creation phase: ```py keras.layers.Dense(10) ``` To change to binary classification, it is recommended t...
I believe the last layer in your network is outputting 10 values, when it should be 1. ``` model = keras.models.Sequential([ keras.layers.Flatten(), keras.layers.Dense(128, activation='softmax'), keras.layers.Dropout(0.2), keras.layers.Dense(1) # needs to be 1 ]) ```
68,837,104
I am new to tensorflow I was trying to build a simple model that would output the probability of installation (install colum). Here a subset of the dataset: ``` {'A': {0: 12, 2: 28, 3: 26, 4: 9, 5: 36}, 'B': {0: 10, 2: 17, 3: 22, 4: 2, 5: 31}, 'C': {0: 1, 2: 0, 3: 5, 4: 0, 5: 1}, 'D': {0: 5, 2: 0, 3: 0, 4: 0, 5: 0...
2021/08/18
[ "https://Stackoverflow.com/questions/68837104", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11796478/" ]
Note: You have not specified which class the `ss` object belongs to and hence I will discuss everything removing it. First let's discuss your target. i.e. the install column. From the values I assume that that your problem is Binary Classification i.e. predicting `0` and `1` and you want the probability of having them...
I believe the last layer in your network is outputting 10 values, when it should be 1. ``` model = keras.models.Sequential([ keras.layers.Flatten(), keras.layers.Dense(128, activation='softmax'), keras.layers.Dropout(0.2), keras.layers.Dense(1) # needs to be 1 ]) ```
68,837,104
I am new to tensorflow I was trying to build a simple model that would output the probability of installation (install colum). Here a subset of the dataset: ``` {'A': {0: 12, 2: 28, 3: 26, 4: 9, 5: 36}, 'B': {0: 10, 2: 17, 3: 22, 4: 2, 5: 31}, 'C': {0: 1, 2: 0, 3: 5, 4: 0, 5: 1}, 'D': {0: 5, 2: 0, 3: 0, 4: 0, 5: 0...
2021/08/18
[ "https://Stackoverflow.com/questions/68837104", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11796478/" ]
Note: You have not specified which class the `ss` object belongs to and hence I will discuss everything removing it. First let's discuss your target. i.e. the install column. From the values I assume that that your problem is Binary Classification i.e. predicting `0` and `1` and you want the probability of having them...
As written now, you create test labels `y_train` with shape `(3,)` and each train label is just `0` or `1`. The network is setup to take training labels from 10 categories. That's what this line does in the model creation phase: ```py keras.layers.Dense(10) ``` To change to binary classification, it is recommended t...
488,211
Unfortunately I don't get the intuition behind the proofs by rules of inference. I do understand example, however I don't see the broad picture, I simply don't understand how to reason about the solution. Following I will show few example with my notes, which are might be incorrect, please show me what I don't get ri...
2013/09/09
[ "https://math.stackexchange.com/questions/488211", "https://math.stackexchange.com", "https://math.stackexchange.com/users/80537/" ]
The reasoning is valid if *modus tollens* $$ A\to B, \neg B\;\vdash\; \neg A$$ is among your repository of inference rules
By transitivity of implication (p → q) and (q → r) implies (p → r). By logical rule saying that if ((a → b) and ¬b) then ¬b (modus tollens) and already prooven fact that (p → r) and assumption ¬r you can infer ¬p.
488,211
Unfortunately I don't get the intuition behind the proofs by rules of inference. I do understand example, however I don't see the broad picture, I simply don't understand how to reason about the solution. Following I will show few example with my notes, which are might be incorrect, please show me what I don't get ri...
2013/09/09
[ "https://math.stackexchange.com/questions/488211", "https://math.stackexchange.com", "https://math.stackexchange.com/users/80537/" ]
The reasoning is valid if *modus tollens* $$ A\to B, \neg B\;\vdash\; \neg A$$ is among your repository of inference rules
You can transform $A \to B = \neg A \vee B$. So you have the following premises: * $p \to q = \neg p \vee q$ (1) * $q \to r = \neg q \vee r$ (2) * $\neg r$ (3) By resolution on (2) and (3): you have $\neg q$ (4) By resolution on (1) and (4): you have $\neg p$.
488,211
Unfortunately I don't get the intuition behind the proofs by rules of inference. I do understand example, however I don't see the broad picture, I simply don't understand how to reason about the solution. Following I will show few example with my notes, which are might be incorrect, please show me what I don't get ri...
2013/09/09
[ "https://math.stackexchange.com/questions/488211", "https://math.stackexchange.com", "https://math.stackexchange.com/users/80537/" ]
The reasoning is valid if *modus tollens* $$ A\to B, \neg B\;\vdash\; \neg A$$ is among your repository of inference rules
Your reasoning is valid. If $r$ is false and we know that $q\implies r$, then $q$ is false too because otherwise the truth of $q$ would immediately imply the truth of $r$. Similarly, knowing $\neg q$ and $p\implies q$, we deduce that $p$ is false. Note that the contrapositives of your two assumptions are $\neg r \imp...
488,211
Unfortunately I don't get the intuition behind the proofs by rules of inference. I do understand example, however I don't see the broad picture, I simply don't understand how to reason about the solution. Following I will show few example with my notes, which are might be incorrect, please show me what I don't get ri...
2013/09/09
[ "https://math.stackexchange.com/questions/488211", "https://math.stackexchange.com", "https://math.stackexchange.com/users/80537/" ]
Valid rules of inference work such that if their premise(s) hold as true, then their conclusion will also hold as true. A solution to such an exercise consists of a deduction that given the premises and the rules of inference of the system (and it's axioms if any... I'd guess your system doesn't have an axioms), the co...
The reasoning is valid if *modus tollens* $$ A\to B, \neg B\;\vdash\; \neg A$$ is among your repository of inference rules
488,211
Unfortunately I don't get the intuition behind the proofs by rules of inference. I do understand example, however I don't see the broad picture, I simply don't understand how to reason about the solution. Following I will show few example with my notes, which are might be incorrect, please show me what I don't get ri...
2013/09/09
[ "https://math.stackexchange.com/questions/488211", "https://math.stackexchange.com", "https://math.stackexchange.com/users/80537/" ]
Valid rules of inference work such that if their premise(s) hold as true, then their conclusion will also hold as true. A solution to such an exercise consists of a deduction that given the premises and the rules of inference of the system (and it's axioms if any... I'd guess your system doesn't have an axioms), the co...
By transitivity of implication (p → q) and (q → r) implies (p → r). By logical rule saying that if ((a → b) and ¬b) then ¬b (modus tollens) and already prooven fact that (p → r) and assumption ¬r you can infer ¬p.
488,211
Unfortunately I don't get the intuition behind the proofs by rules of inference. I do understand example, however I don't see the broad picture, I simply don't understand how to reason about the solution. Following I will show few example with my notes, which are might be incorrect, please show me what I don't get ri...
2013/09/09
[ "https://math.stackexchange.com/questions/488211", "https://math.stackexchange.com", "https://math.stackexchange.com/users/80537/" ]
Valid rules of inference work such that if their premise(s) hold as true, then their conclusion will also hold as true. A solution to such an exercise consists of a deduction that given the premises and the rules of inference of the system (and it's axioms if any... I'd guess your system doesn't have an axioms), the co...
You can transform $A \to B = \neg A \vee B$. So you have the following premises: * $p \to q = \neg p \vee q$ (1) * $q \to r = \neg q \vee r$ (2) * $\neg r$ (3) By resolution on (2) and (3): you have $\neg q$ (4) By resolution on (1) and (4): you have $\neg p$.
488,211
Unfortunately I don't get the intuition behind the proofs by rules of inference. I do understand example, however I don't see the broad picture, I simply don't understand how to reason about the solution. Following I will show few example with my notes, which are might be incorrect, please show me what I don't get ri...
2013/09/09
[ "https://math.stackexchange.com/questions/488211", "https://math.stackexchange.com", "https://math.stackexchange.com/users/80537/" ]
Valid rules of inference work such that if their premise(s) hold as true, then their conclusion will also hold as true. A solution to such an exercise consists of a deduction that given the premises and the rules of inference of the system (and it's axioms if any... I'd guess your system doesn't have an axioms), the co...
Your reasoning is valid. If $r$ is false and we know that $q\implies r$, then $q$ is false too because otherwise the truth of $q$ would immediately imply the truth of $r$. Similarly, knowing $\neg q$ and $p\implies q$, we deduce that $p$ is false. Note that the contrapositives of your two assumptions are $\neg r \imp...
68,434,847
I'm admin and I have a developer. I have a CA root certificate (ca & ca.pub) and many servers. I put ca.pub on all the servers. I wanna do the thing that developer can only log in to one server, not to other servers. How should I sign certificates with ca and configure sshd\_config? For example, if i just sign user.pu...
2021/07/19
[ "https://Stackoverflow.com/questions/68434847", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9892679/" ]
In the line: ``` if ( i >= 0 && i <= height && n >= 0 && n <= width) ``` That should be: ``` if ( i >= 0 && i < height && n >= 0 && n < width) ``` Otherwise you are going one too far past the right and bottom edges of the image.
for anyone who might face this problem in the future here is the mistake I made ... I figured out at the end that I was reading and writing to the same image not reading from a copy so I was reading values that I have already changed instead of reading the original values from one pic and applying results to the other
7,719,444
Had a really rough day with Ruby so far... Using RVM I'm trying to just install rails into a new gemset but running gem install rails hangs toward the end and never returns control back to the user. It gets to this point and dies: ``` Installing RDoc documentation for activesupport-3.1.0... Installing RDoc documenta...
2011/10/10
[ "https://Stackoverflow.com/questions/7719444", "https://Stackoverflow.com", "https://Stackoverflow.com/users/103047/" ]
i had the same problem some minutes ago, the install stuck at the same point, then got killed but it seemed to be installed (doing a gem search rails it found the installed gem). So i tried with a ``` gem update gem uninstall rails gem install rails ``` and it worked (at least it finished without errors.. it's my f...
With "gem update" I found some errors in "make "DESTDIR=" clean (not found)" and I did not figure out the reason for that. Using "gem uninstall rails", it gives me that rails is not alreadty installed. And I can't install rails typing "gem install rails".
3,445,778
I'm trying to understand how I can paint simple graphics in x86 protected mode on Intel chipsets. I already (kind of) know how to do that with VGA interface, and I'm trying to understand how I could use G35 Express to do the same. For this purpose I'm studying [this document](http://intellinuxgraphics.org/VOL_3_display...
2010/08/10
[ "https://Stackoverflow.com/questions/3445778", "https://Stackoverflow.com", "https://Stackoverflow.com/users/415727/" ]
"Graphics Memory Aperture Base" is a reference to AGP memory or system memory mapped for use by the graphics controller for image or command buffers. The GTT is a page-translation table scheme similar to CPU MMU page tables for mapping system physical memory to a linear AGP address space. So in AGP memory space you can...
a good reference <http://msdn.microsoft.com/en-us/library/windows/hardware/ff568296(v=vs.85).aspx>. This explains what aperture space is used for.
257,240
There is a similar post: [How to specify the domain of a variable?](https://mathematica.stackexchange.com/questions/75984/how-to-specify-the-domain-of-a-variable), but it doesn't work well for me. I want to evaluate the integral below, with a parameter $\gamma$. The result is obviously different depending on $\gamma>1...
2021/10/23
[ "https://mathematica.stackexchange.com/questions/257240", "https://mathematica.stackexchange.com", "https://mathematica.stackexchange.com/users/59851/" ]
Un uncommon trick (for a mathematical expert) does it: ``` Integrate[1/(EulerGamma + 1/2 Cos[2 \[Phi]]), \[Phi]] /. EulerGamma -> \[Gamma] (* (2 ArcTan[((-1 + 2 \[Gamma]) Tan[\[Phi]])/Sqrt[-1 + 4 \[Gamma]^2]])/ Sqrt[-1 + 4 \[Gamma]^2] *) ```
I will answer my own question. The result is this ugly monster $$\frac{\frac{2 \tan ^{-1}\left(\frac{\sqrt{4 \gamma +2} \tan \left(\frac{\phi }{2}\right)+2}{\sqrt{4 \gamma -2}}\right)}{\sqrt{\gamma -\frac{1}{2}}}-\frac{2 \tan ^{-1}\left(\frac{2-\sqrt{4 \gamma +2} \tan \left(\frac{\phi }{2}\right)}{\sqrt{4 \gamma -2}}\r...
257,240
There is a similar post: [How to specify the domain of a variable?](https://mathematica.stackexchange.com/questions/75984/how-to-specify-the-domain-of-a-variable), but it doesn't work well for me. I want to evaluate the integral below, with a parameter $\gamma$. The result is obviously different depending on $\gamma>1...
2021/10/23
[ "https://mathematica.stackexchange.com/questions/257240", "https://mathematica.stackexchange.com", "https://mathematica.stackexchange.com/users/59851/" ]
It is indeed possible to get a real antiderivative, but you need to use the [Rubi](https://rulebasedintegration.org) package (easy to install). ``` << Rubi` ``` Now we consider 3 cases ``` Assuming[γ>1/2,Int[1/(γ+1/2 Cos[2 ϕ]),ϕ]] ``` $$\frac{2 \tan ^{-1}\left(\sqrt{-\frac{1-2 \gamma }{2 \gamma +1}} \tan (\phi )\...
I will answer my own question. The result is this ugly monster $$\frac{\frac{2 \tan ^{-1}\left(\frac{\sqrt{4 \gamma +2} \tan \left(\frac{\phi }{2}\right)+2}{\sqrt{4 \gamma -2}}\right)}{\sqrt{\gamma -\frac{1}{2}}}-\frac{2 \tan ^{-1}\left(\frac{2-\sqrt{4 \gamma +2} \tan \left(\frac{\phi }{2}\right)}{\sqrt{4 \gamma -2}}\r...
248,002
> > 1. Lemon juice is preferable **than** tea. > 2. Lemon juice is preferable **to** tea. > > > I have seen in many grammar books that only sentence 2 is correct and not sentence1 with “than”. So my questions are: 1) We use “than” for many comparitive sentences, but why it is not used with “prefer” and “preferabl...
2020/05/20
[ "https://ell.stackexchange.com/questions/248002", "https://ell.stackexchange.com", "https://ell.stackexchange.com/users/89300/" ]
**Question 1:** You said it yourself, *than* is used for comparison. For example: *Faster than...* *Taller than...* *Better than...* We don't say that lemon juice is *'preferabler' than* tea because the word *preferable* is an [extreme adjective](https://www.espressoenglish.net/extreme-adjectives-in-english/). Betw...
Google Books Ngram Viewer shows multiple uses of **preferable to** and none of **preferable than**. As to why, it's because that's the way we speak. There's very little logic to the choice of prepositions in English. The sentence means that lemon juice should be preferred to tea. That's to say, one should choose lemo...
248,002
> > 1. Lemon juice is preferable **than** tea. > 2. Lemon juice is preferable **to** tea. > > > I have seen in many grammar books that only sentence 2 is correct and not sentence1 with “than”. So my questions are: 1) We use “than” for many comparitive sentences, but why it is not used with “prefer” and “preferabl...
2020/05/20
[ "https://ell.stackexchange.com/questions/248002", "https://ell.stackexchange.com", "https://ell.stackexchange.com/users/89300/" ]
**Question 1:** You said it yourself, *than* is used for comparison. For example: *Faster than...* *Taller than...* *Better than...* We don't say that lemon juice is *'preferabler' than* tea because the word *preferable* is an [extreme adjective](https://www.espressoenglish.net/extreme-adjectives-in-english/). Betw...
Your general assumption is correct, and you can use *than* with *preferable* if you make a slight change to the sentence: > > Lemon juice is **more** preferable than tea. > > > However, even though that's grammatical (syntactically), it's still quite unusual, simply because it's not normally used nearly as much a...
43,147,478
I have one ASP.NET MVC project. I have several web sites as instances of that project working on the same server, e.g. on 8000 and 8001 ports. When I authorize on 8000, if I've been authorized on 8001, I am automatically logged out on 8001 site, and vice versa. What's the problem? Is it about cookies? What are the poss...
2017/03/31
[ "https://Stackoverflow.com/questions/43147478", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6435004/" ]
You can specify for each website a custom cookie name by putting into your `web.config`: ``` <authtentication model="Forms"> <forms name="Cookie_8000" loginUrl="urlhere" /> </authentication> ``` ASP.NET MVC is using by default cookies to store information about the signed user. When the websites are in productio...
The problem seems like those sites share primary domain name. As the result, they can also share authentication cookie. For example, `http://site1.example.com` and `http://site2.example.com` You can do one of the followings not to share cookies between sub-domains. **Option 1** Specify different machine key for ea...
7,311,779
I want to remotely query peoplesoft and fetch some data given user's credentials match. Is there a way to do this programatically? can I do it using python? If not, which language or tech would I need? Thanks in advance.
2011/09/05
[ "https://Stackoverflow.com/questions/7311779", "https://Stackoverflow.com", "https://Stackoverflow.com/users/926776/" ]
You shouldn't be releasing entity ``` [entity release]; ``` Since you never called alloc on it, you don't own it.
I noticed that you are not caching section informations. Why not ? Set `cacheName:@"Root"` to use the advantage of the `NSFetchResultController`. Note that this only makes sense if the settings of the `FetchRequestController` are immutable. As far as I can see in your posted code, that's what you have here. So you shou...
129
Sure, some documentaries are made for TV in multiple parts. That seem to be a TV-show and off-topic. But what about for example with: * [Arlit, deuxième Paris](http://www.imdb.com/title/tt0473762/combined) * [Sans soleil](http://www.imdb.com/title/tt0084628/) * [The Shock Doctrine](http://www.imdb.com/title/tt1355640/...
2011/12/09
[ "https://movies.meta.stackexchange.com/questions/129", "https://movies.meta.stackexchange.com", "https://movies.meta.stackexchange.com/users/66/" ]
The FAQ is sketchy with details right now (as the purpose of the beta is to clearly define the scope), but in my eyes, there is one clear rule: **Any film that had a cinematic release is on-topic**. The genre of the film is largely irrelevant, so questions on documentary movies are perfectly valid. Incidentally, I l...
This is hard to discuss because not only do you have to consider the TV factor, you also have to determine if this is also a place for works of fiction only, or all movies, whether fact or fiction. Also the problem with some documentaries, especially political ones, is that it becomes **very** skewed and facts get morp...
129
Sure, some documentaries are made for TV in multiple parts. That seem to be a TV-show and off-topic. But what about for example with: * [Arlit, deuxième Paris](http://www.imdb.com/title/tt0473762/combined) * [Sans soleil](http://www.imdb.com/title/tt0084628/) * [The Shock Doctrine](http://www.imdb.com/title/tt1355640/...
2011/12/09
[ "https://movies.meta.stackexchange.com/questions/129", "https://movies.meta.stackexchange.com", "https://movies.meta.stackexchange.com/users/66/" ]
Documentaries are ***absolutely*** on-topic for a movies site. I even think that made-for-tv documentaries are on-topic. The kind that are several episodes that, strung together, form a single cohesive story are just a broken up version of a movie. I would probably make an exception for self-contained episodic document...
This is hard to discuss because not only do you have to consider the TV factor, you also have to determine if this is also a place for works of fiction only, or all movies, whether fact or fiction. Also the problem with some documentaries, especially political ones, is that it becomes **very** skewed and facts get morp...
50,444,791
I am trying to update the value of **`daysOnWhichPresent`** field by 1 of Firebase database. Here I have read the value two times before and after updating the value of `daysOnWhichPresent` but it is not correctly reading from the database. In first read the value should be 6 but after fetching the data its value is 0....
2018/05/21
[ "https://Stackoverflow.com/questions/50444791", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9821913/" ]
You cannot make a constructor of a static member class `protected` for the subclasses of the outer class. That expressiveness doesn't directly exist in the Java language. But, you can make the constructor of the static member class `Data` `private` - in that case, the outer class can still access it. And the outer cl...
A better solution would be to make the nested class `protected`, and make it implement a `public` interface. Only the interface will be exposed to outside classes, and the nested class itself will remain an implementation detail. ``` public abstract class Parent { public interface Data { public String get...
4,215,086
This is yet another question about the proof on page 340 of Tristan Needham's Visual Complex Analysis (this is the only thing I've read in the entire book as it's the only proof of the crossing rule for winding numbers I could find online). For reference, refer to this image: [![extract from page 340 of Tristan Needham...
2021/08/02
[ "https://math.stackexchange.com/questions/4215086", "https://math.stackexchange.com", "https://math.stackexchange.com/users/550228/" ]
I think I finally made it work. It does use topology theory and I admit that I should have added the tag [topology] as well because my question falls a bit outside the area of interest of complex anaysis. (However, I don't have proper knowledge of topological spaces as per se, but topological results I will be using ar...
I will try to answer your question and I expect this to be useful for you. There is a theorem called Jordan curve theorem which states that any closed and simple curve determines uniquely two different regions of the complex plane (one is the interior of the curve, and the other is an unbounded component), then it seem...
9,837,498
I'm currently working on a VB. Net web service calling another web service running in the mainframe. I was provided with the WSDL file and I generated a proxy class using wsdl.exe. Upon attempting to invoke the method of the mainframe web service using the proxy class, I encountered an exception saying "Conversion from...
2012/03/23
[ "https://Stackoverflow.com/questions/9837498", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1288002/" ]
Figured this out myself. The web service was only requiring COMPLETE AND CORRECT INPUTS. The developer on the customer's side made a mistake when she told us that some of the inputs were not required and therefore can be left blank. Double-checking the WSDL file solved the problem.
First, look at the SOAP message coming back from the mainframe. Does it look like a SOAP message, or does it look like HTML or plain text indicating you aren't authorized? When you were told you didn't need to use any certificate, were you told you should use BASICAUTH?
323,932
I'm using a theme for my WordPress which uses 'Raleway' and it requests (13 requests in gtmetrix waterfall) it from Google fonts API. I want to keep using the font. However, I'm trying to reduce the number of requests and the size of my page. Can I include/integrate the fonts on my website so the browser won't have to ...
2018/12/26
[ "https://wordpress.stackexchange.com/questions/323932", "https://wordpress.stackexchange.com", "https://wordpress.stackexchange.com/users/157759/" ]
Since the text is processed by `_()` function, then, of course, you can modify it using [`gettext`](https://codex.wordpress.org/Plugin_API/Filter_Reference/gettext) filter. ``` function change_update_notification_msg( $translated_text, $untranslated_text, $domain ) { if ( is_admin() ) { $texts = array( ...
This text can't be filtered afaik. You can append text though: <https://developer.wordpress.org/reference/hooks/in_plugin_update_message-file/>
36,720,497
``` def romanToNum(word): word = word.upper() numeralList2 = list(zip( [1000, 500, 100, 50, 10, 5, 1], ['M', 'D', 'C', 'L', 'X', 'V', 'I'] )) num = 0 x = [] a = 0 b = 2 if len(word) % 2 != 0: word = word + "s" for i in range(0,len(word)): x.append(w...
2016/04/19
[ "https://Stackoverflow.com/questions/36720497", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4739445/" ]
Well `n` is an element of `x`. The `IndexError` on the line `n == n[0] + n[1]` means that a certain `n` has length less than `2`. You added an `word = word + 's'` to probably guard against having one character elements in `x` but it doesn't really work. If you look at how you build the `x` list you do: ``` x = [] a ...
This is the culprit: ``` for i in range(0,len(word)): x.append(word[a:b]) a = a + 2 b = b + 2 ``` At the end of this loop, x will be `['XX', 'Xs', '', '']`. Since you are grouping the characters in groups of two, the total number of groups will be half the length of the string. So just halve the numbe...
36,720,497
``` def romanToNum(word): word = word.upper() numeralList2 = list(zip( [1000, 500, 100, 50, 10, 5, 1], ['M', 'D', 'C', 'L', 'X', 'V', 'I'] )) num = 0 x = [] a = 0 b = 2 if len(word) % 2 != 0: word = word + "s" for i in range(0,len(word)): x.append(w...
2016/04/19
[ "https://Stackoverflow.com/questions/36720497", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4739445/" ]
Well `n` is an element of `x`. The `IndexError` on the line `n == n[0] + n[1]` means that a certain `n` has length less than `2`. You added an `word = word + 's'` to probably guard against having one character elements in `x` but it doesn't really work. If you look at how you build the `x` list you do: ``` x = [] a ...
You have a problem with your first for loop that goes farther than expected, affecting an empty string to `x[i]`. It should probably be : `for i in range(int(len(word)/2)):` Then your second loop needs fixing too. `if n == rNum :` is never realised since rNum is a one character string and x's length is 2. Try `n == ...