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
4,895,157
So my function should open a file and count the word length and give the output. For example, many('sample.txt') Words of length 1: 2 Words of length 2: 6 Words of length 3: 7 Words of length 4: 6 My sample.txt file contains: This is a test file. How many words are of length one? How many words are of length thre...
2011/02/04
[ "https://Stackoverflow.com/questions/4895157", "https://Stackoverflow.com", "https://Stackoverflow.com/users/582457/" ]
You want to obtain a list of lengths (1, 2, 3, 4,... characters) and a number of occurrences of words with this length in the file. So until `L = text.split()` it was a good approach. Now have a look at *dictionaries* in Python, that will allow you to store the data structure mentioned above and iterate over the list ...
Let's analyze your problem step-by-step. You need to: 1. Retrieve all the words from a file 2. Iterate over all the words 3. Increment the counter `N` every time you find a word of length `N` 4. Output the result You already did the step 1: ``` def many(fname): infile = open(fname,'r') text = infile.read()...
4,895,157
So my function should open a file and count the word length and give the output. For example, many('sample.txt') Words of length 1: 2 Words of length 2: 6 Words of length 3: 7 Words of length 4: 6 My sample.txt file contains: This is a test file. How many words are of length one? How many words are of length thre...
2011/02/04
[ "https://Stackoverflow.com/questions/4895157", "https://Stackoverflow.com", "https://Stackoverflow.com/users/582457/" ]
What do you expect here ``` if item == 1: ``` and here ``` L.count(item) ``` And what does actually happen? Use a debugger and have a look at the variable values or just print them to the screen.
Let's analyze your problem step-by-step. You need to: 1. Retrieve all the words from a file 2. Iterate over all the words 3. Increment the counter `N` every time you find a word of length `N` 4. Output the result You already did the step 1: ``` def many(fname): infile = open(fname,'r') text = infile.read()...
4,895,157
So my function should open a file and count the word length and give the output. For example, many('sample.txt') Words of length 1: 2 Words of length 2: 6 Words of length 3: 7 Words of length 4: 6 My sample.txt file contains: This is a test file. How many words are of length one? How many words are of length thre...
2011/02/04
[ "https://Stackoverflow.com/questions/4895157", "https://Stackoverflow.com", "https://Stackoverflow.com/users/582457/" ]
You want to obtain a list of lengths (1, 2, 3, 4,... characters) and a number of occurrences of words with this length in the file. So until `L = text.split()` it was a good approach. Now have a look at *dictionaries* in Python, that will allow you to store the data structure mentioned above and iterate over the list ...
The regular expression library might also be helpful, if being somewhat overkill. A simple word matching re might be something like: ``` import re f = open("sample.txt") text = f.read() words = re.findall("\w+", text) ``` Words is then a list of... words :) This however will not properly match words like 'isn't' an...
4,895,157
So my function should open a file and count the word length and give the output. For example, many('sample.txt') Words of length 1: 2 Words of length 2: 6 Words of length 3: 7 Words of length 4: 6 My sample.txt file contains: This is a test file. How many words are of length one? How many words are of length thre...
2011/02/04
[ "https://Stackoverflow.com/questions/4895157", "https://Stackoverflow.com", "https://Stackoverflow.com/users/582457/" ]
Since this is homework, I'll post a short solution here, and leave it as exercise to figure out what it does and why it works :) ``` >>> from collections import Counter >>> text = open("sample.txt").read() >>> counts = Counter([len(word.strip('?!,.')) for word in text.split()]) >>> counts[3] 7 ```
The regular expression library might also be helpful, if being somewhat overkill. A simple word matching re might be something like: ``` import re f = open("sample.txt") text = f.read() words = re.findall("\w+", text) ``` Words is then a list of... words :) This however will not properly match words like 'isn't' an...
4,895,157
So my function should open a file and count the word length and give the output. For example, many('sample.txt') Words of length 1: 2 Words of length 2: 6 Words of length 3: 7 Words of length 4: 6 My sample.txt file contains: This is a test file. How many words are of length one? How many words are of length thre...
2011/02/04
[ "https://Stackoverflow.com/questions/4895157", "https://Stackoverflow.com", "https://Stackoverflow.com/users/582457/" ]
What do you expect here ``` if item == 1: ``` and here ``` L.count(item) ``` And what does actually happen? Use a debugger and have a look at the variable values or just print them to the screen.
The regular expression library might also be helpful, if being somewhat overkill. A simple word matching re might be something like: ``` import re f = open("sample.txt") text = f.read() words = re.findall("\w+", text) ``` Words is then a list of... words :) This however will not properly match words like 'isn't' an...
4,895,157
So my function should open a file and count the word length and give the output. For example, many('sample.txt') Words of length 1: 2 Words of length 2: 6 Words of length 3: 7 Words of length 4: 6 My sample.txt file contains: This is a test file. How many words are of length one? How many words are of length thre...
2011/02/04
[ "https://Stackoverflow.com/questions/4895157", "https://Stackoverflow.com", "https://Stackoverflow.com/users/582457/" ]
You want to obtain a list of lengths (1, 2, 3, 4,... characters) and a number of occurrences of words with this length in the file. So until `L = text.split()` it was a good approach. Now have a look at *dictionaries* in Python, that will allow you to store the data structure mentioned above and iterate over the list ...
Maybe also this: ``` >>> s 'This is a test file. How many words are of length one? How many words are of length three? We should figure it out! Can a function do this?' >>> {x:[len([c for c in w ]) for w in s.split()].count(x) for x in [len([c for c in w ]) for w in s.split()] } {1: 2, 2: 6, 3: 5, 4: 6, 5: 4, 6: 5, 8...
53,590,965
i am currently learning to code in hibernate and going through some blogs.I came across the following line which says - **`"JDBC API throws SQLException that is a checked exception, so we need to write a lot of try-catch block code. Most of the times it’s redundant in every JDBC call and used for transaction management...
2018/12/03
[ "https://Stackoverflow.com/questions/53590965", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8372275/" ]
This here ``` node *head ``` Defines a pointer to a `node`, and calls that pointer `head`. ``` =NULL; ``` Here, `NULL` is assigned to it. According to [this](https://en.cppreference.com/w/cpp/types/NULL), `NULL` is: > > The macro NULL is an implementation-defined null pointer constant, > which may be > > > a...
`NULL` is the macro defined for representing a pointer without a defined address. You can read more about in <https://en.cppreference.com/w/cpp/types/NULL>
234,937
Background: ----------- Story Background: > > The main crux of my story is that one of the 2 mcs - Delilah- is from a group of people being exploited, and the other is the son of the leader of the group doing the exploiting - Jack. Delilah is helping people leave the situation they're in, but the people doing the ex...
2022/08/28
[ "https://worldbuilding.stackexchange.com/questions/234937", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/91171/" ]
Construction ============ An island in a vast ocean is a prime location for an airforce and/or naval base for a superpower. Have the Jacks struck a deal with a superpower where they lease part of the island to the superpower. Part of the deal is a supply of labourers to do construction. The Delilahs form this group o...
Any resemblance with real people, place or events is purely coincidental. Except not really. Tourism ------- Island nations can make for very attractive vacation spots, and you can certainly develop a healthy industry off that, with hotels, restaurants, jetski rentals, boat or helicopter tours, and so forth. You can...
234,937
Background: ----------- Story Background: > > The main crux of my story is that one of the 2 mcs - Delilah- is from a group of people being exploited, and the other is the son of the leader of the group doing the exploiting - Jack. Delilah is helping people leave the situation they're in, but the people doing the ex...
2022/08/28
[ "https://worldbuilding.stackexchange.com/questions/234937", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/91171/" ]
1/12 of the whole income of [Tuvalu](https://en.wikipedia.org/wiki/Tuvalu) is from the `.tv` top-level domain. Your archipelago can have a natural resource (either digital or something like oil) where profits are only distributed to the Jacks and not the Delilahs.
Guano. Islands attract seabirds, which leave dung that's rich in nitrogen, phosphate, and potassium. Over thousands of years, they can build up huge deposits. That guano is then valuable as a fertiliser, and as a precursor for nitrate-based explosives (gunpowder etc.) Before the invention of the Haber process, which ...
234,937
Background: ----------- Story Background: > > The main crux of my story is that one of the 2 mcs - Delilah- is from a group of people being exploited, and the other is the son of the leader of the group doing the exploiting - Jack. Delilah is helping people leave the situation they're in, but the people doing the ex...
2022/08/28
[ "https://worldbuilding.stackexchange.com/questions/234937", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/91171/" ]
Have a foreign power import educated labourers ============================================== There's an island with a poorly known but similar situation to yours. [Nauru](https://www.nytimes.com/1982/03/07/magazine/world-s-richest-little-isle.html) > > Citizenship in the minirepublic is restricted to the native Nau...
Any resemblance with real people, place or events is purely coincidental. Except not really. Tourism ------- Island nations can make for very attractive vacation spots, and you can certainly develop a healthy industry off that, with hotels, restaurants, jetski rentals, boat or helicopter tours, and so forth. You can...
234,937
Background: ----------- Story Background: > > The main crux of my story is that one of the 2 mcs - Delilah- is from a group of people being exploited, and the other is the son of the leader of the group doing the exploiting - Jack. Delilah is helping people leave the situation they're in, but the people doing the ex...
2022/08/28
[ "https://worldbuilding.stackexchange.com/questions/234937", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/91171/" ]
Pearl Diving (or similar sea-based resources) --------------------------------------------- There is a reef off the north coast that has a unique and valuable shellfish species, and the northerners job is diving for them. Exactly why these shellfish are so valuable could vary. Pearls are the obvious answer - top-qual...
Fishing. External parties could be supplying the capital, in the form of large and effective fishing trawlers, but then employing locals at cutthroat rates and keeping the lions share for the profits for themselves as the "owners" of the boats. Workers are free to move from boat to boat in search of better deals, and ...
234,937
Background: ----------- Story Background: > > The main crux of my story is that one of the 2 mcs - Delilah- is from a group of people being exploited, and the other is the son of the leader of the group doing the exploiting - Jack. Delilah is helping people leave the situation they're in, but the people doing the ex...
2022/08/28
[ "https://worldbuilding.stackexchange.com/questions/234937", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/91171/" ]
1/12 of the whole income of [Tuvalu](https://en.wikipedia.org/wiki/Tuvalu) is from the `.tv` top-level domain. Your archipelago can have a natural resource (either digital or something like oil) where profits are only distributed to the Jacks and not the Delilahs.
Any resemblance with real people, place or events is purely coincidental. Except not really. Tourism ------- Island nations can make for very attractive vacation spots, and you can certainly develop a healthy industry off that, with hotels, restaurants, jetski rentals, boat or helicopter tours, and so forth. You can...
234,937
Background: ----------- Story Background: > > The main crux of my story is that one of the 2 mcs - Delilah- is from a group of people being exploited, and the other is the son of the leader of the group doing the exploiting - Jack. Delilah is helping people leave the situation they're in, but the people doing the ex...
2022/08/28
[ "https://worldbuilding.stackexchange.com/questions/234937", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/91171/" ]
**Prostitution.** <https://en.wikipedia.org/wiki/Prostitution_in_the_Dutch_Caribbean> > > Prostitution in the Dutch Caribbean (Aruba, Bonaire, Curaçao, Saba, > Sint Eustatius, and Sint Maarten) is legal and regulated.[1][2] At > least 500 foreign women are reportedly working in prostitution > throughout the islands....
Lumber ====== If the islands are in the tropics, the trees there tend to grow quickly, which is ideal for a lumber trade. Islands are also a great place for building ships, and at least in the early days of seafaring, ships require a lot of wood. An island nation in a strategic place in the ocean would be a great plac...
234,937
Background: ----------- Story Background: > > The main crux of my story is that one of the 2 mcs - Delilah- is from a group of people being exploited, and the other is the son of the leader of the group doing the exploiting - Jack. Delilah is helping people leave the situation they're in, but the people doing the ex...
2022/08/28
[ "https://worldbuilding.stackexchange.com/questions/234937", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/91171/" ]
Pearl Diving (or similar sea-based resources) --------------------------------------------- There is a reef off the north coast that has a unique and valuable shellfish species, and the northerners job is diving for them. Exactly why these shellfish are so valuable could vary. Pearls are the obvious answer - top-qual...
Lumber ====== If the islands are in the tropics, the trees there tend to grow quickly, which is ideal for a lumber trade. Islands are also a great place for building ships, and at least in the early days of seafaring, ships require a lot of wood. An island nation in a strategic place in the ocean would be a great plac...
234,937
Background: ----------- Story Background: > > The main crux of my story is that one of the 2 mcs - Delilah- is from a group of people being exploited, and the other is the son of the leader of the group doing the exploiting - Jack. Delilah is helping people leave the situation they're in, but the people doing the ex...
2022/08/28
[ "https://worldbuilding.stackexchange.com/questions/234937", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/91171/" ]
Pearl Diving (or similar sea-based resources) --------------------------------------------- There is a reef off the north coast that has a unique and valuable shellfish species, and the northerners job is diving for them. Exactly why these shellfish are so valuable could vary. Pearls are the obvious answer - top-qual...
Purple (or equivalent) ---------------------- The reason purple was associated with royalty in Roman times and earlier is that the only known method of producing it then was from a certain type of mediterranean sea snail, only found in Phoenicia (I believe the name Phoenicia is from the same root as the Greek word for...
234,937
Background: ----------- Story Background: > > The main crux of my story is that one of the 2 mcs - Delilah- is from a group of people being exploited, and the other is the son of the leader of the group doing the exploiting - Jack. Delilah is helping people leave the situation they're in, but the people doing the ex...
2022/08/28
[ "https://worldbuilding.stackexchange.com/questions/234937", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/91171/" ]
1/12 of the whole income of [Tuvalu](https://en.wikipedia.org/wiki/Tuvalu) is from the `.tv` top-level domain. Your archipelago can have a natural resource (either digital or something like oil) where profits are only distributed to the Jacks and not the Delilahs.
Fishing. External parties could be supplying the capital, in the form of large and effective fishing trawlers, but then employing locals at cutthroat rates and keeping the lions share for the profits for themselves as the "owners" of the boats. Workers are free to move from boat to boat in search of better deals, and ...
234,937
Background: ----------- Story Background: > > The main crux of my story is that one of the 2 mcs - Delilah- is from a group of people being exploited, and the other is the son of the leader of the group doing the exploiting - Jack. Delilah is helping people leave the situation they're in, but the people doing the ex...
2022/08/28
[ "https://worldbuilding.stackexchange.com/questions/234937", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/91171/" ]
Guano. Islands attract seabirds, which leave dung that's rich in nitrogen, phosphate, and potassium. Over thousands of years, they can build up huge deposits. That guano is then valuable as a fertiliser, and as a precursor for nitrate-based explosives (gunpowder etc.) Before the invention of the Haber process, which ...
Fishing. External parties could be supplying the capital, in the form of large and effective fishing trawlers, but then employing locals at cutthroat rates and keeping the lions share for the profits for themselves as the "owners" of the boats. Workers are free to move from boat to boat in search of better deals, and ...
8,983,310
I know a bit about JDK and JRE source and binary compatibility (e.g. [this](http://upstream.rosalinux.ru/java/versions/jdk.html) and [this](https://stackoverflow.com/questions/4692626/is-jdk-upward-or-backward-compatible)), but not sure about the following situation: Consider I have an application which is compiled us...
2012/01/24
[ "https://Stackoverflow.com/questions/8983310", "https://Stackoverflow.com", "https://Stackoverflow.com/users/473455/" ]
*Normally no problems should arise* if you set the compiler option of JDK6 to use 1.5 source compatibility. However *sometimes this is not always true*. I remember once when compiling 1.4 code with 1.5 compiler (using 1.4 compatibility). The jars where ok (1.4 binary level) but the application crashed due to a funny ...
Untill and unless you have not changed your code and added new Java 6 features, there should be no issues. With regards to other jars there should be no issues at all. JDK always maintains backward compatibility.
8,983,310
I know a bit about JDK and JRE source and binary compatibility (e.g. [this](http://upstream.rosalinux.ru/java/versions/jdk.html) and [this](https://stackoverflow.com/questions/4692626/is-jdk-upward-or-backward-compatible)), but not sure about the following situation: Consider I have an application which is compiled us...
2012/01/24
[ "https://Stackoverflow.com/questions/8983310", "https://Stackoverflow.com", "https://Stackoverflow.com/users/473455/" ]
*Normally no problems should arise* if you set the compiler option of JDK6 to use 1.5 source compatibility. However *sometimes this is not always true*. I remember once when compiling 1.4 code with 1.5 compiler (using 1.4 compatibility). The jars where ok (1.4 binary level) but the application crashed due to a funny ...
Compatibility mostly works. I would not expect any issue for you to arise aside from various *warnings* for e.g. not using generics. Maybe some barely used APIs were deprecated, but I assume they were left in place, just marked as deprecated. **Just try it, if it compiles you *should* be fine.** A key design aspect o...
49,714,539
I am trying to use Laravel Notification to send email but getting this error ``` { "message": "Type error: Argument 1 passed to App\\Notifications\\UserResetPasswordNotify::__construct() must be an instance of App\\Notifications\\User, instance of Illuminate\\Database\\Eloquent\\Collection given, called in /home/f...
2018/04/08
[ "https://Stackoverflow.com/questions/49714539", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8161062/" ]
You need to add use App\User in Notification file.
Try user->notify(new UserResetPasswordNotify($user))
49,714,539
I am trying to use Laravel Notification to send email but getting this error ``` { "message": "Type error: Argument 1 passed to App\\Notifications\\UserResetPasswordNotify::__construct() must be an instance of App\\Notifications\\User, instance of Illuminate\\Database\\Eloquent\\Collection given, called in /home/f...
2018/04/08
[ "https://Stackoverflow.com/questions/49714539", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8161062/" ]
Include `User` Class in your `Notification` Class ------------------------------------------------- You are *Injecting* `User` Dependency as *Typehint* to the **Magic Method** `__Cunstructor` into your `Notification` Class. You have to make sure `Class` is available there. Simply use this in your `Notification` ...
Try user->notify(new UserResetPasswordNotify($user))
35,114,040
I have one submit button, on click of which normal submission of a form should work. I have another element, a check box on click of which I need to submit the form. Is it possible? If yes, how?
2016/01/31
[ "https://Stackoverflow.com/questions/35114040", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5858412/" ]
You're doing the right thing it's just your conversion is wrong, it should be something like this: ``` float scale = context.getResources().getDisplayMetrics().density; x = Math.round(80 * scale); ... new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, x); ```
**Convert dp to pixel:** ``` public int dpToPx(int dp) { DisplayMetrics displayMetrics = getContext().getResources().getDisplayMetrics(); int px = Math.round(dp * (displayMetrics.xdpi / DisplayMetrics.DENSITY_DEFAULT)); return px; } ``` **Convert pixel to dp:** ``` public int pxToDp(int px) { ...
35,114,040
I have one submit button, on click of which normal submission of a form should work. I have another element, a check box on click of which I need to submit the form. Is it possible? If yes, how?
2016/01/31
[ "https://Stackoverflow.com/questions/35114040", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5858412/" ]
You're doing the right thing it's just your conversion is wrong, it should be something like this: ``` float scale = context.getResources().getDisplayMetrics().density; x = Math.round(80 * scale); ... new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, x); ```
Pixel to Dp converter ``` public static float pxToDp(float px) { float densityDpi = Resources.getSystem().getDisplayMetrics().densityDpi; return px / (densityDpi / 160f); } ``` Dp to Pixel converter ``` public static int dpToPx(int dp) { float density = Resources.getSystem().getDisplayM...
43,609,866
so i have a `<div>` that has 3 classes `<div class='a b c'>` and another `<div>` with 2 classes `<div class='a b'>` how can i select all the `<div>` that have classes A and B and not C. Is this possible with JQuery?
2017/04/25
[ "https://Stackoverflow.com/questions/43609866", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7813065/" ]
You can combine classes in the selector and use `:not` ``` $('.a.b:not(.c)') // a and b but no c ```
You can use the :not selector in jQuery, documentation [here](https://api.jquery.com/not-selector/) So your query would be : ``` $('.a.b:not(.c)') ``` JSFiddle : <https://jsfiddle.net/rs4b4gv5/> -- EDIT -- Typo fixed ! .. should be ok now. ```js alert($(".a.b:not(.c)").text()); ``` ```html <script src="https://c...
43,609,866
so i have a `<div>` that has 3 classes `<div class='a b c'>` and another `<div>` with 2 classes `<div class='a b'>` how can i select all the `<div>` that have classes A and B and not C. Is this possible with JQuery?
2017/04/25
[ "https://Stackoverflow.com/questions/43609866", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7813065/" ]
You can use selector like this `$('div.a.b:not(.c)')` 1. `div.a.b` selects all `div` elements that have both classes `a` and `b` 2. `:not(.c)` but won't select `div` element with class `c` ```js $('div.a.b:not(.c)').css('color', 'red') ``` ```html <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquer...
You can use the :not selector in jQuery, documentation [here](https://api.jquery.com/not-selector/) So your query would be : ``` $('.a.b:not(.c)') ``` JSFiddle : <https://jsfiddle.net/rs4b4gv5/> -- EDIT -- Typo fixed ! .. should be ok now. ```js alert($(".a.b:not(.c)").text()); ``` ```html <script src="https://c...
43,609,866
so i have a `<div>` that has 3 classes `<div class='a b c'>` and another `<div>` with 2 classes `<div class='a b'>` how can i select all the `<div>` that have classes A and B and not C. Is this possible with JQuery?
2017/04/25
[ "https://Stackoverflow.com/questions/43609866", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7813065/" ]
You can use selector like this `$('div.a.b:not(.c)')` 1. `div.a.b` selects all `div` elements that have both classes `a` and `b` 2. `:not(.c)` but won't select `div` element with class `c` ```js $('div.a.b:not(.c)').css('color', 'red') ``` ```html <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquer...
You can combine classes in the selector and use `:not` ``` $('.a.b:not(.c)') // a and b but no c ```
34,199,616
I have a dropdown menu created using css. Code below. **CSS** ``` /* Navigation Menu Styles */ ul#navmenu, ul.sub1, ul.sub2 { list-style-type: none; } ul#navmenu li { width: 125px; text-align: left; position: relative; float: left; margin-right: 3px; } ul#navmenu a { text-decoration:...
2015/12/10
[ "https://Stackoverflow.com/questions/34199616", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4315136/" ]
Using the require(PATH) method actually make the packager try and resolve the image during packaging which it can't do if its just looking at a variable. I would try doing: ``` <Image source={{uri: image.images.main}} /> ```
We need to `require` the image before using it. Something like this; `const image = require("../../assets/someImage.png");` `<Image source={image} />` This thing worked for me.
21,006,701
I'm writing an Android app that I would like to eventually port to iOS and Windows Mobile (though I know absolutely nothing about them right now). I'd like my app to be able to find other phones within a certain radius (maybe 20-30 feet) that also have the game installed so that the users can interact with others in th...
2014/01/08
[ "https://Stackoverflow.com/questions/21006701", "https://Stackoverflow.com", "https://Stackoverflow.com/users/762721/" ]
Options I can see ----------------- 1. **Bluetooth** (BT). I don't know, if I'm not too skeptical about it, but I see couple of problems. Short range. The biggest energy consumption. Maximum 7 peers connected at the same time (but maybe it's enough...). The big advantage is that a lot of devices support BT. 2. **BT LE...
I would use the central server approach. Each phone sends position data to the server. The server notifies the other users when they are in range. To limit used data, only send positions when the device reports movement more then X meters. Also, consider using a Ping button. The user presses it to send the position w...
38,941
I was reading my bible when I stumbled on Isaiah 65:20: > > There shall be no more thence an infant of days, nor an old man that > hath not filled his days: **for the child shall die an hundred years > old**; but the sinner being an hundred years old shall be accursed. > > > From what I understand the verse ref...
2019/02/14
[ "https://hermeneutics.stackexchange.com/questions/38941", "https://hermeneutics.stackexchange.com", "https://hermeneutics.stackexchange.com/users/28720/" ]
The OP asks if there is a modern translation of the Bible that closely parallels the quote from the *Dialog with Trypho.* The answer is yes. Modern translations of the Septuagint are almost indistinguishable from the quote from Justin Martyr used. Here is the quote from the translation of Justin: > > And there shall ...
@vikZ......I have reviewed right now all as much as I could in my Logos Bible Software and scholarly resources online. I read All Power to the Lamb as well written by James Johnson. It seems to me that James Johnson misunderstood what's going on with the Septuagint (LXX). I dont see anything wrong. It's simply phrased ...
54,897,848
I am writing a basic program to conjugate verbs in Spanish. I currently have two files: main.py and test.py. I am using test.py to test the function. currently main.py has: ``` import test as present print("Welcome to Spanish Verb Conjugator") verb = raw_input("Enter the verb: ") length = len(verb) #print(length)...
2019/02/27
[ "https://Stackoverflow.com/questions/54897848", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8380946/" ]
Change you code in main.py to : ``` import test print("Welcome to Spanish Verb Conjugator") verb = raw_input("Enter the verb: ") length = len(verb) #print(length) v1 = length - 2 r1 = length - 1 v = verb[v1] r = verb[r1] end = str(v+r) print end stem = verb[0:v1] tense = raw_input("Choose your tense: ") if tense ...
You are importing `test` as `present`. Instead of using `test.testt()` use `present.testt()`. Moreover your code suffers from `circular import` problem. [Circular Import Problem](https://stackabuse.com/python-circular-imports/)
70,335,448
For my Dash app, I want to create a navigation bar that has links to the different pages but also additional stuff, e.g. the currently logged in user, and logos and stuff. However, I unfortunately cannot use pages (Like in the "Navbar" example in dbc) since the WebApp has to be hosted as a single-url app inside anothe...
2021/12/13
[ "https://Stackoverflow.com/questions/70335448", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4629950/" ]
Your inline style should be applied to the parent div of your Tabs component. I made some small modifications here (look at **tabs\_container\_styles**): ```py tabs_styles = {"height": "44px"} tabs_container_styles = {"width": "49%", "display": "inline-block"} app.layout = html.Div( children=[ html.Div( ...
Set the `parent_style` property of your `Tabs` component instead of the `style` property and move your `Span` component to be a child of the div containing your `Tabs` component. > > parent\_style (dict; optional): Appends (inline) styles to the top-level parent container holding both the Tabs container and the conte...
57,971,795
I want to create a stored procedure or database function to delete some entries and return their IDs to the client. I started off with this `FUNCTION`: ``` CREATE FUNCTION dbo.FixHangingCarriers () RETURNS @returntable TABLE ( ID_Plant INT NOT NULL, ID_ChargeCarrier INT NOT NULL ) AS BEGIN; -- Declare a te...
2019/09/17
[ "https://Stackoverflow.com/questions/57971795", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10406502/" ]
After you create the `schema` you need to create a Model **FROM** that schema. Example from [MDN](https://developer.mozilla.org/en-US/docs/Learn/Server-side/Express_Nodejs/mongoose): ``` // Define schema var Schema = mongoose.Schema; var SomeModelSchema = new Schema({ a_string: String, a_date: Date }); // Comp...
The problem is you call an asynchronous function synchronously. It returned undefined because the function hasn't been resolved yet. A solution could be to use [promises](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) or [`async/await`](https://developer.mozilla.org/en-US/docs...
57,971,795
I want to create a stored procedure or database function to delete some entries and return their IDs to the client. I started off with this `FUNCTION`: ``` CREATE FUNCTION dbo.FixHangingCarriers () RETURNS @returntable TABLE ( ID_Plant INT NOT NULL, ID_ChargeCarrier INT NOT NULL ) AS BEGIN; -- Declare a te...
2019/09/17
[ "https://Stackoverflow.com/questions/57971795", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10406502/" ]
After you create the `schema` you need to create a Model **FROM** that schema. Example from [MDN](https://developer.mozilla.org/en-US/docs/Learn/Server-side/Express_Nodejs/mongoose): ``` // Define schema var Schema = mongoose.Schema; var SomeModelSchema = new Schema({ a_string: String, a_date: Date }); // Comp...
Something I ran into was you need to pass in an empty object if your not setting any fields - i.e. Good: Model.create({}) Bad: Model.create()
225,000
I'm trying to design a UML diagram ( UML Static Structure ) in Visio and I need to specify my own custom type for an attribute. How do I this ? When I go the Type combo box I see a list of predefined types and it forces me to select one of those, I can't type whatever I want. ![enter image description here](https://i....
2010/12/22
[ "https://superuser.com/questions/225000", "https://superuser.com", "https://superuser.com/users/60122/" ]
I actually have had a similar problem, and unfortunately you CANNOT specify your own attribute type. I'm unsure what David was talking about, That's just a tutorial on creating a diagram. Unfortunately Microsoft didn't leave data-type as a modifiable parameter, and thus, you have to insert a basic parameter and documen...
You can add your own custom attributes for UML static structure using Visio in the [following way.](http://www.office.microsoft.com/en-us/visio-help/create-a-uml-static-structure-diagram-HP001208873.aspx) 1. On the File menu, point to new, point to Software, and then click UML Model Diagram. 2. In the tree view, right...
225,000
I'm trying to design a UML diagram ( UML Static Structure ) in Visio and I need to specify my own custom type for an attribute. How do I this ? When I go the Type combo box I see a list of predefined types and it forces me to select one of those, I can't type whatever I want. ![enter image description here](https://i....
2010/12/22
[ "https://superuser.com/questions/225000", "https://superuser.com", "https://superuser.com/users/60122/" ]
In Visio 2007 you can add custom datatypes by: * In the Model Explorer, right-click "UML System" * Select "Packages" * Click the "New" button * Enter a name for your new Package (I recommend you name it the same as your assembly or namespace) * Click "OK" * In the Model Explorer, right-click the Package that you just ...
You can add your own custom attributes for UML static structure using Visio in the [following way.](http://www.office.microsoft.com/en-us/visio-help/create-a-uml-static-structure-diagram-HP001208873.aspx) 1. On the File menu, point to new, point to Software, and then click UML Model Diagram. 2. In the tree view, right...
32,353,529
For several projects now I've had this error flash up and completely ground my projects. In most cases, I've simply had to leave them and start a new, different one. Basically, I just want to be able to refer to every object on the form that matches certain criteria. In this case it's an arcade style game with four dif...
2015/09/02
[ "https://Stackoverflow.com/questions/32353529", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4947741/" ]
1) Use [background worker](https://msdn.microsoft.com/en-us/library/cc221403%28v=vs.95%29.aspx?f=255&MSPPError=-2147217396) instead of timer. Its built to interact correctly with the main form thread and handle control interactions a bit more cleanly. Timers are notoriously problematic for both main UI thread sync issu...
Righto, thanks to everyone who commented, replied. It seems to be working now with just that extra condition. Adding an if statement to check to see if the tag is empty before comparing the text. ``` Dim NumofObjsLeft As Integer = 0 For Each obj As Object In Me.Controls If obj.Tag > "" Then If...
47,337,328
I would like to perform some action on sliced DataFrame with multiple slice indexes. The pattern is df.iloc[0:24] , df.iloc[24:48], df.iloc[48:72] and so on with step 24 as you get it. How I can iterate it without to set it manually every time. More like df.iloc[x:z] and each iteration x=0, z=24 and next iteration with...
2017/11/16
[ "https://Stackoverflow.com/questions/47337328", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8187719/" ]
### `for` loop iteration ``` for i in range(0, len(df), 24): slc = df.iloc[i : i + 24] ``` --- ### `groupby` ``` df.groupby(df.index // 24 * 24).apply(your_function) ```
output it will give df with ``` for i in range(0,len(df)): dfnew = df.iloc[i : i + 42] i = i + 1 print(dfnew) ``` 0 to 41 indices data 1 to 42 2 to 43 by skipping first entire row with limit 42 rows of data.
190,213
My knowledge of electrics is very limited, I am planning to buy a Multimeter, but I am confused when it comes to safety. I do not really know what is a danger to life when measuring a circuit with a multimeter. Is it the voltage, current, resistor, capacity, frequenz a combination of some of this or other factors. Coul...
2015/09/12
[ "https://electronics.stackexchange.com/questions/190213", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/86392/" ]
Some general points- of course you should always follow the meter and test probe manufacturer's recommendations. There is danger from electrocution and from release of high energy (shrapnel, molten metal, vapor) in case of a short. Arc flash is a particular type of high energy fault that can cause fatal injuries, A le...
I'll skip the fun stuff, like measuring the voltage of a lightning bolt by standing in the middle of a thunderstorm with one DMM probe stuck in the ground while holding the other above your head. There are two basic areas to be careful of. First, measuring high voltage (basically, 110 volts or greater). You've got to...
190,213
My knowledge of electrics is very limited, I am planning to buy a Multimeter, but I am confused when it comes to safety. I do not really know what is a danger to life when measuring a circuit with a multimeter. Is it the voltage, current, resistor, capacity, frequenz a combination of some of this or other factors. Coul...
2015/09/12
[ "https://electronics.stackexchange.com/questions/190213", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/86392/" ]
I'll skip the fun stuff, like measuring the voltage of a lightning bolt by standing in the middle of a thunderstorm with one DMM probe stuck in the ground while holding the other above your head. There are two basic areas to be careful of. First, measuring high voltage (basically, 110 volts or greater). You've got to...
One risk is electric shocks. It's difficult to pin down exactly what point a supply becomes hazardous because it depends on many factors but the general rule of thumb is that supplies below 50V or so are safe enough under normal conditions. Sticking probes into bits of live metal carries a risk that you will end up ...
190,213
My knowledge of electrics is very limited, I am planning to buy a Multimeter, but I am confused when it comes to safety. I do not really know what is a danger to life when measuring a circuit with a multimeter. Is it the voltage, current, resistor, capacity, frequenz a combination of some of this or other factors. Coul...
2015/09/12
[ "https://electronics.stackexchange.com/questions/190213", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/86392/" ]
Some general points- of course you should always follow the meter and test probe manufacturer's recommendations. There is danger from electrocution and from release of high energy (shrapnel, molten metal, vapor) in case of a short. Arc flash is a particular type of high energy fault that can cause fatal injuries, A le...
One risk is electric shocks. It's difficult to pin down exactly what point a supply becomes hazardous because it depends on many factors but the general rule of thumb is that supplies below 50V or so are safe enough under normal conditions. Sticking probes into bits of live metal carries a risk that you will end up ...
111,815
I am installing Magento 2 on Bitnami WAMP Stack. However, soon after starting the installation it throws a list of errors and I am unable to fix this one: > > PHP Settings Check > > Your PHP Version is 5.6.20, but always\_populate\_raw\_post\_data = 0. $HTTP\_RAW\_POST\_DATA is deprecated from PHP 5.6 onwards and...
2016/04/20
[ "https://magento.stackexchange.com/questions/111815", "https://magento.stackexchange.com", "https://magento.stackexchange.com/users/27703/" ]
Well making changes in the `php.ini` or adding php parameter in the `.htaccess` didn't resolve my issue . I created `.user.ini` file on the web directory root and added this : **always\_populate\_raw\_post\_data = -1** Volla! issue was resolved. Let me know if you guys have any question.
Remove semicolon(**`;`**) before `always_populate_raw_post_data` in `php.ini` file. Make sure you are changing in correct loaded configuration file.
111,815
I am installing Magento 2 on Bitnami WAMP Stack. However, soon after starting the installation it throws a list of errors and I am unable to fix this one: > > PHP Settings Check > > Your PHP Version is 5.6.20, but always\_populate\_raw\_post\_data = 0. $HTTP\_RAW\_POST\_DATA is deprecated from PHP 5.6 onwards and...
2016/04/20
[ "https://magento.stackexchange.com/questions/111815", "https://magento.stackexchange.com", "https://magento.stackexchange.com/users/27703/" ]
Well making changes in the `php.ini` or adding php parameter in the `.htaccess` didn't resolve my issue . I created `.user.ini` file on the web directory root and added this : **always\_populate\_raw\_post\_data = -1** Volla! issue was resolved. Let me know if you guys have any question.
First of all find the path of `php.ini` configuration file. You can find `php.ini` file path by using `phpinfo()`. Once you find the path of file. Go to that path and open the file and find `always_populate_raw_post_data` and set `always_populate_raw_post_data = -1` save and restart the server. if the issue still not...
53,317,291
My Wordpress website is in 4 languages. I have already translated my Wordpress theme string in all languages through Loco translate. But the strings which i have attached in screenshots were not include in the string translate file(PO file). Can you please tell me How i can translate my comment portion all 4 languages?...
2018/11/15
[ "https://Stackoverflow.com/questions/53317291", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10632565/" ]
Yeah, it doesn't really matter whether `L` is dynamically allocated or not. That's by-the-by. In fact there's no reason here to dynamically allocate it. What matters is the ownership and lifetime of the nodes that it manages. These are dynamically allocated, so you will need a destructor inside `ListNode` that unlinks...
You need some delete function like this ``` void DeleteList(ListNode** head) { ListNode* p = *head; while(p != NULL) { ListNode *t = p->next; delete p; p = t; } } // and call it in main: printf("Final value is %d.\n", p->val); ...
3,672,807
Given two positive functions $f(n)$,$g(n)$, such that $f(n)=O(g(n))$ (big O notation) show that there exists a constant $c>0$ so that $f(n)\le cg(n)$ for every $n\ge1$ I dont know how to solve this because I learned at class that $n$ can start start from any number. For example if $g(n)=\log n$ it can't start from $...
2020/05/13
[ "https://math.stackexchange.com/questions/3672807", "https://math.stackexchange.com", "https://math.stackexchange.com/users/634112/" ]
Let $f,g$ be positive and such that $f(n) = O(g(n))$ (as $n\to\infty$). By definition of $O(\cdot)$, there exists $N\geq 1$ and $C>0$ such that $f(n) \leq C\cdot g(n)$ for all $n \geq N$. So how to deal with $1\leq n < N$? Well, you only have a finite number of them, so you can "incorporate that in the constant," sep...
Let me repeat your sentence: $f,g \geqslant 0$ and $f=O(g)$. Exist or not such $C>0$, that $f(n) \leqslant C \cdot g(n)$ for $\forall n \in \mathbb{N}$? Answer is no, because big-O does not set restriction on some initial segment of $\mathbb{N}$. Let's define $ f(n) = \left\{ \begin{array}{ll} 1 & \mbox{if } n = 1...
11,402,282
I have the following test method: ``` [TestMethod] public void TestHarvestMethod() { HarvestTargetTimeRangeUTC time = new HarvestTargetTimeRangeUTC(); time.StartTimeUTC = new DateTime(2008, 01, 01, 00, 00, 00, DateTimeKind.Utc); time.EndTimeUTC = DateTime.UtcNow; XElement lIntelexReport = XElement.Pars...
2012/07/09
[ "https://Stackoverflow.com/questions/11402282", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1170369/" ]
Its looking for you to pass it a copy of your web.config or app.config value so it can extract the information it requires from this (held in the AppSettings section) For example ``` <configuration> <appSettings> <add key="IncidentReport" value="1" /> </appSettings> </configuration> ``` If your te...
In your test assembly you'll need to have a app.config file. Within this file you'll need a key named 'IncidentReport" with an integer value.
45,680,038
I have two dataframes, *A* and *B*, each with 64 rows and 431 columns. Each dataframe contains values of zeros and ones. I need to create a new dataframe *C* that has values of 1 when the cell of *A* is equal to the cell of *B*, and a value of 0 when a cell of *A* is different to the cell of *B*. How to apply the if st...
2017/08/14
[ "https://Stackoverflow.com/questions/45680038", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4932370/" ]
Because of R's behind the scenes magic, you don't even need to use an `if` statement. You can just do this: ``` C <- (A == B) * 1 ``` The first part `(A == B)` goes through every cell of A and B and compares them directly. The result is a bunch of `TRUE` and `FALSE` values. Multiplying everything by `1` forces the `...
The previous answers are correct. If you really want to use an if statement, then you can use this: ``` C <- ifelse(A == B, 1, 0) ```
45,680,038
I have two dataframes, *A* and *B*, each with 64 rows and 431 columns. Each dataframe contains values of zeros and ones. I need to create a new dataframe *C* that has values of 1 when the cell of *A* is equal to the cell of *B*, and a value of 0 when a cell of *A* is different to the cell of *B*. How to apply the if st...
2017/08/14
[ "https://Stackoverflow.com/questions/45680038", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4932370/" ]
Because of R's behind the scenes magic, you don't even need to use an `if` statement. You can just do this: ``` C <- (A == B) * 1 ``` The first part `(A == B)` goes through every cell of A and B and compares them directly. The result is a bunch of `TRUE` and `FALSE` values. Multiplying everything by `1` forces the `...
Basic operations on R matrix-like data structures tend to be cell-wise. Logicals mixed with numbers in operations tend to coerced into the number themselves, 0 (FALSE) and 1 (TRUE) so the `(A == B) + 0` would do what you want to cell-wise, however to make sure that the result is a data.frame and not a matrix you need t...
45,680,038
I have two dataframes, *A* and *B*, each with 64 rows and 431 columns. Each dataframe contains values of zeros and ones. I need to create a new dataframe *C* that has values of 1 when the cell of *A* is equal to the cell of *B*, and a value of 0 when a cell of *A* is different to the cell of *B*. How to apply the if st...
2017/08/14
[ "https://Stackoverflow.com/questions/45680038", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4932370/" ]
You assess whether `A` and `B` are the same (cell-wise) and then transform the `TRUE` / `FALSE` values into binary by multiplying it by 1: ``` df <- (A == B) * 1 ```
The previous answers are correct. If you really want to use an if statement, then you can use this: ``` C <- ifelse(A == B, 1, 0) ```
45,680,038
I have two dataframes, *A* and *B*, each with 64 rows and 431 columns. Each dataframe contains values of zeros and ones. I need to create a new dataframe *C* that has values of 1 when the cell of *A* is equal to the cell of *B*, and a value of 0 when a cell of *A* is different to the cell of *B*. How to apply the if st...
2017/08/14
[ "https://Stackoverflow.com/questions/45680038", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4932370/" ]
You assess whether `A` and `B` are the same (cell-wise) and then transform the `TRUE` / `FALSE` values into binary by multiplying it by 1: ``` df <- (A == B) * 1 ```
Basic operations on R matrix-like data structures tend to be cell-wise. Logicals mixed with numbers in operations tend to coerced into the number themselves, 0 (FALSE) and 1 (TRUE) so the `(A == B) + 0` would do what you want to cell-wise, however to make sure that the result is a data.frame and not a matrix you need t...
25,273,166
Essentially, I have constructed a sizable predictive model in R with about 10~15 separate script files for collecting, sorting, analyzing and presenting my data. Rather than just put everything into one gigantic script file, I would like to maintain some level of modularity and run each piece from a control script, or ...
2014/08/12
[ "https://Stackoverflow.com/questions/25273166", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3934946/" ]
I think you're simply looking for the `source` function. See `?source`. I often have a master script which `source` other `.R` files.
Although I understand your need for modularity, why not simply create a single script for the run of interest. Sourcing multiple scripts results in complexities of not being able to pass variables across scripts unless you write to files (which wastes CPU cycles). You could even build a master script that would read th...
25,273,166
Essentially, I have constructed a sizable predictive model in R with about 10~15 separate script files for collecting, sorting, analyzing and presenting my data. Rather than just put everything into one gigantic script file, I would like to maintain some level of modularity and run each piece from a control script, or ...
2014/08/12
[ "https://Stackoverflow.com/questions/25273166", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3934946/" ]
I think you're simply looking for the `source` function. See `?source`. I often have a master script which `source` other `.R` files.
I am a new developer and I am answering with an example that worked for me because no one has given an example. Example of using source("myscript.R"), to call another R script "myscript\_A.R" or "myscript\_B.R" is as follows- ``` if(condition==X){ source("myscript_A.R") }else{ source("myscript_B.R") } ```
25,273,166
Essentially, I have constructed a sizable predictive model in R with about 10~15 separate script files for collecting, sorting, analyzing and presenting my data. Rather than just put everything into one gigantic script file, I would like to maintain some level of modularity and run each piece from a control script, or ...
2014/08/12
[ "https://Stackoverflow.com/questions/25273166", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3934946/" ]
I think you're simply looking for the `source` function. See `?source`. I often have a master script which `source` other `.R` files.
I've done what you described and split up chunks of code in separate R files and have been running source(this) and source(that), but I've been painfully learning that sourcing functions (rather than subroutines/script files) is the better way to go. Here are 3 possible reasons why we might have developed their script...
25,273,166
Essentially, I have constructed a sizable predictive model in R with about 10~15 separate script files for collecting, sorting, analyzing and presenting my data. Rather than just put everything into one gigantic script file, I would like to maintain some level of modularity and run each piece from a control script, or ...
2014/08/12
[ "https://Stackoverflow.com/questions/25273166", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3934946/" ]
I think you're simply looking for the `source` function. See `?source`. I often have a master script which `source` other `.R` files.
You can source all `.R` scripts from a folder: ``` # Load tidyverse library(tidyverse) # to pipe (%>%) and map across each file # List files and source each list.files("path_to_folder", full.names = TRUE) %>% map(source) ``` Here, you list all files from a folder, then you map across the `source()` function. This ...
25,273,166
Essentially, I have constructed a sizable predictive model in R with about 10~15 separate script files for collecting, sorting, analyzing and presenting my data. Rather than just put everything into one gigantic script file, I would like to maintain some level of modularity and run each piece from a control script, or ...
2014/08/12
[ "https://Stackoverflow.com/questions/25273166", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3934946/" ]
I am a new developer and I am answering with an example that worked for me because no one has given an example. Example of using source("myscript.R"), to call another R script "myscript\_A.R" or "myscript\_B.R" is as follows- ``` if(condition==X){ source("myscript_A.R") }else{ source("myscript_B.R") } ```
Although I understand your need for modularity, why not simply create a single script for the run of interest. Sourcing multiple scripts results in complexities of not being able to pass variables across scripts unless you write to files (which wastes CPU cycles). You could even build a master script that would read th...
25,273,166
Essentially, I have constructed a sizable predictive model in R with about 10~15 separate script files for collecting, sorting, analyzing and presenting my data. Rather than just put everything into one gigantic script file, I would like to maintain some level of modularity and run each piece from a control script, or ...
2014/08/12
[ "https://Stackoverflow.com/questions/25273166", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3934946/" ]
I've done what you described and split up chunks of code in separate R files and have been running source(this) and source(that), but I've been painfully learning that sourcing functions (rather than subroutines/script files) is the better way to go. Here are 3 possible reasons why we might have developed their script...
Although I understand your need for modularity, why not simply create a single script for the run of interest. Sourcing multiple scripts results in complexities of not being able to pass variables across scripts unless you write to files (which wastes CPU cycles). You could even build a master script that would read th...
25,273,166
Essentially, I have constructed a sizable predictive model in R with about 10~15 separate script files for collecting, sorting, analyzing and presenting my data. Rather than just put everything into one gigantic script file, I would like to maintain some level of modularity and run each piece from a control script, or ...
2014/08/12
[ "https://Stackoverflow.com/questions/25273166", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3934946/" ]
You can source all `.R` scripts from a folder: ``` # Load tidyverse library(tidyverse) # to pipe (%>%) and map across each file # List files and source each list.files("path_to_folder", full.names = TRUE) %>% map(source) ``` Here, you list all files from a folder, then you map across the `source()` function. This ...
Although I understand your need for modularity, why not simply create a single script for the run of interest. Sourcing multiple scripts results in complexities of not being able to pass variables across scripts unless you write to files (which wastes CPU cycles). You could even build a master script that would read th...
25,273,166
Essentially, I have constructed a sizable predictive model in R with about 10~15 separate script files for collecting, sorting, analyzing and presenting my data. Rather than just put everything into one gigantic script file, I would like to maintain some level of modularity and run each piece from a control script, or ...
2014/08/12
[ "https://Stackoverflow.com/questions/25273166", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3934946/" ]
I am a new developer and I am answering with an example that worked for me because no one has given an example. Example of using source("myscript.R"), to call another R script "myscript\_A.R" or "myscript\_B.R" is as follows- ``` if(condition==X){ source("myscript_A.R") }else{ source("myscript_B.R") } ```
I've done what you described and split up chunks of code in separate R files and have been running source(this) and source(that), but I've been painfully learning that sourcing functions (rather than subroutines/script files) is the better way to go. Here are 3 possible reasons why we might have developed their script...
25,273,166
Essentially, I have constructed a sizable predictive model in R with about 10~15 separate script files for collecting, sorting, analyzing and presenting my data. Rather than just put everything into one gigantic script file, I would like to maintain some level of modularity and run each piece from a control script, or ...
2014/08/12
[ "https://Stackoverflow.com/questions/25273166", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3934946/" ]
I am a new developer and I am answering with an example that worked for me because no one has given an example. Example of using source("myscript.R"), to call another R script "myscript\_A.R" or "myscript\_B.R" is as follows- ``` if(condition==X){ source("myscript_A.R") }else{ source("myscript_B.R") } ```
You can source all `.R` scripts from a folder: ``` # Load tidyverse library(tidyverse) # to pipe (%>%) and map across each file # List files and source each list.files("path_to_folder", full.names = TRUE) %>% map(source) ``` Here, you list all files from a folder, then you map across the `source()` function. This ...
14,006,106
I am trying to do the heroku setup portion of the tutorial <http://ruby.railstutorial.org/>. But on <https://toolbelt.heroku.com/>, I noticed there isn't an .rpm for Fedora, so I tried to install Foreman and the Heroku CLI individually. Foreman and Git installed fine, but I'm having trouble with the Heroku CLI. When I...
2012/12/22
[ "https://Stackoverflow.com/questions/14006106", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1784747/" ]
I rather used the heroku and the foreman gem than using the heroku tool bet on fedora 17/18. ``` gem install heroku gem install foreman ``` during installation it will give a warning saying > > The `heroku` gem has been deprecated and replaced with the Heroku Toolbelt. > > > Ignore that. The toolbet even ga...
If you install the rubygem\_heroku package, it likely installs the gem in the system ruby. Based on your examples, you're using RVM. You should install the heroku gem directly into the RVM environment and gemset you want to use it in: ``` gem install heroku ```
14,006,106
I am trying to do the heroku setup portion of the tutorial <http://ruby.railstutorial.org/>. But on <https://toolbelt.heroku.com/>, I noticed there isn't an .rpm for Fedora, so I tried to install Foreman and the Heroku CLI individually. Foreman and Git installed fine, but I'm having trouble with the Heroku CLI. When I...
2012/12/22
[ "https://Stackoverflow.com/questions/14006106", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1784747/" ]
There is also a stand alone version of the toolbelt now available at <https://toolbelt.heroku.com/standalone>.
If you install the rubygem\_heroku package, it likely installs the gem in the system ruby. Based on your examples, you're using RVM. You should install the heroku gem directly into the RVM environment and gemset you want to use it in: ``` gem install heroku ```
14,006,106
I am trying to do the heroku setup portion of the tutorial <http://ruby.railstutorial.org/>. But on <https://toolbelt.heroku.com/>, I noticed there isn't an .rpm for Fedora, so I tried to install Foreman and the Heroku CLI individually. Foreman and Git installed fine, but I'm having trouble with the Heroku CLI. When I...
2012/12/22
[ "https://Stackoverflow.com/questions/14006106", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1784747/" ]
I did ``` sudo yum install rubygem-heroku ``` If you are using RVM, do this ``` rvm use system ``` use heroku client. Had a hard time making heroku command work with rvm+jruby
If you install the rubygem\_heroku package, it likely installs the gem in the system ruby. Based on your examples, you're using RVM. You should install the heroku gem directly into the RVM environment and gemset you want to use it in: ``` gem install heroku ```
14,006,106
I am trying to do the heroku setup portion of the tutorial <http://ruby.railstutorial.org/>. But on <https://toolbelt.heroku.com/>, I noticed there isn't an .rpm for Fedora, so I tried to install Foreman and the Heroku CLI individually. Foreman and Git installed fine, but I'm having trouble with the Heroku CLI. When I...
2012/12/22
[ "https://Stackoverflow.com/questions/14006106", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1784747/" ]
You should totality go for the standalone option which is way more stable. I had the gem installed as well and I got into a lot type of errors (ssl, cert, yours...) You can go to: > > <https://toolbelt.heroku.com/standalone> > > > and install it depending on your OS. Hope this helps
If you install the rubygem\_heroku package, it likely installs the gem in the system ruby. Based on your examples, you're using RVM. You should install the heroku gem directly into the RVM environment and gemset you want to use it in: ``` gem install heroku ```
14,006,106
I am trying to do the heroku setup portion of the tutorial <http://ruby.railstutorial.org/>. But on <https://toolbelt.heroku.com/>, I noticed there isn't an .rpm for Fedora, so I tried to install Foreman and the Heroku CLI individually. Foreman and Git installed fine, but I'm having trouble with the Heroku CLI. When I...
2012/12/22
[ "https://Stackoverflow.com/questions/14006106", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1784747/" ]
I rather used the heroku and the foreman gem than using the heroku tool bet on fedora 17/18. ``` gem install heroku gem install foreman ``` during installation it will give a warning saying > > The `heroku` gem has been deprecated and replaced with the Heroku Toolbelt. > > > Ignore that. The toolbet even ga...
I did ``` sudo yum install rubygem-heroku ``` If you are using RVM, do this ``` rvm use system ``` use heroku client. Had a hard time making heroku command work with rvm+jruby
14,006,106
I am trying to do the heroku setup portion of the tutorial <http://ruby.railstutorial.org/>. But on <https://toolbelt.heroku.com/>, I noticed there isn't an .rpm for Fedora, so I tried to install Foreman and the Heroku CLI individually. Foreman and Git installed fine, but I'm having trouble with the Heroku CLI. When I...
2012/12/22
[ "https://Stackoverflow.com/questions/14006106", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1784747/" ]
I rather used the heroku and the foreman gem than using the heroku tool bet on fedora 17/18. ``` gem install heroku gem install foreman ``` during installation it will give a warning saying > > The `heroku` gem has been deprecated and replaced with the Heroku Toolbelt. > > > Ignore that. The toolbet even ga...
You should totality go for the standalone option which is way more stable. I had the gem installed as well and I got into a lot type of errors (ssl, cert, yours...) You can go to: > > <https://toolbelt.heroku.com/standalone> > > > and install it depending on your OS. Hope this helps
14,006,106
I am trying to do the heroku setup portion of the tutorial <http://ruby.railstutorial.org/>. But on <https://toolbelt.heroku.com/>, I noticed there isn't an .rpm for Fedora, so I tried to install Foreman and the Heroku CLI individually. Foreman and Git installed fine, but I'm having trouble with the Heroku CLI. When I...
2012/12/22
[ "https://Stackoverflow.com/questions/14006106", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1784747/" ]
There is also a stand alone version of the toolbelt now available at <https://toolbelt.heroku.com/standalone>.
I did ``` sudo yum install rubygem-heroku ``` If you are using RVM, do this ``` rvm use system ``` use heroku client. Had a hard time making heroku command work with rvm+jruby
14,006,106
I am trying to do the heroku setup portion of the tutorial <http://ruby.railstutorial.org/>. But on <https://toolbelt.heroku.com/>, I noticed there isn't an .rpm for Fedora, so I tried to install Foreman and the Heroku CLI individually. Foreman and Git installed fine, but I'm having trouble with the Heroku CLI. When I...
2012/12/22
[ "https://Stackoverflow.com/questions/14006106", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1784747/" ]
There is also a stand alone version of the toolbelt now available at <https://toolbelt.heroku.com/standalone>.
You should totality go for the standalone option which is way more stable. I had the gem installed as well and I got into a lot type of errors (ssl, cert, yours...) You can go to: > > <https://toolbelt.heroku.com/standalone> > > > and install it depending on your OS. Hope this helps
46,868,036
Im having trouble with STl. Im trying to iterate through an STL list of student objects. Im trying to delete objects when I find a matching comparison. However I receive an error when doing the comparison. This is what I have done so far: ``` string studentName; cout<<"Enter name of student to remove"...
2017/10/21
[ "https://Stackoverflow.com/questions/46868036", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8522311/" ]
You are comparing an instance of `Student` with an `std::string` which I'm assuming doesn't have a defined `operator==` overloaded function. You can either define this operator or compare `studentName` with the member string variable in `Student` which stores the name of the student. You might consider looking at `std:...
When you delete the list segment that the iterator is pointing at, the iterator is no longer valid. This is why `erase` returns a new iterator to the element following the one that was erased. Also, you might want to increment your iterator at some point in the loop. Try this: ``` while (it != studentList.end()){ ...
46,868,036
Im having trouble with STl. Im trying to iterate through an STL list of student objects. Im trying to delete objects when I find a matching comparison. However I receive an error when doing the comparison. This is what I have done so far: ``` string studentName; cout<<"Enter name of student to remove"...
2017/10/21
[ "https://Stackoverflow.com/questions/46868036", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8522311/" ]
You are trying to compare Student with string. Such a comparison is not defined by default so either you have to define a proper operator(s) yourself or write something like `(*it).getName() == studentName` where getName is a member function of Student which returns the name of the student. In addition, your for loop i...
When you delete the list segment that the iterator is pointing at, the iterator is no longer valid. This is why `erase` returns a new iterator to the element following the one that was erased. Also, you might want to increment your iterator at some point in the loop. Try this: ``` while (it != studentList.end()){ ...
46,868,036
Im having trouble with STl. Im trying to iterate through an STL list of student objects. Im trying to delete objects when I find a matching comparison. However I receive an error when doing the comparison. This is what I have done so far: ``` string studentName; cout<<"Enter name of student to remove"...
2017/10/21
[ "https://Stackoverflow.com/questions/46868036", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8522311/" ]
You are comparing an instance of `Student` with an `std::string` which I'm assuming doesn't have a defined `operator==` overloaded function. You can either define this operator or compare `studentName` with the member string variable in `Student` which stores the name of the student. You might consider looking at `std:...
Your loop is actually equivalent to the following `for` loop: ``` for (list<Student>::iterator it = studentList.begin(); it != studentList.end(); /* EMPTY */) { if(*it== studentName){ studentList.erase(it); } } ``` Notice how that last part of the `for` loop is empty? That means you you nev...
46,868,036
Im having trouble with STl. Im trying to iterate through an STL list of student objects. Im trying to delete objects when I find a matching comparison. However I receive an error when doing the comparison. This is what I have done so far: ``` string studentName; cout<<"Enter name of student to remove"...
2017/10/21
[ "https://Stackoverflow.com/questions/46868036", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8522311/" ]
You are trying to compare Student with string. Such a comparison is not defined by default so either you have to define a proper operator(s) yourself or write something like `(*it).getName() == studentName` where getName is a member function of Student which returns the name of the student. In addition, your for loop i...
Your loop is actually equivalent to the following `for` loop: ``` for (list<Student>::iterator it = studentList.begin(); it != studentList.end(); /* EMPTY */) { if(*it== studentName){ studentList.erase(it); } } ``` Notice how that last part of the `for` loop is empty? That means you you nev...
46,868,036
Im having trouble with STl. Im trying to iterate through an STL list of student objects. Im trying to delete objects when I find a matching comparison. However I receive an error when doing the comparison. This is what I have done so far: ``` string studentName; cout<<"Enter name of student to remove"...
2017/10/21
[ "https://Stackoverflow.com/questions/46868036", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8522311/" ]
You are comparing an instance of `Student` with an `std::string` which I'm assuming doesn't have a defined `operator==` overloaded function. You can either define this operator or compare `studentName` with the member string variable in `Student` which stores the name of the student. You might consider looking at `std:...
1. You do not advance the iterator. If you happen to erase the first element, you will crash, otherwise you will get an infinite loop. However, ... 2. There are tons of examples how to iterate lists and erase elements correctly, e.g. here: [Erasing while iterating an std::list](https://stackoverflow.com/questions/16269...
46,868,036
Im having trouble with STl. Im trying to iterate through an STL list of student objects. Im trying to delete objects when I find a matching comparison. However I receive an error when doing the comparison. This is what I have done so far: ``` string studentName; cout<<"Enter name of student to remove"...
2017/10/21
[ "https://Stackoverflow.com/questions/46868036", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8522311/" ]
You are trying to compare Student with string. Such a comparison is not defined by default so either you have to define a proper operator(s) yourself or write something like `(*it).getName() == studentName` where getName is a member function of Student which returns the name of the student. In addition, your for loop i...
1. You do not advance the iterator. If you happen to erase the first element, you will crash, otherwise you will get an infinite loop. However, ... 2. There are tons of examples how to iterate lists and erase elements correctly, e.g. here: [Erasing while iterating an std::list](https://stackoverflow.com/questions/16269...
46,868,036
Im having trouble with STl. Im trying to iterate through an STL list of student objects. Im trying to delete objects when I find a matching comparison. However I receive an error when doing the comparison. This is what I have done so far: ``` string studentName; cout<<"Enter name of student to remove"...
2017/10/21
[ "https://Stackoverflow.com/questions/46868036", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8522311/" ]
You are trying to compare Student with string. Such a comparison is not defined by default so either you have to define a proper operator(s) yourself or write something like `(*it).getName() == studentName` where getName is a member function of Student which returns the name of the student. In addition, your for loop i...
You are comparing an instance of `Student` with an `std::string` which I'm assuming doesn't have a defined `operator==` overloaded function. You can either define this operator or compare `studentName` with the member string variable in `Student` which stores the name of the student. You might consider looking at `std:...
46,868,036
Im having trouble with STl. Im trying to iterate through an STL list of student objects. Im trying to delete objects when I find a matching comparison. However I receive an error when doing the comparison. This is what I have done so far: ``` string studentName; cout<<"Enter name of student to remove"...
2017/10/21
[ "https://Stackoverflow.com/questions/46868036", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8522311/" ]
You are comparing an instance of `Student` with an `std::string` which I'm assuming doesn't have a defined `operator==` overloaded function. You can either define this operator or compare `studentName` with the member string variable in `Student` which stores the name of the student. You might consider looking at `std:...
You are trying to compare a String and a Student. Also, you are not advancing the iterator, therefore that loop will fail to cease. Try something along these lines: ``` while (it != studentList.end()) { if(it->getName == studentName) { it = studentList.erase(it); } ++it; } ```
46,868,036
Im having trouble with STl. Im trying to iterate through an STL list of student objects. Im trying to delete objects when I find a matching comparison. However I receive an error when doing the comparison. This is what I have done so far: ``` string studentName; cout<<"Enter name of student to remove"...
2017/10/21
[ "https://Stackoverflow.com/questions/46868036", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8522311/" ]
You are trying to compare Student with string. Such a comparison is not defined by default so either you have to define a proper operator(s) yourself or write something like `(*it).getName() == studentName` where getName is a member function of Student which returns the name of the student. In addition, your for loop i...
You are trying to compare a String and a Student. Also, you are not advancing the iterator, therefore that loop will fail to cease. Try something along these lines: ``` while (it != studentList.end()) { if(it->getName == studentName) { it = studentList.erase(it); } ++it; } ```
1,425,646
> > Suppose you flip a fair coin three times, > find three events $A$, $B$, and $C$, such that no two of them are > independent, but $P(A \cap B \cap C) = P(A)P(B)P(C)$ > > > I am given the question above. From what I can tell, this is a trick question since: $P(A \cap B \cap C) = P(A)P(B|A)P(C|B,A) = P(A)P(B)P...
2015/09/07
[ "https://math.stackexchange.com/questions/1425646", "https://math.stackexchange.com", "https://math.stackexchange.com/users/245318/" ]
> > Specifically, I would like to know, can I make a statement like: "All fields are rings, and all rings are groups"? > > > That is all correct. A field satisfies all ring axioms plus some extra axioms, so a field is a ring. A ring is an Abelian group plus some more axioms, so each ring is a group. A vector spac...
Every vector space is *over a field*. And every field is a vector space over itself. So for instance $\Bbb R$ is a field. But we can also say that $\Bbb R$ is a vector space over the field $\Bbb R$. Likewise $\Bbb C$ can be considered a vector space over $\Bbb C$ (making it a one-dimensional vector space). Also $\Bbb ...
1,425,646
> > Suppose you flip a fair coin three times, > find three events $A$, $B$, and $C$, such that no two of them are > independent, but $P(A \cap B \cap C) = P(A)P(B)P(C)$ > > > I am given the question above. From what I can tell, this is a trick question since: $P(A \cap B \cap C) = P(A)P(B|A)P(C|B,A) = P(A)P(B)P...
2015/09/07
[ "https://math.stackexchange.com/questions/1425646", "https://math.stackexchange.com", "https://math.stackexchange.com/users/245318/" ]
> > Specifically, I would like to know, can I make a statement like: "All fields are rings, and all rings are groups"? > > > That is all correct. A field satisfies all ring axioms plus some extra axioms, so a field is a ring. A ring is an Abelian group plus some more axioms, so each ring is a group. A vector spac...
Yes, All Fields are rings, and all rings are groups. That said, it is perhaps worthwhile to add a few words of clarification. Among these three, fields, rings and groups, the groups have the simpler structure. Groups require only one operation among it's members, and it is this operation that needs to satisfy the gro...
1,425,646
> > Suppose you flip a fair coin three times, > find three events $A$, $B$, and $C$, such that no two of them are > independent, but $P(A \cap B \cap C) = P(A)P(B)P(C)$ > > > I am given the question above. From what I can tell, this is a trick question since: $P(A \cap B \cap C) = P(A)P(B|A)P(C|B,A) = P(A)P(B)P...
2015/09/07
[ "https://math.stackexchange.com/questions/1425646", "https://math.stackexchange.com", "https://math.stackexchange.com/users/245318/" ]
> > Specifically, I would like to know, can I make a statement like: "All fields are rings, and all rings are groups"? > > > That is all correct. A field satisfies all ring axioms plus some extra axioms, so a field is a ring. A ring is an Abelian group plus some more axioms, so each ring is a group. A vector spac...
I would recommend to learn these terms hierarchically: start first with magmas, then magmas with special properties (semigroups), then monoids, then monoid with special properties (groups), then semirings, then rings, then rings with special properties (such as integral domains, factorial rings, fields, etc.). Consider...
19,123,918
I saw that there is a very nice python library ([PyBBIO](https://github.com/alexanderhiam/PyBBIO)) for direct Control of the BBB using mmap on /dev/mem/ (granted not for the muxing). With some goodies like Webmonitor etc. Unfortunatly this library is not running on the 3.8 Kernel. Are there any viable alternatives in ...
2013/10/01
[ "https://Stackoverflow.com/questions/19123918", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2173891/" ]
There are 2 main causes for this. 1. A bad/corrupt JAR file in your classpath. 2. The JVM built-in URL caching getting in the way. For a bad/corrupt JAR file, you'll have to isolate that on your own, figure out which one it is. Maybe by just unjaring all of them one by one till you find the problematic one. As for t...
I had the same problem, after deleting all `.jar` files and build the path to all `.jar` file once again. Now it's working properly
19,123,918
I saw that there is a very nice python library ([PyBBIO](https://github.com/alexanderhiam/PyBBIO)) for direct Control of the BBB using mmap on /dev/mem/ (granted not for the muxing). With some goodies like Webmonitor etc. Unfortunatly this library is not running on the 3.8 Kernel. Are there any viable alternatives in ...
2013/10/01
[ "https://Stackoverflow.com/questions/19123918", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2173891/" ]
There are 2 main causes for this. 1. A bad/corrupt JAR file in your classpath. 2. The JVM built-in URL caching getting in the way. For a bad/corrupt JAR file, you'll have to isolate that on your own, figure out which one it is. Maybe by just unjaring all of them one by one till you find the problematic one. As for t...
I was having the same issue because of the actual WAR being corrupt. Try rerunning `mvn clean install` and redeploy.
19,123,918
I saw that there is a very nice python library ([PyBBIO](https://github.com/alexanderhiam/PyBBIO)) for direct Control of the BBB using mmap on /dev/mem/ (granted not for the muxing). With some goodies like Webmonitor etc. Unfortunatly this library is not running on the 3.8 Kernel. Are there any viable alternatives in ...
2013/10/01
[ "https://Stackoverflow.com/questions/19123918", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2173891/" ]
This issue can also occur if you are doing any of your own reflection in that code path.
I had the same problem, after deleting all `.jar` files and build the path to all `.jar` file once again. Now it's working properly
19,123,918
I saw that there is a very nice python library ([PyBBIO](https://github.com/alexanderhiam/PyBBIO)) for direct Control of the BBB using mmap on /dev/mem/ (granted not for the muxing). With some goodies like Webmonitor etc. Unfortunatly this library is not running on the 3.8 Kernel. Are there any viable alternatives in ...
2013/10/01
[ "https://Stackoverflow.com/questions/19123918", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2173891/" ]
You don't need to test all files to ensure the correctness of them. Just put a break point at java.util.zip.ZipFile.ensureOpen(ZipFile.java:632) and check the name field in ZipFile class: private final String name
I had the same problem, after deleting all `.jar` files and build the path to all `.jar` file once again. Now it's working properly
19,123,918
I saw that there is a very nice python library ([PyBBIO](https://github.com/alexanderhiam/PyBBIO)) for direct Control of the BBB using mmap on /dev/mem/ (granted not for the muxing). With some goodies like Webmonitor etc. Unfortunatly this library is not running on the 3.8 Kernel. Are there any viable alternatives in ...
2013/10/01
[ "https://Stackoverflow.com/questions/19123918", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2173891/" ]
I had the same problem after deploying jenkins war; all I had to do was to restart the server after the deploy. Hope it helps.
I had the same problem, after deleting all `.jar` files and build the path to all `.jar` file once again. Now it's working properly
19,123,918
I saw that there is a very nice python library ([PyBBIO](https://github.com/alexanderhiam/PyBBIO)) for direct Control of the BBB using mmap on /dev/mem/ (granted not for the muxing). With some goodies like Webmonitor etc. Unfortunatly this library is not running on the 3.8 Kernel. Are there any viable alternatives in ...
2013/10/01
[ "https://Stackoverflow.com/questions/19123918", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2173891/" ]
I had the same problem after deploying jenkins war; all I had to do was to restart the server after the deploy. Hope it helps.
I was having the same issue because of the actual WAR being corrupt. Try rerunning `mvn clean install` and redeploy.
19,123,918
I saw that there is a very nice python library ([PyBBIO](https://github.com/alexanderhiam/PyBBIO)) for direct Control of the BBB using mmap on /dev/mem/ (granted not for the muxing). With some goodies like Webmonitor etc. Unfortunatly this library is not running on the 3.8 Kernel. Are there any viable alternatives in ...
2013/10/01
[ "https://Stackoverflow.com/questions/19123918", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2173891/" ]
There are 2 main causes for this. 1. A bad/corrupt JAR file in your classpath. 2. The JVM built-in URL caching getting in the way. For a bad/corrupt JAR file, you'll have to isolate that on your own, figure out which one it is. Maybe by just unjaring all of them one by one till you find the problematic one. As for t...
This issue can also occur if you are doing any of your own reflection in that code path.
19,123,918
I saw that there is a very nice python library ([PyBBIO](https://github.com/alexanderhiam/PyBBIO)) for direct Control of the BBB using mmap on /dev/mem/ (granted not for the muxing). With some goodies like Webmonitor etc. Unfortunatly this library is not running on the 3.8 Kernel. Are there any viable alternatives in ...
2013/10/01
[ "https://Stackoverflow.com/questions/19123918", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2173891/" ]
There are 2 main causes for this. 1. A bad/corrupt JAR file in your classpath. 2. The JVM built-in URL caching getting in the way. For a bad/corrupt JAR file, you'll have to isolate that on your own, figure out which one it is. Maybe by just unjaring all of them one by one till you find the problematic one. As for t...
I had the same problem after deploying jenkins war; all I had to do was to restart the server after the deploy. Hope it helps.
19,123,918
I saw that there is a very nice python library ([PyBBIO](https://github.com/alexanderhiam/PyBBIO)) for direct Control of the BBB using mmap on /dev/mem/ (granted not for the muxing). With some goodies like Webmonitor etc. Unfortunatly this library is not running on the 3.8 Kernel. Are there any viable alternatives in ...
2013/10/01
[ "https://Stackoverflow.com/questions/19123918", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2173891/" ]
This issue can also occur if you are doing any of your own reflection in that code path.
I was having the same issue because of the actual WAR being corrupt. Try rerunning `mvn clean install` and redeploy.
19,123,918
I saw that there is a very nice python library ([PyBBIO](https://github.com/alexanderhiam/PyBBIO)) for direct Control of the BBB using mmap on /dev/mem/ (granted not for the muxing). With some goodies like Webmonitor etc. Unfortunatly this library is not running on the 3.8 Kernel. Are there any viable alternatives in ...
2013/10/01
[ "https://Stackoverflow.com/questions/19123918", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2173891/" ]
You don't need to test all files to ensure the correctness of them. Just put a break point at java.util.zip.ZipFile.ensureOpen(ZipFile.java:632) and check the name field in ZipFile class: private final String name
I was having the same issue because of the actual WAR being corrupt. Try rerunning `mvn clean install` and redeploy.
15,787,016
I need to calculate a count on a query, however I got some problem. The original query works well. It gives me 1 row with the right count (3200): ``` select count(e.entity_id) from `catalog_product_entity` AS `e` INNER JOIN `review` AS `rt` ON rt.entity_pk_value = e.entity_id INNER JOIN `review_detail` AS `rdt` ...
2013/04/03
[ "https://Stackoverflow.com/questions/15787016", "https://Stackoverflow.com", "https://Stackoverflow.com/users/716435/" ]
Take away the group by clause.
When you have the query without a `group by`, it will implicitly make a group of the whole result, and you get the count for that single group. By adding the `group by` you are creating one group for each review, and the result is a count for each group. Just remove the `group by` clause from the query, and you get b...
15,787,016
I need to calculate a count on a query, however I got some problem. The original query works well. It gives me 1 row with the right count (3200): ``` select count(e.entity_id) from `catalog_product_entity` AS `e` INNER JOIN `review` AS `rt` ON rt.entity_pk_value = e.entity_id INNER JOIN `review_detail` AS `rdt` ...
2013/04/03
[ "https://Stackoverflow.com/questions/15787016", "https://Stackoverflow.com", "https://Stackoverflow.com/users/716435/" ]
Try this ``` select TOP 1 count(e.entity_id) OVER() [Total Count] from `catalog_product_entity` AS `e` INNER JOIN `review` AS `rt` ON rt.entity_pk_value = e.entity_id INNER JOIN `review_detail` AS `rdt` ON rdt.review_id = rt.review_id LEFT JOIN `rating_option_vote` AS `vt` ON vt.review_id = rt.review_id INNER JOIN ...
Take away the group by clause.
15,787,016
I need to calculate a count on a query, however I got some problem. The original query works well. It gives me 1 row with the right count (3200): ``` select count(e.entity_id) from `catalog_product_entity` AS `e` INNER JOIN `review` AS `rt` ON rt.entity_pk_value = e.entity_id INNER JOIN `review_detail` AS `rdt` ...
2013/04/03
[ "https://Stackoverflow.com/questions/15787016", "https://Stackoverflow.com", "https://Stackoverflow.com/users/716435/" ]
Take away the group by clause.
Try this ``` select TOP 1 count(e.entity_id) OVER (partition by '1') from `catalog_product_entity` AS `e` INNER JOIN `review` AS `rt` ON rt.entity_pk_value = e.entity_id INNER JOIN `review_detail` AS `rdt` ON rdt.review_id = rt.review_id LEFT JOIN `rating_option_vote` AS `vt` ON vt.review_id = rt.review_id INNER JO...
15,787,016
I need to calculate a count on a query, however I got some problem. The original query works well. It gives me 1 row with the right count (3200): ``` select count(e.entity_id) from `catalog_product_entity` AS `e` INNER JOIN `review` AS `rt` ON rt.entity_pk_value = e.entity_id INNER JOIN `review_detail` AS `rdt` ...
2013/04/03
[ "https://Stackoverflow.com/questions/15787016", "https://Stackoverflow.com", "https://Stackoverflow.com/users/716435/" ]
Try this ``` select TOP 1 count(e.entity_id) OVER() [Total Count] from `catalog_product_entity` AS `e` INNER JOIN `review` AS `rt` ON rt.entity_pk_value = e.entity_id INNER JOIN `review_detail` AS `rdt` ON rdt.review_id = rt.review_id LEFT JOIN `rating_option_vote` AS `vt` ON vt.review_id = rt.review_id INNER JOIN ...
When you have the query without a `group by`, it will implicitly make a group of the whole result, and you get the count for that single group. By adding the `group by` you are creating one group for each review, and the result is a count for each group. Just remove the `group by` clause from the query, and you get b...
15,787,016
I need to calculate a count on a query, however I got some problem. The original query works well. It gives me 1 row with the right count (3200): ``` select count(e.entity_id) from `catalog_product_entity` AS `e` INNER JOIN `review` AS `rt` ON rt.entity_pk_value = e.entity_id INNER JOIN `review_detail` AS `rdt` ...
2013/04/03
[ "https://Stackoverflow.com/questions/15787016", "https://Stackoverflow.com", "https://Stackoverflow.com/users/716435/" ]
Try this ``` select TOP 1 count(e.entity_id) OVER() [Total Count] from `catalog_product_entity` AS `e` INNER JOIN `review` AS `rt` ON rt.entity_pk_value = e.entity_id INNER JOIN `review_detail` AS `rdt` ON rdt.review_id = rt.review_id LEFT JOIN `rating_option_vote` AS `vt` ON vt.review_id = rt.review_id INNER JOIN ...
Try this ``` select TOP 1 count(e.entity_id) OVER (partition by '1') from `catalog_product_entity` AS `e` INNER JOIN `review` AS `rt` ON rt.entity_pk_value = e.entity_id INNER JOIN `review_detail` AS `rdt` ON rdt.review_id = rt.review_id LEFT JOIN `rating_option_vote` AS `vt` ON vt.review_id = rt.review_id INNER JO...
2,910,983
For the Build Process in TFS 2010 I've created a library containing some custom code activities. In the past it all worked fine by adding the library (\*.dll) to Source Control and setting the 'Build Controller - Version Control Path to Custom Assemblies' to the path where the library could be found in Source Control....
2010/05/26
[ "https://Stackoverflow.com/questions/2910983", "https://Stackoverflow.com", "https://Stackoverflow.com/users/267122/" ]
As mentioned by Rhapsody on June 2 2010, the GAC can be used. However it needs to be noted that if you do use the GAC, you need to stop and restart the build service, so that it re-scans the GAC, hence picking up your DLL. I had initially registered my DLL in the GAC, and when I kicked off a build that pointed to a wo...
The fix I needed was to create a partial class definition of my class, and apply the BuildActivity attribute to it. My problem was that I was missing the BuildActivity attribute on my activity class, since I had implemented it in loose Xaml and not as a Code Activity, so this fixed it for me. Supposedly, Team Build lo...
2,910,983
For the Build Process in TFS 2010 I've created a library containing some custom code activities. In the past it all worked fine by adding the library (\*.dll) to Source Control and setting the 'Build Controller - Version Control Path to Custom Assemblies' to the path where the library could be found in Source Control....
2010/05/26
[ "https://Stackoverflow.com/questions/2910983", "https://Stackoverflow.com", "https://Stackoverflow.com/users/267122/" ]
If you want to specify assemblies that contain custom code activities you've written you need to do the following: 1. Build you custom activities into your workflow. 2. Make sure your xmlns at the top is defined correctly: xmlns:local="clr-namespace:BuildTasks;assembly=BuildTasks" 3. Make sure the tags in the XAML for...
Since no answer is given and I haven't found any fix, I decided to put in the GAC now. That works as well. :)
2,910,983
For the Build Process in TFS 2010 I've created a library containing some custom code activities. In the past it all worked fine by adding the library (\*.dll) to Source Control and setting the 'Build Controller - Version Control Path to Custom Assemblies' to the path where the library could be found in Source Control....
2010/05/26
[ "https://Stackoverflow.com/questions/2910983", "https://Stackoverflow.com", "https://Stackoverflow.com/users/267122/" ]
I had this exact same problem. The reason was that I had compiled the library with the custom activities against the x86 platform and the Build Controller was running off of a 64-bit Windows 2008 VM. Switching the target platform to AnyCPU allowed the build controller to immediately utilize the library without having t...
I didn't have any success with the other answers in this thread however I thought I'd share what I did. My custom assembly was loaded onto my build machine through GAC. I had to manually open the build template XAML file and add my assembly to the namespace reference. For some reason Visual Studio wasn't properly refer...
2,910,983
For the Build Process in TFS 2010 I've created a library containing some custom code activities. In the past it all worked fine by adding the library (\*.dll) to Source Control and setting the 'Build Controller - Version Control Path to Custom Assemblies' to the path where the library could be found in Source Control....
2010/05/26
[ "https://Stackoverflow.com/questions/2910983", "https://Stackoverflow.com", "https://Stackoverflow.com/users/267122/" ]
Check your Windows Event notifications. Your custom activity DLL may NOT have gotten loaded properly. If it did not, then you may have to change the platform target of your custom activity project... either to 32bit or 64 bit.
I didn't have any success with the other answers in this thread however I thought I'd share what I did. My custom assembly was loaded onto my build machine through GAC. I had to manually open the build template XAML file and add my assembly to the namespace reference. For some reason Visual Studio wasn't properly refer...
2,910,983
For the Build Process in TFS 2010 I've created a library containing some custom code activities. In the past it all worked fine by adding the library (\*.dll) to Source Control and setting the 'Build Controller - Version Control Path to Custom Assemblies' to the path where the library could be found in Source Control....
2010/05/26
[ "https://Stackoverflow.com/questions/2910983", "https://Stackoverflow.com", "https://Stackoverflow.com/users/267122/" ]
As mentioned by Rhapsody on June 2 2010, the GAC can be used. However it needs to be noted that if you do use the GAC, you need to stop and restart the build service, so that it re-scans the GAC, hence picking up your DLL. I had initially registered my DLL in the GAC, and when I kicked off a build that pointed to a wo...
I encountered the same issue after a reboot of our TFS 2012 build server. A CI job that was running perfectly fine stopped working with the mentioned TF215097 error, it was unable to find a custom activity. A comment on this page (<https://social.msdn.microsoft.com/Forums/vstudio/en-US/479449e1-5c02-4744-b620-3bba6403...
2,910,983
For the Build Process in TFS 2010 I've created a library containing some custom code activities. In the past it all worked fine by adding the library (\*.dll) to Source Control and setting the 'Build Controller - Version Control Path to Custom Assemblies' to the path where the library could be found in Source Control....
2010/05/26
[ "https://Stackoverflow.com/questions/2910983", "https://Stackoverflow.com", "https://Stackoverflow.com/users/267122/" ]
If you want to specify assemblies that contain custom code activities you've written you need to do the following: 1. Build you custom activities into your workflow. 2. Make sure your xmlns at the top is defined correctly: xmlns:local="clr-namespace:BuildTasks;assembly=BuildTasks" 3. Make sure the tags in the XAML for...
I didn't have any success with the other answers in this thread however I thought I'd share what I did. My custom assembly was loaded onto my build machine through GAC. I had to manually open the build template XAML file and add my assembly to the namespace reference. For some reason Visual Studio wasn't properly refer...
2,910,983
For the Build Process in TFS 2010 I've created a library containing some custom code activities. In the past it all worked fine by adding the library (\*.dll) to Source Control and setting the 'Build Controller - Version Control Path to Custom Assemblies' to the path where the library could be found in Source Control....
2010/05/26
[ "https://Stackoverflow.com/questions/2910983", "https://Stackoverflow.com", "https://Stackoverflow.com/users/267122/" ]
This solution might not apply to all cases, as the answers provided in previous posts are correct, but were not the solution to my issue. This answer assumes the following: 1. the custom solution assemblies are all changed in checked in and are correctly tagged and built. 2. The build controller has been pointed at th...
The fix I needed was to create a partial class definition of my class, and apply the BuildActivity attribute to it. My problem was that I was missing the BuildActivity attribute on my activity class, since I had implemented it in loose Xaml and not as a Code Activity, so this fixed it for me. Supposedly, Team Build lo...