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
366,280
so I am incredibly new to LaTex. Generally for my math writings and such, I just use MS Word's equation editor. However recently I was just playing around and I created my "own" equation set. I wanted to denote this with an unused symbol for my own satisfaction; unfortunately (I think) all the Greek letters have been u...
2017/04/23
[ "https://tex.stackexchange.com/questions/366280", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/131980/" ]
You can do it, but I don't think your readers will be happy. ``` \documentclass{article} \usepackage{amsmath} \DeclareRobustCommand{\waw}{{\text{\usefont{U}{xnsh}{m}{n}\symbol{240}}}} \begin{document} $\waw+3=x_{\waw}$ \end{document} ``` [![enter image description here](https://i.stack.imgur.com/1nriG.png)](http...
If you can display the character in text mode, you can wrap the command in `\textnormal` to display it in math mode. It might be a good idea to additionally wrap it in `\mathord` to prevent ligatures in what should be a product of separate variables. For example, you can support OpenType fonts this way, and display Ar...
77,503
I have done the following: ``` sudo apt-get install vim-gnome ``` But I get the following: ``` vim-gnome : Depends: libruby1.8 (>= 1.8.7.352) but 1.8.6.111-2ubuntu1 is to be installed E: Unable to correct problems, you have held broken packages. ``` I've done: ``` sudo apt-get update sudo apt-get upgrade sudo ap...
2011/11/09
[ "https://askubuntu.com/questions/77503", "https://askubuntu.com", "https://askubuntu.com/users/33038/" ]
The following worked for me: run this ``` sudo apt-get update ``` and then run ``` sudo apt-get install vim-gnome ```
You'll need to check your sources. I see that `libruby1.8 1.8.7.352-2` is available through `main` while it seems that the newest version you have is: `1.8.6.111-2ubuntu1`. This probably means that you `dist-upgrade` failed or that you still need to `update` your sources. ``` $ apt-cache policy libruby1.8 libruby1.8: ...
77,503
I have done the following: ``` sudo apt-get install vim-gnome ``` But I get the following: ``` vim-gnome : Depends: libruby1.8 (>= 1.8.7.352) but 1.8.6.111-2ubuntu1 is to be installed E: Unable to correct problems, you have held broken packages. ``` I've done: ``` sudo apt-get update sudo apt-get upgrade sudo ap...
2011/11/09
[ "https://askubuntu.com/questions/77503", "https://askubuntu.com", "https://askubuntu.com/users/33038/" ]
You'll need to check your sources. I see that `libruby1.8 1.8.7.352-2` is available through `main` while it seems that the newest version you have is: `1.8.6.111-2ubuntu1`. This probably means that you `dist-upgrade` failed or that you still need to `update` your sources. ``` $ apt-cache policy libruby1.8 libruby1.8: ...
in Ubuntu 16.04 it should be: ``` sudo apt update ``` and then ``` sudo apt install vim-gnome ```
77,503
I have done the following: ``` sudo apt-get install vim-gnome ``` But I get the following: ``` vim-gnome : Depends: libruby1.8 (>= 1.8.7.352) but 1.8.6.111-2ubuntu1 is to be installed E: Unable to correct problems, you have held broken packages. ``` I've done: ``` sudo apt-get update sudo apt-get upgrade sudo ap...
2011/11/09
[ "https://askubuntu.com/questions/77503", "https://askubuntu.com", "https://askubuntu.com/users/33038/" ]
You'll need to check your sources. I see that `libruby1.8 1.8.7.352-2` is available through `main` while it seems that the newest version you have is: `1.8.6.111-2ubuntu1`. This probably means that you `dist-upgrade` failed or that you still need to `update` your sources. ``` $ apt-cache policy libruby1.8 libruby1.8: ...
**What worked for me** : ``` sudo apt remove vim-common sudo apt-get install vim-gnome ```
77,503
I have done the following: ``` sudo apt-get install vim-gnome ``` But I get the following: ``` vim-gnome : Depends: libruby1.8 (>= 1.8.7.352) but 1.8.6.111-2ubuntu1 is to be installed E: Unable to correct problems, you have held broken packages. ``` I've done: ``` sudo apt-get update sudo apt-get upgrade sudo ap...
2011/11/09
[ "https://askubuntu.com/questions/77503", "https://askubuntu.com", "https://askubuntu.com/users/33038/" ]
On Ubuntu 20.04 (since [`vim-gnome` was removed in 19.10](https://git.launchpad.net/ubuntu/+source/vim/tree/debian/changelog?h=ubuntu/eoan#n140)): ``` sudo apt install vim-gtk3 ```
You'll need to check your sources. I see that `libruby1.8 1.8.7.352-2` is available through `main` while it seems that the newest version you have is: `1.8.6.111-2ubuntu1`. This probably means that you `dist-upgrade` failed or that you still need to `update` your sources. ``` $ apt-cache policy libruby1.8 libruby1.8: ...
77,503
I have done the following: ``` sudo apt-get install vim-gnome ``` But I get the following: ``` vim-gnome : Depends: libruby1.8 (>= 1.8.7.352) but 1.8.6.111-2ubuntu1 is to be installed E: Unable to correct problems, you have held broken packages. ``` I've done: ``` sudo apt-get update sudo apt-get upgrade sudo ap...
2011/11/09
[ "https://askubuntu.com/questions/77503", "https://askubuntu.com", "https://askubuntu.com/users/33038/" ]
The following worked for me: run this ``` sudo apt-get update ``` and then run ``` sudo apt-get install vim-gnome ```
in Ubuntu 16.04 it should be: ``` sudo apt update ``` and then ``` sudo apt install vim-gnome ```
77,503
I have done the following: ``` sudo apt-get install vim-gnome ``` But I get the following: ``` vim-gnome : Depends: libruby1.8 (>= 1.8.7.352) but 1.8.6.111-2ubuntu1 is to be installed E: Unable to correct problems, you have held broken packages. ``` I've done: ``` sudo apt-get update sudo apt-get upgrade sudo ap...
2011/11/09
[ "https://askubuntu.com/questions/77503", "https://askubuntu.com", "https://askubuntu.com/users/33038/" ]
The following worked for me: run this ``` sudo apt-get update ``` and then run ``` sudo apt-get install vim-gnome ```
**What worked for me** : ``` sudo apt remove vim-common sudo apt-get install vim-gnome ```
77,503
I have done the following: ``` sudo apt-get install vim-gnome ``` But I get the following: ``` vim-gnome : Depends: libruby1.8 (>= 1.8.7.352) but 1.8.6.111-2ubuntu1 is to be installed E: Unable to correct problems, you have held broken packages. ``` I've done: ``` sudo apt-get update sudo apt-get upgrade sudo ap...
2011/11/09
[ "https://askubuntu.com/questions/77503", "https://askubuntu.com", "https://askubuntu.com/users/33038/" ]
On Ubuntu 20.04 (since [`vim-gnome` was removed in 19.10](https://git.launchpad.net/ubuntu/+source/vim/tree/debian/changelog?h=ubuntu/eoan#n140)): ``` sudo apt install vim-gtk3 ```
in Ubuntu 16.04 it should be: ``` sudo apt update ``` and then ``` sudo apt install vim-gnome ```
77,503
I have done the following: ``` sudo apt-get install vim-gnome ``` But I get the following: ``` vim-gnome : Depends: libruby1.8 (>= 1.8.7.352) but 1.8.6.111-2ubuntu1 is to be installed E: Unable to correct problems, you have held broken packages. ``` I've done: ``` sudo apt-get update sudo apt-get upgrade sudo ap...
2011/11/09
[ "https://askubuntu.com/questions/77503", "https://askubuntu.com", "https://askubuntu.com/users/33038/" ]
On Ubuntu 20.04 (since [`vim-gnome` was removed in 19.10](https://git.launchpad.net/ubuntu/+source/vim/tree/debian/changelog?h=ubuntu/eoan#n140)): ``` sudo apt install vim-gtk3 ```
**What worked for me** : ``` sudo apt remove vim-common sudo apt-get install vim-gnome ```
4,070,130
I have a form which upon its loading events retrieves data and populates some menu-items. I am adding menu-items using ``` Viewer.AudioTrackToolStripMenuItem.DropDownItems.Add(myValue) ``` The number of menu-items created are not always the same. Sometimes they are 2, other times they are 4 depending on the data be...
2010/11/01
[ "https://Stackoverflow.com/questions/4070130", "https://Stackoverflow.com", "https://Stackoverflow.com/users/45402/" ]
Define myvalue\_click method to handle all myValue clicks. Add event handles programmatically, like: ``` this.myValue.Click += new System.EventHandler(this.myValue_Click); ```
You can add the event at runtime too, e.g.. Since your `myValue` is a string, you'll first need to create a button for it: ``` ToolStripItem toolStripItem = new ToolStripItem(); toolStripItem.Text = myValue; toolStripItem.Click += new EventHandler(toolStripItem_Click); Viewer.AudioTrackToolStripMenuItem.DropDownIte...
35,568,522
I am trying to match words from user input with a string from a text file. When this code runs, it crashes after the file is opened. (marked by \*\*\*\*) How can I change it to properly match the strings from user input with strings from the text file. Any help would be appreciated, thank you. ``` const int Size = 8...
2016/02/23
[ "https://Stackoverflow.com/questions/35568522", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5669325/" ]
Are you calling the `DataBind()` method of your `GridView` within `SetGridData`? And also add a `AsyncPostBackTrigger` Have a look at an example [here](https://pawanmishra.wordpress.com/2009/10/03/ajaxcontroltoolkits-asyncfileupload-control/)
try UpdateMode="Always" . it will work
270,932
I have two machines in a master - slave replication. I want to know if they are in two seperate places e.g. London, England and Tokyo, Japan are there going to be any latency issues. What exactly is the maximum latency (if possible measured using distance) that mysql replication can tolerate before an error happens or...
2020/07/14
[ "https://dba.stackexchange.com/questions/270932", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/211287/" ]
You should consider what distance does to any DB connection. I have some posts from myself and others on this subject * `Jul 25, 2012` : [Mysql database replication on different vlan/subnet/another site](https://dba.stackexchange.com/questions/21474/mysql-database-replication-on-different-vlan-subnet-another-site/214...
The limit is high enough to give no problem on the earth. (Jupiter might be a problem, or earth to moon.) I have used 200ms latency in master-replica setups. Tokyo to London is faster than that. (Please switch from the term "Slave" to "Replica".)
51,036,718
In G17 to G26 cells contain formulas like `=IF(Indent!$C17>0,Indent!$C$5,"")` & as per formula we got result either C5 value or blank. after selecting cell range (G17:G26), I want only C5 value cells in selected range without blank cell. Note: Active Sheet name is Indent As per my regular practice to find non blank ...
2018/06/26
[ "https://Stackoverflow.com/questions/51036718", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9992558/" ]
You can use select case like this ``` SELECT mobileNumber, SUM(CASE WHEN (statusName='unattended') THEN 1 ELSE 0 END) AS unattended, SUM(CASE WHEN (statusName='closed' ) THEN 1 ELSE 0 END) AS closed, SUM(CASE WHEN (statusName='NotApplicable') THEN 1 ELSE 0 END) AS NotApplicable, SUM(CASE WHEN (s...
This is what you need ``` SELECT cust_mob_no, SUM(CASE WHEN (Status='unattended') THEN 1 ELSE 0 END) AS unattended, SUM(CASE WHEN (Status='closed' AND pagecount=1) THEN 1 ELSE 0 END) AS closed, SUM(CASE WHEN (Status='NotApplicable' AND pagecount=2) THEN 1 ELSE 0 END) AS NotApplic...
12,704
Many Emacs commands alter their behavior when called with one or more `C-u` prefixes. In some cases the default behavior of a command is less useful to me than the behavior I get when prefixing it with `C-u`. At the same time, I do not want to get rid of the default behavior completely. To give a concrete example, the...
2015/05/26
[ "https://emacs.stackexchange.com/questions/12704", "https://emacs.stackexchange.com", "https://emacs.stackexchange.com/users/504/" ]
Something like this: ```cl (defun swap-args (fun) (if (not (equal (interactive-form fun) '(interactive "P"))) (error "Unexpected") (advice-add fun :around (lambda (x &rest args) "Swap the meaning the universal prefix argument" (if (called-interactively-p 'any)...
Not that easy as thought. However, as it's trivial to have the swapped command: ``` (defun my-quit-window-args-swapped (&optional bury window) "Adapted docstring blah, blah " (interactive "P") (quit-restore-window window (if bury 'bury 'kill))) ```
12,704
Many Emacs commands alter their behavior when called with one or more `C-u` prefixes. In some cases the default behavior of a command is less useful to me than the behavior I get when prefixing it with `C-u`. At the same time, I do not want to get rid of the default behavior completely. To give a concrete example, the...
2015/05/26
[ "https://emacs.stackexchange.com/questions/12704", "https://emacs.stackexchange.com", "https://emacs.stackexchange.com/users/504/" ]
Another method based on the fact that an `interactive-form` property in the function's plist overrides the form specified in code: ([ref](https://www.gnu.org/software/emacs/manual/html_node/elisp/Using-Interactive.html)) ``` (put 'org-insert-subheading 'interactive-form '(interactive (progn (if current-prefi...
Not that easy as thought. However, as it's trivial to have the swapped command: ``` (defun my-quit-window-args-swapped (&optional bury window) "Adapted docstring blah, blah " (interactive "P") (quit-restore-window window (if bury 'bury 'kill))) ```
12,704
Many Emacs commands alter their behavior when called with one or more `C-u` prefixes. In some cases the default behavior of a command is less useful to me than the behavior I get when prefixing it with `C-u`. At the same time, I do not want to get rid of the default behavior completely. To give a concrete example, the...
2015/05/26
[ "https://emacs.stackexchange.com/questions/12704", "https://emacs.stackexchange.com", "https://emacs.stackexchange.com/users/504/" ]
Something like this: ```cl (defun swap-args (fun) (if (not (equal (interactive-form fun) '(interactive "P"))) (error "Unexpected") (advice-add fun :around (lambda (x &rest args) "Swap the meaning the universal prefix argument" (if (called-interactively-p 'any)...
Another method based on the fact that an `interactive-form` property in the function's plist overrides the form specified in code: ([ref](https://www.gnu.org/software/emacs/manual/html_node/elisp/Using-Interactive.html)) ``` (put 'org-insert-subheading 'interactive-form '(interactive (progn (if current-prefi...
2,582,904
Is it possible to create a table that has no 'id'? For example, this is my domain: ``` class SnbrActVector { int nid String term double weight static mapping = { version false id generator: 'identity' } static constraints = { } } ``` When I run this SQL statement, it fa...
2010/04/06
[ "https://Stackoverflow.com/questions/2582904", "https://Stackoverflow.com", "https://Stackoverflow.com/users/273259/" ]
You probably need to specify that nid is your id column. ``` static mapping = { version false id generator: 'identity', column: 'nid' } ```
Try using: "id( generator: 'assigned')" instead of "id generator: 'identity'" and see if that removes the autoincrement property from the "id" database column.
2,582,904
Is it possible to create a table that has no 'id'? For example, this is my domain: ``` class SnbrActVector { int nid String term double weight static mapping = { version false id generator: 'identity' } static constraints = { } } ``` When I run this SQL statement, it fa...
2010/04/06
[ "https://Stackoverflow.com/questions/2582904", "https://Stackoverflow.com", "https://Stackoverflow.com/users/273259/" ]
Gorm requires an id field to work. You can fake an assigned id by using a transient variable like below. The getters and setters map the nid field to the id field. When saving a domain object using this method you have to do: ``` snbrActVectgor.save(insert:true) ``` because grails thinks a non-null id is a persiste...
Try using: "id( generator: 'assigned')" instead of "id generator: 'identity'" and see if that removes the autoincrement property from the "id" database column.
2,582,904
Is it possible to create a table that has no 'id'? For example, this is my domain: ``` class SnbrActVector { int nid String term double weight static mapping = { version false id generator: 'identity' } static constraints = { } } ``` When I run this SQL statement, it fa...
2010/04/06
[ "https://Stackoverflow.com/questions/2582904", "https://Stackoverflow.com", "https://Stackoverflow.com/users/273259/" ]
There is no way to have no "id". what you can do is change the name of "id" field using assigned id generator.
Try using: "id( generator: 'assigned')" instead of "id generator: 'identity'" and see if that removes the autoincrement property from the "id" database column.
2,582,904
Is it possible to create a table that has no 'id'? For example, this is my domain: ``` class SnbrActVector { int nid String term double weight static mapping = { version false id generator: 'identity' } static constraints = { } } ``` When I run this SQL statement, it fa...
2010/04/06
[ "https://Stackoverflow.com/questions/2582904", "https://Stackoverflow.com", "https://Stackoverflow.com/users/273259/" ]
Gorm requires an id field to work. You can fake an assigned id by using a transient variable like below. The getters and setters map the nid field to the id field. When saving a domain object using this method you have to do: ``` snbrActVectgor.save(insert:true) ``` because grails thinks a non-null id is a persiste...
You probably need to specify that nid is your id column. ``` static mapping = { version false id generator: 'identity', column: 'nid' } ```
2,582,904
Is it possible to create a table that has no 'id'? For example, this is my domain: ``` class SnbrActVector { int nid String term double weight static mapping = { version false id generator: 'identity' } static constraints = { } } ``` When I run this SQL statement, it fa...
2010/04/06
[ "https://Stackoverflow.com/questions/2582904", "https://Stackoverflow.com", "https://Stackoverflow.com/users/273259/" ]
You probably need to specify that nid is your id column. ``` static mapping = { version false id generator: 'identity', column: 'nid' } ```
Yes in Oracle you can use ROWID for ID column. ``` class Document { String id static mapping = { table "DOCUMENTS" version false id column: 'ROWID' } } ```
2,582,904
Is it possible to create a table that has no 'id'? For example, this is my domain: ``` class SnbrActVector { int nid String term double weight static mapping = { version false id generator: 'identity' } static constraints = { } } ``` When I run this SQL statement, it fa...
2010/04/06
[ "https://Stackoverflow.com/questions/2582904", "https://Stackoverflow.com", "https://Stackoverflow.com/users/273259/" ]
Gorm requires an id field to work. You can fake an assigned id by using a transient variable like below. The getters and setters map the nid field to the id field. When saving a domain object using this method you have to do: ``` snbrActVectgor.save(insert:true) ``` because grails thinks a non-null id is a persiste...
There is no way to have no "id". what you can do is change the name of "id" field using assigned id generator.
2,582,904
Is it possible to create a table that has no 'id'? For example, this is my domain: ``` class SnbrActVector { int nid String term double weight static mapping = { version false id generator: 'identity' } static constraints = { } } ``` When I run this SQL statement, it fa...
2010/04/06
[ "https://Stackoverflow.com/questions/2582904", "https://Stackoverflow.com", "https://Stackoverflow.com/users/273259/" ]
Gorm requires an id field to work. You can fake an assigned id by using a transient variable like below. The getters and setters map the nid field to the id field. When saving a domain object using this method you have to do: ``` snbrActVectgor.save(insert:true) ``` because grails thinks a non-null id is a persiste...
Yes in Oracle you can use ROWID for ID column. ``` class Document { String id static mapping = { table "DOCUMENTS" version false id column: 'ROWID' } } ```
2,582,904
Is it possible to create a table that has no 'id'? For example, this is my domain: ``` class SnbrActVector { int nid String term double weight static mapping = { version false id generator: 'identity' } static constraints = { } } ``` When I run this SQL statement, it fa...
2010/04/06
[ "https://Stackoverflow.com/questions/2582904", "https://Stackoverflow.com", "https://Stackoverflow.com/users/273259/" ]
There is no way to have no "id". what you can do is change the name of "id" field using assigned id generator.
Yes in Oracle you can use ROWID for ID column. ``` class Document { String id static mapping = { table "DOCUMENTS" version false id column: 'ROWID' } } ```
222,052
I'm building/modifying a tool using lightning components which houses (dynamically-created) input components in a larger wrapper component. Currently, the inputs correctly send events to the wrapper (to update a master map of values), but because some inputs are linked in different ways, I then need to send an event (l...
2018/06/19
[ "https://salesforce.stackexchange.com/questions/222052", "https://salesforce.stackexchange.com", "https://salesforce.stackexchange.com/users/56174/" ]
You don't need SeeAllData. Your test class can and should construct and insert Custom Settings instances, something you'll often do in an `@testSetup` method. They're constructed and inserted just like normal sObjects. You can populate the `SetupOwnerId` field appropriately if it's a Hierarchy Custom Setting. In most...
Brian & David have covered well the core of your question, but let's also take a look at this: > > Is the reliance on the custom setting in itself the bad practice? > > > If a) this is new code with a new custom setting and b) it is not a hierarchy custom setting where you are actively using the hierarchical feat...
222,052
I'm building/modifying a tool using lightning components which houses (dynamically-created) input components in a larger wrapper component. Currently, the inputs correctly send events to the wrapper (to update a master map of values), but because some inputs are linked in different ways, I then need to send an event (l...
2018/06/19
[ "https://salesforce.stackexchange.com/questions/222052", "https://salesforce.stackexchange.com", "https://salesforce.stackexchange.com/users/56174/" ]
The only known valid use of SeeAllData is for things that explicitly tell you in the documentation that you need SeeAllData, which I believe is only the ConnectApi library. I believe there was also a bug regarding unique indexes, and for that case, you might also need SeeAllData. For every other situation, you should ...
Brian & David have covered well the core of your question, but let's also take a look at this: > > Is the reliance on the custom setting in itself the bad practice? > > > If a) this is new code with a new custom setting and b) it is not a hierarchy custom setting where you are actively using the hierarchical feat...
25,168,616
I am trying to write data (text, floating point data) to a file in binary, which is to be read by another program later. The problem is that this program (in Fort95) is incredibly particular; each byte has to be in exactly the right place in order for the file to be read correctly. I've tried using Bytes objects and .e...
2014/08/06
[ "https://Stackoverflow.com/questions/25168616", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3915727/" ]
Assuming that you want it in little-endian, you could do something like this to write 42 in a four byte binary. ``` test_file=open(PATH_HERE/test_file.dat','ab') test_file.write(b'\xA2\0\0\0') test_file.close() ``` A2 is 42 in hexadecimal, and the bytes `'\xA2\0\0\0'` makes the first byte equal to 42 followed by thr...
In my problem [Write binary string in binary file Python 3.4](https://stackoverflow.com/questions/29834047/write-binary-string-in-binary-file-python-3-4) I do like this: ``` file.write(bytes(chr(int(mgcnmbr)), 'iso8859-1')) ```
25,168,616
I am trying to write data (text, floating point data) to a file in binary, which is to be read by another program later. The problem is that this program (in Fort95) is incredibly particular; each byte has to be in exactly the right place in order for the file to be read correctly. I've tried using Bytes objects and .e...
2014/08/06
[ "https://Stackoverflow.com/questions/25168616", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3915727/" ]
You need the [struct](https://docs.python.org/3.4/library/struct.html) module. ``` import struct fout = open('test.dat', 'wb') fout.write(struct.pack('>i', 42)) fout.write(struct.pack('>f', 2.71828182846)) fout.close() ``` The first argument in struct.pack is the format string. The first character in the format ...
Assuming that you want it in little-endian, you could do something like this to write 42 in a four byte binary. ``` test_file=open(PATH_HERE/test_file.dat','ab') test_file.write(b'\xA2\0\0\0') test_file.close() ``` A2 is 42 in hexadecimal, and the bytes `'\xA2\0\0\0'` makes the first byte equal to 42 followed by thr...
25,168,616
I am trying to write data (text, floating point data) to a file in binary, which is to be read by another program later. The problem is that this program (in Fort95) is incredibly particular; each byte has to be in exactly the right place in order for the file to be read correctly. I've tried using Bytes objects and .e...
2014/08/06
[ "https://Stackoverflow.com/questions/25168616", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3915727/" ]
You need the [struct](https://docs.python.org/3.4/library/struct.html) module. ``` import struct fout = open('test.dat', 'wb') fout.write(struct.pack('>i', 42)) fout.write(struct.pack('>f', 2.71828182846)) fout.close() ``` The first argument in struct.pack is the format string. The first character in the format ...
In my problem [Write binary string in binary file Python 3.4](https://stackoverflow.com/questions/29834047/write-binary-string-in-binary-file-python-3-4) I do like this: ``` file.write(bytes(chr(int(mgcnmbr)), 'iso8859-1')) ```
71,313
Over time I have installed several additional trusted CA certificates to Windows trust store, sometimes because an app pushed me to do so, other times for reasons of development and testing. Is there any command to restore the default (or currently MS recommended) trusted CA certificates and delete any other entries?
2014/10/22
[ "https://security.stackexchange.com/questions/71313", "https://security.stackexchange.com", "https://security.stackexchange.com/users/10247/" ]
**Theoretically,** you could apply the following method: 1. Delete all root CA certificates except the ones that are absolutely needed by Windows itself, as indicated [here](https://docs.microsoft.com/en-US/troubleshoot/windows-server/identity/trusted-root-certificates-are-required). 2. Install the current list of tru...
1. Create a [VirtualBox](https://www.virtualbox.org/wiki/Downloads) VM or [download a pre-made VM by microsoft](https://developer.microsoft.com/en-us/windows/downloads/virtual-machines) (Premade VM will include a few extra certs for code signing and visual studio) 2. Install Windows 10 [here is a wrapper that uses the ...
71,313
Over time I have installed several additional trusted CA certificates to Windows trust store, sometimes because an app pushed me to do so, other times for reasons of development and testing. Is there any command to restore the default (or currently MS recommended) trusted CA certificates and delete any other entries?
2014/10/22
[ "https://security.stackexchange.com/questions/71313", "https://security.stackexchange.com", "https://security.stackexchange.com/users/10247/" ]
I found the following simple method to remove the locally trusted CA certificates not present in the official and current Microsoft Certificate Trust List: First download Sigcheck (<https://docs.microsoft.com/en-us/sysinternals/downloads/sigcheck>) and then execute: ``` >sigcheck.exe -tuv ... Listing valid certifica...
1. Create a [VirtualBox](https://www.virtualbox.org/wiki/Downloads) VM or [download a pre-made VM by microsoft](https://developer.microsoft.com/en-us/windows/downloads/virtual-machines) (Premade VM will include a few extra certs for code signing and visual studio) 2. Install Windows 10 [here is a wrapper that uses the ...
12,731,254
Is it possible to show a download dialog after sending POST data to the server? Since I need many complex values "just" using a HTML form with method post won't work. Until now I used the GET method the following way: ``` $("form").submit(function() { window.location.href = 'upload.php?url='+$(".url").val()+'&ho...
2012/10/04
[ "https://Stackoverflow.com/questions/12731254", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1398695/" ]
You cannot use AJAX to download a file. Instead, you should let the form submit normally.
upload.php can be the action of a POST form. 1. User selects a file from his computer 2. User submits the POST form to upload.php 3. upload.php does whatever needs to be done 4. upload.php returns headers for a file 5. User gets the download dialog
7,751,990
I'm trying to upload a file using `paperclip` in a production environment in Heroku and the log files show: ``` Errno::EACCES (Permission denied - /app/public/system/photos/1/small/081811-2012-honda-cbr1000rr-leaked-003.jpg): ``` Will I *have* to use s3 or similar to handle file uploads, or can I configure path perm...
2011/10/13
[ "https://Stackoverflow.com/questions/7751990", "https://Stackoverflow.com", "https://Stackoverflow.com/users/521411/" ]
I would suggest moving `@Html.Partial("SubtasksGrid", model.Subtasks)` outside of your form, and either having it in a single separate form, or have the partial generate a form for each grid row. This will address your validation problems with your main form, and should also permit you to simplify validation of each r...
Looks like you are working against the MVC egine here. I would use Editor templates and Display templates, EditorFor template for the stuff you wanna validate and post, and Display template for the stuff you dont wanna post and validate.. If you have a TextBoxFor in the display template make sure its binding property h...
7,751,990
I'm trying to upload a file using `paperclip` in a production environment in Heroku and the log files show: ``` Errno::EACCES (Permission denied - /app/public/system/photos/1/small/081811-2012-honda-cbr1000rr-leaked-003.jpg): ``` Will I *have* to use s3 or similar to handle file uploads, or can I configure path perm...
2011/10/13
[ "https://Stackoverflow.com/questions/7751990", "https://Stackoverflow.com", "https://Stackoverflow.com/users/521411/" ]
This is what we've come up with: 1. Add an attribute to all subtask fields (which should *not* be validated when submitting the form), e.g. "data-val-ignore". 2. Set the `ignore` setting on the form's validator to `"[data-val-ignore]"` 3. For the add button, in order to validate the subtask fields (which are normally ...
Looks like you are working against the MVC egine here. I would use Editor templates and Display templates, EditorFor template for the stuff you wanna validate and post, and Display template for the stuff you dont wanna post and validate.. If you have a TextBoxFor in the display template make sure its binding property h...
7,751,990
I'm trying to upload a file using `paperclip` in a production environment in Heroku and the log files show: ``` Errno::EACCES (Permission denied - /app/public/system/photos/1/small/081811-2012-honda-cbr1000rr-leaked-003.jpg): ``` Will I *have* to use s3 or similar to handle file uploads, or can I configure path perm...
2011/10/13
[ "https://Stackoverflow.com/questions/7751990", "https://Stackoverflow.com", "https://Stackoverflow.com/users/521411/" ]
This is what we've come up with: 1. Add an attribute to all subtask fields (which should *not* be validated when submitting the form), e.g. "data-val-ignore". 2. Set the `ignore` setting on the form's validator to `"[data-val-ignore]"` 3. For the add button, in order to validate the subtask fields (which are normally ...
I would suggest moving `@Html.Partial("SubtasksGrid", model.Subtasks)` outside of your form, and either having it in a single separate form, or have the partial generate a form for each grid row. This will address your validation problems with your main form, and should also permit you to simplify validation of each r...
7,751,990
I'm trying to upload a file using `paperclip` in a production environment in Heroku and the log files show: ``` Errno::EACCES (Permission denied - /app/public/system/photos/1/small/081811-2012-honda-cbr1000rr-leaked-003.jpg): ``` Will I *have* to use s3 or similar to handle file uploads, or can I configure path perm...
2011/10/13
[ "https://Stackoverflow.com/questions/7751990", "https://Stackoverflow.com", "https://Stackoverflow.com/users/521411/" ]
I would suggest moving `@Html.Partial("SubtasksGrid", model.Subtasks)` outside of your form, and either having it in a single separate form, or have the partial generate a form for each grid row. This will address your validation problems with your main form, and should also permit you to simplify validation of each r...
To validate part of the form, wrap the section or the controls you want to validate into a div with an `#id` or `.class` and do the following: ``` var validator = $("#myForm").validate(); var isValid = true; $("myDivToBeValidated").find("*[data-val]").each(function (indx, elem) { if (!validator.element(elem)) { i...
7,751,990
I'm trying to upload a file using `paperclip` in a production environment in Heroku and the log files show: ``` Errno::EACCES (Permission denied - /app/public/system/photos/1/small/081811-2012-honda-cbr1000rr-leaked-003.jpg): ``` Will I *have* to use s3 or similar to handle file uploads, or can I configure path perm...
2011/10/13
[ "https://Stackoverflow.com/questions/7751990", "https://Stackoverflow.com", "https://Stackoverflow.com/users/521411/" ]
This is what we've come up with: 1. Add an attribute to all subtask fields (which should *not* be validated when submitting the form), e.g. "data-val-ignore". 2. Set the `ignore` setting on the form's validator to `"[data-val-ignore]"` 3. For the add button, in order to validate the subtask fields (which are normally ...
To validate part of the form, wrap the section or the controls you want to validate into a div with an `#id` or `.class` and do the following: ``` var validator = $("#myForm").validate(); var isValid = true; $("myDivToBeValidated").find("*[data-val]").each(function (indx, elem) { if (!validator.element(elem)) { i...
224,300
Normally after a room is done burning it just cleans itself up, but this power room has been sooty for quite a while now, like hours. It also did not seem to perform as well as it had (which is why it is empty). The lab right below it? Burned 20s before this screen shot was taken. Do the rooms have so many times they ...
2015/06/19
[ "https://gaming.stackexchange.com/questions/224300", "https://gaming.stackexchange.com", "https://gaming.stackexchange.com/users/8581/" ]
Well this appears to be a bug not a game mechanic I stumbled into.. I reloaded my vault and the room is now crisp and clean!.
Well Normally this should happen directly after the fire is out out. If you let the room burn down with no one inside you need to put a dweller in to instantly repair it.
7,754,133
In my site host, I have seen (via phpinfo) that * post\_max\_size = 8Mb * upload\_max\_filesize = 16Mb This led me to think that I should be able to upload as file as big as 16Mb. However, when I do this through a post method (as normal), post\_max\_size takes over and declares that I sent too much. What is the met...
2011/10/13
[ "https://Stackoverflow.com/questions/7754133", "https://Stackoverflow.com", "https://Stackoverflow.com/users/717406/" ]
The normal method to send a file upload is POST, thus also `post_max_size` should be 16 Mb or more. Incidentally, also `memory_limit` plays a role. It should be bigger than 16Mb, but since the default value is 128Mb, you won't see this problem. Example `php.ini` configuration: ``` post_max_size = 16M upload_max_file...
Your server configuration settings allows users to upload files upto 16MB (because you have set [upload\_max\_filesize](http://php.net/upload_max_filesize) = 16Mb) but the [post\_max\_size](http://php.net/post_max_size) accepts post data upto 8MB only. This is why it throws an error. Quoted from the [official PHP site...
7,754,133
In my site host, I have seen (via phpinfo) that * post\_max\_size = 8Mb * upload\_max\_filesize = 16Mb This led me to think that I should be able to upload as file as big as 16Mb. However, when I do this through a post method (as normal), post\_max\_size takes over and declares that I sent too much. What is the met...
2011/10/13
[ "https://Stackoverflow.com/questions/7754133", "https://Stackoverflow.com", "https://Stackoverflow.com/users/717406/" ]
`upload_max_filesize` is the limit of any single file. `post_max_size` is the limit of the entire body of the request, which could include multiple files. Given `post_max_size = 20M` and `upload_max_filesize = 6M` you could upload up to 3 files of 6M each. If instead `post_max_size = 6M` and `upload_max_filesize = 20M...
By POST file uploads are done (commonly, there are also other methods). Look into the method attribute of the form which contains the file-upload field ;) The lowest limit of any related setting supersedes a higher setting: * [post\_max\_size](http://php.net/post_max_size) * [upload\_max\_filesize](http://php.net/upl...
7,754,133
In my site host, I have seen (via phpinfo) that * post\_max\_size = 8Mb * upload\_max\_filesize = 16Mb This led me to think that I should be able to upload as file as big as 16Mb. However, when I do this through a post method (as normal), post\_max\_size takes over and declares that I sent too much. What is the met...
2011/10/13
[ "https://Stackoverflow.com/questions/7754133", "https://Stackoverflow.com", "https://Stackoverflow.com/users/717406/" ]
Your server configuration settings allows users to upload files upto 16MB (because you have set [upload\_max\_filesize](http://php.net/upload_max_filesize) = 16Mb) but the [post\_max\_size](http://php.net/post_max_size) accepts post data upto 8MB only. This is why it throws an error. Quoted from the [official PHP site...
change in php.ini `max_input_vars 1000`
7,754,133
In my site host, I have seen (via phpinfo) that * post\_max\_size = 8Mb * upload\_max\_filesize = 16Mb This led me to think that I should be able to upload as file as big as 16Mb. However, when I do this through a post method (as normal), post\_max\_size takes over and declares that I sent too much. What is the met...
2011/10/13
[ "https://Stackoverflow.com/questions/7754133", "https://Stackoverflow.com", "https://Stackoverflow.com/users/717406/" ]
### **post\_max\_size:** * Sets max size of post data allowed. This setting also affects file upload * To upload large files, this value must be larger than upload\_max\_filesize * Generally speaking, memory\_limit should be larger than post\_max\_size. * *PHP Default: 8M* ### **upload\_max\_filesize:** * The maximu...
change in php.ini `max_input_vars 1000`
7,754,133
In my site host, I have seen (via phpinfo) that * post\_max\_size = 8Mb * upload\_max\_filesize = 16Mb This led me to think that I should be able to upload as file as big as 16Mb. However, when I do this through a post method (as normal), post\_max\_size takes over and declares that I sent too much. What is the met...
2011/10/13
[ "https://Stackoverflow.com/questions/7754133", "https://Stackoverflow.com", "https://Stackoverflow.com/users/717406/" ]
### **post\_max\_size:** * Sets max size of post data allowed. This setting also affects file upload * To upload large files, this value must be larger than upload\_max\_filesize * Generally speaking, memory\_limit should be larger than post\_max\_size. * *PHP Default: 8M* ### **upload\_max\_filesize:** * The maximu...
Your server configuration settings allows users to upload files upto 16MB (because you have set [upload\_max\_filesize](http://php.net/upload_max_filesize) = 16Mb) but the [post\_max\_size](http://php.net/post_max_size) accepts post data upto 8MB only. This is why it throws an error. Quoted from the [official PHP site...
7,754,133
In my site host, I have seen (via phpinfo) that * post\_max\_size = 8Mb * upload\_max\_filesize = 16Mb This led me to think that I should be able to upload as file as big as 16Mb. However, when I do this through a post method (as normal), post\_max\_size takes over and declares that I sent too much. What is the met...
2011/10/13
[ "https://Stackoverflow.com/questions/7754133", "https://Stackoverflow.com", "https://Stackoverflow.com/users/717406/" ]
By POST file uploads are done (commonly, there are also other methods). Look into the method attribute of the form which contains the file-upload field ;) The lowest limit of any related setting supersedes a higher setting: * [post\_max\_size](http://php.net/post_max_size) * [upload\_max\_filesize](http://php.net/upl...
change in php.ini `max_input_vars 1000`
7,754,133
In my site host, I have seen (via phpinfo) that * post\_max\_size = 8Mb * upload\_max\_filesize = 16Mb This led me to think that I should be able to upload as file as big as 16Mb. However, when I do this through a post method (as normal), post\_max\_size takes over and declares that I sent too much. What is the met...
2011/10/13
[ "https://Stackoverflow.com/questions/7754133", "https://Stackoverflow.com", "https://Stackoverflow.com/users/717406/" ]
`upload_max_filesize` is the limit of any single file. `post_max_size` is the limit of the entire body of the request, which could include multiple files. Given `post_max_size = 20M` and `upload_max_filesize = 6M` you could upload up to 3 files of 6M each. If instead `post_max_size = 6M` and `upload_max_filesize = 20M...
Your server configuration settings allows users to upload files upto 16MB (because you have set [upload\_max\_filesize](http://php.net/upload_max_filesize) = 16Mb) but the [post\_max\_size](http://php.net/post_max_size) accepts post data upto 8MB only. This is why it throws an error. Quoted from the [official PHP site...
7,754,133
In my site host, I have seen (via phpinfo) that * post\_max\_size = 8Mb * upload\_max\_filesize = 16Mb This led me to think that I should be able to upload as file as big as 16Mb. However, when I do this through a post method (as normal), post\_max\_size takes over and declares that I sent too much. What is the met...
2011/10/13
[ "https://Stackoverflow.com/questions/7754133", "https://Stackoverflow.com", "https://Stackoverflow.com/users/717406/" ]
`upload_max_filesize` is the limit of any single file. `post_max_size` is the limit of the entire body of the request, which could include multiple files. Given `post_max_size = 20M` and `upload_max_filesize = 6M` you could upload up to 3 files of 6M each. If instead `post_max_size = 6M` and `upload_max_filesize = 20M...
change in php.ini `max_input_vars 1000`
7,754,133
In my site host, I have seen (via phpinfo) that * post\_max\_size = 8Mb * upload\_max\_filesize = 16Mb This led me to think that I should be able to upload as file as big as 16Mb. However, when I do this through a post method (as normal), post\_max\_size takes over and declares that I sent too much. What is the met...
2011/10/13
[ "https://Stackoverflow.com/questions/7754133", "https://Stackoverflow.com", "https://Stackoverflow.com/users/717406/" ]
`upload_max_filesize` is the limit of any single file. `post_max_size` is the limit of the entire body of the request, which could include multiple files. Given `post_max_size = 20M` and `upload_max_filesize = 6M` you could upload up to 3 files of 6M each. If instead `post_max_size = 6M` and `upload_max_filesize = 20M...
### **post\_max\_size:** * Sets max size of post data allowed. This setting also affects file upload * To upload large files, this value must be larger than upload\_max\_filesize * Generally speaking, memory\_limit should be larger than post\_max\_size. * *PHP Default: 8M* ### **upload\_max\_filesize:** * The maximu...
7,754,133
In my site host, I have seen (via phpinfo) that * post\_max\_size = 8Mb * upload\_max\_filesize = 16Mb This led me to think that I should be able to upload as file as big as 16Mb. However, when I do this through a post method (as normal), post\_max\_size takes over and declares that I sent too much. What is the met...
2011/10/13
[ "https://Stackoverflow.com/questions/7754133", "https://Stackoverflow.com", "https://Stackoverflow.com/users/717406/" ]
`upload_max_filesize` is the limit of any single file. `post_max_size` is the limit of the entire body of the request, which could include multiple files. Given `post_max_size = 20M` and `upload_max_filesize = 6M` you could upload up to 3 files of 6M each. If instead `post_max_size = 6M` and `upload_max_filesize = 20M...
The normal method to send a file upload is POST, thus also `post_max_size` should be 16 Mb or more. Incidentally, also `memory_limit` plays a role. It should be bigger than 16Mb, but since the default value is 128Mb, you won't see this problem. Example `php.ini` configuration: ``` post_max_size = 16M upload_max_file...
4,236,299
Currently, I'm using GEdit as my text editor for editing Ruby and Javascript source codes. I would like to give GVim a try to be my editor choice. I have tried to follow <https://github.com/akitaonrails/vimfiles> and few others instructions, but I don't get any luck, when I source ~/.vimrc, then I always get: ``` bash...
2010/11/21
[ "https://Stackoverflow.com/questions/4236299", "https://Stackoverflow.com", "https://Stackoverflow.com/users/35700/" ]
You need to run `source ~/.vimrc` as an Ex mode command. That is, inside Vim itself, hit `:` and enter the command: ``` :source ~/.vimrc ``` Right now, you're running Bash's `source` command, which is entirely not what you want to do.
You can also try integrating Vim with eclipse if you want to bring IDE functionality to Vim (like projects, error highlighting, code completion, etc). If you're interested check out the **[eclim](http://eclim.org/)** project. It supports most of the modern languages, including Ruby, and I highly recommend it.
4,236,299
Currently, I'm using GEdit as my text editor for editing Ruby and Javascript source codes. I would like to give GVim a try to be my editor choice. I have tried to follow <https://github.com/akitaonrails/vimfiles> and few others instructions, but I don't get any luck, when I source ~/.vimrc, then I always get: ``` bash...
2010/11/21
[ "https://Stackoverflow.com/questions/4236299", "https://Stackoverflow.com", "https://Stackoverflow.com/users/35700/" ]
You need to run `source ~/.vimrc` as an Ex mode command. That is, inside Vim itself, hit `:` and enter the command: ``` :source ~/.vimrc ``` Right now, you're running Bash's `source` command, which is entirely not what you want to do.
Try adding a .vim or vimfiles in your $HOME directory. If it still fails, add a file to the .vim directory. I did a ``` cd mkdir .vim cd .vim touch .netrwhist chmod g+w .netrwhist ``` I discovered this while learning about building your own syntax files at [vim wikia creating your own syntax files](http://vim.wikia...
4,236,299
Currently, I'm using GEdit as my text editor for editing Ruby and Javascript source codes. I would like to give GVim a try to be my editor choice. I have tried to follow <https://github.com/akitaonrails/vimfiles> and few others instructions, but I don't get any luck, when I source ~/.vimrc, then I always get: ``` bash...
2010/11/21
[ "https://Stackoverflow.com/questions/4236299", "https://Stackoverflow.com", "https://Stackoverflow.com/users/35700/" ]
`~/.vimrc` is the configuration file for vim, and will automatically be read by vim when it launches in order to know how you want it set up. You can add your non-graphical vim commands, such as key mappings, abbreviations to `~/.vimrc/`. In `~/.gvimrc` you can add commands to set your colorscheme, the default number o...
You can also try integrating Vim with eclipse if you want to bring IDE functionality to Vim (like projects, error highlighting, code completion, etc). If you're interested check out the **[eclim](http://eclim.org/)** project. It supports most of the modern languages, including Ruby, and I highly recommend it.
4,236,299
Currently, I'm using GEdit as my text editor for editing Ruby and Javascript source codes. I would like to give GVim a try to be my editor choice. I have tried to follow <https://github.com/akitaonrails/vimfiles> and few others instructions, but I don't get any luck, when I source ~/.vimrc, then I always get: ``` bash...
2010/11/21
[ "https://Stackoverflow.com/questions/4236299", "https://Stackoverflow.com", "https://Stackoverflow.com/users/35700/" ]
`~/.vimrc` is the configuration file for vim, and will automatically be read by vim when it launches in order to know how you want it set up. You can add your non-graphical vim commands, such as key mappings, abbreviations to `~/.vimrc/`. In `~/.gvimrc` you can add commands to set your colorscheme, the default number o...
Try adding a .vim or vimfiles in your $HOME directory. If it still fails, add a file to the .vim directory. I did a ``` cd mkdir .vim cd .vim touch .netrwhist chmod g+w .netrwhist ``` I discovered this while learning about building your own syntax files at [vim wikia creating your own syntax files](http://vim.wikia...
13,022,183
I'm trying to use Entity Framework 4 for a small database application I'm writing to keep record of downloaded files. When running the application I set a break point after the tableName.Add() method, before the .SaveChanges() method and I can see the data saved into the entity; then I have another break point after ca...
2012/10/23
[ "https://Stackoverflow.com/questions/13022183", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1766946/" ]
Pawel, you guided me in the right direction. The entity had the data, but the database I was looking into did not. But after reading your comment I ran the program from Visual Studio and used Process Monitor to monitor any operations to \*.sdf files. This helped finding out that upon building the solution, it would cre...
You can use [SQL Server Profiler](http://msdn.microsoft.com/en-us/library/ms187929%28v=sql.105%29.aspx) to see if the entity framework has really called the database. (The tool is not included in SQL Server Express)
15,395,406
With [`CoffeeScript`](http://coffeescript.org/) I can extend node's [`http.Server`](http://nodejs.org/api/http.html#http_class_http_server) class: ``` {Server} = require 'http' class MyServer extends Server foo: 'bar' myserver = new MyServer console.log myserver.foo # 'bar' class MyServer2 extends MyServer constr...
2013/03/13
[ "https://Stackoverflow.com/questions/15395406", "https://Stackoverflow.com", "https://Stackoverflow.com/users/959819/" ]
You can use: ``` [_scrollView setContentOffset:CGPointMake(x,y) animated:YES]; ``` and use the x and y as the touch points on the screen you can capture. You can also do an animation with CoreAnimation: ``` [UIScrollView beginAnimations:@"scrollAnimation" context:nil]; [UIScrollView setAnimationDuration:1.0f]...
You can set x if you want to scroll horizontally, otherwise set y to scroll vertical. ``` [_scrollView setContentOffset:CGPointMake(x, y) animated:YES]; ``` and modify the co-ordinates accordingly.
15,395,406
With [`CoffeeScript`](http://coffeescript.org/) I can extend node's [`http.Server`](http://nodejs.org/api/http.html#http_class_http_server) class: ``` {Server} = require 'http' class MyServer extends Server foo: 'bar' myserver = new MyServer console.log myserver.foo # 'bar' class MyServer2 extends MyServer constr...
2013/03/13
[ "https://Stackoverflow.com/questions/15395406", "https://Stackoverflow.com", "https://Stackoverflow.com/users/959819/" ]
this adapted code did the trick (source <http://sugartin.info/2012/01/21/image-sliding-page-by-page-uiscrollview-auto-scrolling-like-image-slider/>) PS : each image is 280 by 200 ``` - (void)viewDidLoad { [super viewDidLoad]; UIScrollView *scr=[[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.s...
You can set x if you want to scroll horizontally, otherwise set y to scroll vertical. ``` [_scrollView setContentOffset:CGPointMake(x, y) animated:YES]; ``` and modify the co-ordinates accordingly.
15,395,406
With [`CoffeeScript`](http://coffeescript.org/) I can extend node's [`http.Server`](http://nodejs.org/api/http.html#http_class_http_server) class: ``` {Server} = require 'http' class MyServer extends Server foo: 'bar' myserver = new MyServer console.log myserver.foo # 'bar' class MyServer2 extends MyServer constr...
2013/03/13
[ "https://Stackoverflow.com/questions/15395406", "https://Stackoverflow.com", "https://Stackoverflow.com/users/959819/" ]
this adapted code did the trick (source <http://sugartin.info/2012/01/21/image-sliding-page-by-page-uiscrollview-auto-scrolling-like-image-slider/>) PS : each image is 280 by 200 ``` - (void)viewDidLoad { [super viewDidLoad]; UIScrollView *scr=[[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.s...
You can use: ``` [_scrollView setContentOffset:CGPointMake(x,y) animated:YES]; ``` and use the x and y as the touch points on the screen you can capture. You can also do an animation with CoreAnimation: ``` [UIScrollView beginAnimations:@"scrollAnimation" context:nil]; [UIScrollView setAnimationDuration:1.0f]...
56,194,859
Suppose I have an AppBar: ``` final AppBar myAppBar = AppBar( leading: IconButton( icon: Icon(Icons.delete), onPressed: () {}, ), ); ``` If I want to reference the main parent context in that `onPressed` function, is there a way to reference the variable without creating a new class or creating a functio...
2019/05/17
[ "https://Stackoverflow.com/questions/56194859", "https://Stackoverflow.com", "https://Stackoverflow.com/users/479947/" ]
You said the parent `Widget` was a `MaterialApp`, so in order to access the `BuildContext` of a parent `Widget`, you can use the `BuildContext` of the child `Widget` in the following way: ```dart class Foo extends StatefulWidget { ... } class FooState extends State<Foo> { ... BuildContext getParentContext() { ...
After some digging, I came across `Builder` and `StatefulBuilder` in the Flutter API documentation: <https://api.flutter.dev/flutter/widgets/Builder-class.html> <https://api.flutter.dev/flutter/widgets/StatefulBuilder-class.html> ``` final AppBar myAppBar = AppBar( leading: IconButton( icon: Icon(Icons.delet...
28,985,391
I want to create own data container like `STL-containers`. ``` template <class priorityType = size_t, class Compare = std::less<priorityType>> class task_queue { public: task_queue(Compare c = Compare()) { } private: std::priority_queue<priorityType, std::vector<priorityType>, Compare> tasks_id; }; ...
2015/03/11
[ "https://Stackoverflow.com/questions/28985391", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1756750/" ]
Just call right [constructor](http://en.cppreference.com/w/cpp/container/priority_queue/priority_queue). ``` task_queue(Compare c = Compare()) : tasks_id(c) { } ```
You just need to invoke it: ``` c(valuetocompare1, valuetocompare2); ``` It's simple as that.
146,494
I've been trying to figure this out for a while now, I believe that this should be easy but I still can't solve it. I'm a beginner at this. -\_- **I have 3 Content types** 1. Venue 2. Food 3. Package I have a List of Venue that will be used as reference for the Food. So, The Food content type has an entity reference...
2015/02/05
[ "https://drupal.stackexchange.com/questions/146494", "https://drupal.stackexchange.com", "https://drupal.stackexchange.com/users/36589/" ]
I got this working with this set up: **Contextual Filter**: field\_venue -> Provide default value ->PHP Code -> PHP contextual filter code > > $node=menu\_get\_object(); > return $node->field\_venue\_for\_catering['und'][0]['target\_id']; > > > * "field\_venue" is the venue field from "Food" * "field\_venue\_...
Not exactly what you want, but you could try adding a filter criterion on Venue to the Food View and expose the criterion. That way the user can filter Food *manually* in the widget.
146,494
I've been trying to figure this out for a while now, I believe that this should be easy but I still can't solve it. I'm a beginner at this. -\_- **I have 3 Content types** 1. Venue 2. Food 3. Package I have a List of Venue that will be used as reference for the Food. So, The Food content type has an entity reference...
2015/02/05
[ "https://drupal.stackexchange.com/questions/146494", "https://drupal.stackexchange.com", "https://drupal.stackexchange.com/users/36589/" ]
I got this working with this set up: **Contextual Filter**: field\_venue -> Provide default value ->PHP Code -> PHP contextual filter code > > $node=menu\_get\_object(); > return $node->field\_venue\_for\_catering['und'][0]['target\_id']; > > > * "field\_venue" is the venue field from "Food" * "field\_venue\_...
I needed to filter a view based on a Taxonomy field in a content type. I found a way to do that and it's very easy. 1- make a contextual filter -> select provide default value. 2- select type -> Taxonomy term id from url, you will get new checkboxes appeared below it. 3- check the following: Load default filter fr...
46,311,925
I am trying to write a program that will allow the user to add items into a shopping cart and remove them. The assignment is to use the Bag class that is already provided by the instructor. ShoppingCart class will derive from Bag class. I am struggling with the inheritance and compiling it. I am confused with the `#in...
2017/09/20
[ "https://Stackoverflow.com/questions/46311925", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7847272/" ]
I think your problem is in == operator which is used in say getFrequencyOf() which tries to compare const Item& and fails since there is no appropriate == defined anywhere. There are actually several problems with it, and without clear border between your code and assignment code, it's hard to be sure, but my best gue...
I strongly suggest implementing all of your template functions in the header files after (not inside of) the class definition, and then #including all the .h files normally as needed (in other words, don't #include your .cpp files). EDIT: Re-read question. Sorry, my teacher always had us implement them in the same file...
2,710,556
I'm retrieving an array of objects from a hidden html input field. The string I'm getting is: ``` "{"id":"1234","name":"john smith","email":"jsmith@blah.com"},{"id":"4431","name":"marry doe","email":"mdoe@blah.com"}" ``` Now I need to pass this as an array of objects again. How do I convert this string into array o...
2010/04/26
[ "https://Stackoverflow.com/questions/2710556", "https://Stackoverflow.com", "https://Stackoverflow.com/users/37759/" ]
``` var array_of_objects = eval("[" + my_string + "]"); ``` This executes the string as code, which is why we need to add the [] to make it an object. This is also one of the few legitimate uses for eval as its the fastest and easiest way. :D
Assuming that `str` holds valid JSON syntax, you can simply call `eval(str)`. For security reasons, it's better to use a [JSON parser](https://github.com/douglascrockford/JSON-js/blob/master/json2.js), like this: ``` JSON.parse(str); ``` Note that `str` must be wrapped in `[]` to be a valid JSON array.
2,710,556
I'm retrieving an array of objects from a hidden html input field. The string I'm getting is: ``` "{"id":"1234","name":"john smith","email":"jsmith@blah.com"},{"id":"4431","name":"marry doe","email":"mdoe@blah.com"}" ``` Now I need to pass this as an array of objects again. How do I convert this string into array o...
2010/04/26
[ "https://Stackoverflow.com/questions/2710556", "https://Stackoverflow.com", "https://Stackoverflow.com/users/37759/" ]
Assuming that `str` holds valid JSON syntax, you can simply call `eval(str)`. For security reasons, it's better to use a [JSON parser](https://github.com/douglascrockford/JSON-js/blob/master/json2.js), like this: ``` JSON.parse(str); ``` Note that `str` must be wrapped in `[]` to be a valid JSON array.
``` var str=eval([{'id':'1','txt':'name1'},{'id':'2','txt':'name2'},{'id':'3','txt':'name3'}]) for(var i=0;i<str.length;i++) { alert(str[i].txt); } ```
2,710,556
I'm retrieving an array of objects from a hidden html input field. The string I'm getting is: ``` "{"id":"1234","name":"john smith","email":"jsmith@blah.com"},{"id":"4431","name":"marry doe","email":"mdoe@blah.com"}" ``` Now I need to pass this as an array of objects again. How do I convert this string into array o...
2010/04/26
[ "https://Stackoverflow.com/questions/2710556", "https://Stackoverflow.com", "https://Stackoverflow.com/users/37759/" ]
Assuming that `str` holds valid JSON syntax, you can simply call `eval(str)`. For security reasons, it's better to use a [JSON parser](https://github.com/douglascrockford/JSON-js/blob/master/json2.js), like this: ``` JSON.parse(str); ``` Note that `str` must be wrapped in `[]` to be a valid JSON array.
There are many bad formatted string object, GET from API, old code, etc. Bad format doesn't means it drops error in code, but drops error for input of JSON.parse(). ``` // not " wrapped key syntax var str = "{ a: 2 }"; console.log( JSON.parse( str ) ); // SyntaxError: JSON.parse: expected property name or '}' at line...
2,710,556
I'm retrieving an array of objects from a hidden html input field. The string I'm getting is: ``` "{"id":"1234","name":"john smith","email":"jsmith@blah.com"},{"id":"4431","name":"marry doe","email":"mdoe@blah.com"}" ``` Now I need to pass this as an array of objects again. How do I convert this string into array o...
2010/04/26
[ "https://Stackoverflow.com/questions/2710556", "https://Stackoverflow.com", "https://Stackoverflow.com/users/37759/" ]
``` var array_of_objects = eval("[" + my_string + "]"); ``` This executes the string as code, which is why we need to add the [] to make it an object. This is also one of the few legitimate uses for eval as its the fastest and easiest way. :D
``` var str=eval([{'id':'1','txt':'name1'},{'id':'2','txt':'name2'},{'id':'3','txt':'name3'}]) for(var i=0;i<str.length;i++) { alert(str[i].txt); } ```
2,710,556
I'm retrieving an array of objects from a hidden html input field. The string I'm getting is: ``` "{"id":"1234","name":"john smith","email":"jsmith@blah.com"},{"id":"4431","name":"marry doe","email":"mdoe@blah.com"}" ``` Now I need to pass this as an array of objects again. How do I convert this string into array o...
2010/04/26
[ "https://Stackoverflow.com/questions/2710556", "https://Stackoverflow.com", "https://Stackoverflow.com/users/37759/" ]
``` var array_of_objects = eval("[" + my_string + "]"); ``` This executes the string as code, which is why we need to add the [] to make it an object. This is also one of the few legitimate uses for eval as its the fastest and easiest way. :D
There are many bad formatted string object, GET from API, old code, etc. Bad format doesn't means it drops error in code, but drops error for input of JSON.parse(). ``` // not " wrapped key syntax var str = "{ a: 2 }"; console.log( JSON.parse( str ) ); // SyntaxError: JSON.parse: expected property name or '}' at line...
2,710,556
I'm retrieving an array of objects from a hidden html input field. The string I'm getting is: ``` "{"id":"1234","name":"john smith","email":"jsmith@blah.com"},{"id":"4431","name":"marry doe","email":"mdoe@blah.com"}" ``` Now I need to pass this as an array of objects again. How do I convert this string into array o...
2010/04/26
[ "https://Stackoverflow.com/questions/2710556", "https://Stackoverflow.com", "https://Stackoverflow.com/users/37759/" ]
There are many bad formatted string object, GET from API, old code, etc. Bad format doesn't means it drops error in code, but drops error for input of JSON.parse(). ``` // not " wrapped key syntax var str = "{ a: 2 }"; console.log( JSON.parse( str ) ); // SyntaxError: JSON.parse: expected property name or '}' at line...
``` var str=eval([{'id':'1','txt':'name1'},{'id':'2','txt':'name2'},{'id':'3','txt':'name3'}]) for(var i=0;i<str.length;i++) { alert(str[i].txt); } ```
41,041,136
We have a web application (a single page app backed by a REST API) that is mainly used on smart phones. Users are encouraged to create a homescreen icon so that they have easy access and a full screen experience. This worked fine until we decided to release a new version of our application. Some browsers are caching th...
2016/12/08
[ "https://Stackoverflow.com/questions/41041136", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1589588/" ]
Posting the solution to my own question. The index.html looks like this: ```html <html> <head> <style> body { margin: 0px; } iframe { overflow: hidden; height: 100vh; width: 100vw; border: none; } </style> </head> <body> <iframe id="content"></iframe> <script> var xmlHt...
You would not be needing an iFrame. You can achieve it through javascript. Create a `XMLHttpRequest` as you are doing from the iframe. Whenever you request for the image by calling the REST API through the XMLHttpRequest, add a query String parameter in the request url whose value is going to be a random number. Sho...
21,148,917
**Edit** I upgraded node and ran "npm install -g contextify" It looks like it installed fine (no errors), but typing in "which contextify" returns nothing. Message while installing contextify: ``` npm http GET https://registry.npmjs.org/contextify npm http 304 https://registry.npmjs.org/contextify npm http GET https:...
2014/01/15
[ "https://Stackoverflow.com/questions/21148917", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2805564/" ]
### Original problem > > Segmentation fault: 11 node "`dirname "$0"` > > > This appears to be a bug in V8 exposed by compiling with Clang. It's been fixed in more recent versions of Node, so you'll need to update. The github issue is tracked [here](https://github.com/joyent/node/issues/6427) ### Edit problem Th...
There is no such thing as `contextify` binary. There is `contextify.node` binary in `/usr/lib/node_modules/contextify/build/Release/` (when installed globally in my ubuntu 12.04). Just use the module in your node program by using `require('contextify')` and it should work. ``` var Contextify = require('contextify');...
21,148,917
**Edit** I upgraded node and ran "npm install -g contextify" It looks like it installed fine (no errors), but typing in "which contextify" returns nothing. Message while installing contextify: ``` npm http GET https://registry.npmjs.org/contextify npm http 304 https://registry.npmjs.org/contextify npm http GET https:...
2014/01/15
[ "https://Stackoverflow.com/questions/21148917", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2805564/" ]
I had the same problem with `node-gyp rebuild`. The solution was install **g++**: ``` apt-get -y install g++ ```
There is no such thing as `contextify` binary. There is `contextify.node` binary in `/usr/lib/node_modules/contextify/build/Release/` (when installed globally in my ubuntu 12.04). Just use the module in your node program by using `require('contextify')` and it should work. ``` var Contextify = require('contextify');...
21,148,917
**Edit** I upgraded node and ran "npm install -g contextify" It looks like it installed fine (no errors), but typing in "which contextify" returns nothing. Message while installing contextify: ``` npm http GET https://registry.npmjs.org/contextify npm http 304 https://registry.npmjs.org/contextify npm http GET https:...
2014/01/15
[ "https://Stackoverflow.com/questions/21148917", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2805564/" ]
I had the same problem with `node-gyp rebuild`. The solution was install **g++**: ``` apt-get -y install g++ ```
### Original problem > > Segmentation fault: 11 node "`dirname "$0"` > > > This appears to be a bug in V8 exposed by compiling with Clang. It's been fixed in more recent versions of Node, so you'll need to update. The github issue is tracked [here](https://github.com/joyent/node/issues/6427) ### Edit problem Th...
558,145
I am writing an algorithm that evaluates the square root of a positive real number $y$. To do this I am using the Newton-Raphton method to approximate the roots to $f(x)=x^2-y$. The $n^{th}$ iteration gives $$x\_n=\frac{x\_{n-1}^2+y}{2x\_{n-1}}$$ as an approximation to $\sqrt{y}$. I found that starting with an initial ...
2013/11/09
[ "https://math.stackexchange.com/questions/558145", "https://math.stackexchange.com", "https://math.stackexchange.com/users/12516/" ]
There is such a formula: consider $$\frac{x\_n+\sqrt y}{x\_n-\sqrt y}=\frac{\frac{x\_{n-1}^2+y}{2x\_{n-1}}+\sqrt y}{\frac{x\_{n-1}^2+y}{2x\_{n-1}}-\sqrt y}=\frac{(x\_{n-1}+\sqrt y)^2}{(x\_{n-1}-\sqrt y)^2}=\left(\frac{x\_{n-1}+\sqrt y}{x\_{n-1}-\sqrt y}\right)^2.$$ By recurrence, $$\frac{x\_n+\sqrt y}{x\_n-\sqrt y}=...
If your starting value of $y$ is correctly "scaled" between $1$ and $100$, then a good initial guess is $X\_0 = 1,1545 + 0,11545\*y$ (linear approx) or if you prefer a second order approx. you can use: $X\_0 = 1,0 + y\*( 0,18 - 0,0009\*y)$ Using $X\_0$, you need only 3 iterations (Newton / Heron) to get a Relative E...
23,968,937
I built an android app which can handle a share intent from Google Maps and show it's coordinates. The problem is that they send a short url which I decode with Google's url shortner api and in some cases, the result long link is of this type: <http://maps.google.com/?cid=3635533832900933072&hl=en&gl=us>. Can anyon...
2014/05/31
[ "https://Stackoverflow.com/questions/23968937", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1102276/" ]
As far as I know there is no public API to get the location from a cid. However, a possible workaround would be to parse the Google Maps output to obtain the latitude and longitude (though it may be brittle, if they change the result format). *(Although the url contains `output=json`, it's not actually json -- that'...
After reading this post yesterday, I found a new method to do it. I hope Google do not close this new API and hidden parameter. :) You can use this API hidden parameter to get the coordinater. Usage: <https://maps.googleapis.com/maps/api/place/details/json?cid=YOUR_CID&key=YOUR_KEY> It returns a result contains forma...
23,968,937
I built an android app which can handle a share intent from Google Maps and show it's coordinates. The problem is that they send a short url which I decode with Google's url shortner api and in some cases, the result long link is of this type: <http://maps.google.com/?cid=3635533832900933072&hl=en&gl=us>. Can anyon...
2014/05/31
[ "https://Stackoverflow.com/questions/23968937", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1102276/" ]
As far as I know there is no public API to get the location from a cid. However, a possible workaround would be to parse the Google Maps output to obtain the latitude and longitude (though it may be brittle, if they change the result format). *(Although the url contains `output=json`, it's not actually json -- that'...
In latest Google Maps update, the share intent contains the address name in the body which can be decoded with Geocoder into coordinates.
31,109,497
Generally I am having a hard time understanding how to construct the data item that i feed into the parseRawData. But here I am having a much simpler problem...I am unable to change the chart legend. I created this visualization: ``` var appRetentionAndroidFunnelQry = new Keen.Query("funnel", { steps: [ ...
2015/06/29
[ "https://Stackoverflow.com/questions/31109497", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1942151/" ]
In the very last piece of your code, you can choose what the labels are: ``` // Draw custom data object combinedFunnel .parseRawData(output) .labels(["Android", "iOS"]) .render(); ``` I got this from: <https://github.com/keen/keen-js/blob/master/docs/visualization.md#funnels>
You can use the .labelMapping() function. Especially when using grouping for the data the order of labels in the data can change, so .labelMapping() is safer than just setting labels with .labels(). ``` chart.data(res).labelMapping({ '741224f021ca7f': 'Sensor A', 'a1a9e6253e16af': 'Sensor B' }).render(); ```
31,109,497
Generally I am having a hard time understanding how to construct the data item that i feed into the parseRawData. But here I am having a much simpler problem...I am unable to change the chart legend. I created this visualization: ``` var appRetentionAndroidFunnelQry = new Keen.Query("funnel", { steps: [ ...
2015/06/29
[ "https://Stackoverflow.com/questions/31109497", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1942151/" ]
Ok, so I played around with this a bit, and to get what you want, you're going to have to completely over ride the dataset that gets passed to the `Dataviz` component. Here is an example jsfiddle that shows you the format for the data to get what you're looking for: <http://jsfiddle.net/hex337/16av86as/2/> The key c...
You can use the .labelMapping() function. Especially when using grouping for the data the order of labels in the data can change, so .labelMapping() is safer than just setting labels with .labels(). ``` chart.data(res).labelMapping({ '741224f021ca7f': 'Sensor A', 'a1a9e6253e16af': 'Sensor B' }).render(); ```
34,694,849
I don't even know if it's mathematically feasible, but let's say I have a tower at (Tx, Ty) shooting at a monster located at (Mx(t),My(t)). The thing is, the path followed by the monster is jagged and swirly, meaning that predictive aiming from a distance based on velocity/direction at -that exact time- would be usele...
2016/01/09
[ "https://Stackoverflow.com/questions/34694849", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5766981/" ]
CodeIgniter optionally supports this capability, which can be enabled in your application/config.php file. If you open your config file you'll see these items: ``` $config['enable_query_strings'] = FALSE; $config['controller_trigger'] = 'c'; $config['function_trigger'] = 'm'; ``` If you change "enable\_query\_string...
You have to change form method from GET to POST. [Inflector helper](https://codeigniter.com/userguide3/helpers/inflector_helper.html#underscore) has function you can use, or you can use [str\_replace()](http://php.net/manual/en/function.str-replace.php) PHP function too. Than something like this: ``` <?php defined('BA...
1,543,313
I have the following action which is executed when a certain button is pressed in a [Qt](http://en.wikipedia.org/wiki/Qt_(toolkit)) application: ``` #include <shape.h> void computeOperations() { polynomial_t p1("x^2-x*y+1"),p2("x^2+2*y-1"); BoundingBox bx(-4.01, 4.01,-6.01,6.01,-6.01,6.01); Topology3d g(b...
2009/10/09
[ "https://Stackoverflow.com/questions/1543313", "https://Stackoverflow.com", "https://Stackoverflow.com/users/82475/" ]
You cannot achieve what you want with the use of try-catch. if g.run() takes too much time or goes into an infinite loop, that doesn't mean an exception will be thrown. What you can do is, you can move the operations that take a lot of time into another thread. Start that thread in your event handler and wait for it ...
Thanks for the suggestions. So I see how I should create the thread, something like: ``` class myopThread : public QThread { public: void run(); }; ``` Then I am rewriting the run() function and put all the operations that take a lot of time in it: ``` void myopThread::run() { polynomial_t p1("x^2-x*y+1"),p...
1,543,313
I have the following action which is executed when a certain button is pressed in a [Qt](http://en.wikipedia.org/wiki/Qt_(toolkit)) application: ``` #include <shape.h> void computeOperations() { polynomial_t p1("x^2-x*y+1"),p2("x^2+2*y-1"); BoundingBox bx(-4.01, 4.01,-6.01,6.01,-6.01,6.01); Topology3d g(b...
2009/10/09
[ "https://Stackoverflow.com/questions/1543313", "https://Stackoverflow.com", "https://Stackoverflow.com/users/82475/" ]
You cannot achieve what you want with the use of try-catch. if g.run() takes too much time or goes into an infinite loop, that doesn't mean an exception will be thrown. What you can do is, you can move the operations that take a lot of time into another thread. Start that thread in your event handler and wait for it ...
The most elegant way to solve this that I know of is with a future value. If you haven't run across these before they can be quite handy in situations like this. Say you have a value that you'll need later on, but you can begin calculating concurrently. The code might look something like this: ``` SomeValue getValue()...
21,779,633
I have to put my device into a very deep low power mode from Linux 2.6.38 and therefore, it's necessary to suspend all components, including CPU und DDR2. What I found out so far is that I have to copy the core assembler function into the processor's internal memory and execute it from there. Basically, it looks like ...
2014/02/14
[ "https://Stackoverflow.com/questions/21779633", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3310207/" ]
As it was [sometimes pointed](http://www.gamefromscratch.com/post/2012/05/09/Pay-as-you-go-Macintosh-development-A-MacInCloudcom-review.aspx) over articles in the internet, Mac in Cloud faces some performance issues. This article refers to may '2012, but can be considered nowadays as a point of concern. On the other h...
Best bet is to sell your surface and buy a used Macbook Pro 2011 from craigslist, i look up and researched all those ways, they never work as good as having a dedicated mac. They always remind you that you don't have a mac. Save yourself the agony...
21,779,633
I have to put my device into a very deep low power mode from Linux 2.6.38 and therefore, it's necessary to suspend all components, including CPU und DDR2. What I found out so far is that I have to copy the core assembler function into the processor's internal memory and execute it from there. Basically, it looks like ...
2014/02/14
[ "https://Stackoverflow.com/questions/21779633", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3310207/" ]
As it was [sometimes pointed](http://www.gamefromscratch.com/post/2012/05/09/Pay-as-you-go-Macintosh-development-A-MacInCloudcom-review.aspx) over articles in the internet, Mac in Cloud faces some performance issues. This article refers to may '2012, but can be considered nowadays as a point of concern. On the other h...
Instead of paying for a cloud instance, you can also [run OSX locally with VMWare](http://www.sysprobs.com/guide-install-os-x-10-9-mavericks-on-vmware-workstation-with-windows-7-or-windows-8) player for free
21,779,633
I have to put my device into a very deep low power mode from Linux 2.6.38 and therefore, it's necessary to suspend all components, including CPU und DDR2. What I found out so far is that I have to copy the core assembler function into the processor's internal memory and execute it from there. Basically, it looks like ...
2014/02/14
[ "https://Stackoverflow.com/questions/21779633", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3310207/" ]
As it was [sometimes pointed](http://www.gamefromscratch.com/post/2012/05/09/Pay-as-you-go-Macintosh-development-A-MacInCloudcom-review.aspx) over articles in the internet, Mac in Cloud faces some performance issues. This article refers to may '2012, but can be considered nowadays as a point of concern. On the other h...
In 2014 this was a tough question to answer, but since this year I have a fairly workable setup as I'm encountering this problem from time to time. **My setup at the end of 2021** (I'm using Windows or Linux on my laptop) * M1 Mac Mini at a trusted location * Google Chrome Remote Desktop * Zoom if I need to tunnel my...
21,779,633
I have to put my device into a very deep low power mode from Linux 2.6.38 and therefore, it's necessary to suspend all components, including CPU und DDR2. What I found out so far is that I have to copy the core assembler function into the processor's internal memory and execute it from there. Basically, it looks like ...
2014/02/14
[ "https://Stackoverflow.com/questions/21779633", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3310207/" ]
Best bet is to sell your surface and buy a used Macbook Pro 2011 from craigslist, i look up and researched all those ways, they never work as good as having a dedicated mac. They always remind you that you don't have a mac. Save yourself the agony...
Instead of paying for a cloud instance, you can also [run OSX locally with VMWare](http://www.sysprobs.com/guide-install-os-x-10-9-mavericks-on-vmware-workstation-with-windows-7-or-windows-8) player for free
21,779,633
I have to put my device into a very deep low power mode from Linux 2.6.38 and therefore, it's necessary to suspend all components, including CPU und DDR2. What I found out so far is that I have to copy the core assembler function into the processor's internal memory and execute it from there. Basically, it looks like ...
2014/02/14
[ "https://Stackoverflow.com/questions/21779633", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3310207/" ]
Best bet is to sell your surface and buy a used Macbook Pro 2011 from craigslist, i look up and researched all those ways, they never work as good as having a dedicated mac. They always remind you that you don't have a mac. Save yourself the agony...
In 2014 this was a tough question to answer, but since this year I have a fairly workable setup as I'm encountering this problem from time to time. **My setup at the end of 2021** (I'm using Windows or Linux on my laptop) * M1 Mac Mini at a trusted location * Google Chrome Remote Desktop * Zoom if I need to tunnel my...
12,762,818
trying to write a query which will paginate through all rows in a column family using astyanax client and RowSliceQuery. ``` keyspace.prepareQuery(COLUMN_FAMILY).getKeyRange(null, null, null, null, 100); ``` Done this successfully using hector where 1st call is done with null start and end keys. After retrieving 1st...
2012/10/06
[ "https://Stackoverflow.com/questions/12762818", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1725589/" ]
What you are referring to is the `getRowRange` method: ``` keyspace.prepareQuery(CF_STANDARD1) .getRowRange(startKey, endKey, startToken, endToken, count) ``` Note however that this works only when the [ByteOrderedPartitioner](http://www.datastax.com/documentation/cassandra/2.1/cassandra/architecture/architectureP...
Check this sample code. I hope this code will help you in doing the paging. ``` IndexQuery<String, String> query = keyspace .prepareQuery(CF_STANDARD1).searchWithIndex() .setRowLimit(10).autoPaginateRows(true).addExpression() .whereColumn("Index2").equals().value(42); ``` Best,
1,639,912
I want to run three commands at the same time from python. The command format is query.pl -args Currently I am doing ``` os.system("query.pl -results '10000' -serverName 'server1' >> log1.txt") os.system("query.pl -results '10000' -serverName 'server2' >> log2.txt") os.system("query.pl -results '10000' -serverName...
2009/10/28
[ "https://Stackoverflow.com/questions/1639912", "https://Stackoverflow.com", "https://Stackoverflow.com/users/178437/" ]
You could use the [subprocess](http://docs.python.org/library/subprocess.html) module and have all three running independently: use subprocess.Popen. Take care in setting the "shell" parameter correctly. Use the wait() or poll() method to determine when the subprocesses are finished.
``` os.system("query.pl -results '10000' -serverName 'server1' &") os.system("query.pl -results '10000' -serverName 'server2' &") os.system("query.pl -results '10000' -serverName 'server3' &") ``` in this case - process will be started in background
1,639,912
I want to run three commands at the same time from python. The command format is query.pl -args Currently I am doing ``` os.system("query.pl -results '10000' -serverName 'server1' >> log1.txt") os.system("query.pl -results '10000' -serverName 'server2' >> log2.txt") os.system("query.pl -results '10000' -serverName...
2009/10/28
[ "https://Stackoverflow.com/questions/1639912", "https://Stackoverflow.com", "https://Stackoverflow.com/users/178437/" ]
You could use the [subprocess](http://docs.python.org/library/subprocess.html) module and have all three running independently: use subprocess.Popen. Take care in setting the "shell" parameter correctly. Use the wait() or poll() method to determine when the subprocesses are finished.
You can use [Queue](http://docs.python.org/library/queue.html) ``` tasks = ("query.pl -results '10000' -serverName 'server1'",\ "query.pl -results '10000' -serverName 'server2'",\ "query.pl -results '10000' -serverName 'server1'") def worker(): while True: item = q.get() os.system(item) q = Queue...
57,125,494
My function `createBomb()` is not working because none of the elements are turning into bombs. I've tried finding the error. HTML: ``` <div class = "grid-square" onclick = "check(1,8)" id = "18">?</div> Javascript: function createBomb() { bombNum = Math.floor(Math.random() * 80) + 1; if (!document.get...
2019/07/20
[ "https://Stackoverflow.com/questions/57125494", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11810692/" ]
You can iterate through all input by using `System.Enum.GetValues()` ``` (using System.Linq;) void Update() { var allKeys = System.Enum.GetValues(typeof(KeyCode)).Cast<KeyCode>(); foreach (var key in allKeys) { if (Input.GetKeyDown(key)) { Debug.Log(key + " was pressed."); } }...
I think this is what you're looking for? this gets the value of the key clicked, however you must debug log the inputValue to know what is coming you cannot use KeyCode.UpArrow in the below, and this might be the only way you can use switch with input. ``` var inputValue = Input.inputString; switch(inputValue)...
57,125,494
My function `createBomb()` is not working because none of the elements are turning into bombs. I've tried finding the error. HTML: ``` <div class = "grid-square" onclick = "check(1,8)" id = "18">?</div> Javascript: function createBomb() { bombNum = Math.floor(Math.random() * 80) + 1; if (!document.get...
2019/07/20
[ "https://Stackoverflow.com/questions/57125494", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11810692/" ]
The accepted answer is very inefficient. You're both using [reflection](https://stackoverflow.com/questions/25458/how-costly-is-net-reflection) ~60 times a second & looping through loads of things you don't need to loop through, just for the sake of using a `switch case` instead of `if`. The way you should be checki...
I think this is what you're looking for? this gets the value of the key clicked, however you must debug log the inputValue to know what is coming you cannot use KeyCode.UpArrow in the below, and this might be the only way you can use switch with input. ``` var inputValue = Input.inputString; switch(inputValue)...
57,125,494
My function `createBomb()` is not working because none of the elements are turning into bombs. I've tried finding the error. HTML: ``` <div class = "grid-square" onclick = "check(1,8)" id = "18">?</div> Javascript: function createBomb() { bombNum = Math.floor(Math.random() * 80) + 1; if (!document.get...
2019/07/20
[ "https://Stackoverflow.com/questions/57125494", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11810692/" ]
You can iterate through all input by using `System.Enum.GetValues()` ``` (using System.Linq;) void Update() { var allKeys = System.Enum.GetValues(typeof(KeyCode)).Cast<KeyCode>(); foreach (var key in allKeys) { if (Input.GetKeyDown(key)) { Debug.Log(key + " was pressed."); } }...
I would do it as follows: ``` void Update() { if (Input.anyKeyDown) { if (Input.GetKeyDown(KeyCode.Up) Debug.Log("Up Arrow key was pressed"); else if (Input.GetKeyDown(KeyCode.Right) Debug.Log("Right Arrow key was pressed"); else if (Input.GetKeyDown(KeyCode.Down) ...
57,125,494
My function `createBomb()` is not working because none of the elements are turning into bombs. I've tried finding the error. HTML: ``` <div class = "grid-square" onclick = "check(1,8)" id = "18">?</div> Javascript: function createBomb() { bombNum = Math.floor(Math.random() * 80) + 1; if (!document.get...
2019/07/20
[ "https://Stackoverflow.com/questions/57125494", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11810692/" ]
The accepted answer is very inefficient. You're both using [reflection](https://stackoverflow.com/questions/25458/how-costly-is-net-reflection) ~60 times a second & looping through loads of things you don't need to loop through, just for the sake of using a `switch case` instead of `if`. The way you should be checki...
I would do it as follows: ``` void Update() { if (Input.anyKeyDown) { if (Input.GetKeyDown(KeyCode.Up) Debug.Log("Up Arrow key was pressed"); else if (Input.GetKeyDown(KeyCode.Right) Debug.Log("Right Arrow key was pressed"); else if (Input.GetKeyDown(KeyCode.Down) ...
4,695
... or more specifically is there a particular name for a verb in the past tense? for example the train has *arrived*, whereas the process of achieving the state would be to *arrive*
2010/11/03
[ "https://english.stackexchange.com/questions/4695", "https://english.stackexchange.com", "https://english.stackexchange.com/users/1941/" ]
Googling further, I found this quote from "The Dictionary of Clichés" by James Rogers: > > **penny for your thoughts** — "What's on your mind? (Usually said to someone who is looking pensive.) The saying is from a time when the British penny was worth a significant sum. In 1522, Sir Thomas More wrote (in 'Four Last T...
The phrase means "Tell me what you are thinking.", and the implication is that you're willing to pay money to know what they are actually thinking. Looks like the phrase is at least 400 years old, and so getting a precise etymology may be hard. > > In 1522, Sir Thomas More wrote (in > 'Four Last Things'): 'It oft...
27,174
In the month of June I am looking to take my lead climbing from indoors into the outdoors. To bridge the gap between my gym skills and whats required in the "wild", I've decided to go on Youtube and look up [some training videos](https://www.youtube.com/watch?v=7U6tdEevJgs). However most videos begin with something lik...
2021/06/01
[ "https://outdoors.stackexchange.com/questions/27174", "https://outdoors.stackexchange.com", "https://outdoors.stackexchange.com/users/12593/" ]
I was a tennis instructor for about 10 years. Here are a few things from my experience that can become problems for you with learning through videos. 1). You have to retain everything that you watched on a video. If you forget something you won't be able to call yourself out on it. And being a beginner you won't have ...
[@AnoE's answer](https://outdoors.stackexchange.com/a/27179/15558) is pretty much bang on, but there are two main elements that you can't learn by watching videos; stress management and improvisation. I've taught numerous people to climb outside, and one thing I've always tried to install in them is that, at some poin...
27,174
In the month of June I am looking to take my lead climbing from indoors into the outdoors. To bridge the gap between my gym skills and whats required in the "wild", I've decided to go on Youtube and look up [some training videos](https://www.youtube.com/watch?v=7U6tdEevJgs). However most videos begin with something lik...
2021/06/01
[ "https://outdoors.stackexchange.com/questions/27174", "https://outdoors.stackexchange.com", "https://outdoors.stackexchange.com/users/12593/" ]
I was a tennis instructor for about 10 years. Here are a few things from my experience that can become problems for you with learning through videos. 1). You have to retain everything that you watched on a video. If you forget something you won't be able to call yourself out on it. And being a beginner you won't have ...
1. In climbing, there are many small, innocuous looking mistakes that can have fatal consequences. A video (especially a short-format one) can really only go over one specific procedure and a few statistically common pitfalls, but it might not cover your specific mistake. Knots can be tied incorrectly (but look right a...
27,174
In the month of June I am looking to take my lead climbing from indoors into the outdoors. To bridge the gap between my gym skills and whats required in the "wild", I've decided to go on Youtube and look up [some training videos](https://www.youtube.com/watch?v=7U6tdEevJgs). However most videos begin with something lik...
2021/06/01
[ "https://outdoors.stackexchange.com/questions/27174", "https://outdoors.stackexchange.com", "https://outdoors.stackexchange.com/users/12593/" ]
I was a tennis instructor for about 10 years. Here are a few things from my experience that can become problems for you with learning through videos. 1). You have to retain everything that you watched on a video. If you forget something you won't be able to call yourself out on it. And being a beginner you won't have ...
Specifically for your example of rock climbing: You should really have personal oversight on your first real rock climbs because the stakes are *much* higher. In the climbing gym, the safe points are in a straight vertical line; everything is colorful and trivial to see and use. If you fall past the 3rd or 4th carabin...
27,174
In the month of June I am looking to take my lead climbing from indoors into the outdoors. To bridge the gap between my gym skills and whats required in the "wild", I've decided to go on Youtube and look up [some training videos](https://www.youtube.com/watch?v=7U6tdEevJgs). However most videos begin with something lik...
2021/06/01
[ "https://outdoors.stackexchange.com/questions/27174", "https://outdoors.stackexchange.com", "https://outdoors.stackexchange.com/users/12593/" ]
I can answer only from experience from learning ice-skating, swimming and tennis. No video can tell you what **you** are doing wrong. For that, you need an experienced instructor. And not all instructors are equal. Some are geniuses at focussing in on **your particular** mistakes and deficits, and telling **you** -- *...
Specifically for your example of rock climbing: You should really have personal oversight on your first real rock climbs because the stakes are *much* higher. In the climbing gym, the safe points are in a straight vertical line; everything is colorful and trivial to see and use. If you fall past the 3rd or 4th carabin...
27,174
In the month of June I am looking to take my lead climbing from indoors into the outdoors. To bridge the gap between my gym skills and whats required in the "wild", I've decided to go on Youtube and look up [some training videos](https://www.youtube.com/watch?v=7U6tdEevJgs). However most videos begin with something lik...
2021/06/01
[ "https://outdoors.stackexchange.com/questions/27174", "https://outdoors.stackexchange.com", "https://outdoors.stackexchange.com/users/12593/" ]
[@AnoE's answer](https://outdoors.stackexchange.com/a/27179/15558) is pretty much bang on, but there are two main elements that you can't learn by watching videos; stress management and improvisation. I've taught numerous people to climb outside, and one thing I've always tried to install in them is that, at some poin...
Learning can be supervised or unsupervised. What you're doing with watching videos is unsupervised. (It works well for a lot of things, no doubt) The difference between supervised and unsupervised is *feedback*. Someone telling you what you're doing well, and what mistakes you're making. In climbing in particular, a...
27,174
In the month of June I am looking to take my lead climbing from indoors into the outdoors. To bridge the gap between my gym skills and whats required in the "wild", I've decided to go on Youtube and look up [some training videos](https://www.youtube.com/watch?v=7U6tdEevJgs). However most videos begin with something lik...
2021/06/01
[ "https://outdoors.stackexchange.com/questions/27174", "https://outdoors.stackexchange.com", "https://outdoors.stackexchange.com/users/12593/" ]
I was a tennis instructor for about 10 years. Here are a few things from my experience that can become problems for you with learning through videos. 1). You have to retain everything that you watched on a video. If you forget something you won't be able to call yourself out on it. And being a beginner you won't have ...
I can answer only from experience from learning ice-skating, swimming and tennis. No video can tell you what **you** are doing wrong. For that, you need an experienced instructor. And not all instructors are equal. Some are geniuses at focussing in on **your particular** mistakes and deficits, and telling **you** -- *...
27,174
In the month of June I am looking to take my lead climbing from indoors into the outdoors. To bridge the gap between my gym skills and whats required in the "wild", I've decided to go on Youtube and look up [some training videos](https://www.youtube.com/watch?v=7U6tdEevJgs). However most videos begin with something lik...
2021/06/01
[ "https://outdoors.stackexchange.com/questions/27174", "https://outdoors.stackexchange.com", "https://outdoors.stackexchange.com/users/12593/" ]
Learning can be supervised or unsupervised. What you're doing with watching videos is unsupervised. (It works well for a lot of things, no doubt) The difference between supervised and unsupervised is *feedback*. Someone telling you what you're doing well, and what mistakes you're making. In climbing in particular, a...
1. In climbing, there are many small, innocuous looking mistakes that can have fatal consequences. A video (especially a short-format one) can really only go over one specific procedure and a few statistically common pitfalls, but it might not cover your specific mistake. Knots can be tied incorrectly (but look right a...
27,174
In the month of June I am looking to take my lead climbing from indoors into the outdoors. To bridge the gap between my gym skills and whats required in the "wild", I've decided to go on Youtube and look up [some training videos](https://www.youtube.com/watch?v=7U6tdEevJgs). However most videos begin with something lik...
2021/06/01
[ "https://outdoors.stackexchange.com/questions/27174", "https://outdoors.stackexchange.com", "https://outdoors.stackexchange.com/users/12593/" ]
I was a tennis instructor for about 10 years. Here are a few things from my experience that can become problems for you with learning through videos. 1). You have to retain everything that you watched on a video. If you forget something you won't be able to call yourself out on it. And being a beginner you won't have ...
Learning can be supervised or unsupervised. What you're doing with watching videos is unsupervised. (It works well for a lot of things, no doubt) The difference between supervised and unsupervised is *feedback*. Someone telling you what you're doing well, and what mistakes you're making. In climbing in particular, a...