qid
int64
1
74.7M
question
stringlengths
0
58.3k
date
stringlengths
10
10
metadata
list
response_j
stringlengths
2
48.3k
response_k
stringlengths
2
40.5k
11,917,086
I have created a JavaScript function which will return data containing 2 URL's. And I would like to insert these into the HTML code. e.g. the return URL values are JavsScript file ``` http://www.domain.com/javascript.js ``` CSS file ``` http://www.domain.com/buttons.css ``` I need to insert these into the code ...
2012/08/11
[ "https://Stackoverflow.com/questions/11917086", "https://Stackoverflow.com", "https://Stackoverflow.com/users/511666/" ]
You can load external css (and also js) files dynamically using javascript. Just create the appropriate `<link>` element using javascript. ``` var url = computeUrl(); /* Obtain url */ var link = document.createElement('link'); /* Create the link element */ link.setAttribute(...
You can easily add nodes to the head element using javascript: ``` link=document.createElement('link'); link.href= your_css_href_function(); link.rel='stylesheet'; link.type='text/css'; document.getElementsByTagName('head')[0].appendChild(link); ``` And the same for your javascript tag: ``` script=document.createE...
24,041,113
When I'm building, VS show error. This is my code: ``` public Composite buildComposite(ComboBox subs, ComboBox bas) { int count = 0; Composite a = new Composite(); if (subs.SelectedItem != null) { foreach (Substance d in listSubstance) { if (String.Compare(d.notation, subs.T...
2014/06/04
[ "https://Stackoverflow.com/questions/24041113", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3453838/" ]
Your `Composite` class is not `public`. You can't return a non-public type from a public method. If you don't specify an accessibility for a non-nested class then `internal` is used by default. Add `public` to your `Composite` class definition: ``` public class Composite { ... ``` Alternatively, if `buildCompos...
you are trying to return an instance of class `Composite` from a public method, but `Composite` is not public therefore can't be returned as any calling code cannot know anything about the `Composite` class as it cannot see it. Make your `Composite` class public. ``` public class Composite{...} ``` or make your met...
24,041,113
When I'm building, VS show error. This is my code: ``` public Composite buildComposite(ComboBox subs, ComboBox bas) { int count = 0; Composite a = new Composite(); if (subs.SelectedItem != null) { foreach (Substance d in listSubstance) { if (String.Compare(d.notation, subs.T...
2014/06/04
[ "https://Stackoverflow.com/questions/24041113", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3453838/" ]
Your `Composite` class is not `public`. You can't return a non-public type from a public method. If you don't specify an accessibility for a non-nested class then `internal` is used by default. Add `public` to your `Composite` class definition: ``` public class Composite { ... ``` Alternatively, if `buildCompos...
Your custom type, Composite, is currently less accessible than your method buildComposite. For other classes to see this public method, they must also have public access to the Composite class/struct.
24,041,113
When I'm building, VS show error. This is my code: ``` public Composite buildComposite(ComboBox subs, ComboBox bas) { int count = 0; Composite a = new Composite(); if (subs.SelectedItem != null) { foreach (Substance d in listSubstance) { if (String.Compare(d.notation, subs.T...
2014/06/04
[ "https://Stackoverflow.com/questions/24041113", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3453838/" ]
Your `Composite` class is not `public`. You can't return a non-public type from a public method. If you don't specify an accessibility for a non-nested class then `internal` is used by default. Add `public` to your `Composite` class definition: ``` public class Composite { ... ``` Alternatively, if `buildCompos...
if `Composite` was defined in unreachable/unmodifiable code like `class Composite`, you could try making `buildComposite` as internal. Like `internal Composite buildComposite(ComboBox subs, ComboBox bas)`. This way it is still more accessible by making the method *private*.
24,041,113
When I'm building, VS show error. This is my code: ``` public Composite buildComposite(ComboBox subs, ComboBox bas) { int count = 0; Composite a = new Composite(); if (subs.SelectedItem != null) { foreach (Substance d in listSubstance) { if (String.Compare(d.notation, subs.T...
2014/06/04
[ "https://Stackoverflow.com/questions/24041113", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3453838/" ]
you are trying to return an instance of class `Composite` from a public method, but `Composite` is not public therefore can't be returned as any calling code cannot know anything about the `Composite` class as it cannot see it. Make your `Composite` class public. ``` public class Composite{...} ``` or make your met...
Your custom type, Composite, is currently less accessible than your method buildComposite. For other classes to see this public method, they must also have public access to the Composite class/struct.
24,041,113
When I'm building, VS show error. This is my code: ``` public Composite buildComposite(ComboBox subs, ComboBox bas) { int count = 0; Composite a = new Composite(); if (subs.SelectedItem != null) { foreach (Substance d in listSubstance) { if (String.Compare(d.notation, subs.T...
2014/06/04
[ "https://Stackoverflow.com/questions/24041113", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3453838/" ]
you are trying to return an instance of class `Composite` from a public method, but `Composite` is not public therefore can't be returned as any calling code cannot know anything about the `Composite` class as it cannot see it. Make your `Composite` class public. ``` public class Composite{...} ``` or make your met...
if `Composite` was defined in unreachable/unmodifiable code like `class Composite`, you could try making `buildComposite` as internal. Like `internal Composite buildComposite(ComboBox subs, ComboBox bas)`. This way it is still more accessible by making the method *private*.
6,969,482
I got a side bar (fixed on the right side) which is made with 3 images, `Top.png`, `Mid.png`, `Bot.png`. I was wondering if there is a way to load those 3 images during runtime and create/merging into a new one (`sideBar.png`), without saving it to the HD. The point is, as I don't know the height of the screen, I am p...
2011/08/06
[ "https://Stackoverflow.com/questions/6969482", "https://Stackoverflow.com", "https://Stackoverflow.com/users/882271/" ]
This seems truly unnecessary. I'd recommend using CSS attribute `repeat-y` and building your HTML and CSS structures in such a way the images will mesh. This is not the purpose of JavaScript.
You haven't shown the HTML markup, but I'm guessing you should put the three images in a container div and animate the container div with one animation, not three. Then, there will not be anything out of sync during the animation.
65,291
Remove the custom design tab from magento category edit page.![enter image description here](https://i.stack.imgur.com/JAXcy.png)
2015/04/30
[ "https://magento.stackexchange.com/questions/65291", "https://magento.stackexchange.com", "https://magento.stackexchange.com/users/24066/" ]
First of all i am asuming you know how to create module [If not please check [This](https://stackoverflow.com/questions/576908/how-to-create-a-simple-hello-world-module-in-magento) ] You can remove a tab using the method `Mage_Adminhtml_Block_Widget_Tabs::removeTab()`. Every edit page in Magento (admin side) is actual...
Not the best but simple way, use below property in your CSS : ``` #category_info_tabs > li:nth-child(3) { display: none; } ```
15,899
In school, our teacher requires us to put a ⇔ sign on the left of our equations, when we do a tranformation on the equation. Usually, I use an `align` context to format multiple transformations of an equation, but I don't know, how to add that extra sign on the left. In the best case, want them to be all align on the s...
2011/04/15
[ "https://tex.stackexchange.com/questions/15899", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/4595/" ]
``` \documentclass{article} \usepackage{amsmath} \def\LRA{\Leftrightarrow\mkern40mu} \pagestyle{empty} \begin{document} \begin{alignat}{2} \LRA && A + B &= C + D \\ \LRA && C + D + F &= Y + K \\ \LRA && E &= F \\ && X &= Z \end{alignat} \end{document} ``` ![enter image description he...
Here's one with eplain: ``` \input eplain \leftdisplays % instead of displays being centered, align them at left $$ \leqalignno{% sets the last column on the left (despite given at right) 2x^2+bx+c&=0\cr x^2+{b\over x}x&=-{c\over2}&\Leftrightarrow\cr x^2+{b\over x}x+{b^2\over4x^2}&={b^2-4xc}&\Leftrightarrow\cr ...
9,739,754
Anyone have the problem with Undo operation (Cmd + Z) in Xcode? When I am edit my Objective-C code with Undo operation, some symbols are not correctly edited. For instance: was { with Undo {{ XCode 4.2.1
2012/03/16
[ "https://Stackoverflow.com/questions/9739754", "https://Stackoverflow.com", "https://Stackoverflow.com/users/744144/" ]
I have Xcode 4.3.2, which still has severe problems with undo/redo -- it will usually crash after one or two redo! Just before it crashes, it will usually do some nonsense edit. --- *Added*: I have experimented with the tip by Walt to turn off line numbers. However, I have not seen any significant drop in crash freq...
they fixed this partially in Xcode 4.3.1, it doesn't occur that often anymore
9,739,754
Anyone have the problem with Undo operation (Cmd + Z) in Xcode? When I am edit my Objective-C code with Undo operation, some symbols are not correctly edited. For instance: was { with Undo {{ XCode 4.2.1
2012/03/16
[ "https://Stackoverflow.com/questions/9739754", "https://Stackoverflow.com", "https://Stackoverflow.com/users/744144/" ]
I have XCode 4.3.2 and I have exactly the same problem. This is a serious bug in XCode 4.3.2 especially because of the nonsense edit that it tossed around in various places in the code file that is being edited before XCode 4.3.2 crashes.
they fixed this partially in Xcode 4.3.1, it doesn't occur that often anymore
9,739,754
Anyone have the problem with Undo operation (Cmd + Z) in Xcode? When I am edit my Objective-C code with Undo operation, some symbols are not correctly edited. For instance: was { with Undo {{ XCode 4.2.1
2012/03/16
[ "https://Stackoverflow.com/questions/9739754", "https://Stackoverflow.com", "https://Stackoverflow.com/users/744144/" ]
I have the same issue with Xcode 4.3.2, specifically the screen starts going garbled and if you are showing line numbers in your editor those will get messed up to then click somewhere else and *crash*. Few quick helpful tips I have found: 1. Option-Command-S *before* you Command-Z (Save All) [in case it crashes you ...
they fixed this partially in Xcode 4.3.1, it doesn't occur that often anymore
9,739,754
Anyone have the problem with Undo operation (Cmd + Z) in Xcode? When I am edit my Objective-C code with Undo operation, some symbols are not correctly edited. For instance: was { with Undo {{ XCode 4.2.1
2012/03/16
[ "https://Stackoverflow.com/questions/9739754", "https://Stackoverflow.com", "https://Stackoverflow.com/users/744144/" ]
I have Xcode 4.3.2, which still has severe problems with undo/redo -- it will usually crash after one or two redo! Just before it crashes, it will usually do some nonsense edit. --- *Added*: I have experimented with the tip by Walt to turn off line numbers. However, I have not seen any significant drop in crash freq...
I have XCode 4.3.2 and I have exactly the same problem. This is a serious bug in XCode 4.3.2 especially because of the nonsense edit that it tossed around in various places in the code file that is being edited before XCode 4.3.2 crashes.
9,739,754
Anyone have the problem with Undo operation (Cmd + Z) in Xcode? When I am edit my Objective-C code with Undo operation, some symbols are not correctly edited. For instance: was { with Undo {{ XCode 4.2.1
2012/03/16
[ "https://Stackoverflow.com/questions/9739754", "https://Stackoverflow.com", "https://Stackoverflow.com/users/744144/" ]
I have Xcode 4.3.2, which still has severe problems with undo/redo -- it will usually crash after one or two redo! Just before it crashes, it will usually do some nonsense edit. --- *Added*: I have experimented with the tip by Walt to turn off line numbers. However, I have not seen any significant drop in crash freq...
I have the same issue with Xcode 4.3.2, specifically the screen starts going garbled and if you are showing line numbers in your editor those will get messed up to then click somewhere else and *crash*. Few quick helpful tips I have found: 1. Option-Command-S *before* you Command-Z (Save All) [in case it crashes you ...
9,739,754
Anyone have the problem with Undo operation (Cmd + Z) in Xcode? When I am edit my Objective-C code with Undo operation, some symbols are not correctly edited. For instance: was { with Undo {{ XCode 4.2.1
2012/03/16
[ "https://Stackoverflow.com/questions/9739754", "https://Stackoverflow.com", "https://Stackoverflow.com/users/744144/" ]
I have Xcode 4.3.2, which still has severe problems with undo/redo -- it will usually crash after one or two redo! Just before it crashes, it will usually do some nonsense edit. --- *Added*: I have experimented with the tip by Walt to turn off line numbers. However, I have not seen any significant drop in crash freq...
Go slowly when using Undo/Redo. I've noticed that it crashes more when I'm hitting Command-Z many times quickly. Try turning off the line numbers in Xcode preferences. That seems to have improved things on my Mac. Preferences -> "Text Editing" tab -> "Editing" subtab uncheck the "Line Numbers" button From the loo...
9,739,754
Anyone have the problem with Undo operation (Cmd + Z) in Xcode? When I am edit my Objective-C code with Undo operation, some symbols are not correctly edited. For instance: was { with Undo {{ XCode 4.2.1
2012/03/16
[ "https://Stackoverflow.com/questions/9739754", "https://Stackoverflow.com", "https://Stackoverflow.com/users/744144/" ]
I have XCode 4.3.2 and I have exactly the same problem. This is a serious bug in XCode 4.3.2 especially because of the nonsense edit that it tossed around in various places in the code file that is being edited before XCode 4.3.2 crashes.
Go slowly when using Undo/Redo. I've noticed that it crashes more when I'm hitting Command-Z many times quickly. Try turning off the line numbers in Xcode preferences. That seems to have improved things on my Mac. Preferences -> "Text Editing" tab -> "Editing" subtab uncheck the "Line Numbers" button From the loo...
9,739,754
Anyone have the problem with Undo operation (Cmd + Z) in Xcode? When I am edit my Objective-C code with Undo operation, some symbols are not correctly edited. For instance: was { with Undo {{ XCode 4.2.1
2012/03/16
[ "https://Stackoverflow.com/questions/9739754", "https://Stackoverflow.com", "https://Stackoverflow.com/users/744144/" ]
I have the same issue with Xcode 4.3.2, specifically the screen starts going garbled and if you are showing line numbers in your editor those will get messed up to then click somewhere else and *crash*. Few quick helpful tips I have found: 1. Option-Command-S *before* you Command-Z (Save All) [in case it crashes you ...
Go slowly when using Undo/Redo. I've noticed that it crashes more when I'm hitting Command-Z many times quickly. Try turning off the line numbers in Xcode preferences. That seems to have improved things on my Mac. Preferences -> "Text Editing" tab -> "Editing" subtab uncheck the "Line Numbers" button From the loo...
25,119,380
I have crated a dialog activity which pops up when my application receives a message from the cloud, prompting the user to take an action (pressing yes/no). But if there are to notifications in the same time, the new dialog intent overlaps the first, and if the user selects either yes/no, a 3rd activity is started and ...
2014/08/04
[ "https://Stackoverflow.com/questions/25119380", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2483101/" ]
According to [the plugin github page](https://github.com/jmeter-maven-plugin/jmeter-maven-plugin/wiki/Configuring-the-jvm-that-the-jmeter-process-runs-in), you set the JVM options via the project configuration file, like this: ``` <plugin> <groupId>com.lazerycode.jmeter</groupId> <artifactId>jmeter-maven-plugin</a...
Typical reason for StackOverflowError is bad recursive call, increasing heap won't help. Do you use any scripting or looping in your test plan? If so, inspect it carefully to detect any nested calls or loops.
1,881,600
Can i use if else under a check constraint. Can i use check constraint using a variable need xplanation with eg.
2009/12/10
[ "https://Stackoverflow.com/questions/1881600", "https://Stackoverflow.com", "https://Stackoverflow.com/users/203262/" ]
You cannot use `IF/ELSE`, but you can use inline conditionals: `CASE WHEN`
Your question is a bit vague. What are you trying to do with the IF...ELSE? Check constraints aren't processed code, they're part of the table definition - there is no control flow and no variables. You can use a user-defined function in check constraints, which may be what you're after, but it's hard to tell from your...
8,249,256
in Ie I am getting a javascript error: 'Style' is null or not an object lightbox-resize.js Line 33 char 6 code 0 This realates to the following page: <http://www.nickypellegrino.com/blog/> I can figure out what is causing this issue. The page (and the lightbox) works fine in firefox/chrome - but not in IE. There...
2011/11/23
[ "https://Stackoverflow.com/questions/8249256", "https://Stackoverflow.com", "https://Stackoverflow.com/users/735369/" ]
The problem stems from the collision between Prototype and jQuery over the symbol "$". You're going to have to make one or the other of them relinquish it. With jQuery, you do it like this: ``` jQuery.noConflict(); ``` right after including the library: ``` <script type='text/javascript' src='https://ajax.googleap...
You are using prototype.js and jQuery without using jQuery's [noConflict()](http://api.jquery.com/jQuery.noConflict/), what results in a conflict when using `$()`
29,933,386
I have a large mysqldump (4+ gigs), and we have an archive type table which [suffers from this bug](http://bugs.mysql.com/bug.php?id=37182) Net result is that I need to reset the AUTO\_INCREMENT counter to zero. Did manage to do the replacement, but it was ugly, involving splitting the file into smaller chunks, then gr...
2015/04/29
[ "https://Stackoverflow.com/questions/29933386", "https://Stackoverflow.com", "https://Stackoverflow.com/users/435817/" ]
If `perl` is an option then it is easier using `DOTALL` flag in `perl` like this: ``` perl -00 -pe 's/(?s)(CREATE TABLE `archive_exported_problems`.*?AUTO_INCREMENT)=\d+/$1=0/' file.sql DROP TABLE IF EXISTS `archive_exported_problems`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET char...
Consider this: ``` $ sed -r '/CREATE TABLE `archive_exported_problems`/,/AUTO_INCREMENT=/ {s/(AUTO_INCREMENT)=[[:digit:]]+/\1=0/;}' file DROP TABLE IF EXISTS `archive_exported_problems`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `archive_ex...
10,634,340
I'm trying to implement the new Windows 7 taskbar progress bar. I managed to get it to work with TBPF\_NORMAL state using the following code: ``` CoCreateInstance(CLSID_TaskbarList, NULL, CLSCTX_INPROC_SERVER, IID_PPV_ARGS(&taskbarList)); HRESULT c = taskbarList->SetProgressState(hWnd, TBPF_NORMAL); if (c != S_OK) Me...
2012/05/17
[ "https://Stackoverflow.com/questions/10634340", "https://Stackoverflow.com", "https://Stackoverflow.com/users/561309/" ]
Okay, it looks like it was a problem with the configuration of my system. I post the answer here because it's not obvious why one progress bar animation would work but not another. In System Properties / Performance Options, I had "Animations in the taskbar and Start Menu" disabled. This option apparently disables the...
This happened to me too. In the code, I have a Form A that shows a Form B (which Form B in the OnLoad event calls SetProgressState) and after that Form A calls the method Close to itself, and when it was in Indeterminate mode it didn't show anything! Surpringsly, if I close first Form A and then show Form B, the probl...
679,099
``` say -v Alex "Hello" ``` Is there a way to change the speed of speech like there is in the speech settings of *System Preferences* -> *Date & Time* -> *Clock* -> *Customize Voice*? ![enter image description here](https://i.stack.imgur.com/XpeWm.png)
2013/11/22
[ "https://superuser.com/questions/679099", "https://superuser.com", "https://superuser.com/users/94704/" ]
Yes, there is. The command ``` say -v Alex "Hello" -r 200 ``` will cause the voice Alex say "Hello" at a rate of 200 words/minute.
There is also an [embedded speech command](https://developer.apple.com/library/mac/documentation/UserExperience/Conceptual/SpeechSynthesisProgrammingGuide/FineTuning/FineTuning.html#//apple_ref/doc/uid/TP40004365-CH5-SW3) for changing the rate: ``` say '[[rate 200]] hello' ```
679,099
``` say -v Alex "Hello" ``` Is there a way to change the speed of speech like there is in the speech settings of *System Preferences* -> *Date & Time* -> *Clock* -> *Customize Voice*? ![enter image description here](https://i.stack.imgur.com/XpeWm.png)
2013/11/22
[ "https://superuser.com/questions/679099", "https://superuser.com", "https://superuser.com/users/94704/" ]
Yes, there is. The command ``` say -v Alex "Hello" -r 200 ``` will cause the voice Alex say "Hello" at a rate of 200 words/minute.
FWIW: I'm on Big Sur and the `-r`/`--rate` is simply ignored. However, the embedded command as described by [@lri](https://superuser.com/users/69039/lri) still works. P.S. I see in an earlier comment that 10.13 also had that issue. Well...
679,099
``` say -v Alex "Hello" ``` Is there a way to change the speed of speech like there is in the speech settings of *System Preferences* -> *Date & Time* -> *Clock* -> *Customize Voice*? ![enter image description here](https://i.stack.imgur.com/XpeWm.png)
2013/11/22
[ "https://superuser.com/questions/679099", "https://superuser.com", "https://superuser.com/users/94704/" ]
There is also an [embedded speech command](https://developer.apple.com/library/mac/documentation/UserExperience/Conceptual/SpeechSynthesisProgrammingGuide/FineTuning/FineTuning.html#//apple_ref/doc/uid/TP40004365-CH5-SW3) for changing the rate: ``` say '[[rate 200]] hello' ```
FWIW: I'm on Big Sur and the `-r`/`--rate` is simply ignored. However, the embedded command as described by [@lri](https://superuser.com/users/69039/lri) still works. P.S. I see in an earlier comment that 10.13 also had that issue. Well...
19,117,738
I am working on ROR apps and Mongo DB , App has two controller : 1) Portfolio --- All method related to admin. 2) Target ---- All actions which are used for public display of data. Now I want to put a log in page into my website so only login users can see views related to portfolio ? How can I do that. Any lead ...
2013/10/01
[ "https://Stackoverflow.com/questions/19117738", "https://Stackoverflow.com", "https://Stackoverflow.com/users/793806/" ]
You should check the [devise](https://github.com/plataformatec/devise) gem.
If you don't want an administrator panel, you can just use Devise: <https://github.com/plataformatec/devise> You can then use `user_signed_in?` to control what is shown to the user. In other words: ``` <% if user_signed_in? %> Only signed in users can see this message! <% end %> ```
19,117,738
I am working on ROR apps and Mongo DB , App has two controller : 1) Portfolio --- All method related to admin. 2) Target ---- All actions which are used for public display of data. Now I want to put a log in page into my website so only login users can see views related to portfolio ? How can I do that. Any lead ...
2013/10/01
[ "https://Stackoverflow.com/questions/19117738", "https://Stackoverflow.com", "https://Stackoverflow.com/users/793806/" ]
I would look into either RailsAdmin: <https://github.com/sferik/rails_admin> Or try ActiveAdmin: <https://github.com/gregbell/active_admin> They both include Devise, as suggested by grotori, and give you admin panel functionality out of the box. If you're using Mongoid, you'd also want to look at: <https://github...
If you don't want an administrator panel, you can just use Devise: <https://github.com/plataformatec/devise> You can then use `user_signed_in?` to control what is shown to the user. In other words: ``` <% if user_signed_in? %> Only signed in users can see this message! <% end %> ```
68,240,571
I have this DF: `Columns: df=pd.DataFrame(columns=["a","b","c","d","e","f","g"])` and this : `data=["a:42","b:43","c:22","d:41","a:21","b:14" ,"c:12","e:14" ,"f:7","a:0" ,"d:1","f:3","a:6" ,"b:0","c:9","g:8" ]` I need ``` for d in data: spli=d.split(":") colum=spli[0] value=spli[1] df[colum] = value ```...
2021/07/03
[ "https://Stackoverflow.com/questions/68240571", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11172101/" ]
`.loc` can help you here: ``` last_c = 'z' # Enter some ordinally large string r = -1 for x in data: c,v = x.split(':') if c <= last_c: r += 1 df.loc[r,c] = v last_c = c a b c d e f g 0 42 43 22 41 NaN NaN NaN 1 21 14 12 NaN 14 7 NaN 2 0 ...
Is it posible to convert your data to a list of dictionary like: ``` data = [{"a":42,"b":43,"c":22,"d":41}, {"a":21,"b":14 ,"c":12,"e":14 ,"f":7}, {"a":0 ,"d":1,"f":3}, {"a":6 ,"b":0,"c":9,"g":8}] ``` Then, you can create a dataframe by: ``` df=pd.DataFrame(data). ```
68,240,571
I have this DF: `Columns: df=pd.DataFrame(columns=["a","b","c","d","e","f","g"])` and this : `data=["a:42","b:43","c:22","d:41","a:21","b:14" ,"c:12","e:14" ,"f:7","a:0" ,"d:1","f:3","a:6" ,"b:0","c:9","g:8" ]` I need ``` for d in data: spli=d.split(":") colum=spli[0] value=spli[1] df[colum] = value ```...
2021/07/03
[ "https://Stackoverflow.com/questions/68240571", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11172101/" ]
You need a non-empty df to set a column to a certain value. You can create a new df for a row with all nans, and then set column values. You can test whether you need a new row by comparing the numeric value of a, b, c ... with ord(). Append the df\_row to the master df for each new row, and once at the end of the loop...
Is it posible to convert your data to a list of dictionary like: ``` data = [{"a":42,"b":43,"c":22,"d":41}, {"a":21,"b":14 ,"c":12,"e":14 ,"f":7}, {"a":0 ,"d":1,"f":3}, {"a":6 ,"b":0,"c":9,"g":8}] ``` Then, you can create a dataframe by: ``` df=pd.DataFrame(data). ```
2,194,289
What I am looking for is a tool that easily or automatically sends coldfusion error messages to their system. Then I can use the web-based interface, to manage priorities, track who fixed what and so forth. But I want to use this to help us deal with errors better, but also to show the importance of a bug tracking ...
2010/02/03
[ "https://Stackoverflow.com/questions/2194289", "https://Stackoverflow.com", "https://Stackoverflow.com/users/191899/" ]
A lot of good information from everyone, and I really do appreciate the efforts given. But not the answer i was looking for. Which maybe means, that what i want does not exist, yet. So i may have to roll my own solution...Or maybe integrate with another existing app... Thank You all.
We use [HopToad](http://www.hoptoadapp.com/pages/home). There is another bug-tracking app called [LightHouse](http://lighthouseapp.com/) that integrates with HopToad so you can easily create a [bug] ticket from an incoming exception. HopToad has an API of which there are many clients, you want the CF based one: <http:...
2,194,289
What I am looking for is a tool that easily or automatically sends coldfusion error messages to their system. Then I can use the web-based interface, to manage priorities, track who fixed what and so forth. But I want to use this to help us deal with errors better, but also to show the importance of a bug tracking ...
2010/02/03
[ "https://Stackoverflow.com/questions/2194289", "https://Stackoverflow.com", "https://Stackoverflow.com/users/191899/" ]
I'm surprised no one mentioned LighthousePro (<http://lighthousepro.riaforge.org>). Open source - 100% free - and ColdFusion. As the author I'm a bit biased though. :)
We use [HopToad](http://www.hoptoadapp.com/pages/home). There is another bug-tracking app called [LightHouse](http://lighthouseapp.com/) that integrates with HopToad so you can easily create a [bug] ticket from an incoming exception. HopToad has an API of which there are many clients, you want the CF based one: <http:...
2,194,289
What I am looking for is a tool that easily or automatically sends coldfusion error messages to their system. Then I can use the web-based interface, to manage priorities, track who fixed what and so forth. But I want to use this to help us deal with errors better, but also to show the importance of a bug tracking ...
2010/02/03
[ "https://Stackoverflow.com/questions/2194289", "https://Stackoverflow.com", "https://Stackoverflow.com/users/191899/" ]
I have been heavily using this type of a setup for several years by email only, and the last 3 years with a Bug Tracking Software. I must say, the bug tracking software has made my life so much more peaceful. Nothing is left, forgotten, or slips through the cracks. It's easy to find trends in errors, and remember "all...
There are few in CF411 list: [Bug Tracking/Defect Tracking/Trouble Ticket/Help Desk Tools Written in CFML](http://www.carehart.org/cf411/#bugcfml)
2,194,289
What I am looking for is a tool that easily or automatically sends coldfusion error messages to their system. Then I can use the web-based interface, to manage priorities, track who fixed what and so forth. But I want to use this to help us deal with errors better, but also to show the importance of a bug tracking ...
2010/02/03
[ "https://Stackoverflow.com/questions/2194289", "https://Stackoverflow.com", "https://Stackoverflow.com/users/191899/" ]
Wiki has a list of issue tracking software, maybe this list could help. <http://en.wikipedia.org/wiki/Comparison_of_issue_tracking_systems> You may be able to find a hosted service and use either email or web services to create the ticket using onError. With that said, a simple issue tracking app could be created for ...
We use [HopToad](http://www.hoptoadapp.com/pages/home). There is another bug-tracking app called [LightHouse](http://lighthouseapp.com/) that integrates with HopToad so you can easily create a [bug] ticket from an incoming exception. HopToad has an API of which there are many clients, you want the CF based one: <http:...
2,194,289
What I am looking for is a tool that easily or automatically sends coldfusion error messages to their system. Then I can use the web-based interface, to manage priorities, track who fixed what and so forth. But I want to use this to help us deal with errors better, but also to show the importance of a bug tracking ...
2010/02/03
[ "https://Stackoverflow.com/questions/2194289", "https://Stackoverflow.com", "https://Stackoverflow.com/users/191899/" ]
I'm surprised no one mentioned LighthousePro (<http://lighthousepro.riaforge.org>). Open source - 100% free - and ColdFusion. As the author I'm a bit biased though. :)
A lot of bug tracking software will expose SOAP methods for entering data into them. For example, we used Axosoft's OnTime and that exposed some WSDL pages that I consumed in my application. I was told that Jira did as well.
2,194,289
What I am looking for is a tool that easily or automatically sends coldfusion error messages to their system. Then I can use the web-based interface, to manage priorities, track who fixed what and so forth. But I want to use this to help us deal with errors better, but also to show the importance of a bug tracking ...
2010/02/03
[ "https://Stackoverflow.com/questions/2194289", "https://Stackoverflow.com", "https://Stackoverflow.com/users/191899/" ]
A lot of good information from everyone, and I really do appreciate the efforts given. But not the answer i was looking for. Which maybe means, that what i want does not exist, yet. So i may have to roll my own solution...Or maybe integrate with another existing app... Thank You all.
A lot of bug tracking software will expose SOAP methods for entering data into them. For example, we used Axosoft's OnTime and that exposed some WSDL pages that I consumed in my application. I was told that Jira did as well.
2,194,289
What I am looking for is a tool that easily or automatically sends coldfusion error messages to their system. Then I can use the web-based interface, to manage priorities, track who fixed what and so forth. But I want to use this to help us deal with errors better, but also to show the importance of a bug tracking ...
2010/02/03
[ "https://Stackoverflow.com/questions/2194289", "https://Stackoverflow.com", "https://Stackoverflow.com/users/191899/" ]
Wiki has a list of issue tracking software, maybe this list could help. <http://en.wikipedia.org/wiki/Comparison_of_issue_tracking_systems> You may be able to find a hosted service and use either email or web services to create the ticket using onError. With that said, a simple issue tracking app could be created for ...
A lot of bug tracking software will expose SOAP methods for entering data into them. For example, we used Axosoft's OnTime and that exposed some WSDL pages that I consumed in my application. I was told that Jira did as well.
2,194,289
What I am looking for is a tool that easily or automatically sends coldfusion error messages to their system. Then I can use the web-based interface, to manage priorities, track who fixed what and so forth. But I want to use this to help us deal with errors better, but also to show the importance of a bug tracking ...
2010/02/03
[ "https://Stackoverflow.com/questions/2194289", "https://Stackoverflow.com", "https://Stackoverflow.com/users/191899/" ]
Wiki has a list of issue tracking software, maybe this list could help. <http://en.wikipedia.org/wiki/Comparison_of_issue_tracking_systems> You may be able to find a hosted service and use either email or web services to create the ticket using onError. With that said, a simple issue tracking app could be created for ...
There are few in CF411 list: [Bug Tracking/Defect Tracking/Trouble Ticket/Help Desk Tools Written in CFML](http://www.carehart.org/cf411/#bugcfml)
2,194,289
What I am looking for is a tool that easily or automatically sends coldfusion error messages to their system. Then I can use the web-based interface, to manage priorities, track who fixed what and so forth. But I want to use this to help us deal with errors better, but also to show the importance of a bug tracking ...
2010/02/03
[ "https://Stackoverflow.com/questions/2194289", "https://Stackoverflow.com", "https://Stackoverflow.com/users/191899/" ]
A lot of good information from everyone, and I really do appreciate the efforts given. But not the answer i was looking for. Which maybe means, that what i want does not exist, yet. So i may have to roll my own solution...Or maybe integrate with another existing app... Thank You all.
I really like Fogbugz from the makers of Stack Overflow. For one user it's quite reasonably priced. I enter some bugs manually and have others emailed in.
2,194,289
What I am looking for is a tool that easily or automatically sends coldfusion error messages to their system. Then I can use the web-based interface, to manage priorities, track who fixed what and so forth. But I want to use this to help us deal with errors better, but also to show the importance of a bug tracking ...
2010/02/03
[ "https://Stackoverflow.com/questions/2194289", "https://Stackoverflow.com", "https://Stackoverflow.com/users/191899/" ]
A lot of good information from everyone, and I really do appreciate the efforts given. But not the answer i was looking for. Which maybe means, that what i want does not exist, yet. So i may have to roll my own solution...Or maybe integrate with another existing app... Thank You all.
Hard question to answer not knowing what kind of restrictions are there? Do you have any permissions to install anything? Also most bug-tracking systems require some kind of database support. I have a suggestion. You can put in place a basic bug-tracking system, that just allows people to create tickets, and allows yo...
12,018,811
I want to create a multipage PDF report using *iReport*. When I'm designing in *iReport* it crosses A4 page size. If I increase page height, it prints out empty space in the page. How can I create a multi-page report? The resulting report: ![enter image description here](https://i.stack.imgur.com/2Usiz.jpg)
2012/08/18
[ "https://Stackoverflow.com/questions/12018811", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1097733/" ]
I am using bellow code and its works perfect for me. You may also try this code. ``` <detail> <band height="802" splitType="Stretch"> // page 1 design here </band> <band height="802" splitType="Stretch"> // page 2 design here </band> <band height="802" splitTyp...
In common properties of main report there is page setup option. There you provide the page dimensions which you want in your output. Also ignore pagination flag should be set to false
9,947,718
> > **Possible Duplicate:** > > [VS2005 C# Programmatically change connection string contained in app.config](https://stackoverflow.com/questions/63546/vs2005-c-sharp-programmatically-change-connection-string-contained-in-app-config) > > > I have created a WinForms project in my PC using C#, and would like to ...
2012/03/30
[ "https://Stackoverflow.com/questions/9947718", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1286824/" ]
If you've created a settings file for your project, there will be a class that represents the properties in a type-safe manner. This is typically something like `TiddleBits.Properties.Settings.Default`, where *TwiddleBits* is your assembly name. If you haven't created a settings file for your project, do it. It vastly...
You can tell the users to edit the app.config, or you can provide a UI and use the ConfigurationManager to edit the app.config at runtime. [Edit app config at runtime](http://itsmebhavin.wordpress.com/2012/02/08/edit-app-config-at-runtime-c/) [Update app.config system.net setting at runtime](https://stackoverflow.com...
9,947,718
> > **Possible Duplicate:** > > [VS2005 C# Programmatically change connection string contained in app.config](https://stackoverflow.com/questions/63546/vs2005-c-sharp-programmatically-change-connection-string-contained-in-app-config) > > > I have created a WinForms project in my PC using C#, and would like to ...
2012/03/30
[ "https://Stackoverflow.com/questions/9947718", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1286824/" ]
If you've created a settings file for your project, there will be a class that represents the properties in a type-safe manner. This is typically something like `TiddleBits.Properties.Settings.Default`, where *TwiddleBits* is your assembly name. If you haven't created a settings file for your project, do it. It vastly...
Like others have said creating your own config file is the way to go. Here is some code that may help Just create an app.config file in VS and put it in the same directory as dll. It will look something like this. ``` <?xml version="1.0" encoding="utf-8" ?> <configuration> <appSettings> <add...
9,947,718
> > **Possible Duplicate:** > > [VS2005 C# Programmatically change connection string contained in app.config](https://stackoverflow.com/questions/63546/vs2005-c-sharp-programmatically-change-connection-string-contained-in-app-config) > > > I have created a WinForms project in my PC using C#, and would like to ...
2012/03/30
[ "https://Stackoverflow.com/questions/9947718", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1286824/" ]
If you've created a settings file for your project, there will be a class that represents the properties in a type-safe manner. This is typically something like `TiddleBits.Properties.Settings.Default`, where *TwiddleBits* is your assembly name. If you haven't created a settings file for your project, do it. It vastly...
Modify the app config from code. <http://chiragrdarji.wordpress.com/2008/09/25/how-to-change-appconfig-file-run-time-using-c/>
9,947,718
> > **Possible Duplicate:** > > [VS2005 C# Programmatically change connection string contained in app.config](https://stackoverflow.com/questions/63546/vs2005-c-sharp-programmatically-change-connection-string-contained-in-app-config) > > > I have created a WinForms project in my PC using C#, and would like to ...
2012/03/30
[ "https://Stackoverflow.com/questions/9947718", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1286824/" ]
You can tell the users to edit the app.config, or you can provide a UI and use the ConfigurationManager to edit the app.config at runtime. [Edit app config at runtime](http://itsmebhavin.wordpress.com/2012/02/08/edit-app-config-at-runtime-c/) [Update app.config system.net setting at runtime](https://stackoverflow.com...
Modify the app config from code. <http://chiragrdarji.wordpress.com/2008/09/25/how-to-change-appconfig-file-run-time-using-c/>
9,947,718
> > **Possible Duplicate:** > > [VS2005 C# Programmatically change connection string contained in app.config](https://stackoverflow.com/questions/63546/vs2005-c-sharp-programmatically-change-connection-string-contained-in-app-config) > > > I have created a WinForms project in my PC using C#, and would like to ...
2012/03/30
[ "https://Stackoverflow.com/questions/9947718", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1286824/" ]
Like others have said creating your own config file is the way to go. Here is some code that may help Just create an app.config file in VS and put it in the same directory as dll. It will look something like this. ``` <?xml version="1.0" encoding="utf-8" ?> <configuration> <appSettings> <add...
Modify the app config from code. <http://chiragrdarji.wordpress.com/2008/09/25/how-to-change-appconfig-file-run-time-using-c/>
17,017,818
i'm not able to display the images to another page. The images are taken from json. So i'm trying to pass the image url of the selected item of a listbox into a navigagtion query string.The variable i'm trying to pass the data is showing as null.Plese provide me with solution. Thanks Here the code of the first page: ...
2013/06/10
[ "https://Stackoverflow.com/questions/17017818", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2194823/" ]
You can use UIButton instead of UIImageView in tableview cell. Use following code for getting single and double tap. ``` //add target for your UITableViewCell's button [aBtnThumbObj addTarget:self action:@selector(btnThumbClickDouble:) forControlEvents:UIControlEventTouchDownRepeat]; [aBtnThumbObj addTarget:self act...
You can set selection style for your cell as ``` cell.selectionStyle = UITableViewCellSelectionStyleNone; ``` And then just don't implement your -tableViewDidSelectRowAtIndexPath method
17,017,818
i'm not able to display the images to another page. The images are taken from json. So i'm trying to pass the image url of the selected item of a listbox into a navigagtion query string.The variable i'm trying to pass the data is showing as null.Plese provide me with solution. Thanks Here the code of the first page: ...
2013/06/10
[ "https://Stackoverflow.com/questions/17017818", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2194823/" ]
You can use UIButton instead of UIImageView in tableview cell. Use following code for getting single and double tap. ``` //add target for your UITableViewCell's button [aBtnThumbObj addTarget:self action:@selector(btnThumbClickDouble:) forControlEvents:UIControlEventTouchDownRepeat]; [aBtnThumbObj addTarget:self act...
These two lines of code work for me: ``` tapGesture.cancelsTouchesInView = YES; tapGesture.delaysTouchesBegan = YES; ```
17,017,818
i'm not able to display the images to another page. The images are taken from json. So i'm trying to pass the image url of the selected item of a listbox into a navigagtion query string.The variable i'm trying to pass the data is showing as null.Plese provide me with solution. Thanks Here the code of the first page: ...
2013/06/10
[ "https://Stackoverflow.com/questions/17017818", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2194823/" ]
You can set selection style for your cell as ``` cell.selectionStyle = UITableViewCellSelectionStyleNone; ``` And then just don't implement your -tableViewDidSelectRowAtIndexPath method
These two lines of code work for me: ``` tapGesture.cancelsTouchesInView = YES; tapGesture.delaysTouchesBegan = YES; ```
4,505,103
I'm wondering if there is a way to calculate arrangements for this problem without enumerating all possibilities. There are 4 work-pieces that 4 guys A, B, C, D work on during a single day. At the end of the day each person transfers his assigned work-piece to another person. Each person works on only 1 work-piece dur...
2022/08/03
[ "https://math.stackexchange.com/questions/4505103", "https://math.stackexchange.com", "https://math.stackexchange.com/users/1083422/" ]
These are all the permutations of a set with 4 elements without fixed points. For a set with $n$ elements see: [Fixed-point-free permutations](https://math.stackexchange.com/questions/41949/fixed-point-free-permutations) or the many equations for it ($!n$) on wikipedia <https://en.wikipedia.org/wiki/Derangement>.
Alternative approach: Person-A can transfer to anyone of three people. So, there will be an initial factor of $(3)$. Now, you can assume, without loss of generality, that Person-A transfers to Person-B. Now, there are 3 people that Person-B might transfer to: * If Person-B transfers to Person-A, then the transf...
220,282
In [agar.io](http://agar.io), sources of mass are abundant. The little pellets of nutrition spawn frequently. The problem is that there are no places for mass to go - which it must do otherwise the game would run out of space. Even when people log out, their cell remains stationary until it is eaten. I'm assuming then ...
2015/05/21
[ "https://gaming.stackexchange.com/questions/220282", "https://gaming.stackexchange.com", "https://gaming.stackexchange.com/users/3610/" ]
Thanks to [Ardaozkal](https://gaming.stackexchange.com/users/87186/ardaozkal) his comment I was able to do some research. There are a couple of reasons why the game never runs out of space, * When just going around not collecting any orbs you seem to lose a bit off mass. The amount of mass you lose seems to be bigger...
You eject 13 mass every time you press w or, on the mobile version, click the target button, but your cell loses 18 mass, so self feeding, or ejecting mass and then eating it again, will cause you to lose mass, not stay the same. You can eat viruses when you are split into 16 pieces, and you gain 100 mass every time yo...
3,759
I'd like to ask how to download all the files from a single category or article on a Wikimedia project, more specifically Wikimedia Commons in an automated manner (i.e., I just want to run a single script to get this result and not have to download them all manually myself from my browser), but I'm wondering if this wo...
2015/02/24
[ "https://webapps.meta.stackexchange.com/questions/3759", "https://webapps.meta.stackexchange.com", "https://webapps.meta.stackexchange.com/users/42104/" ]
As a member of both communities, I think that kind of question would be better suited for Super User. Wikimedia Commons isn't a webapp *per se*, and you're asking about how to download files to the computer, which places your question more in SU's domain. Please note that your question is more likely to be answered i...
The [Wikimedia Commons Help Desk](http://commons.wikimedia.org/wiki/Commons:Help_desk) is probably a better place to ask. You're guaranteed to be able to interact with experts on the software there. If you're bound and determined to ask on a Stack Exchange site, then I think this one or [Super User](http://superuser.c...
43,626,512
I currently have this tab view which I followed from [this](http://www.truiton.com/2015/06/android-tabs-example-fragments-viewpager/) tutorial. Everything works fine until I noticed that the `onCreateView` is not called on any of the tab. I've looked around here and there for solution but I still can't solve. Here is ...
2017/04/26
[ "https://Stackoverflow.com/questions/43626512", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6541772/" ]
> > public PrefAdapter(FragmentManager fm, int NumOfTabs) > > > You must declare Count No **NumOfTabs** > > int getCount ()-> How many items are in the data set represented by this > Adapter. > > > ``` @Override public int getCount() { return mNumOfTabs; } ``` ***Do not***' ``` return inflater.infl...
Your `getCount()` method is returning 0;
43,626,512
I currently have this tab view which I followed from [this](http://www.truiton.com/2015/06/android-tabs-example-fragments-viewpager/) tutorial. Everything works fine until I noticed that the `onCreateView` is not called on any of the tab. I've looked around here and there for solution but I still can't solve. Here is ...
2017/04/26
[ "https://Stackoverflow.com/questions/43626512", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6541772/" ]
You should make changes at two place: 1) Change ``` @Override public int getCount() { return 0; } ``` to ``` @Override public int getCount() { return mNumOfTabs; } ``` 2) Change ``` return inflater.inflate(R.layout.activity_pref_specialization_container, container, false); ``` to ``` return view; ```
> > public PrefAdapter(FragmentManager fm, int NumOfTabs) > > > You must declare Count No **NumOfTabs** > > int getCount ()-> How many items are in the data set represented by this > Adapter. > > > ``` @Override public int getCount() { return mNumOfTabs; } ``` ***Do not***' ``` return inflater.infl...
43,626,512
I currently have this tab view which I followed from [this](http://www.truiton.com/2015/06/android-tabs-example-fragments-viewpager/) tutorial. Everything works fine until I noticed that the `onCreateView` is not called on any of the tab. I've looked around here and there for solution but I still can't solve. Here is ...
2017/04/26
[ "https://Stackoverflow.com/questions/43626512", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6541772/" ]
> > public PrefAdapter(FragmentManager fm, int NumOfTabs) > > > You must declare Count No **NumOfTabs** > > int getCount ()-> How many items are in the data set represented by this > Adapter. > > > ``` @Override public int getCount() { return mNumOfTabs; } ``` ***Do not***' ``` return inflater.infl...
There is another (possibly easier) way to connect the view pager with the tab layout- First, in your `PrefAdapter` class, override the `getPageTitle()` method and return your tab titles for the respective tab positions from there. In your `PrefMainActivity` class, remove all the lines like- `tabLayout.addTab(...)` ...
43,626,512
I currently have this tab view which I followed from [this](http://www.truiton.com/2015/06/android-tabs-example-fragments-viewpager/) tutorial. Everything works fine until I noticed that the `onCreateView` is not called on any of the tab. I've looked around here and there for solution but I still can't solve. Here is ...
2017/04/26
[ "https://Stackoverflow.com/questions/43626512", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6541772/" ]
You should make changes at two place: 1) Change ``` @Override public int getCount() { return 0; } ``` to ``` @Override public int getCount() { return mNumOfTabs; } ``` 2) Change ``` return inflater.inflate(R.layout.activity_pref_specialization_container, container, false); ``` to ``` return view; ```
Your `getCount()` method is returning 0;
43,626,512
I currently have this tab view which I followed from [this](http://www.truiton.com/2015/06/android-tabs-example-fragments-viewpager/) tutorial. Everything works fine until I noticed that the `onCreateView` is not called on any of the tab. I've looked around here and there for solution but I still can't solve. Here is ...
2017/04/26
[ "https://Stackoverflow.com/questions/43626512", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6541772/" ]
Your `getCount()` method is returning 0;
There is another (possibly easier) way to connect the view pager with the tab layout- First, in your `PrefAdapter` class, override the `getPageTitle()` method and return your tab titles for the respective tab positions from there. In your `PrefMainActivity` class, remove all the lines like- `tabLayout.addTab(...)` ...
43,626,512
I currently have this tab view which I followed from [this](http://www.truiton.com/2015/06/android-tabs-example-fragments-viewpager/) tutorial. Everything works fine until I noticed that the `onCreateView` is not called on any of the tab. I've looked around here and there for solution but I still can't solve. Here is ...
2017/04/26
[ "https://Stackoverflow.com/questions/43626512", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6541772/" ]
You should make changes at two place: 1) Change ``` @Override public int getCount() { return 0; } ``` to ``` @Override public int getCount() { return mNumOfTabs; } ``` 2) Change ``` return inflater.inflate(R.layout.activity_pref_specialization_container, container, false); ``` to ``` return view; ```
There is another (possibly easier) way to connect the view pager with the tab layout- First, in your `PrefAdapter` class, override the `getPageTitle()` method and return your tab titles for the respective tab positions from there. In your `PrefMainActivity` class, remove all the lines like- `tabLayout.addTab(...)` ...
53,407,728
I need to create a runnable jar file that will be operated in Batch mode. During development I need to use following api/frameworks apache-poi,hibernate,Spring etc. So,I prefer to go with maven: Please find below my maven file: ``` <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3...
2018/11/21
[ "https://Stackoverflow.com/questions/53407728", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3945085/" ]
Consider using [Maven Shade Plugin](https://maven.apache.org/plugins/maven-shade-plugin/). > > This plugin provides the capability to package the artifact in an uber-jar, including its dependencies > > > Spring framework can do similar thing for you. [Generate sample project](https://start.spring.io/) and check ...
`maven-jar-plugin` provides the capability to build jars without dependencies. To create jar with all it's dependencies you can use `maven-assembly-plugin` or `maven-shade-plugin`. Below is `maven-assembly-plugin` configuration in `pom.xml`: ``` <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>...
53,407,728
I need to create a runnable jar file that will be operated in Batch mode. During development I need to use following api/frameworks apache-poi,hibernate,Spring etc. So,I prefer to go with maven: Please find below my maven file: ``` <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3...
2018/11/21
[ "https://Stackoverflow.com/questions/53407728", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3945085/" ]
Consider using [Maven Shade Plugin](https://maven.apache.org/plugins/maven-shade-plugin/). > > This plugin provides the capability to package the artifact in an uber-jar, including its dependencies > > > Spring framework can do similar thing for you. [Generate sample project](https://start.spring.io/) and check ...
Try this out inside your pom.xml file: ``` <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency-plugin</artifactId> <version>2.8</version> <executions> <execution> <id>copy-dependencies</id> ...
24,933,989
I have to add text for example `<meta tag...>` in my project in all files "\*\*.html\*" after "\*`<title>title page</title>*` text. For Example: ``` .....blablalbalblala <title>title page</title> **<meta... tag/>** //inserted text ..... ``` I know how to find \*.html files with text ... but ...
2014/07/24
[ "https://Stackoverflow.com/questions/24933989", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3459112/" ]
* Search for all occurrences of `</title>` * In the Search view, remove all matches that you don't want to replace * Invoke the context menu, choose `Replace All...` * Replace your matches with `</title><meta... tag/>` If you want the meta tag to be placed on a new line, you can search with the checkbox for `Regular e...
If you'are using Linux, you can open a terminal, going in your project dir and do: ``` A="<meta tag...>" B="</title>" awk -v "pattern=$A" '{print} /^$B/ && !x {print A; x=1}' filename > tmp cat tmp > filename rm tmp ``` if you want to apply to all your file, make a script, say "addMeta": ``` #!/bin/bash cd $1 A="<...
24,933,989
I have to add text for example `<meta tag...>` in my project in all files "\*\*.html\*" after "\*`<title>title page</title>*` text. For Example: ``` .....blablalbalblala <title>title page</title> **<meta... tag/>** //inserted text ..... ``` I know how to find \*.html files with text ... but ...
2014/07/24
[ "https://Stackoverflow.com/questions/24933989", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3459112/" ]
Refer images. Select your **project** in package explorer, I selected package. Press `Ctrl`+`H` ![enter image description here](https://i.stack.imgur.com/qI0hf.jpg) Note down the number of **search hits** after searching. In below picture it is present below the view toolbar. Here it is 3. ![enter image description ...
If you'are using Linux, you can open a terminal, going in your project dir and do: ``` A="<meta tag...>" B="</title>" awk -v "pattern=$A" '{print} /^$B/ && !x {print A; x=1}' filename > tmp cat tmp > filename rm tmp ``` if you want to apply to all your file, make a script, say "addMeta": ``` #!/bin/bash cd $1 A="<...
57,414,633
Is there a way/policy using which I can deny all users except one who can invoke an API endpoint at AWS API Gateway? Policy currently used: ``` { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Principal": { "AWS": "arn:aws:iam::account_id:user/use...
2019/08/08
[ "https://Stackoverflow.com/questions/57414633", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5536733/" ]
``` { "Version": "2012-10-17", "Statement": [ { "Effect": "Deny", "NotPrincipal": { "AWS": [ "arn:aws:iam::account_id:user/user-name", "arn:aws:iam::account_id:root" ] }, "Action"...
Did you try to use **IAM Policies Conditions**? I haven't tried it in a production environment but it should fulfil your need. ``` {"Version": "2012-10-17", "Statement": [ { "Effect": "Deny", "Action": "execute-api:Invoke", "Resource": "arn:aws:execute-api:region:account_id:api_to_be_invoke...
4,940,982
My goal is to use a [Greasemonkey-style user script](http://www.chromium.org/developers/design-documents/user-scripts) in Google Chrome to enable remembering of passwords on a specific form that has the `autocomplete="off"` attribute set. Chrome's developer tools indicate that `autocomplete="on"` is being successfully...
2011/02/09
[ "https://Stackoverflow.com/questions/4940982", "https://Stackoverflow.com", "https://Stackoverflow.com/users/507177/" ]
One of my favorite jQuery form validation plugins has to be [Happy.js](http://happyjs.com/). It's very lightweight and extensible, and requires very little effort to get working.
The standard way to validate with jQuery is to just use the [jQuery validation plugin](http://docs.jquery.com/Plugins/validation). It's widely used, regularly maintained, easy to use and mature. There's no point in rewriting something that's already been done. You can obviously use this plugin to control form submissio...
332,095
I am running a MacBook Pro Early 2015 13" on High Sierra 10.13.5, and keep getting the "X disk cannot be ejected because one or more programs might be using it" message, when apparently there is no program using that disk (not even Dropbox, Preview). It happens sometimes when I try ejecting an external thunderbolt Dri...
2018/07/26
[ "https://apple.stackexchange.com/questions/332095", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/292129/" ]
Often when a drive is plugged in Spotlight begins to index the entire drive. While this is occurring Spotlight is "using" the drive and therefore can't be ejected. Try adding a Spotlight exception: 1. System Preferences>Spotlight>Privacy 2. `+` 3. Select your drive 4. `Choose`
You should download the **Mountain** app. It gives you better control over all mounted volumes. It has been able to unmount or mount disks that I seem to have no control over. It's $6 from the [developer site.](https://appgineers.de). Before spending the money I would read about it at that site to ensure it does all yo...
6,820,694
I have a controller `games` and a method: ``` def index @games = Game.all end def set_game @current_game = Game.find(params[:set_game]) end ``` In my view I have: ``` <%= form_tag("/games") do %> <% @games.each do |g| %> <%= radio_button_tag(:game_id, g.id) %> <%= label_tag(:game_name, g.name) %><br> <% end %>...
2011/07/25
[ "https://Stackoverflow.com/questions/6820694", "https://Stackoverflow.com", "https://Stackoverflow.com/users/854569/" ]
``` <%= form_tag(set_game_games_path) do %> ... <% end %> #routes.rb resources :games do collection do get '/set_game', :as => :set_game end end ```
That's an example of a custom route: ``` match "customroute" => "controller#action", :as => "customroutename" ``` This can be then accessed with "customroutename\_url" in your views. If you want to create a custom route for your set\_game action, for example, it would be ``` match "setgame" => "games#set_game",...
12,016,725
> > **Possible Duplicate:** > > [Using jQuery to test if an input has focus](https://stackoverflow.com/questions/967096/using-jquery-to-test-if-an-input-has-focus) > > > I need to check if a particular textbox has the focus or not using jQuery. So my code is like this, but it is not working: ``` if (document....
2012/08/18
[ "https://Stackoverflow.com/questions/12016725", "https://Stackoverflow.com", "https://Stackoverflow.com/users/853575/" ]
``` if (document.getElementById("lastname").focus == true) { alert("hello"); } ``` Check with == , using = is an assignment
Try this ``` var status = $('#lastname').is(":focus"); alert(status);//false or true ```
12,016,725
> > **Possible Duplicate:** > > [Using jQuery to test if an input has focus](https://stackoverflow.com/questions/967096/using-jquery-to-test-if-an-input-has-focus) > > > I need to check if a particular textbox has the focus or not using jQuery. So my code is like this, but it is not working: ``` if (document....
2012/08/18
[ "https://Stackoverflow.com/questions/12016725", "https://Stackoverflow.com", "https://Stackoverflow.com/users/853575/" ]
``` if ($("#lastname").is(':focus')) { alert("hello"); } ``` [jQuery docs for `:focus`](http://api.jquery.com/focus-selector/) [jQuery docs for `.is()`](http://api.jquery.com/is/) --- **Update:** To show/hide an element when the field gains/loses focus use the `focusin` and `focusout` events handlers: ``` ...
``` <script type="text/javascript" language="javascript"> function check() { if ($(document.activeElement).attr("id") === "element_name") { alert('checkbox is focused'); } } </script> ```
12,016,725
> > **Possible Duplicate:** > > [Using jQuery to test if an input has focus](https://stackoverflow.com/questions/967096/using-jquery-to-test-if-an-input-has-focus) > > > I need to check if a particular textbox has the focus or not using jQuery. So my code is like this, but it is not working: ``` if (document....
2012/08/18
[ "https://Stackoverflow.com/questions/12016725", "https://Stackoverflow.com", "https://Stackoverflow.com/users/853575/" ]
``` if ($("#lastname").is(':focus')) { alert("hello"); } ``` [jQuery docs for `:focus`](http://api.jquery.com/focus-selector/) [jQuery docs for `.is()`](http://api.jquery.com/is/) --- **Update:** To show/hide an element when the field gains/loses focus use the `focusin` and `focusout` events handlers: ``` ...
``` $("#lastname").focus(function(){ alert("lastname has focus"); }); ```
12,016,725
> > **Possible Duplicate:** > > [Using jQuery to test if an input has focus](https://stackoverflow.com/questions/967096/using-jquery-to-test-if-an-input-has-focus) > > > I need to check if a particular textbox has the focus or not using jQuery. So my code is like this, but it is not working: ``` if (document....
2012/08/18
[ "https://Stackoverflow.com/questions/12016725", "https://Stackoverflow.com", "https://Stackoverflow.com/users/853575/" ]
``` $("#lastname").focus(function(){ alert("lastname has focus"); }); ```
``` <script type="text/javascript" language="javascript"> function check() { if ($(document.activeElement).attr("id") === "element_name") { alert('checkbox is focused'); } } </script> ```
12,016,725
> > **Possible Duplicate:** > > [Using jQuery to test if an input has focus](https://stackoverflow.com/questions/967096/using-jquery-to-test-if-an-input-has-focus) > > > I need to check if a particular textbox has the focus or not using jQuery. So my code is like this, but it is not working: ``` if (document....
2012/08/18
[ "https://Stackoverflow.com/questions/12016725", "https://Stackoverflow.com", "https://Stackoverflow.com/users/853575/" ]
``` if ($("#lastname").is(':focus')) { alert("hello"); } ``` [jQuery docs for `:focus`](http://api.jquery.com/focus-selector/) [jQuery docs for `.is()`](http://api.jquery.com/is/) --- **Update:** To show/hide an element when the field gains/loses focus use the `focusin` and `focusout` events handlers: ``` ...
You can try jQuery's [:focus](http://api.jquery.com/focus-selector/) selector. Or you can always add a class and check for that class.
12,016,725
> > **Possible Duplicate:** > > [Using jQuery to test if an input has focus](https://stackoverflow.com/questions/967096/using-jquery-to-test-if-an-input-has-focus) > > > I need to check if a particular textbox has the focus or not using jQuery. So my code is like this, but it is not working: ``` if (document....
2012/08/18
[ "https://Stackoverflow.com/questions/12016725", "https://Stackoverflow.com", "https://Stackoverflow.com/users/853575/" ]
``` if ($("#lastname").is(':focus')) { alert("hello"); } ``` [jQuery docs for `:focus`](http://api.jquery.com/focus-selector/) [jQuery docs for `.is()`](http://api.jquery.com/is/) --- **Update:** To show/hide an element when the field gains/loses focus use the `focusin` and `focusout` events handlers: ``` ...
``` if (document.getElementById("lastname").focus == true) { alert("hello"); } ``` Check with == , using = is an assignment
12,016,725
> > **Possible Duplicate:** > > [Using jQuery to test if an input has focus](https://stackoverflow.com/questions/967096/using-jquery-to-test-if-an-input-has-focus) > > > I need to check if a particular textbox has the focus or not using jQuery. So my code is like this, but it is not working: ``` if (document....
2012/08/18
[ "https://Stackoverflow.com/questions/12016725", "https://Stackoverflow.com", "https://Stackoverflow.com/users/853575/" ]
``` $("#lastname").focus(function(){ alert("lastname has focus"); }); ```
You can try jQuery's [:focus](http://api.jquery.com/focus-selector/) selector. Or you can always add a class and check for that class.
12,016,725
> > **Possible Duplicate:** > > [Using jQuery to test if an input has focus](https://stackoverflow.com/questions/967096/using-jquery-to-test-if-an-input-has-focus) > > > I need to check if a particular textbox has the focus or not using jQuery. So my code is like this, but it is not working: ``` if (document....
2012/08/18
[ "https://Stackoverflow.com/questions/12016725", "https://Stackoverflow.com", "https://Stackoverflow.com/users/853575/" ]
``` $("#lastname").focus(function(){ alert("lastname has focus"); }); ```
Try this ``` var status = $('#lastname').is(":focus"); alert(status);//false or true ```
12,016,725
> > **Possible Duplicate:** > > [Using jQuery to test if an input has focus](https://stackoverflow.com/questions/967096/using-jquery-to-test-if-an-input-has-focus) > > > I need to check if a particular textbox has the focus or not using jQuery. So my code is like this, but it is not working: ``` if (document....
2012/08/18
[ "https://Stackoverflow.com/questions/12016725", "https://Stackoverflow.com", "https://Stackoverflow.com/users/853575/" ]
``` if (document.getElementById("lastname").focus == true) { alert("hello"); } ``` Check with == , using = is an assignment
You can try jQuery's [:focus](http://api.jquery.com/focus-selector/) selector. Or you can always add a class and check for that class.
12,016,725
> > **Possible Duplicate:** > > [Using jQuery to test if an input has focus](https://stackoverflow.com/questions/967096/using-jquery-to-test-if-an-input-has-focus) > > > I need to check if a particular textbox has the focus or not using jQuery. So my code is like this, but it is not working: ``` if (document....
2012/08/18
[ "https://Stackoverflow.com/questions/12016725", "https://Stackoverflow.com", "https://Stackoverflow.com/users/853575/" ]
``` if (document.getElementById("lastname").focus == true) { alert("hello"); } ``` Check with == , using = is an assignment
``` <script type="text/javascript" language="javascript"> function check() { if ($(document.activeElement).attr("id") === "element_name") { alert('checkbox is focused'); } } </script> ```
9,073
**A bit of backstory** My parents are separated and my Dad has a long-term partner who he has been with for over 10 years now. She (my Dad's partner, let's call her Eve) has a close group of friends who she sees on a regular basis. One of Eve's close friends (let's call her Annie) works at the same place as me, in dif...
2018/01/12
[ "https://interpersonal.stackexchange.com/questions/9073", "https://interpersonal.stackexchange.com", "https://interpersonal.stackexchange.com/users/9257/" ]
This is a tough one. There are no guarantees Eve will honor your request. Usually, people who spread information to others, whether you consider it gossiping or not don't realize it's a big deal and if this is how they are they will keep doing it. **Approach Eve and tell her what her friend Annie mentioned/asked abou...
Tell Eve what you told us. There's no need to ask her to stop sharing information, merely to mention the outcome of sharing the information (ie, Adam may be upset) and that she should discuss it with Adam so he knows what she's shared, who she's shared it with, and what he'd like her to do in the future. > > Eve, Ann...
34,929,461
Im using this script for delete all C/C++ comments with sed: <http://sed.sourceforge.net/grabbag/scripts/remccoms3.sed> ``` sed -i -f remccoms3.sed Myfile.cpp ``` But this script duplicate all the lines, example: ``` /*------------------------------------------------------------------------------- This file is par...
2016/01/21
[ "https://Stackoverflow.com/questions/34929461", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1308617/" ]
The intended command line to run that `sed` script is `/bin/sed -nf` (from the shebang line). Your command (`sed -i -f remccoms3.sed`) leaves out the `-n` argument. The `-n` argument to `sed` is > > -n, --quiet, --silent > > > suppress automatic printing of pattern space > > > so without that you get the norm...
Don't use that script. Its cute and some people may find it interesting as a mental exercise but it's buggy (as it says itself it's been `bugfixed to some extent`!), absurdly complicated and a completely inappropriate application for sed. To remove comments from all versions of C or C++ code just use the script at <ht...
16,942,531
I have an array that I want to export to a CSV file, now I know that there is a fputcsv function but I am using version 5.0.4 of PHP so this isn't an option for me. Is there an alternative method I can use?
2013/06/05
[ "https://Stackoverflow.com/questions/16942531", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2441000/" ]
You can use a polyfill for this. write your code as if you where on a system that supports `fputcsv` From comments within the php block (with some slight framing code) but include this (copied and slightly modified from <http://www.php.net/manual/en/function.fputcsv.php#56827>) ``` <?php if (!function_exists(fputcsv)...
I took the solution from @Orangepill and refactored / simplified it in a couple of ways. This may also become handy if you want every field to be enclosed which is not the case in the default php implementation. ```php function fputcsv_custom($handle, $fields, $delimiter = ",", $enclosure = '"', $escape_char = "\\") {...
16,942,531
I have an array that I want to export to a CSV file, now I know that there is a fputcsv function but I am using version 5.0.4 of PHP so this isn't an option for me. Is there an alternative method I can use?
2013/06/05
[ "https://Stackoverflow.com/questions/16942531", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2441000/" ]
Assuming you have a `$Data` array, which contains individual arrays for each registry (or line), you may try this: ``` $Delimiter = '"'; $Separator = ',' foreach($Data as $Line) { fwrite($File, $Delimiter. implode($Delimiter.$Separator.$Delimiter, $Line).$Delimiter."\n"); } ``` Where `$File` is the handl...
I took the solution from @Orangepill and refactored / simplified it in a couple of ways. This may also become handy if you want every field to be enclosed which is not the case in the default php implementation. ```php function fputcsv_custom($handle, $fields, $delimiter = ",", $enclosure = '"', $escape_char = "\\") {...
9,629,900
This works fine in Firefox and Chrome, but not in IE: CSS ``` .tablehead th{ border-bottom: 1px solid #C2C2C2; color: #FFFFFF; background-color:#000058; font-size: 13px; font-family:calibri!important; font-weight: 700; } .tab_head th.tab_space { padding-left: 5px; } .redtab_head th { ...
2012/03/09
[ "https://Stackoverflow.com/questions/9629900", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1101236/" ]
I was able to get it working with the following: ``` table{ table-layout: fixed; } ```
How about stripping this down a bit to see if the issue is with the property in IE or something else. Does the following work? ### HTML: ``` <table class="tablehead" id="pls-batting"> <thead> <tr class="tab_head" id="pls-play"> <th># vs.R</th><th class="tab_space">PLAYER</th> </tr> </thead> <tbody> ...
52,568,087
I have a flag "active" in mysql database for users, this column is boolean type. From admin account I want to create a select options to select True/False if user is activated or not. So in my form for user's information editing/creating I have: ``` <div class="form-group{{ $errors->has('active') ? ' has-error' : '' }...
2018/09/29
[ "https://Stackoverflow.com/questions/52568087", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9542556/" ]
Try changing your HTML to the following: ``` <div class="form-group{{ $errors->has('active') ? ' has-error' : '' }}"> <label>Is user active?</label> <select class="form-control" name="active" id="active"> <option value="1" @if (old('active') == 1) selected @endif>True</option> <option value="0"...
``` <div class="form-group{{ $errors->has('active') ? ' has-error' : '' }}"> <label>Is user active?</label> <select class="form-control" name="active" id="active"> <option value="1" {{ old('active') ? 'selected' }}>True</option> <option value="0" {{ !old('active') ? 'selected' }}>False</...
74,256,644
I am new to programming in C and I am doing some activities for my first year in CS. The following activity consists of calculating the sum of squares of the digits of a user input number and the output should be as follows: ```none Number: 1234   n=1234; sum=16   n=123; sum=25   n=12; sum=29   n=1; sum=30 Result: 30 ...
2022/10/30
[ "https://Stackoverflow.com/questions/74256644", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20374015/" ]
Write something like the following ``` int digit = num % 10; square = digit * digit; sum += square; printf("\n=%d; sum= %d", num, sum ); ``` Pay attention to that the variable i is redundant: ``` i=0; while(num>i) ``` just write ``` while ( num != 0 ) ``` Also introducing the variable `result` is redundant and...
You need a variable, keeping track of the input number (num), a variable keeping track of the sum ('sum') and a variable with the current digit (digit). Every iteration, you can calculate the digit, square it and add it to the sum. The `a += b` operation is equivalent to `a = a + b`, in case you are wondering. The same...
896,555
Today I tried several times to install Ubuntu but I have some GPU problems. I have a bootable stick. When I boot in UEFI mode all its normal but the installer isn't able to install the boot loader. When I boot in leagacy mode I'm able to install Ubuntu but only when I unplug my GPU GTX 1070. When I don't do that, I ...
2017/03/24
[ "https://askubuntu.com/questions/896555", "https://askubuntu.com", "https://askubuntu.com/users/669390/" ]
I had a similar problem with my GTX 1080 when installing Ubuntu 16.04. It seems that 16.04 does not support the latest Nvidia GPUs. I finally managed to install Ubuntu 16.04 along side with Windows 10 dual boot with my GTX 1080 unplugged. What I did is as follow. 1. Before you install Ubuntu, go to BIOS setting and di...
**1. Make sure that your GRUB is set right:** --------------------------------------------- **a.For Non UEFI**, Download boot-repair-disk <https://sourceforge.net/projects/boot-repair-cd/files/> and repair the grub maybe is not installed on the GNU/Linux partition, do a repair just to be sure. **b.For UEFI** see <htt...
896,555
Today I tried several times to install Ubuntu but I have some GPU problems. I have a bootable stick. When I boot in UEFI mode all its normal but the installer isn't able to install the boot loader. When I boot in leagacy mode I'm able to install Ubuntu but only when I unplug my GPU GTX 1070. When I don't do that, I ...
2017/03/24
[ "https://askubuntu.com/questions/896555", "https://askubuntu.com", "https://askubuntu.com/users/669390/" ]
Thanks for you answers but in the meantime I fixed my problem by installing Ubuntu 17.04 beta 2. I was able to install it without any problems. The driver I installed with the help of the blog post [Installing Nvidia's Proprietary GTX 1070 and 1080 Driver in Ubuntu 16.04. How to Get Around The "out of range" Error and...
**1. Make sure that your GRUB is set right:** --------------------------------------------- **a.For Non UEFI**, Download boot-repair-disk <https://sourceforge.net/projects/boot-repair-cd/files/> and repair the grub maybe is not installed on the GNU/Linux partition, do a repair just to be sure. **b.For UEFI** see <htt...
896,555
Today I tried several times to install Ubuntu but I have some GPU problems. I have a bootable stick. When I boot in UEFI mode all its normal but the installer isn't able to install the boot loader. When I boot in leagacy mode I'm able to install Ubuntu but only when I unplug my GPU GTX 1070. When I don't do that, I ...
2017/03/24
[ "https://askubuntu.com/questions/896555", "https://askubuntu.com", "https://askubuntu.com/users/669390/" ]
I had a similar problem with my GTX 1080 when installing Ubuntu 16.04. It seems that 16.04 does not support the latest Nvidia GPUs. I finally managed to install Ubuntu 16.04 along side with Windows 10 dual boot with my GTX 1080 unplugged. What I did is as follow. 1. Before you install Ubuntu, go to BIOS setting and di...
Thanks for you answers but in the meantime I fixed my problem by installing Ubuntu 17.04 beta 2. I was able to install it without any problems. The driver I installed with the help of the blog post [Installing Nvidia's Proprietary GTX 1070 and 1080 Driver in Ubuntu 16.04. How to Get Around The "out of range" Error and...
65,056
I am having trouble inserting pictures into my latex document at a specific point. Currently I have the two figure environments in the text but they are printed at the back of the document, after the bibliography. Am I missing something? The pictures are both supposed to be full page-sized rather than a traditional sm...
2012/07/28
[ "https://tex.stackexchange.com/questions/65056", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/14865/" ]
Since the images must go at a specific position, it's not convenient to use a floating environment; you can use `\captionof` from the [`capt-of`](http://www.ctan.org/pkg/capt-of) or [`caption`](http://www.ctan.org/pkg/caption) packages to give your figures a caption: ``` \documentclass[12pt, a4paper, twoside]{article}...
You're not doing anything wrong by using the `figure` environment. Since you mention that the figures are meant to take up a full page, you could load the `afterpage` package and use its `\afterpage` command to defer typesetting the figures until the next page break occurs anyway; this will relieve you from having to f...
74,310,316
I'm learning C++ and I want to know if there is a way you can use variables defined in a class's constructor in a member function. I've tried looking online and in my textbook but I can't find a definitive answer. For example: ``` class Item { public: Item(std::string str) { std::string text = str; int ...
2022/11/03
[ "https://Stackoverflow.com/questions/74310316", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15150535/" ]
> > I want to know if there is a way you can use variables defined in a class's constructor in a member function. > > > No, you can't. Variables defined in the constructor goes out of scope at the end of the constructor. The normal way is to initialize *member variables* in the constructor. These can then be acce...
You need to turn `text` and `pos` into private data members of the `Item` class. *Private* because, if declared public, they could be easily overwritten making, for instance, redundant the `increment()` function, which is an undesirable side effect. ``` class Item { public: Item(std::string str): text{str}, pos{-1...
10,483,888
I am trying to create a table on MySQL using an SQL script and the MySQL database keeps on giving me error 150. I've tried the following code in both Navicat and MySQL Workbench and both give an 150 error. It appears that this is a foreign key problem but i cant actually see what the problem with my code is and was w...
2012/05/07
[ "https://Stackoverflow.com/questions/10483888", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1152304/" ]
Replace the if statement with a case statement. You cant use the if in a query like that.
``` Declare @Type varchar if((select tn.notification_type from tbl_Notification tn) = 1) begin set @Type= 'WORK FLOW' print 'status '+ CAST(@type AS nvarchar(58)) end ```
10,483,888
I am trying to create a table on MySQL using an SQL script and the MySQL database keeps on giving me error 150. I've tried the following code in both Navicat and MySQL Workbench and both give an 150 error. It appears that this is a foreign key problem but i cant actually see what the problem with my code is and was w...
2012/05/07
[ "https://Stackoverflow.com/questions/10483888", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1152304/" ]
To elaborate on Namphibian's answer, which is accurate: ``` SELECT @Type = (CASE tn.Notification_Type WHEN 1 THEN 'WORK FLOW' ELSE 'SOMETHING ELSE' END) FROM tbl_Notification tn ``` You also won't be able to do the print in the SQL query like that, you'd...
Replace the if statement with a case statement. You cant use the if in a query like that.
10,483,888
I am trying to create a table on MySQL using an SQL script and the MySQL database keeps on giving me error 150. I've tried the following code in both Navicat and MySQL Workbench and both give an 150 error. It appears that this is a foreign key problem but i cant actually see what the problem with my code is and was w...
2012/05/07
[ "https://Stackoverflow.com/questions/10483888", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1152304/" ]
To elaborate on Namphibian's answer, which is accurate: ``` SELECT @Type = (CASE tn.Notification_Type WHEN 1 THEN 'WORK FLOW' ELSE 'SOMETHING ELSE' END) FROM tbl_Notification tn ``` You also won't be able to do the print in the SQL query like that, you'd...
``` Declare @Type varchar if((select tn.notification_type from tbl_Notification tn) = 1) begin set @Type= 'WORK FLOW' print 'status '+ CAST(@type AS nvarchar(58)) end ```
33,416,021
I have been using Mendeley's Microsoft Word plugin to easily reference papers in my Mendeley Desktop library. However, I've noticed that the IEEE format for the bibliography/citation is incorrect with regards to referencing conference proceedings and theses. On the IEEE citation guide: <http://www.ieee.org/documents/...
2015/10/29
[ "https://Stackoverflow.com/questions/33416021", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4421492/" ]
Two options, use this formatted one that I just made, or follow the steps I did to make this change in the CSL Visual Editor. **Just use the corrected file** 1. While in Mendeley Desktop, go to View menu, "Citation Style ->" and click "More Styles..." 2. Click on the tab "Get More Styles", and enter the following li...
Mendeley does not show the thesis citations correctly in IEEE format. It should be like this: [1] J. K. Author, “Title of thesis,” M.S. thesis, Abbrev. Dept., Abbrev. Univ., City of Univ., Abbrev. State, year. [2] J. K. Author, “Title of dissertation,” Ph.D. dissertation, Abbrev. Dept., Abbrev. Univ., City of Univ., A...
49,111,567
I have following data frames such as ``` dummy_ts_1 <- data.frame(Date=as.Date(c("1990-03-31","1990-06-30","1990-09-30","1990-12-31","1991-03-31","1991-06-30","1991-09-30","1991-12-31","1992-03-31","1992-06-30")), GDP=c(100,200,300,400,500,600,700,800,900,1000)) dummy_ts_2 <- data.frame(Date=as.Dat...
2018/03/05
[ "https://Stackoverflow.com/questions/49111567", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8758767/" ]
Assuming that your `tags = ['hansel, gretel', 'cappuccetto, rosso, lupo', 'signore, anelli, gollum', 'blade,runner', 'pinocchio', 'incredibili']` after your `fetchall()` your can achieve your result with this: ``` lista_tags = [] for entry in tags: lista_tags += entry.split(",") ``` The output will be: ``` ['h...
> > List is a collection of value so you are append value in `lista_tags` so you get all value > > > `for i in tags: lista_tags.append(i)` > > if you want to get single value by accessing them using "key" > `lista_tags[1]` > it will give you single value > > >
2,316
There are some hadith listing Mubah actions that involve khayr. These are; flirting with the spouse, horse racing and marksmanship. I would like to know if marksmanship encompasses javelin throwing or not. Maybe someone can find and check the Arabic original of the hadith and share here the meaning(s) of the word used....
2012/08/24
[ "https://islam.stackexchange.com/questions/2316", "https://islam.stackexchange.com", "https://islam.stackexchange.com/users/-1/" ]
The Arabic word *rimaya* رماية literally means *throwing*, but when it is unqualified it is used as a synonym for *shooting*, which at the time meant archery. In modern usage this has been extended to marksmanship in firearms. But getting back to the hadith itself, looking at the context we can deduce that the *throw...
Perhaps it becomes clear if we look at Volume 5, Book 58, Number 156: > > Talha was a strong, experienced archer who used to keep his arrow bow strong and well stretched. On that day he broke two or three arrow bows. > > > This seems to make it clear that this is referring to regular bow-based archery, suggestin...
64,039,448
I was implementing the Oauth2.0 authentication using Google. I used react-google-login npm on the frontend to authenticate the user using Google Oauth2.0. I successfully created the CLient-id and secret under google cloud platform for my project, along with the URI as needed. The frontend is running on default localho...
2020/09/24
[ "https://Stackoverflow.com/questions/64039448", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10407808/" ]
Browsers will first send a pre-flight request to check CORS. In your backend code, you have to allow the front-end host and port. In this case localhost:3000. The reason you are getting the cors error is bacause its on two different ports. But if proper cors response is given by backend (port 9000), it will resolve.
[![enter image description here](https://i.stack.imgur.com/OY7HY.png)](https://i.stack.imgur.com/OY7HY.png)Clearing the browser cookies and cache made everything work again. googlesignin is working without cors error. I have added following line of code to serve all static files from backend to frontend. ``` app.use(e...
66,524,661
Here I check the installed version of pip `py -m pip --version` ``` pip 21.0.1 from C:\Users\hp\AppData\Local\Programs\Python\Python39\lib\site-packages\pip (python 3.9) ``` Now I try to run a pip command `pip install pip --target $HOME\\.pyenv` ``` pip: The term 'pip' is not recognized as a name of a cmdlet, fun...
2021/03/08
[ "https://Stackoverflow.com/questions/66524661", "https://Stackoverflow.com", "https://Stackoverflow.com/users/865220/" ]
Add the scripts folder to PATH `C:\Users\hp\AppData\Local\Programs\Python\Python39\Scripts` or `C:\Python39\Scripts` (depending on how you have installed python locate and add python/scripts folder)
Just use on the terminal: ``` py -m pip install ``` followed by the library you want to install. It tends to work.
661,360
This questions regards to doing force calculation using vectors. This image here should display my problem [![image](https://i.stack.imgur.com/SjXc5.jpg)](https://i.stack.imgur.com/SjXc5.jpg). In basic newtonian physics, the normal force = force of gravity \* cosine (angle of inclination). $$F\_N = F\_G \times \cos{\t...
2021/08/25
[ "https://physics.stackexchange.com/questions/661360", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/310668/" ]
In standard cosmology, the answer to the bolded question is "yes", while the answer to the second one is "no". There is a way to define an absolute reference frame, in that any observer can measure the dipole moment of CMB radiation and determine the velocity with which they are moving through it (see section 2.1 in [...
Is there a well-defined “speed relative to the universe" and is there a well-defined "central point" of the universe are 2 different questions. As far as central point is concerned, there is indeed no such point. Speed relative to the universe is also strictly not well-defined, but the frame of the cosmic background ...
661,360
This questions regards to doing force calculation using vectors. This image here should display my problem [![image](https://i.stack.imgur.com/SjXc5.jpg)](https://i.stack.imgur.com/SjXc5.jpg). In basic newtonian physics, the normal force = force of gravity \* cosine (angle of inclination). $$F\_N = F\_G \times \cos{\t...
2021/08/25
[ "https://physics.stackexchange.com/questions/661360", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/310668/" ]
In standard cosmology, the answer to the bolded question is "yes", while the answer to the second one is "no". There is a way to define an absolute reference frame, in that any observer can measure the dipole moment of CMB radiation and determine the velocity with which they are moving through it (see section 2.1 in [...
> > Is there any sort of Absolute Universal (as in of-the-universe) Frame of Reference? > > > Sometimes the [CMB](https://en.wikipedia.org/wiki/Cosmic_microwave_background#CMBR_dipole_anisotropy) is considered to be a stationary frame of reference for the universe. But as per this link, one should not consider the...
661,360
This questions regards to doing force calculation using vectors. This image here should display my problem [![image](https://i.stack.imgur.com/SjXc5.jpg)](https://i.stack.imgur.com/SjXc5.jpg). In basic newtonian physics, the normal force = force of gravity \* cosine (angle of inclination). $$F\_N = F\_G \times \cos{\t...
2021/08/25
[ "https://physics.stackexchange.com/questions/661360", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/310668/" ]
Is there a well-defined “speed relative to the universe" and is there a well-defined "central point" of the universe are 2 different questions. As far as central point is concerned, there is indeed no such point. Speed relative to the universe is also strictly not well-defined, but the frame of the cosmic background ...
> > Is there any sort of Absolute Universal (as in of-the-universe) Frame of Reference? > > > Sometimes the [CMB](https://en.wikipedia.org/wiki/Cosmic_microwave_background#CMBR_dipole_anisotropy) is considered to be a stationary frame of reference for the universe. But as per this link, one should not consider the...
2,402,433
As we use "default" keyword as a access specifier, and it can be used in switch statements as well with complete different purpose, So i was curious that is there any other keywords in java which can be used in more then one purposes
2010/03/08
[ "https://Stackoverflow.com/questions/2402433", "https://Stackoverflow.com", "https://Stackoverflow.com/users/241717/" ]
Something no one else has mentioned yet: the **class** keyword has two different uses. Declaring a class: ``` class Test{}; ``` and indicating a class literal: ``` Class<Test> testClass = Test.class; ```
The "extends" keyword can be for single inheritance (either implementation or "pure abstract class" aka "interface inheritance" in Java). The "extends" keyword can also be used for multiple (interface) inheritance. The ones who always argue that Java doesn't support multiple inheritance will hence have a hard time ar...
2,402,433
As we use "default" keyword as a access specifier, and it can be used in switch statements as well with complete different purpose, So i was curious that is there any other keywords in java which can be used in more then one purposes
2010/03/08
[ "https://Stackoverflow.com/questions/2402433", "https://Stackoverflow.com", "https://Stackoverflow.com/users/241717/" ]
The "default" in the case of access modifier isn't a keyword - you don't write: `default void doSomething()` However, when specifying the default value of an attribute of annotations - it is. ``` switch (a) { default: something(); } ``` and ``` public @interface MyAnnotation { boolean bool() default tru...
The "extends" keyword can be for single inheritance (either implementation or "pure abstract class" aka "interface inheritance" in Java). The "extends" keyword can also be used for multiple (interface) inheritance. The ones who always argue that Java doesn't support multiple inheritance will hence have a hard time ar...