qid
int64
1
74.7M
question
stringlengths
0
58.3k
date
stringlengths
10
10
metadata
list
response_j
stringlengths
2
48.3k
response_k
stringlengths
2
40.5k
21,913
I have a servo motor with rotary encoder salvaged from an old scanner. I'm trying to figure out how to re-use it in a DIY CNC machine. By reading through the engineering manual from the original device (Hooray for uncle Google!) I have established that the servo was run on PWM'ed 24.5v DC and the encoder was run on 5v...
2019/08/17
[ "https://reverseengineering.stackexchange.com/questions/21913", "https://reverseengineering.stackexchange.com", "https://reverseengineering.stackexchange.com/users/27513/" ]
There are two possibilities: Your GND is actually safety ground. Which is usually used when electronics (or motor) is directly (without transformer) connected to 120/230V electrical grid. Other reasons is that motor need high current which introduce voltage drop and electrical noise on power supply lines. This could g...
Most of it is gibberish to me, but [this page](https://library.automationdirect.com/encoders-explained-issue-25-2013/) seems to mention that 0V pin is used as the base for the encoding output and is separate from the ground for the power supply.
27,044,082
I have two source schema and one destination. I would like to compare Source 1 against Source 2 and map non matching data from Source 2 to destination. Below is my inline XSLT but I am not getting the expected output. Looks like it is mapping all the data from Source 2 Is this the proper way doing "not equal" in XSLT...
2014/11/20
[ "https://Stackoverflow.com/questions/27044082", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4051627/" ]
Assuming you want this to be available outside your class, making the enum public makes sense. As an `enum class`, you will need the enum name to access the values in addition to the class name: ``` class Patterns { public: enum class PatternType { ... }; ... }; void makePattern(Patterns::PatternType value) { ... ...
Your approach is ok, only drawback would be if you are trying to access PatternType from outside the class it would be unreachable since it is declared private.
27,044,082
I have two source schema and one destination. I would like to compare Source 1 against Source 2 and map non matching data from Source 2 to destination. Below is my inline XSLT but I am not getting the expected output. Looks like it is mapping all the data from Source 2 Is this the proper way doing "not equal" in XSLT...
2014/11/20
[ "https://Stackoverflow.com/questions/27044082", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4051627/" ]
Assuming you want this to be available outside your class, making the enum public makes sense. As an `enum class`, you will need the enum name to access the values in addition to the class name: ``` class Patterns { public: enum class PatternType { ... }; ... }; void makePattern(Patterns::PatternType value) { ... ...
I'd make it `public`, but otherwise you've done it just as I would.
30,845,037
I am using js codes to apply shadow . When my button background color is white it doesnot apply any box shadow.But one of my function is within uncaught reference error. My js files are --------------- ``` var btnDefault = $(".btn"); btnDefault.each(function(index, elem) { var btnDefaultbgColor = $(this).css('ba...
2015/06/15
[ "https://Stackoverflow.com/questions/30845037", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4740633/" ]
You are using `FragmentActivity` and `getSupportFragmentManager()`. Therefore, `PlaceholderFragment` needs to inherit from `android.support.v4.app.Fragment`, not `android.app.Fragment`.
Use ``` import android.support.v4.app.Fragment; ``` instead of ``` import android.app.Fragment; ``` All over in the project. Also, use support library for FragmentManager and FragmentTransaction.
30,845,037
I am using js codes to apply shadow . When my button background color is white it doesnot apply any box shadow.But one of my function is within uncaught reference error. My js files are --------------- ``` var btnDefault = $(".btn"); btnDefault.each(function(index, elem) { var btnDefaultbgColor = $(this).css('ba...
2015/06/15
[ "https://Stackoverflow.com/questions/30845037", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4740633/" ]
You are using `FragmentActivity` and `getSupportFragmentManager()`. Therefore, `PlaceholderFragment` needs to inherit from `android.support.v4.app.Fragment`, not `android.app.Fragment`.
If you use **AndroidX** of Andorid Jetpack, then use, ``` androidx.fragment.app.Fragment ``` instead of, ``` import android.app.Fragment; // or import android.support.v4.app.Fragment; ```
28,947,266
I am getting confused as to how I could loop trough my multidimensional associative array and pull the values separately to insert into my database. I am wanting to pull each item from the old array and populate it into a column called old and pull each item from the new array and populate it to the new column. ``` ...
2015/03/09
[ "https://Stackoverflow.com/questions/28947266", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3532508/" ]
Well, I think `foreach` is not going to help you here. Try this: ``` $array = array( 'old' => array('item1', 'item2'), 'new' => array('item3', 'item4') ); if(count($array['old'] == $array['new'])) { $model = new \Namespace\Model; for($i = 0; $i < count($array['old']); $i++){ $mod...
try this: ``` $array = array( array("item1" => "1" , "item2" => "2") , array("item1" =>"1", "item2" =>"2"); ``` You would have to parse each different array all the sub arrays would just run in a for loop like this: ``` for($i = 0, $i < $array->getLength;$i++){ $array["item1"][$i]; } ```
2,560,868
I want to have a 2 column layout, and have the left column able to be 200 px at first, and have a "shrink" button to shrink it down to 10px, and have the right column expand to fill all the rest of the available space. Then if they click on the "show" button (which will be all they see in the now 10px wide left column)...
2010/04/01
[ "https://Stackoverflow.com/questions/2560868", "https://Stackoverflow.com", "https://Stackoverflow.com/users/232/" ]
Something like this should do the trick: ``` <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> <head> <meta http-equiv="Content-type" content="text/html; charset=utf-8" /> <title>Demo</title> <style type="text/css" media...
it would help if you put your sample on <http://jsbin.com/>, but try the following: html, body, form { height: 100%; margin: 0px; padding: 0px; } and then make the right column width 100%. Is this what your are looking for?: <http://jsbin.com/uweqe3>
2,560,868
I want to have a 2 column layout, and have the left column able to be 200 px at first, and have a "shrink" button to shrink it down to 10px, and have the right column expand to fill all the rest of the available space. Then if they click on the "show" button (which will be all they see in the now 10px wide left column)...
2010/04/01
[ "https://Stackoverflow.com/questions/2560868", "https://Stackoverflow.com", "https://Stackoverflow.com/users/232/" ]
If you float your left column (`float: left;`) with variably a width of either 10 or 200px, and simply add `overflow: hidden;` to the styles of the right column, the right column will expand and contract to fill the space, whatever the site of the left column is.
it would help if you put your sample on <http://jsbin.com/>, but try the following: html, body, form { height: 100%; margin: 0px; padding: 0px; } and then make the right column width 100%. Is this what your are looking for?: <http://jsbin.com/uweqe3>
55,299,219
I have below tables with following fields admins Table ``` ->id (int) ->name (string) ->status (boolean) ``` locations Table ``` ->id (int) ->name (string ``` ) I have many to many relation between this two tables via pivot table admin\_locations ``` ->admin_id ->location_id ``` My Model ``` Admin.php...
2019/03/22
[ "https://Stackoverflow.com/questions/55299219", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9320300/" ]
A `tidyverse` approach using `gather` and `spread` would be ``` library(tidyverse) df %>% gather(time, ind, -data) %>% separate(time, into = c("indName", "time")) %>% spread(indName, ind) # data time H W #1 Ind_1 1 151 56 #2 Ind_1 2 154 57 #3 Ind_1 3 NA 56 #4 Ind_1 4 153 56 #5 Ind_1 5 152 ...
You can use `melt` function from `data.table` and then `cbind`- ``` setDT(df) df <- cbind(setnames(melt(df)[grep("^H_",variable),],"value","H"), setnames(melt(df)[grep("^W_",variable),],"value","W")) df <- df[,Ind:=gsub(".*_","",data)] ##cleaning Ind_ df <- df[, time:=1:.N, by = .(Ind)] df <- df[,.(time,W,...
55,299,219
I have below tables with following fields admins Table ``` ->id (int) ->name (string) ->status (boolean) ``` locations Table ``` ->id (int) ->name (string ``` ) I have many to many relation between this two tables via pivot table admin\_locations ``` ->admin_id ->location_id ``` My Model ``` Admin.php...
2019/03/22
[ "https://Stackoverflow.com/questions/55299219", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9320300/" ]
An option using `data.table` that makes use of the `measure/patterns` would be to use `melt`. In the example, the column names have common `patterns` as 'weight', 'height' which we specify it in `measure` parameter to convert it to 'long' format, then extract the numeric part with `sub` to create 'Ind' ``` library(dat...
You can use `melt` function from `data.table` and then `cbind`- ``` setDT(df) df <- cbind(setnames(melt(df)[grep("^H_",variable),],"value","H"), setnames(melt(df)[grep("^W_",variable),],"value","W")) df <- df[,Ind:=gsub(".*_","",data)] ##cleaning Ind_ df <- df[, time:=1:.N, by = .(Ind)] df <- df[,.(time,W,...
62,625,182
How do you show and hide divs in Angular (4 thru 9) upon a user selecting an option(s) in a dropdown select? My code below is only showing one/the same div no matter the option I select. ```js public Terminated = true; public Release = true; selectedFilter:string; public filterTypes = [ {value:'empty', disp...
2020/06/28
[ "https://Stackoverflow.com/questions/62625182", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10167760/" ]
In your code, you are checking `selectedFilter` to set the variables to true and false, but the value of this variable is only set in the constructor. Due to which the change in the select drop down is not having any affect. You may change your code to the below, component.html ``` <select class="form-control" [(ngM...
Well firstly the condition will always be true no matter what - a string value will always evaluate true. Secondly, it may be better to use simple [(ngModel)] on the input and display content using ngSwitch on ngContainer like this: ``` <select [(ngModel)]="selectedOption" [ngModelOptions]="{standalone: true}"> <optio...
62,625,182
How do you show and hide divs in Angular (4 thru 9) upon a user selecting an option(s) in a dropdown select? My code below is only showing one/the same div no matter the option I select. ```js public Terminated = true; public Release = true; selectedFilter:string; public filterTypes = [ {value:'empty', disp...
2020/06/28
[ "https://Stackoverflow.com/questions/62625182", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10167760/" ]
Try to use \*ngIf directive. Besides of that, I think your code has some logic problems, I'll suggest you do some corrections: ``` public terminated = false; public release = true; selectedFilter:string; public filterTypes = [ {value:'empty', display:''}, {value:'release', display:'Release Report'}, ...
Well firstly the condition will always be true no matter what - a string value will always evaluate true. Secondly, it may be better to use simple [(ngModel)] on the input and display content using ngSwitch on ngContainer like this: ``` <select [(ngModel)]="selectedOption" [ngModelOptions]="{standalone: true}"> <optio...
62,625,182
How do you show and hide divs in Angular (4 thru 9) upon a user selecting an option(s) in a dropdown select? My code below is only showing one/the same div no matter the option I select. ```js public Terminated = true; public Release = true; selectedFilter:string; public filterTypes = [ {value:'empty', disp...
2020/06/28
[ "https://Stackoverflow.com/questions/62625182", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10167760/" ]
In your code, you are checking `selectedFilter` to set the variables to true and false, but the value of this variable is only set in the constructor. Due to which the change in the select drop down is not having any affect. You may change your code to the below, component.html ``` <select class="form-control" [(ngM...
Try to use \*ngIf directive. Besides of that, I think your code has some logic problems, I'll suggest you do some corrections: ``` public terminated = false; public release = true; selectedFilter:string; public filterTypes = [ {value:'empty', display:''}, {value:'release', display:'Release Report'}, ...
3,500,566
Actually I am new here and not familiar about placeholder. Just hear about it and find generally in ASP.Net. my question is PlaceHolder is not available in local C# is there any similar control is there or not then how to access the PlaceHolder in local C# Application. Guide me Please.
2010/08/17
[ "https://Stackoverflow.com/questions/3500566", "https://Stackoverflow.com", "https://Stackoverflow.com/users/439582/" ]
The placeholder is an Asp.net control which you drag from the toolbox on your page. There is no such thing in C# Here is an example of how to use it: <http://www.aspxcode.net/free-asp-net-sample-source-code-c.aspx?Topics=How%20to%20Use%20PlaceHolder> Hope that helps.
With 'local' You mean so called win forms? Maybe wpf? In win forms it would be 'Panel' control if I remember correctly.
23,502,842
Every time I open a project in Visual Studio 2013 (ultimate) it displays an annoying popup with this error message: an exception has been encountered. This may be caused by an extension. You can get more information by examining the file 'C:\Users\john\AppData\Roaming\Microsoft\VisualStudio\12.0\ActivityLog.xml 1- be...
2014/05/06
[ "https://Stackoverflow.com/questions/23502842", "https://Stackoverflow.com", "https://Stackoverflow.com/users/699559/" ]
1. Go to TOOLS 2. Select 'Extensions and Updates' 3. Select 'Updates' 4. Install latest Visual studio update 5 (for me Update 5 for VS2013) this will fix everything.
The fix depends on error one sees in the activity.log XML For instance take the below error [![enter image description here](https://i.stack.imgur.com/4dzed.jpg)](https://i.stack.imgur.com/4dzed.jpg) The error clearly states an issue loading "Azure Tools" package **FIX:** * Goto Tools -> Extensions and Updates * Sea...
23,502,842
Every time I open a project in Visual Studio 2013 (ultimate) it displays an annoying popup with this error message: an exception has been encountered. This may be caused by an extension. You can get more information by examining the file 'C:\Users\john\AppData\Roaming\Microsoft\VisualStudio\12.0\ActivityLog.xml 1- be...
2014/05/06
[ "https://Stackoverflow.com/questions/23502842", "https://Stackoverflow.com", "https://Stackoverflow.com/users/699559/" ]
1. Go to TOOLS 2. Select 'Extensions and Updates' 3. Select 'Updates' 4. Install latest Visual studio update 5 (for me Update 5 for VS2013) this will fix everything.
I had the same problem and I only cleared out the Temp folder and now it works. The Temp folder path: > > C:\Users[UserName]\AppData\Local\Temp > > >
53,647,329
**explanation -** I am trying to use social sharing in my ionic Application using <https://ionicframework.com/docs/native/social-sharing/> , for ios and Android it is working **But when I try to use share on facebook , twitter , linkdin for web platform Api is not available** How can I do it for web platform
2018/12/06
[ "https://Stackoverflow.com/questions/53647329", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10692238/" ]
You can share links to social sites using these api's ``` shareTwitter(e) { e.preventDefault(); var twitterWindow = window.open('https://twitter.com/share?url=' + document.URL, 'twitter-popup', 'height=350,width=600'); if(twitterWindow.focus) { twitterWindow.focus(); } return false; } shareFacebook(e) { ...
As per the cordova-plugin github repository, It supports only Mobile Platforms (Android, IOS, Windows). It doesn't support desktop version. You need to add support from your end. <https://github.com/EddyVerbruggen/SocialSharing-PhoneGap-Plugin/tree/master/src>
29,496,680
I recently found Foundation5 has [Block Grid](http://foundation.zurb.com/docs/components/block_grid.html) which has rarely found use case online anywhere to demostrate the importance of using it... or is it even a great function to have? Because I am currently using Bootstrap3 and found it does not have Block Grid. So ...
2015/04/07
[ "https://Stackoverflow.com/questions/29496680", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2646226/" ]
There are several differences between the `block grid` and regular column `grid`.. * The block grid is always evenly spaced and distributed * The block grid requires less markup * The block grid doesn't have inner padding Take a look at this demo: <http://codeply.com/go/XiyFxtMcXT>, and you'll see the differences. No...
Block grids give you a way to evenly split contents of a list within the grid. If you wanted to create a row of five images or paragraphs that need to stay evenly spaced no matter the screen size, the block grid is for you.
29,496,680
I recently found Foundation5 has [Block Grid](http://foundation.zurb.com/docs/components/block_grid.html) which has rarely found use case online anywhere to demostrate the importance of using it... or is it even a great function to have? Because I am currently using Bootstrap3 and found it does not have Block Grid. So ...
2015/04/07
[ "https://Stackoverflow.com/questions/29496680", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2646226/" ]
There are several differences between the `block grid` and regular column `grid`.. * The block grid is always evenly spaced and distributed * The block grid requires less markup * The block grid doesn't have inner padding Take a look at this demo: <http://codeply.com/go/XiyFxtMcXT>, and you'll see the differences. No...
You could just as easily use a percentage based grid system to achieve the same result. I think the benefit of the 'block grid' is: 1. Items are displayed in a 'ul' which will group them together (good, for accessibility). 2. It's quicker to add one style to a 'ul' that will automatically make each 'li' a 'column' th...
13,601,811
Here is what I would like my application to do on a tablet. Fragment (0) has some menu that would display fragments (1)...(n) like this: ``` ----------------- | | | | | | | | | | |(0)| X | X | X | | | | | | | | | | | ----------------- becomes ----------------- | | | | | | | ...
2012/11/28
[ "https://Stackoverflow.com/questions/13601811", "https://Stackoverflow.com", "https://Stackoverflow.com/users/347565/" ]
Yes container of the fragment can be changed using `remove()` function. The problem here is `commit()`. It is an asynchronous call, and will schedule it to be on main thread. So to force the `FragmentManager` to do this immediately before adding it to the other container. For this we will have to use **`executePendi...
I don't know if this is quite what you want but I made a little sample regarding your problem. Basically you'll be doing the right shifting using the layout file, having a wrapper container for each of those shifting fragments. The code sample is a little to big for an answer so I've posted it into [a gist that you can...
59,504,422
I have a motionLayout for the root container, in my main layout. Inside it, there are other views. One of them is a frameLayout, containing a fragment. The fragment is a page, consisting a NestedScrollView etc... MotionLayout has OnSwipe for only horizontal swipes, and the NestedScrollView should only be able to be scr...
2019/12/27
[ "https://Stackoverflow.com/questions/59504422", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
> > `%{65 => 0, 66 => 2}` [...] > > How do I transform the keys to this representation: > > `%{?A => 1, ?B => 2}` > > > These two representations are essentially the same. `?A` is the syntactic sugar to *input* ordinal values of ASCII symbols, there is no way to make it to output integers that way. ```rb i...
`<<66 :: utf8>>` converts the codepoint `66` in to a `B` see here <https://elixir-lang.org/getting-started/binaries-strings-and-char-lists.html>
59,504,422
I have a motionLayout for the root container, in my main layout. Inside it, there are other views. One of them is a frameLayout, containing a fragment. The fragment is a page, consisting a NestedScrollView etc... MotionLayout has OnSwipe for only horizontal swipes, and the NestedScrollView should only be able to be scr...
2019/12/27
[ "https://Stackoverflow.com/questions/59504422", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
`<<66 :: utf8>>` converts the codepoint `66` in to a `B` see here <https://elixir-lang.org/getting-started/binaries-strings-and-char-lists.html>
``` iex(5)> %{?A => 1, ?B => 2} %{65 => 1, 66 => 2} ``` > > How do I transform the keys to this representation: > > > > ``` > %{?A => 1, ?B => 2} > > ``` > > That's like asking, how do I get the following map ``` %{ fn(x) -> x+2 end.(4) => "hello", fn(x) -> x-2 end.(10) => "goodbye" } ``` to display...
59,504,422
I have a motionLayout for the root container, in my main layout. Inside it, there are other views. One of them is a frameLayout, containing a fragment. The fragment is a page, consisting a NestedScrollView etc... MotionLayout has OnSwipe for only horizontal swipes, and the NestedScrollView should only be able to be scr...
2019/12/27
[ "https://Stackoverflow.com/questions/59504422", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
> > `%{65 => 0, 66 => 2}` [...] > > How do I transform the keys to this representation: > > `%{?A => 1, ?B => 2}` > > > These two representations are essentially the same. `?A` is the syntactic sugar to *input* ordinal values of ASCII symbols, there is no way to make it to output integers that way. ```rb i...
``` iex(5)> %{?A => 1, ?B => 2} %{65 => 1, 66 => 2} ``` > > How do I transform the keys to this representation: > > > > ``` > %{?A => 1, ?B => 2} > > ``` > > That's like asking, how do I get the following map ``` %{ fn(x) -> x+2 end.(4) => "hello", fn(x) -> x-2 end.(10) => "goodbye" } ``` to display...
21,793,709
I have an `NSArray` of `NSDictionaries`. In the `NSDictionary` I have an element called 'rowID' which is saved as an `NSString`. However, everything saved in it is a number even though they saved as a string. I would like to know how to sort the array based on this value but in terms of sorting 1-100. Currently, when ...
2014/02/15
[ "https://Stackoverflow.com/questions/21793709", "https://Stackoverflow.com", "https://Stackoverflow.com/users/748343/" ]
Try this :- ``` NSArray *aSortedArray = [itemArray sortedArrayUsingComparator:^(NSMutableDictionary *obj1,NSMutableDictionary *obj2) { NSString *num1 =[obj1 objectForKey:@"rowID"]; NSString *num2 =[obj2 objectForKey:@"rowID"]; return (NSComparisonResult) [num1 compare:num2 options:(NSNumericSearch)]; }]; ...
If you create your sort descriptor with `initWithKey:ascending:selector:` or `sortDescriptorWithKey:ascending:comparator:` you can specify a selector used to compare objects. Now the problem is which selector to pass. Well, you can create a Category on NSString implementing a custom sort function that sorts based on t...
21,793,709
I have an `NSArray` of `NSDictionaries`. In the `NSDictionary` I have an element called 'rowID' which is saved as an `NSString`. However, everything saved in it is a number even though they saved as a string. I would like to know how to sort the array based on this value but in terms of sorting 1-100. Currently, when ...
2014/02/15
[ "https://Stackoverflow.com/questions/21793709", "https://Stackoverflow.com", "https://Stackoverflow.com/users/748343/" ]
You can get numeric sorting by following this code:- ``` NSMutableArray *tmpAr = [[NSMutableArray alloc] init]; NSMutableDictionary *tmpDict = [[NSMutableDictionary alloc] init]; [tmpDict setObject:@"name" forKey:@"number5"]; [tmpDict setObject:@"5" forKey:@"id"]; [tmpAr addObject:tmpDict]; tmpDict = [[NSMutableDict...
If you create your sort descriptor with `initWithKey:ascending:selector:` or `sortDescriptorWithKey:ascending:comparator:` you can specify a selector used to compare objects. Now the problem is which selector to pass. Well, you can create a Category on NSString implementing a custom sort function that sorts based on t...
21,793,709
I have an `NSArray` of `NSDictionaries`. In the `NSDictionary` I have an element called 'rowID' which is saved as an `NSString`. However, everything saved in it is a number even though they saved as a string. I would like to know how to sort the array based on this value but in terms of sorting 1-100. Currently, when ...
2014/02/15
[ "https://Stackoverflow.com/questions/21793709", "https://Stackoverflow.com", "https://Stackoverflow.com/users/748343/" ]
Try this :- ``` NSArray *aSortedArray = [itemArray sortedArrayUsingComparator:^(NSMutableDictionary *obj1,NSMutableDictionary *obj2) { NSString *num1 =[obj1 objectForKey:@"rowID"]; NSString *num2 =[obj2 objectForKey:@"rowID"]; return (NSComparisonResult) [num1 compare:num2 options:(NSNumericSearch)]; }]; ...
Try like this :- ``` NSDictionary *row1 = [NSDictionary dictionaryWithObjectsAndKeys:@"1",@"rowId",nil]; NSDictionary *row2 = [NSDictionary dictionaryWithObjectsAndKeys:@"2",@"rowId",nil]; NSDictionary *row3 = [NSDictionary dictionaryWithObjectsAndKeys:@"3",@"rowId",nil]; NSMutableArray *arr = [[NSMutableArray alloc]...
21,793,709
I have an `NSArray` of `NSDictionaries`. In the `NSDictionary` I have an element called 'rowID' which is saved as an `NSString`. However, everything saved in it is a number even though they saved as a string. I would like to know how to sort the array based on this value but in terms of sorting 1-100. Currently, when ...
2014/02/15
[ "https://Stackoverflow.com/questions/21793709", "https://Stackoverflow.com", "https://Stackoverflow.com/users/748343/" ]
Try this :- ``` NSArray *aSortedArray = [itemArray sortedArrayUsingComparator:^(NSMutableDictionary *obj1,NSMutableDictionary *obj2) { NSString *num1 =[obj1 objectForKey:@"rowID"]; NSString *num2 =[obj2 objectForKey:@"rowID"]; return (NSComparisonResult) [num1 compare:num2 options:(NSNumericSearch)]; }]; ...
You can get numeric sorting by following this code:- ``` NSMutableArray *tmpAr = [[NSMutableArray alloc] init]; NSMutableDictionary *tmpDict = [[NSMutableDictionary alloc] init]; [tmpDict setObject:@"name" forKey:@"number5"]; [tmpDict setObject:@"5" forKey:@"id"]; [tmpAr addObject:tmpDict]; tmpDict = [[NSMutableDict...
21,793,709
I have an `NSArray` of `NSDictionaries`. In the `NSDictionary` I have an element called 'rowID' which is saved as an `NSString`. However, everything saved in it is a number even though they saved as a string. I would like to know how to sort the array based on this value but in terms of sorting 1-100. Currently, when ...
2014/02/15
[ "https://Stackoverflow.com/questions/21793709", "https://Stackoverflow.com", "https://Stackoverflow.com/users/748343/" ]
You can get numeric sorting by following this code:- ``` NSMutableArray *tmpAr = [[NSMutableArray alloc] init]; NSMutableDictionary *tmpDict = [[NSMutableDictionary alloc] init]; [tmpDict setObject:@"name" forKey:@"number5"]; [tmpDict setObject:@"5" forKey:@"id"]; [tmpAr addObject:tmpDict]; tmpDict = [[NSMutableDict...
Try like this :- ``` NSDictionary *row1 = [NSDictionary dictionaryWithObjectsAndKeys:@"1",@"rowId",nil]; NSDictionary *row2 = [NSDictionary dictionaryWithObjectsAndKeys:@"2",@"rowId",nil]; NSDictionary *row3 = [NSDictionary dictionaryWithObjectsAndKeys:@"3",@"rowId",nil]; NSMutableArray *arr = [[NSMutableArray alloc]...
7,852,247
I have a `function1` where I allocate an array with a specific number of bytes each time. When I use `printf` I can see that my data is loaded on this array. ``` function1 (other arguments, CvPoint2D32f* array1) ``` Then there is a `function2` in which I call `function1` and assign the array1 data to another variab...
2011/10/21
[ "https://Stackoverflow.com/questions/7852247", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1007475/" ]
``` SELECT id, origin FROM My_Table T1 WHERE EXISTS (SELECT * FROM My_Table T2 WHERE T2.id = T1.id AND T2.origin = 'ROME') AND EXISTS (SELECT * FROM My_Table T3 WHERE T3.id = T1.id AND T3.origin <> 'ROME') ```
``` SELECT t0.id, t0.origin FROM Table t0 WHERE t0.id IN (SELECT distinct(t1.id) FROM Table t1 JOIN Table t2 ON t1.id = t2.id WHERE t1.id > (SELECT t2.id FROM Countries t2 WHERE t1.name = t2.name LIMIT 1)); ``` Output 2 Rome 2 Lodi This produced the results you're looking for. I'm not sure if it has any errors ...
7,852,247
I have a `function1` where I allocate an array with a specific number of bytes each time. When I use `printf` I can see that my data is loaded on this array. ``` function1 (other arguments, CvPoint2D32f* array1) ``` Then there is a `function2` in which I call `function1` and assign the array1 data to another variab...
2011/10/21
[ "https://Stackoverflow.com/questions/7852247", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1007475/" ]
``` SELECT id, origin FROM My_Table T1 WHERE EXISTS (SELECT * FROM My_Table T2 WHERE T2.id = T1.id AND T2.origin = 'ROME') AND EXISTS (SELECT * FROM My_Table T3 WHERE T3.id = T1.id AND T3.origin <> 'ROME') ```
``` CREATE GLOBAL TEMPORARY TABLE Test ( Id int, Origin varchar(100) ) INSERT INTO #Test SELECT 1, 'ROME' FROM DUAL UNION ALL SELECT 1, 'ROME' FROM DUAL UNION ALL SELECT 2, 'ROME' FROM DUAL UNION ALL SELECT 2, 'LODI' FROM DUAL UNION ALL SELECT 3, 'ASTI' FROM DUAL UNION ALL SELECT 4, 'PI...
7,852,247
I have a `function1` where I allocate an array with a specific number of bytes each time. When I use `printf` I can see that my data is loaded on this array. ``` function1 (other arguments, CvPoint2D32f* array1) ``` Then there is a `function2` in which I call `function1` and assign the array1 data to another variab...
2011/10/21
[ "https://Stackoverflow.com/questions/7852247", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1007475/" ]
``` SELECT id, origin FROM My_Table T1 WHERE EXISTS (SELECT * FROM My_Table T2 WHERE T2.id = T1.id AND T2.origin = 'ROME') AND EXISTS (SELECT * FROM My_Table T3 WHERE T3.id = T1.id AND T3.origin <> 'ROME') ```
``` SELECT id, origin FROM ( SELECT id, origin, count(*) over (partition by id) as id_count, count(case when origin = 'ROME' then origin else null end) over (partition by id) as rome_count, count(case when origin <> 'ROME' then origin else null end) over (partiti...
7,852,247
I have a `function1` where I allocate an array with a specific number of bytes each time. When I use `printf` I can see that my data is loaded on this array. ``` function1 (other arguments, CvPoint2D32f* array1) ``` Then there is a `function2` in which I call `function1` and assign the array1 data to another variab...
2011/10/21
[ "https://Stackoverflow.com/questions/7852247", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1007475/" ]
``` SELECT t0.id, t0.origin FROM Table t0 WHERE t0.id IN (SELECT distinct(t1.id) FROM Table t1 JOIN Table t2 ON t1.id = t2.id WHERE t1.id > (SELECT t2.id FROM Countries t2 WHERE t1.name = t2.name LIMIT 1)); ``` Output 2 Rome 2 Lodi This produced the results you're looking for. I'm not sure if it has any errors ...
``` CREATE GLOBAL TEMPORARY TABLE Test ( Id int, Origin varchar(100) ) INSERT INTO #Test SELECT 1, 'ROME' FROM DUAL UNION ALL SELECT 1, 'ROME' FROM DUAL UNION ALL SELECT 2, 'ROME' FROM DUAL UNION ALL SELECT 2, 'LODI' FROM DUAL UNION ALL SELECT 3, 'ASTI' FROM DUAL UNION ALL SELECT 4, 'PI...
7,852,247
I have a `function1` where I allocate an array with a specific number of bytes each time. When I use `printf` I can see that my data is loaded on this array. ``` function1 (other arguments, CvPoint2D32f* array1) ``` Then there is a `function2` in which I call `function1` and assign the array1 data to another variab...
2011/10/21
[ "https://Stackoverflow.com/questions/7852247", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1007475/" ]
``` SELECT id, origin FROM ( SELECT id, origin, count(*) over (partition by id) as id_count, count(case when origin = 'ROME' then origin else null end) over (partition by id) as rome_count, count(case when origin <> 'ROME' then origin else null end) over (partiti...
``` CREATE GLOBAL TEMPORARY TABLE Test ( Id int, Origin varchar(100) ) INSERT INTO #Test SELECT 1, 'ROME' FROM DUAL UNION ALL SELECT 1, 'ROME' FROM DUAL UNION ALL SELECT 2, 'ROME' FROM DUAL UNION ALL SELECT 2, 'LODI' FROM DUAL UNION ALL SELECT 3, 'ASTI' FROM DUAL UNION ALL SELECT 4, 'PI...
11,004,666
I'm working on a Mssql install script and I want to get the results of a silent mssql installation. In my PowerShell script I run this command: ``` $result = (start cmd "/c D:\SQL2008R2\SQL2008R2\setup.exe /CONFIGURATIONFILE=sqlconfig.ini && exit 0 || exit 1") ``` Which should return 0 on fail and 1 on pass. Unfortu...
2012/06/12
[ "https://Stackoverflow.com/questions/11004666", "https://Stackoverflow.com", "https://Stackoverflow.com/users/264675/" ]
An alternative to `Start-Process` is the more syntactically terse call operator `&`. ``` & cmd.exe /c 'ping.exe doesnotexist && exit 0 || exit 1' ``` The exit code will be contained in the built-in variable `$LASTEXITCODE` so: ``` Write-Host $LASTEXITCODE ``` This will contain the exit code of the program run so ...
This is how you do it: `start` is actually an alias `Start-Process`, so you have to look at *it's* documentation, which is a lot different than cmd.exe's `start`. So you can do this: ``` (Start-Process -FilePath "cmd.exe /c ..." -Wait -Passthru).ExitCode ``` So easy!
11,004,666
I'm working on a Mssql install script and I want to get the results of a silent mssql installation. In my PowerShell script I run this command: ``` $result = (start cmd "/c D:\SQL2008R2\SQL2008R2\setup.exe /CONFIGURATIONFILE=sqlconfig.ini && exit 0 || exit 1") ``` Which should return 0 on fail and 1 on pass. Unfortu...
2012/06/12
[ "https://Stackoverflow.com/questions/11004666", "https://Stackoverflow.com", "https://Stackoverflow.com/users/264675/" ]
This is how you do it: `start` is actually an alias `Start-Process`, so you have to look at *it's* documentation, which is a lot different than cmd.exe's `start`. So you can do this: ``` (Start-Process -FilePath "cmd.exe /c ..." -Wait -Passthru).ExitCode ``` So easy!
Too late maybe but does this help? ``` start /WAIT cmd.exe /C "YOUR-COMMAND-HERE" & if errorlevel 1 echo 'error occurred' ``` you can also explicitly return an error code like this: ``` start /WAIT cmd.exe /C "YOUR-COMMAND-HERE & exit MY-ERROR-CODE" & if errorlevel 1 echo 'error occurred' ```
11,004,666
I'm working on a Mssql install script and I want to get the results of a silent mssql installation. In my PowerShell script I run this command: ``` $result = (start cmd "/c D:\SQL2008R2\SQL2008R2\setup.exe /CONFIGURATIONFILE=sqlconfig.ini && exit 0 || exit 1") ``` Which should return 0 on fail and 1 on pass. Unfortu...
2012/06/12
[ "https://Stackoverflow.com/questions/11004666", "https://Stackoverflow.com", "https://Stackoverflow.com/users/264675/" ]
An alternative to `Start-Process` is the more syntactically terse call operator `&`. ``` & cmd.exe /c 'ping.exe doesnotexist && exit 0 || exit 1' ``` The exit code will be contained in the built-in variable `$LASTEXITCODE` so: ``` Write-Host $LASTEXITCODE ``` This will contain the exit code of the program run so ...
Too late maybe but does this help? ``` start /WAIT cmd.exe /C "YOUR-COMMAND-HERE" & if errorlevel 1 echo 'error occurred' ``` you can also explicitly return an error code like this: ``` start /WAIT cmd.exe /C "YOUR-COMMAND-HERE & exit MY-ERROR-CODE" & if errorlevel 1 echo 'error occurred' ```
42,662,936
I'm looking to animate the scale of a container using the [transform](https://docs.flutter.io/flutter/widgets/AnimatedContainer/transform.html) property of an [AnimatedContainer](https://docs.flutter.io/flutter/widgets/AnimatedContainer-class.html); however, the scale is not being transitioned and jumps directly from s...
2017/03/08
[ "https://Stackoverflow.com/questions/42662936", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1630961/" ]
I'm afraid `transform` is one of the properties we don't animate (`child` is another). If you want to animate the scale, you can use ScaleTransition. ScaleTransition: <https://docs.flutter.io/flutter/widgets/ScaleTransition-class.html> Bug for Matrix lerp: <https://github.com/flutter/flutter/issues/443>
you can Animate using the Animated Builder,the below code will scale a Text from font Size 20-35 in 4 secs let me break this into steps to make you better understand 1.you need to implement your class from **TickerProviderStateMixin**. 2.You need an **AnimationController** and a **Animation** variables; 3.wrap your...
42,662,936
I'm looking to animate the scale of a container using the [transform](https://docs.flutter.io/flutter/widgets/AnimatedContainer/transform.html) property of an [AnimatedContainer](https://docs.flutter.io/flutter/widgets/AnimatedContainer-class.html); however, the scale is not being transitioned and jumps directly from s...
2017/03/08
[ "https://Stackoverflow.com/questions/42662936", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1630961/" ]
I'm afraid `transform` is one of the properties we don't animate (`child` is another). If you want to animate the scale, you can use ScaleTransition. ScaleTransition: <https://docs.flutter.io/flutter/widgets/ScaleTransition-class.html> Bug for Matrix lerp: <https://github.com/flutter/flutter/issues/443>
AnimatedContainer supports animting it's transform value, as follow: ``` /// scale to 95%, centerred final width = 200.0; final height = 300.0; bool shouldScaleDown = true;// change value when needed AnimatedContainer( color: Colors.blueAccent, width: width, height: height, duration: Duration(milliseconds: 100...
42,662,936
I'm looking to animate the scale of a container using the [transform](https://docs.flutter.io/flutter/widgets/AnimatedContainer/transform.html) property of an [AnimatedContainer](https://docs.flutter.io/flutter/widgets/AnimatedContainer-class.html); however, the scale is not being transitioned and jumps directly from s...
2017/03/08
[ "https://Stackoverflow.com/questions/42662936", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1630961/" ]
AnimatedContainer supports animting it's transform value, as follow: ``` /// scale to 95%, centerred final width = 200.0; final height = 300.0; bool shouldScaleDown = true;// change value when needed AnimatedContainer( color: Colors.blueAccent, width: width, height: height, duration: Duration(milliseconds: 100...
you can Animate using the Animated Builder,the below code will scale a Text from font Size 20-35 in 4 secs let me break this into steps to make you better understand 1.you need to implement your class from **TickerProviderStateMixin**. 2.You need an **AnimationController** and a **Animation** variables; 3.wrap your...
10,004,847
In Hadley Wickham's **ggplot2** book in chapter 10.3, he alludes to making plot functions. I want to make many similar plots that use faceting, but I cannot refer to a column. If all my references are in aesthetics then I can use aes\_string and everything works. Facet\_wrap seems not to have an analogue. ``` library(...
2012/04/04
[ "https://Stackoverflow.com/questions/10004847", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1024165/" ]
`facet_wrap` expects a formula as its first argument, so I'd just coerce it with `as.formula`, and feed in my `sp` as a string: ``` flowerPlotWrap <- function(dat, sl, sw, pl, sp){ ggplot(data=dat, aes_string(x=sl, y=sw, color=pl)) + geom_point() +facet_wrap(as.formula(sp)) # note the as.formula } pl.flow...
Your function worked fine for me unmodified if I just used `sp='Species'`, i.e. the name of the variable you want to facet by. `flowerPlotWrap(iris, sl='Sepal.Length', sw='Sepal.Width', pl='Petal.Length', sp='Species')` ![enter image description here](https://i.stack.imgur.com/oNBc6.png)
10,004,847
In Hadley Wickham's **ggplot2** book in chapter 10.3, he alludes to making plot functions. I want to make many similar plots that use faceting, but I cannot refer to a column. If all my references are in aesthetics then I can use aes\_string and everything works. Facet\_wrap seems not to have an analogue. ``` library(...
2012/04/04
[ "https://Stackoverflow.com/questions/10004847", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1024165/" ]
Here are some alternatives using new features from `ggplot2 V3.0.0` Using strings : ``` flowerPlot <- function(dat, sl, sw, pl, sp){ ggplot(data=dat, aes(x=!!ensym(sl), y=!!ensym(sw), color=!!ensym(pl))) + geom_point() + facet_wrap(eval(expr(~!!ensym(sp)))) } flowerPlot(iris, sl='Sepal.Length', sw='Sepal....
Your function worked fine for me unmodified if I just used `sp='Species'`, i.e. the name of the variable you want to facet by. `flowerPlotWrap(iris, sl='Sepal.Length', sw='Sepal.Width', pl='Petal.Length', sp='Species')` ![enter image description here](https://i.stack.imgur.com/oNBc6.png)
10,004,847
In Hadley Wickham's **ggplot2** book in chapter 10.3, he alludes to making plot functions. I want to make many similar plots that use faceting, but I cannot refer to a column. If all my references are in aesthetics then I can use aes\_string and everything works. Facet\_wrap seems not to have an analogue. ``` library(...
2012/04/04
[ "https://Stackoverflow.com/questions/10004847", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1024165/" ]
`facet_wrap` expects a formula as its first argument, so I'd just coerce it with `as.formula`, and feed in my `sp` as a string: ``` flowerPlotWrap <- function(dat, sl, sw, pl, sp){ ggplot(data=dat, aes_string(x=sl, y=sw, color=pl)) + geom_point() +facet_wrap(as.formula(sp)) # note the as.formula } pl.flow...
Here are some alternatives using new features from `ggplot2 V3.0.0` Using strings : ``` flowerPlot <- function(dat, sl, sw, pl, sp){ ggplot(data=dat, aes(x=!!ensym(sl), y=!!ensym(sw), color=!!ensym(pl))) + geom_point() + facet_wrap(eval(expr(~!!ensym(sp)))) } flowerPlot(iris, sl='Sepal.Length', sw='Sepal....
23,050,774
I have a dynamic populated list. I am trying to have it return nothing if a variable is a certain value. Here is what I am doing: ``` /* FIRST VALIDATE TIME LEFT TO MAKE SURE IT STILL EXIST */ NSString *check = [self.googlePlacesArrayFromAFNetworking[indexPath.row] objectForKey:@"time_left"]; if(![check isEqu...
2014/04/14
[ "https://Stackoverflow.com/questions/23050774", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3428077/" ]
Your data source must return consistent values across all of its methods. The number of rows in your tableView is controlled by the return value from `numberOfRowsInSection` and `cellForRowAtIndexPath` must return a valid cell for each row. Validation and modification of the data in the data source must be performed o...
You always have to return a `cell`. What you need is not return `nil` but just don't populate it.
23,050,774
I have a dynamic populated list. I am trying to have it return nothing if a variable is a certain value. Here is what I am doing: ``` /* FIRST VALIDATE TIME LEFT TO MAKE SURE IT STILL EXIST */ NSString *check = [self.googlePlacesArrayFromAFNetworking[indexPath.row] objectForKey:@"time_left"]; if(![check isEqu...
2014/04/14
[ "https://Stackoverflow.com/questions/23050774", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3428077/" ]
It depends on what you want. There are two options: 1. If you want your table view to have empty rows for the data that are expired, you need to configure and return a blank cell. 2. If you want those cells to be missing, you need to return the correct number of rows for `-tableView:numberOfRowsInSection` (that is, su...
You always have to return a `cell`. What you need is not return `nil` but just don't populate it.
23,050,774
I have a dynamic populated list. I am trying to have it return nothing if a variable is a certain value. Here is what I am doing: ``` /* FIRST VALIDATE TIME LEFT TO MAKE SURE IT STILL EXIST */ NSString *check = [self.googlePlacesArrayFromAFNetworking[indexPath.row] objectForKey:@"time_left"]; if(![check isEqu...
2014/04/14
[ "https://Stackoverflow.com/questions/23050774", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3428077/" ]
Your data source must return consistent values across all of its methods. The number of rows in your tableView is controlled by the return value from `numberOfRowsInSection` and `cellForRowAtIndexPath` must return a valid cell for each row. Validation and modification of the data in the data source must be performed o...
It depends on what you want. There are two options: 1. If you want your table view to have empty rows for the data that are expired, you need to configure and return a blank cell. 2. If you want those cells to be missing, you need to return the correct number of rows for `-tableView:numberOfRowsInSection` (that is, su...
33,956,873
I'm writing a compiler for LLVM for a language whose semantics *explicity* define that a division by zero *should always* raise a floating point exception. The problem is, after running -mem2reg and -constprop on my raw IR, my code gets converted to: ``` define i32 @main() { entry: %t3 = sdiv i32 2, 0 ret i32 7 } `...
2015/11/27
[ "https://Stackoverflow.com/questions/33956873", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1651215/" ]
The sdiv instruction has divide by zero semantics that are undefined. If your front end language has some defined semantics for this you'll need to use instructions other than sdiv. Perhaps you'll have to detect a divide by zero and branch at runtime to a sequence of instructions that gives the semantics you want.
The [language reference](http://llvm.org/docs/LangRef.html#sdiv-instruction) states that `[d]ivision by zero leads to undefined behavior` as stated by Colin. Thus, you have to check if the dividend is zero and explicitly generate a floating point exception. In C, this could look as follows: ``` extern void raiseFloat...
11,449,782
I have seen some posts regarding this topic and a few blogs, but none seem to mention the output I'm getting. What I want is to generate a google maps map with information on it. Manually entering the information results in the correct information. So that part works. Where I'm getting stuck is when I'm going to dyna...
2012/07/12
[ "https://Stackoverflow.com/questions/11449782", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1343595/" ]
Just tried with ``` <script type="text/javascript"> var projects = [ @Html.Raw("['" + "aaa" + "', '" + "bbb" + "'],") ]; </script> ``` it worked and showed ... ``` <script type="text/javascript"> var projects = [ ['aaa', 'bbb'], ]; </script> ```
You don't want to call JavaScriptStringEncode on the entire string, that will also encode your literal indicators (which are being converted to \u0027 in your example). Instead, call it on each item in your array like this: ``` <script type="text/javascript"> var projects = [ @foreach (var item in Model) { ...
11,449,782
I have seen some posts regarding this topic and a few blogs, but none seem to mention the output I'm getting. What I want is to generate a google maps map with information on it. Manually entering the information results in the correct information. So that part works. Where I'm getting stuck is when I'm going to dyna...
2012/07/12
[ "https://Stackoverflow.com/questions/11449782", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1343595/" ]
Just tried with ``` <script type="text/javascript"> var projects = [ @Html.Raw("['" + "aaa" + "', '" + "bbb" + "'],") ]; </script> ``` it worked and showed ... ``` <script type="text/javascript"> var projects = [ ['aaa', 'bbb'], ]; </script> ```
I believe you could do most of the heavy lifting in .net and leverage Html.Raw to transform the object for you: ``` @{ var myObj = Model.Select(i => new { item.Gebouwnaam, item.LocatieLatitude.ToString().Replace(",", "."), item.LocatieLongitude.ToString().Replace(",", "."), item.Pla...
11,449,782
I have seen some posts regarding this topic and a few blogs, but none seem to mention the output I'm getting. What I want is to generate a google maps map with information on it. Manually entering the information results in the correct information. So that part works. Where I'm getting stuck is when I'm going to dyna...
2012/07/12
[ "https://Stackoverflow.com/questions/11449782", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1343595/" ]
You don't want to call JavaScriptStringEncode on the entire string, that will also encode your literal indicators (which are being converted to \u0027 in your example). Instead, call it on each item in your array like this: ``` <script type="text/javascript"> var projects = [ @foreach (var item in Model) { ...
I believe you could do most of the heavy lifting in .net and leverage Html.Raw to transform the object for you: ``` @{ var myObj = Model.Select(i => new { item.Gebouwnaam, item.LocatieLatitude.ToString().Replace(",", "."), item.LocatieLongitude.ToString().Replace(",", "."), item.Pla...
42,363,401
This error showed up when I was trying to search from a range of date. This is my model: ``` def self.search(search) if search @policies = Policy.find_by_sql("acct_ent_date IN ?", start_date..end_date) else limit(10) end end ```
2017/02/21
[ "https://Stackoverflow.com/questions/42363401", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7385151/" ]
Just to help out anyone else coming here: If you want to use query params with `find_by_sql`, you need to put *all the arguments* into an array, like this: ``` Policy.find_by_sql(["acct_ent_date IN ?", start_date..end_date]) ``` I've never actually seen passing a range as a query parameter, so I can't comment on tha...
You rarely need to drop down to writing raw SQL in rails (e.g. using the `find_by_sql` method) - especially for such a simple query as this. Instead, you can just write the following and `ActiveRecord` will correctly convert it to valid SQL syntax for you: ``` # If you are looking for a list of all matching entries: ...
48,618,088
[![enter image description here](https://i.stack.imgur.com/s4Aaa.png)](https://i.stack.imgur.com/s4Aaa.png) I am creating gallery using HorizontalScrollView, and I want to click the image in HorizontalScrollView. Here is my code: ``` @Override protected void onActivityResult(int requestCode, int resultCode, Inte...
2018/02/05
[ "https://Stackoverflow.com/questions/48618088", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9309307/" ]
Hi use the below code to `implement` click event to `ImageView`: ``` @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); if(requestCode == RESULT_LOAD_IMAGE && resultCode == RESULT_OK){ if(data.getClipData() !...
Set `onClickListener` in loop. So every `ImageView` will have it's own click listener. Before adding image into layout. ``` image.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { // do ur work here } }) ``` Thanks
48,618,088
[![enter image description here](https://i.stack.imgur.com/s4Aaa.png)](https://i.stack.imgur.com/s4Aaa.png) I am creating gallery using HorizontalScrollView, and I want to click the image in HorizontalScrollView. Here is my code: ``` @Override protected void onActivityResult(int requestCode, int resultCode, Inte...
2018/02/05
[ "https://Stackoverflow.com/questions/48618088", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9309307/" ]
Hi use the below code to `implement` click event to `ImageView`: ``` @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); if(requestCode == RESULT_LOAD_IMAGE && resultCode == RESULT_OK){ if(data.getClipData() !...
**See below:** ``` for(int i = 0; i < totalItemsSelected; i++){ Uri fileUri = data.getClipData().getItemAt(i).getUri(); ImageView image = new ImageView(this); image.setAdjustViewBounds(true); image.setImageURI(fileUri); image.setOnClickListener(new View.OnClickListener() { @Override ...
581,983
My data table looks something like this (first row = column names): > > Name; Number; Group 1; Group 2; Group 3; > > > ``` Leslie; 555-555-5555; Y; N; Y; John; 555-555-1234; N; Y; N; Mary; 555-555-2222; Y; Y; N; James; 555-555-3333; N; N; Y; Sue; 555-555-4444; Y; Y; Y; ``` I want my report to look like this: >...
2009/02/24
[ "https://Stackoverflow.com/questions/581983", "https://Stackoverflow.com", "https://Stackoverflow.com/users/38949/" ]
You either have to change your record source to group them the way you want. Example: ``` SELECT 'Group 1' as GroupName, Name, Number FROM Table WHERE Group1 = 'Y' UNION SELECT 'Group 2' as GroupName, Name, Number FROM Table WHERE Group2 = 'Y' UNION SELECT 'Group 3' as GroupName, Name, Number FROM Table WHERE Gro...
Group on a formula. Make the formula a concatenation of whatever fields you wish to be in the composite key.
20,333,070
I have a Pivot table in excel that is using a raw table as its data source. This pivot table is doing a bunch of grouping and summing of rows. I'd like to now use the result of this new pivot table as the data source for a new pivot table which will further modify this data. Is this possible with excel? I suppose y...
2013/12/02
[ "https://Stackoverflow.com/questions/20333070", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1157373/" ]
In a new sheet (where you want to create a new pivot table) press the key combination (Alt+D+P). In the list of data source options choose "Microsoft Excel list of database". Click Next and select the pivot table that you want to use as a source (select starting with the actual headers of the fields). I assume that thi...
As suggested you can change the pivot table content and paste as values. But if you want to change the values dynamically the easiest way I found is Go To `Insert->create pivot table` Now in the dialog box in the input data field select the cells of your previous pivot table.
20,333,070
I have a Pivot table in excel that is using a raw table as its data source. This pivot table is doing a bunch of grouping and summing of rows. I'd like to now use the result of this new pivot table as the data source for a new pivot table which will further modify this data. Is this possible with excel? I suppose y...
2013/12/02
[ "https://Stackoverflow.com/questions/20333070", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1157373/" ]
* Make your first pivot table. * Select the first top left cell. * Create a range name using offset: `OFFSET(Sheet1!$A$3,0,0,COUNTA(Sheet1!$A:$A)-1,COUNTA(Sheet1!$3:$3))` * Make your second pivot with your range name as source of data using F3. If you change number of rows or columns from your first pivot, your secon...
Personally, I got around this in a slightly different way - I had a pivot table querying an SQL server source and I was using the timeline slicer to restrict the results to a date range - I then wanted to summarise the pivot results in another table. I selected the 'source' pivot table and created a named range called...
20,333,070
I have a Pivot table in excel that is using a raw table as its data source. This pivot table is doing a bunch of grouping and summing of rows. I'd like to now use the result of this new pivot table as the data source for a new pivot table which will further modify this data. Is this possible with excel? I suppose y...
2013/12/02
[ "https://Stackoverflow.com/questions/20333070", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1157373/" ]
I guess your end goal is to show Distinct (unique) values inside your original Pivot table. For example you could have data set with OrderNumber, OrderDate, OrderItem, orderQty First pivot table will show you OrderDate and sum of OrderQty **and you probably want to see Count of unique orders in the same Pivot**. You ...
You have to convert the pivot to values first before you can do that: * Remove the subtotals * Repeat the row items * Copy / Paste values * Insert a new pivot table
20,333,070
I have a Pivot table in excel that is using a raw table as its data source. This pivot table is doing a bunch of grouping and summing of rows. I'd like to now use the result of this new pivot table as the data source for a new pivot table which will further modify this data. Is this possible with excel? I suppose y...
2013/12/02
[ "https://Stackoverflow.com/questions/20333070", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1157373/" ]
I guess your end goal is to show Distinct (unique) values inside your original Pivot table. For example you could have data set with OrderNumber, OrderDate, OrderItem, orderQty First pivot table will show you OrderDate and sum of OrderQty **and you probably want to see Count of unique orders in the same Pivot**. You ...
As suggested you can change the pivot table content and paste as values. But if you want to change the values dynamically the easiest way I found is Go To `Insert->create pivot table` Now in the dialog box in the input data field select the cells of your previous pivot table.
20,333,070
I have a Pivot table in excel that is using a raw table as its data source. This pivot table is doing a bunch of grouping and summing of rows. I'd like to now use the result of this new pivot table as the data source for a new pivot table which will further modify this data. Is this possible with excel? I suppose y...
2013/12/02
[ "https://Stackoverflow.com/questions/20333070", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1157373/" ]
In a new sheet (where you want to create a new pivot table) press the key combination (Alt+D+P). In the list of data source options choose "Microsoft Excel list of database". Click Next and select the pivot table that you want to use as a source (select starting with the actual headers of the fields). I assume that thi...
I guess your end goal is to show Distinct (unique) values inside your original Pivot table. For example you could have data set with OrderNumber, OrderDate, OrderItem, orderQty First pivot table will show you OrderDate and sum of OrderQty **and you probably want to see Count of unique orders in the same Pivot**. You ...
20,333,070
I have a Pivot table in excel that is using a raw table as its data source. This pivot table is doing a bunch of grouping and summing of rows. I'd like to now use the result of this new pivot table as the data source for a new pivot table which will further modify this data. Is this possible with excel? I suppose y...
2013/12/02
[ "https://Stackoverflow.com/questions/20333070", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1157373/" ]
* Make your first pivot table. * Select the first top left cell. * Create a range name using offset: `OFFSET(Sheet1!$A$3,0,0,COUNTA(Sheet1!$A:$A)-1,COUNTA(Sheet1!$3:$3))` * Make your second pivot with your range name as source of data using F3. If you change number of rows or columns from your first pivot, your secon...
here is how I've done this before. 1. put a dummy column "X" off to the right of your source pivot table. 2. click in that cell and start your pivot table. 3. once the dialogue box pops up you can edit the data range to include your pivot table. 4. this may require you to Refresh the source table first and then refres...
20,333,070
I have a Pivot table in excel that is using a raw table as its data source. This pivot table is doing a bunch of grouping and summing of rows. I'd like to now use the result of this new pivot table as the data source for a new pivot table which will further modify this data. Is this possible with excel? I suppose y...
2013/12/02
[ "https://Stackoverflow.com/questions/20333070", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1157373/" ]
In a new sheet (where you want to create a new pivot table) press the key combination (Alt+D+P). In the list of data source options choose "Microsoft Excel list of database". Click Next and select the pivot table that you want to use as a source (select starting with the actual headers of the fields). I assume that thi...
here is how I've done this before. 1. put a dummy column "X" off to the right of your source pivot table. 2. click in that cell and start your pivot table. 3. once the dialogue box pops up you can edit the data range to include your pivot table. 4. this may require you to Refresh the source table first and then refres...
20,333,070
I have a Pivot table in excel that is using a raw table as its data source. This pivot table is doing a bunch of grouping and summing of rows. I'd like to now use the result of this new pivot table as the data source for a new pivot table which will further modify this data. Is this possible with excel? I suppose y...
2013/12/02
[ "https://Stackoverflow.com/questions/20333070", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1157373/" ]
* Make your first pivot table. * Select the first top left cell. * Create a range name using offset: `OFFSET(Sheet1!$A$3,0,0,COUNTA(Sheet1!$A:$A)-1,COUNTA(Sheet1!$3:$3))` * Make your second pivot with your range name as source of data using F3. If you change number of rows or columns from your first pivot, your secon...
As @nutsch implies, Excel won't do what you need directly, so you have to copy your data from the pivot table to somewhere else first. Rather than using copy and then paste values, however, a better way for many purposes is to create some hidden columns or a whole hidden sheet that copies values using simple formulae. ...
20,333,070
I have a Pivot table in excel that is using a raw table as its data source. This pivot table is doing a bunch of grouping and summing of rows. I'd like to now use the result of this new pivot table as the data source for a new pivot table which will further modify this data. Is this possible with excel? I suppose y...
2013/12/02
[ "https://Stackoverflow.com/questions/20333070", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1157373/" ]
* Make your first pivot table. * Select the first top left cell. * Create a range name using offset: `OFFSET(Sheet1!$A$3,0,0,COUNTA(Sheet1!$A:$A)-1,COUNTA(Sheet1!$3:$3))` * Make your second pivot with your range name as source of data using F3. If you change number of rows or columns from your first pivot, your secon...
I guess your end goal is to show Distinct (unique) values inside your original Pivot table. For example you could have data set with OrderNumber, OrderDate, OrderItem, orderQty First pivot table will show you OrderDate and sum of OrderQty **and you probably want to see Count of unique orders in the same Pivot**. You ...
20,333,070
I have a Pivot table in excel that is using a raw table as its data source. This pivot table is doing a bunch of grouping and summing of rows. I'd like to now use the result of this new pivot table as the data source for a new pivot table which will further modify this data. Is this possible with excel? I suppose y...
2013/12/02
[ "https://Stackoverflow.com/questions/20333070", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1157373/" ]
* Make your first pivot table. * Select the first top left cell. * Create a range name using offset: `OFFSET(Sheet1!$A$3,0,0,COUNTA(Sheet1!$A:$A)-1,COUNTA(Sheet1!$3:$3))` * Make your second pivot with your range name as source of data using F3. If you change number of rows or columns from your first pivot, your secon...
As suggested you can change the pivot table content and paste as values. But if you want to change the values dynamically the easiest way I found is Go To `Insert->create pivot table` Now in the dialog box in the input data field select the cells of your previous pivot table.
40,899,502
I've opened a Firefox today, hit the Firebug button and it showed me that in the new version it is integrated into the developer tools. I hit ok and realized that it doesn't work at all (everytime using *Inspect Element* the `<body>` element is selected). So I would like to revert that setup back, but I cannot find wh...
2016/11/30
[ "https://Stackoverflow.com/questions/40899502", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5046468/" ]
[As I wrote in the Firebug discussion group](https://groups.google.com/d/msg/firebug/PiCXxzDdsO8/7usaqu6sDwAJ), that the `<body>` element is selected first before the actual element you inspected is a bug and I've already [filed a bug report](https://bugzilla.mozilla.org/show_bug.cgi?id=1324254) for it. There is also ...
In additional to @Sebastian Zartner's answer, (*from [Firebug](http://getfirebug.com/)'s website*): > > Firebug 2 doesn’t work in multi-process browsers (i.e. e10s) and converting it is too complex, so it will stop working when e10s is activated in Firefox. **You will be able to disable e10s for a while to keep using...
26,096,463
I've stacked some input text fields, drop downs, radio gruop inside a DIV. Now how do I check if all text fields, radio groups and dropdowns inside this DIV have some value? I've created a simple mockup in [JSFiddle](http://jsfiddle.net/tq3jL2d6/1/) jQ: ``` $("#continue_btn").click(function(){ if($('#myForm inpu...
2014/09/29
[ "https://Stackoverflow.com/questions/26096463", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4009167/" ]
All you have to do is to wrap your markup in a `form` element and to each `input` add attr `required` this is pure css. [DEMO ON JSFIDDLE](http://jsfiddle.net/tq3jL2d6/7/) =================================================== ```js function highlight(event) { event.preventDefault(); alert('Done!!!'); r...
You can use this code, here is the link ``` http://jqueryvalidation.org/files/demo/ ``` And here is the code ``` view-source:http://jqueryvalidation.org/files/demo/ ```
26,096,463
I've stacked some input text fields, drop downs, radio gruop inside a DIV. Now how do I check if all text fields, radio groups and dropdowns inside this DIV have some value? I've created a simple mockup in [JSFiddle](http://jsfiddle.net/tq3jL2d6/1/) jQ: ``` $("#continue_btn").click(function(){ if($('#myForm inpu...
2014/09/29
[ "https://Stackoverflow.com/questions/26096463", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4009167/" ]
All you have to do is to wrap your markup in a `form` element and to each `input` add attr `required` this is pure css. [DEMO ON JSFIDDLE](http://jsfiddle.net/tq3jL2d6/7/) =================================================== ```js function highlight(event) { event.preventDefault(); alert('Done!!!'); r...
You can use filter function which can filter every value in form like this ``` $("#continue_btn").click(function(){ var anyFieldIsEmpty = $("#myForm input,select").filter(function() { return $.trim(this.value).length === 0; }).length > 0; if(anyFieldIsEmpty){ alert("yes"); } else { alert...
26,096,463
I've stacked some input text fields, drop downs, radio gruop inside a DIV. Now how do I check if all text fields, radio groups and dropdowns inside this DIV have some value? I've created a simple mockup in [JSFiddle](http://jsfiddle.net/tq3jL2d6/1/) jQ: ``` $("#continue_btn").click(function(){ if($('#myForm inpu...
2014/09/29
[ "https://Stackoverflow.com/questions/26096463", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4009167/" ]
All you have to do is to wrap your markup in a `form` element and to each `input` add attr `required` this is pure css. [DEMO ON JSFIDDLE](http://jsfiddle.net/tq3jL2d6/7/) =================================================== ```js function highlight(event) { event.preventDefault(); alert('Done!!!'); r...
The main difficulty here is radio buttons which you need to check separately. Try something like this: ``` var $form = $('#myForm'); $("#continue_btn").click(function () { var $radio = $form.find(':radio:checked'); var hasEmpty = $.grep($form.serializeArray(), function(el) { return !$.trim(el.value)...
26,096,463
I've stacked some input text fields, drop downs, radio gruop inside a DIV. Now how do I check if all text fields, radio groups and dropdowns inside this DIV have some value? I've created a simple mockup in [JSFiddle](http://jsfiddle.net/tq3jL2d6/1/) jQ: ``` $("#continue_btn").click(function(){ if($('#myForm inpu...
2014/09/29
[ "https://Stackoverflow.com/questions/26096463", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4009167/" ]
The main difficulty here is radio buttons which you need to check separately. Try something like this: ``` var $form = $('#myForm'); $("#continue_btn").click(function () { var $radio = $form.find(':radio:checked'); var hasEmpty = $.grep($form.serializeArray(), function(el) { return !$.trim(el.value)...
You can use this code, here is the link ``` http://jqueryvalidation.org/files/demo/ ``` And here is the code ``` view-source:http://jqueryvalidation.org/files/demo/ ```
26,096,463
I've stacked some input text fields, drop downs, radio gruop inside a DIV. Now how do I check if all text fields, radio groups and dropdowns inside this DIV have some value? I've created a simple mockup in [JSFiddle](http://jsfiddle.net/tq3jL2d6/1/) jQ: ``` $("#continue_btn").click(function(){ if($('#myForm inpu...
2014/09/29
[ "https://Stackoverflow.com/questions/26096463", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4009167/" ]
The main difficulty here is radio buttons which you need to check separately. Try something like this: ``` var $form = $('#myForm'); $("#continue_btn").click(function () { var $radio = $form.find(':radio:checked'); var hasEmpty = $.grep($form.serializeArray(), function(el) { return !$.trim(el.value)...
You can use filter function which can filter every value in form like this ``` $("#continue_btn").click(function(){ var anyFieldIsEmpty = $("#myForm input,select").filter(function() { return $.trim(this.value).length === 0; }).length > 0; if(anyFieldIsEmpty){ alert("yes"); } else { alert...
447
У відповідь на привітання зі святом чи побажання здоров'я завжди говорю *взаємно* (або *дякую, взаємно*). Останнім часом дуже рідко чую у відповідь *взаємно*, натомість вживають варіант *навзаєм*. Це слово є милозвучним, але абсолютно новим для мене. Яке походження слова *навзаєм*? Чи є воно коректним/правильним/рек...
2017/02/15
[ "https://ukrainian.stackexchange.com/questions/447", "https://ukrainian.stackexchange.com", "https://ukrainian.stackexchange.com/users/326/" ]
[Словник української мови](http://sum.in.ua/s/navzajem) позначає слово *навзаєм* як діалектне. Наголос на другому складі. > > **НАВЗА́ЄМ**, присл., діал. Взаємно. Знов регіт розлігся, знов жарти > навзаєм (Леонід Первомайський, II, 1958, 318); Зустрічаючись, іноки > цілують навзаєм руки (Павло Загребельний, Диво, 1...
Новѣший [*Словник української мови*](//uk.wikipedia.org/wiki/%D0%A1%D0%BB%D0%BE%D0%B2%D0%BD%D0%B8%D0%BA_%D1%83%D0%BA%D1%80%D0%B0%D1%97%D0%BD%D1%81%D1%8C%D0%BA%D0%BE%D1%97_%D0%BC%D0%BE%D0%B2%D0%B8_%D1%83_20_%D1%82%D0%BE%D0%BC%D0%B0%D1%85) [*у 20 томах*] вже не маїть позначки *діалектне*: > > [**НАВЗА́ЄМ**](//sum20ua.c...
23,633,890
I would appreciate some help with the following task: From the data frame below (`C`), for each id I would like to subtract the first entry under column `d_2` from the final entry and then store the results in another dataframe containing the same ids. I can then merge this with my initial dataframe. Pls note that the ...
2014/05/13
[ "https://Stackoverflow.com/questions/23633890", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2739669/" ]
This can be done easily with `dplyr`. The `last` and `first` functions are very helpful for this task. ``` library(dplyr) #install the package dplyr and load it into library diff_df <- C %>% #create a new data.frame (diff_df) and store the output of the following operation in it. The %.% op...
If you have any singletons and they need to be left alone, then this will solve your problem. It's the same as docendo discimus's answer, but with an `if-else` component to deal with the singleton cases: ``` library(dplyr) diff_df <- C %>% group_by(id) %>% summarize(difference = if(n(...
59,147,459
I'm having problems renewing an RHEL Developer account subscription, which expired a few days ago. I performed the following steps, but still, subscription-manager notifies me that: `Unable to find available subscriptions for all your installed products.` ``` [qa@brendan ~]$ sudo subscription-manager remove --all 0...
2019/12/02
[ "https://Stackoverflow.com/questions/59147459", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1656850/" ]
useEffect has already been triggered and working, the point is that its an `async` operation. So you need to wait for the fetch to be completed. one of the ways that you can do that is: 1. write your assertion(s) 2. specify the number of assertion(s) in your test, so that jest knows that it has to wait for the operatio...
You can set a timeout to asynchronously check if the the expected condition has been met. ``` it('handles groupId and api call ', (done) => { const wrapper = shallow(<UsageWidget surface={`${USAGE_SURFACES.metrics}`} groupId={1} />) setTimeout(() => { expect(wrapper.find("iframe").prop('src')).toBeTruthy(); /...
59,147,459
I'm having problems renewing an RHEL Developer account subscription, which expired a few days ago. I performed the following steps, but still, subscription-manager notifies me that: `Unable to find available subscriptions for all your installed products.` ``` [qa@brendan ~]$ sudo subscription-manager remove --all 0...
2019/12/02
[ "https://Stackoverflow.com/questions/59147459", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1656850/" ]
Here's a minimal, complete example of mocking `fetch`. Your component pretty much boils down to the generic fire-fetch-and-set-state-with-response-data idiom: ```js import React, {useEffect, useState} from "react"; export default function Users() { const [users, setUsers] = useState([]); useEffect(() => { (a...
useEffect has already been triggered and working, the point is that its an `async` operation. So you need to wait for the fetch to be completed. one of the ways that you can do that is: 1. write your assertion(s) 2. specify the number of assertion(s) in your test, so that jest knows that it has to wait for the operatio...
59,147,459
I'm having problems renewing an RHEL Developer account subscription, which expired a few days ago. I performed the following steps, but still, subscription-manager notifies me that: `Unable to find available subscriptions for all your installed products.` ``` [qa@brendan ~]$ sudo subscription-manager remove --all 0...
2019/12/02
[ "https://Stackoverflow.com/questions/59147459", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1656850/" ]
With jest you can always mock. So what you need is: 1. In your unit test mock useEffect from React ``` jest.mock('React', () => ({ ...jest.requireActual('React'), useEffect: jest.fn(), })); ``` That allows to mock only useEffect and keep other implementation actual. 2. Import useEffect to use it in the test `...
useEffect has already been triggered and working, the point is that its an `async` operation. So you need to wait for the fetch to be completed. one of the ways that you can do that is: 1. write your assertion(s) 2. specify the number of assertion(s) in your test, so that jest knows that it has to wait for the operatio...
59,147,459
I'm having problems renewing an RHEL Developer account subscription, which expired a few days ago. I performed the following steps, but still, subscription-manager notifies me that: `Unable to find available subscriptions for all your installed products.` ``` [qa@brendan ~]$ sudo subscription-manager remove --all 0...
2019/12/02
[ "https://Stackoverflow.com/questions/59147459", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1656850/" ]
Here's a minimal, complete example of mocking `fetch`. Your component pretty much boils down to the generic fire-fetch-and-set-state-with-response-data idiom: ```js import React, {useEffect, useState} from "react"; export default function Users() { const [users, setUsers] = useState([]); useEffect(() => { (a...
You can set a timeout to asynchronously check if the the expected condition has been met. ``` it('handles groupId and api call ', (done) => { const wrapper = shallow(<UsageWidget surface={`${USAGE_SURFACES.metrics}`} groupId={1} />) setTimeout(() => { expect(wrapper.find("iframe").prop('src')).toBeTruthy(); /...
59,147,459
I'm having problems renewing an RHEL Developer account subscription, which expired a few days ago. I performed the following steps, but still, subscription-manager notifies me that: `Unable to find available subscriptions for all your installed products.` ``` [qa@brendan ~]$ sudo subscription-manager remove --all 0...
2019/12/02
[ "https://Stackoverflow.com/questions/59147459", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1656850/" ]
With jest you can always mock. So what you need is: 1. In your unit test mock useEffect from React ``` jest.mock('React', () => ({ ...jest.requireActual('React'), useEffect: jest.fn(), })); ``` That allows to mock only useEffect and keep other implementation actual. 2. Import useEffect to use it in the test `...
You can set a timeout to asynchronously check if the the expected condition has been met. ``` it('handles groupId and api call ', (done) => { const wrapper = shallow(<UsageWidget surface={`${USAGE_SURFACES.metrics}`} groupId={1} />) setTimeout(() => { expect(wrapper.find("iframe").prop('src')).toBeTruthy(); /...
59,147,459
I'm having problems renewing an RHEL Developer account subscription, which expired a few days ago. I performed the following steps, but still, subscription-manager notifies me that: `Unable to find available subscriptions for all your installed products.` ``` [qa@brendan ~]$ sudo subscription-manager remove --all 0...
2019/12/02
[ "https://Stackoverflow.com/questions/59147459", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1656850/" ]
Here's a minimal, complete example of mocking `fetch`. Your component pretty much boils down to the generic fire-fetch-and-set-state-with-response-data idiom: ```js import React, {useEffect, useState} from "react"; export default function Users() { const [users, setUsers] = useState([]); useEffect(() => { (a...
With jest you can always mock. So what you need is: 1. In your unit test mock useEffect from React ``` jest.mock('React', () => ({ ...jest.requireActual('React'), useEffect: jest.fn(), })); ``` That allows to mock only useEffect and keep other implementation actual. 2. Import useEffect to use it in the test `...
113,182
The text file containing cars' arrival and departure time will upload stuff from the parking lot. Text will be like this: ``` 10:10, 11:10 10:30, 12:40 10:25, 11:10 11:10, 12:20 ``` I created a `ParkedCar` class: ``` public class ParkerCar { public DateTime ArrivalTime { get; set; } public DateTime Depart...
2015/12/07
[ "https://codereview.stackexchange.com/questions/113182", "https://codereview.stackexchange.com", "https://codereview.stackexchange.com/users/-1/" ]
**Naming Conventions** [MSDN, General Naming Conventions](https://msdn.microsoft.com/en-us/library/ms229045(v=vs.110).aspx) * DO NOT use Hungarian notation: + [dt]Start in `getPickTimeframe()` --> `DateTime currentFrameStartDate` + [dt]End in `getPickTimeframe()` --> `DateTime currentFrameEndDate` * DO favor reada...
You have an issue where if a car parks for a really long time, your method will probably return that timespan, which might not be very useful if it is pretty much the entire time your lot is open. I would recommend specifying an interval of time beforehand that you want to check, and calculate the number of cars in e...
38,648,012
I'm trying to get the HTML of this page <http://pastebin.com/raw/7y7MWssc> using C. So far I'm trying to connect to pastebin using sockets & port 80, and then use a HTTP request to get the HTML on that pastebin page. I know what I have so far is probably WAY off, but here it is: ``` #include <stdio.h> #include <strin...
2016/07/28
[ "https://Stackoverflow.com/questions/38648012", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6651883/" ]
Fixed, i needed to set add ``` serverAddr.sin_family = AF_INET; ``` and bzero serverAddr, and also my HTTP request was wrong, it had an extra /r/n and spaces, like @immibis said. Corrected: ``` sprintf(request, "GET %s HTTP/1.1\r\nHost: %s\r\n\r\n", url, host); ```
You are getting the pointer returned by gethostbyname() but you weren't doing anything with it. You need to populate the sockaddr\_in with the address, domain and port. This works...but now you need to worry about obtaining the response... ``` #include <stdio.h> #include <string.h> #include <stdlib.h> #include <sys/...
20,748,295
I am trying to generate a datafile as downlaod of a table, which is possiby in fixed format. I already have the SQL ready. **Example:** ``` SELECT RPAD(ORGANIZATION_ID,10)||RPAD(ORGANIZATION_NAME,100)||RPAD(EMPLOYEE_COUNT,100) FROM MY_ORGANIZATION_STATE; ``` I run it in a SQL Developer, and export into Excel. for ...
2013/12/23
[ "https://Stackoverflow.com/questions/20748295", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3129841/" ]
Actually, I am able to recreate your issue easily. It happens when the column text is lesser. when i issue exact text size, the layout is size, and I am seeing the text inside the spooled text has tab characters instead if spaces. The pattern is not consistent too. I just researched with available command, and I found....
Actually i have this kind of problem with sqlplus. After i have fixed it i would like to recommend you to try with this format of sqlplus. 1. SET TRIMSPOOL ON; 2. SET TAB OFF; Due to the error , Because it is about the spool issue. So we just take the format of the trimspool on.
1,405,914
How do I find the range of these logarithmic functions? \begin{align} & \ln(3x^2 -4x +5), \\ & \log\_3(5+4x-x^2). \end{align} how should I approach questions like this ? What I did: I found out the roots of quadratic: i.e. $(5-x)(1+x) >0$ so $(x-5)(1+x) <0$ so it lies between $-1$ and $5$, and then I took log on both ...
2015/08/22
[ "https://math.stackexchange.com/questions/1405914", "https://math.stackexchange.com", "https://math.stackexchange.com/users/263684/" ]
You can view the fact that as $x\to 5$ or $x\to -1$ the functional value is becoming larger and larger i.e. for $\ln(3x^2−4x+5)$ range set is unbounded. So, also the function is continuous on $(-1,5)$ so there must be a point in the interval where the functional value is the smallest. Let $f(x)=\ln(3x^2−4x+5)$ $$f'...
Hint: In the reals $\log\_{b}(p(x))$ is not defined when $p(x) \leq 0$. Where $p(x)$ is a polynomial.
1,405,914
How do I find the range of these logarithmic functions? \begin{align} & \ln(3x^2 -4x +5), \\ & \log\_3(5+4x-x^2). \end{align} how should I approach questions like this ? What I did: I found out the roots of quadratic: i.e. $(5-x)(1+x) >0$ so $(x-5)(1+x) <0$ so it lies between $-1$ and $5$, and then I took log on both ...
2015/08/22
[ "https://math.stackexchange.com/questions/1405914", "https://math.stackexchange.com", "https://math.stackexchange.com/users/263684/" ]
You can only take a logarithm of a number greater than zero. So you need $3x^2-4x+5 > 0$ in the first case. Completing the square give you $\left(x-\frac{2}{3}\right)^2+\frac{11}9$. We see that the quadratic is always greater than $\frac{11}{9}$ and goes to infinity. Therefore the range is $[\ln\left(\frac{11}{9}\righ...
You can view the fact that as $x\to 5$ or $x\to -1$ the functional value is becoming larger and larger i.e. for $\ln(3x^2−4x+5)$ range set is unbounded. So, also the function is continuous on $(-1,5)$ so there must be a point in the interval where the functional value is the smallest. Let $f(x)=\ln(3x^2−4x+5)$ $$f'...
1,405,914
How do I find the range of these logarithmic functions? \begin{align} & \ln(3x^2 -4x +5), \\ & \log\_3(5+4x-x^2). \end{align} how should I approach questions like this ? What I did: I found out the roots of quadratic: i.e. $(5-x)(1+x) >0$ so $(x-5)(1+x) <0$ so it lies between $-1$ and $5$, and then I took log on both ...
2015/08/22
[ "https://math.stackexchange.com/questions/1405914", "https://math.stackexchange.com", "https://math.stackexchange.com/users/263684/" ]
You can only take a logarithm of a number greater than zero. So you need $3x^2-4x+5 > 0$ in the first case. Completing the square give you $\left(x-\frac{2}{3}\right)^2+\frac{11}9$. We see that the quadratic is always greater than $\frac{11}{9}$ and goes to infinity. Therefore the range is $[\ln\left(\frac{11}{9}\righ...
Hint: In the reals $\log\_{b}(p(x))$ is not defined when $p(x) \leq 0$. Where $p(x)$ is a polynomial.
2,513,830
I have the below line of codes ``` $day1 = new Zend_Date('2010-03-01', 'YYYY-mm-dd'); $day2 = new Zend_Date('2010-03-05', 'YYYY-mm-dd'); $dateDiff = $day2->getDate()->get(Zend_Date::TIMESTAMP) - $day1->getDate()->get(Zend_Date::TIMESTAMP); $days = floor((($dateDiff / 60) / 60) / 24); return $days; ``` this will ...
2010/03/25
[ "https://Stackoverflow.com/questions/2513830", "https://Stackoverflow.com", "https://Stackoverflow.com/users/171995/" ]
If $date is a Zend\_Date object you can use the following: ``` if ($date->isEarlier(Zend_Date::now()->subDay(2)){ [...] } ``` or the other subXxx functions of the Zend\_Date object.
number of days between date of registration (later) and date of purchase (before) ``` // $datePurchase instanceof Zend_Date // $dateRegistration instanceof Zend_Date if($datePurchase && $dateRegistration) { $diff = $dateRegistration->sub($datePurchase)->toValue(); $days = ceil($diff/60/60/24)+1; } ```
2,513,830
I have the below line of codes ``` $day1 = new Zend_Date('2010-03-01', 'YYYY-mm-dd'); $day2 = new Zend_Date('2010-03-05', 'YYYY-mm-dd'); $dateDiff = $day2->getDate()->get(Zend_Date::TIMESTAMP) - $day1->getDate()->get(Zend_Date::TIMESTAMP); $days = floor((($dateDiff / 60) / 60) / 24); return $days; ``` this will ...
2010/03/25
[ "https://Stackoverflow.com/questions/2513830", "https://Stackoverflow.com", "https://Stackoverflow.com/users/171995/" ]
``` $firstDay = new Zend_Date('2010-02-28', 'YYYY-MM-dd'); $lastDay = new Zend_Date('2010-03-01', 'YYYY-MM-dd'); $diff = $lastDay->sub($firstDay)->toValue(); $days = ceil($diff/60/60/24) +1; ``` return $days; this gives the right answer
number of days between date of registration (later) and date of purchase (before) ``` // $datePurchase instanceof Zend_Date // $dateRegistration instanceof Zend_Date if($datePurchase && $dateRegistration) { $diff = $dateRegistration->sub($datePurchase)->toValue(); $days = ceil($diff/60/60/24)+1; } ```
2,513,830
I have the below line of codes ``` $day1 = new Zend_Date('2010-03-01', 'YYYY-mm-dd'); $day2 = new Zend_Date('2010-03-05', 'YYYY-mm-dd'); $dateDiff = $day2->getDate()->get(Zend_Date::TIMESTAMP) - $day1->getDate()->get(Zend_Date::TIMESTAMP); $days = floor((($dateDiff / 60) / 60) / 24); return $days; ``` this will ...
2010/03/25
[ "https://Stackoverflow.com/questions/2513830", "https://Stackoverflow.com", "https://Stackoverflow.com/users/171995/" ]
``` $cerimonia = new Zend_Date('your date here'); $days = $cerimonia->sub(Zend_Date::now()); $days = round($days/86400)+1; ```
number of days between date of registration (later) and date of purchase (before) ``` // $datePurchase instanceof Zend_Date // $dateRegistration instanceof Zend_Date if($datePurchase && $dateRegistration) { $diff = $dateRegistration->sub($datePurchase)->toValue(); $days = ceil($diff/60/60/24)+1; } ```
2,513,830
I have the below line of codes ``` $day1 = new Zend_Date('2010-03-01', 'YYYY-mm-dd'); $day2 = new Zend_Date('2010-03-05', 'YYYY-mm-dd'); $dateDiff = $day2->getDate()->get(Zend_Date::TIMESTAMP) - $day1->getDate()->get(Zend_Date::TIMESTAMP); $days = floor((($dateDiff / 60) / 60) / 24); return $days; ``` this will ...
2010/03/25
[ "https://Stackoverflow.com/questions/2513830", "https://Stackoverflow.com", "https://Stackoverflow.com/users/171995/" ]
``` $firstDay = new Zend_Date('2010-02-28', 'YYYY-MM-dd'); $lastDay = new Zend_Date('2010-03-01', 'YYYY-MM-dd'); $diff = $lastDay->sub($firstDay)->toValue(); $days = ceil($diff/60/60/24) +1; ``` return $days; this gives the right answer
If $date is a Zend\_Date object you can use the following: ``` if ($date->isEarlier(Zend_Date::now()->subDay(2)){ [...] } ``` or the other subXxx functions of the Zend\_Date object.
2,513,830
I have the below line of codes ``` $day1 = new Zend_Date('2010-03-01', 'YYYY-mm-dd'); $day2 = new Zend_Date('2010-03-05', 'YYYY-mm-dd'); $dateDiff = $day2->getDate()->get(Zend_Date::TIMESTAMP) - $day1->getDate()->get(Zend_Date::TIMESTAMP); $days = floor((($dateDiff / 60) / 60) / 24); return $days; ``` this will ...
2010/03/25
[ "https://Stackoverflow.com/questions/2513830", "https://Stackoverflow.com", "https://Stackoverflow.com/users/171995/" ]
``` $firstDay = new Zend_Date('2010-02-28', 'YYYY-MM-dd'); $lastDay = new Zend_Date('2010-03-01', 'YYYY-MM-dd'); $diff = $lastDay->sub($firstDay)->toValue(); $days = ceil($diff/60/60/24) +1; ``` return $days; this gives the right answer
I've extended `Zend_Date` for my own convenience functions. My solution is similar to Nisanth's, with some key differences: 1. calculate the beginning of the day for both days before comparing 2. use `round()` instead of `ceil()` 3. do not add `1` to the result Example code: ``` class My_Date extends Zend_Date { ...
2,513,830
I have the below line of codes ``` $day1 = new Zend_Date('2010-03-01', 'YYYY-mm-dd'); $day2 = new Zend_Date('2010-03-05', 'YYYY-mm-dd'); $dateDiff = $day2->getDate()->get(Zend_Date::TIMESTAMP) - $day1->getDate()->get(Zend_Date::TIMESTAMP); $days = floor((($dateDiff / 60) / 60) / 24); return $days; ``` this will ...
2010/03/25
[ "https://Stackoverflow.com/questions/2513830", "https://Stackoverflow.com", "https://Stackoverflow.com/users/171995/" ]
I've extended `Zend_Date` for my own convenience functions. My solution is similar to Nisanth's, with some key differences: 1. calculate the beginning of the day for both days before comparing 2. use `round()` instead of `ceil()` 3. do not add `1` to the result Example code: ``` class My_Date extends Zend_Date { ...
number of days between date of registration (later) and date of purchase (before) ``` // $datePurchase instanceof Zend_Date // $dateRegistration instanceof Zend_Date if($datePurchase && $dateRegistration) { $diff = $dateRegistration->sub($datePurchase)->toValue(); $days = ceil($diff/60/60/24)+1; } ```
2,513,830
I have the below line of codes ``` $day1 = new Zend_Date('2010-03-01', 'YYYY-mm-dd'); $day2 = new Zend_Date('2010-03-05', 'YYYY-mm-dd'); $dateDiff = $day2->getDate()->get(Zend_Date::TIMESTAMP) - $day1->getDate()->get(Zend_Date::TIMESTAMP); $days = floor((($dateDiff / 60) / 60) / 24); return $days; ``` this will ...
2010/03/25
[ "https://Stackoverflow.com/questions/2513830", "https://Stackoverflow.com", "https://Stackoverflow.com/users/171995/" ]
``` $firstDay = new Zend_Date('2010-02-28', 'YYYY-MM-dd'); $lastDay = new Zend_Date('2010-03-01', 'YYYY-MM-dd'); $diff = $lastDay->sub($firstDay)->toValue(); $days = ceil($diff/60/60/24) +1; ``` return $days; this gives the right answer
``` $cerimonia = new Zend_Date('your date here'); $days = $cerimonia->sub(Zend_Date::now()); $days = round($days/86400)+1; ```
2,513,830
I have the below line of codes ``` $day1 = new Zend_Date('2010-03-01', 'YYYY-mm-dd'); $day2 = new Zend_Date('2010-03-05', 'YYYY-mm-dd'); $dateDiff = $day2->getDate()->get(Zend_Date::TIMESTAMP) - $day1->getDate()->get(Zend_Date::TIMESTAMP); $days = floor((($dateDiff / 60) / 60) / 24); return $days; ``` this will ...
2010/03/25
[ "https://Stackoverflow.com/questions/2513830", "https://Stackoverflow.com", "https://Stackoverflow.com/users/171995/" ]
``` $firstDay = new Zend_Date('2010-02-28', 'YYYY-MM-dd'); $lastDay = new Zend_Date('2010-03-01', 'YYYY-MM-dd'); $diff = $lastDay->sub($firstDay)->toValue(); $days = ceil($diff/60/60/24) +1; ``` return $days; this gives the right answer
I believe the problem is in your part string. Try **YYYY-MM-dd** instead. ``` $day1 = new Zend_Date('2010-02-28', 'YYYY-MM-dd'); $day2 = new Zend_Date('2010-03-01', 'YYYY-MM-dd'); echo $day2->sub($day1)->toString(Zend_Date::DAY); ```
2,513,830
I have the below line of codes ``` $day1 = new Zend_Date('2010-03-01', 'YYYY-mm-dd'); $day2 = new Zend_Date('2010-03-05', 'YYYY-mm-dd'); $dateDiff = $day2->getDate()->get(Zend_Date::TIMESTAMP) - $day1->getDate()->get(Zend_Date::TIMESTAMP); $days = floor((($dateDiff / 60) / 60) / 24); return $days; ``` this will ...
2010/03/25
[ "https://Stackoverflow.com/questions/2513830", "https://Stackoverflow.com", "https://Stackoverflow.com/users/171995/" ]
I believe the problem is in your part string. Try **YYYY-MM-dd** instead. ``` $day1 = new Zend_Date('2010-02-28', 'YYYY-MM-dd'); $day2 = new Zend_Date('2010-03-01', 'YYYY-MM-dd'); echo $day2->sub($day1)->toString(Zend_Date::DAY); ```
I've extended `Zend_Date` for my own convenience functions. My solution is similar to Nisanth's, with some key differences: 1. calculate the beginning of the day for both days before comparing 2. use `round()` instead of `ceil()` 3. do not add `1` to the result Example code: ``` class My_Date extends Zend_Date { ...
2,513,830
I have the below line of codes ``` $day1 = new Zend_Date('2010-03-01', 'YYYY-mm-dd'); $day2 = new Zend_Date('2010-03-05', 'YYYY-mm-dd'); $dateDiff = $day2->getDate()->get(Zend_Date::TIMESTAMP) - $day1->getDate()->get(Zend_Date::TIMESTAMP); $days = floor((($dateDiff / 60) / 60) / 24); return $days; ``` this will ...
2010/03/25
[ "https://Stackoverflow.com/questions/2513830", "https://Stackoverflow.com", "https://Stackoverflow.com/users/171995/" ]
I believe the problem is in your part string. Try **YYYY-MM-dd** instead. ``` $day1 = new Zend_Date('2010-02-28', 'YYYY-MM-dd'); $day2 = new Zend_Date('2010-03-01', 'YYYY-MM-dd'); echo $day2->sub($day1)->toString(Zend_Date::DAY); ```
If $date is a Zend\_Date object you can use the following: ``` if ($date->isEarlier(Zend_Date::now()->subDay(2)){ [...] } ``` or the other subXxx functions of the Zend\_Date object.
62,143,685
How to add additional styles to window style when it already using a style like in below? ``` <Style x:Key="MyWindowStyle" TargetType="Window"> <Setter Property="Control.Background" Value="PaleGreen"/> <Setter Property="Window.Title" Value="Styled Window"/> </Style> ``` My main window is: ``...
2020/06/02
[ "https://Stackoverflow.com/questions/62143685", "https://Stackoverflow.com", "https://Stackoverflow.com/users/841330/" ]
Problem is that when you use `StaticResouce` the resource has to be initialized before the usage. In your case you have the resource inside the window therefor it is not initialized before the window is initialized. Use `DynamicResource` instead and it will work: ``` <Window x:Class="Binding.MainWindow" xmlns="h...
You can define MyWindowStyle2 and use it. ``` <Style x:Key="MyWindowStyle2" TargetType="Window" BasedOn="{StaticResource MyWindowStyle}"> <Setter Property="BorderThickness" Value="3"/> <Setter Property="BorderBrush" Value="Red"/> </Style> ``` Or [here](https://stackoverflow.com/questions/16096/how-to-apply-m...
44,296,815
I'm having a problem where Atom isn't displaying Typescript errors. Below is a screenshot of my code example in Atom. [![enter image description here](https://i.stack.imgur.com/eRHHm.png)](https://i.stack.imgur.com/eRHHm.png) And below is a screenshot of the same code in Visual Studio Code. [![enter image descriptio...
2017/06/01
[ "https://Stackoverflow.com/questions/44296815", "https://Stackoverflow.com", "https://Stackoverflow.com/users/894067/" ]
Atom requires a plugin in order to provide these errors. Install [Atom TypeScript](https://atom.io/packages/atom-typescript) (`apm install atom-typescript`) and restart Atom and the errors will automatically be displayed. If the errors are still not showing up, you may need to manually install linter in order to show ...
To get showing errors working, I had to reload Atom (on OSX) via View > Developer > Reload Window. A simple restart of Atom didn't work. After hitting "Reload Window", additional dependencies were loaded.
9,352,016
I have some shops with products on them in my MongoDB db following this data model: Shop { idShop, name, location {lat, lon}, products [] of int } If I run the following command in the mongoDB default console: > > db.shops.find({products:1, location:{$near:[41.391204,2.145381]}}).limit(300) > > > to find the ...
2012/02/19
[ "https://Stackoverflow.com/questions/9352016", "https://Stackoverflow.com", "https://Stackoverflow.com/users/959533/" ]
I dont have any experience with java driver, but it seem to me the problem is in this line ``` query2.near(Double.parseDouble(lat), Double.parseDouble(lon)); ``` Accoridng to [mongodb](http://www.mongodb.org/display/DOCS/Geospatial+Indexing#GeospatialIndexing-NewSphericalModel) documentation, > > The code assumes...
Yes, this is pretty straight forward. I have just posted an example that should walk you through the solution at <http://chuckjohnson.wordpress.com/> - see <http://chuckjohnson.wordpress.com/2012/04/02/geospatial-location-based-searches-in-mongodb-part-2-simple-searching/>
880,399
We have recently moved to a new ISP and my Windows 8.1 ThinkPad will not reliably connect to the new network. I am not having issues with any other devices, but this laptop barely works at all. It always connects, and sometimes works extremely briefly, loading, say, half a Web page before giving up. Sometimes Windows...
2015/02/20
[ "https://superuser.com/questions/880399", "https://superuser.com", "https://superuser.com/users/20503/" ]
I would 1. Try using the laptop as close as possible to the access point to see if there is some source of noise disturbing the communication 2. Load a [linux live-CD](http://www.knoppix.org/) (works out of the box on my thinkpad) onto USB stick and try using WiFi. If it works well, the problem may have to something w...
Whenever troubleshooting wireless issues, always try to determine if the issue is local to your network or with the device itself. The easiest test is to take the device to a local hot spot (public wi-fi, such as "Starbucks" or even "McDonalds" and test your connectivity. If you are still having issues, then concentra...
323,742
I got a calendaring app and a terminology question. An event that occurs just once, is a ***one-off*** If it occurs every second Monday, and/or 4th Friday of month it is ***regular*** If it happens on a random series of odd days, it is ***irregular*** But if it starts on 12-jan and runs every weekday until 3-mar an...
2016/05/05
[ "https://english.stackexchange.com/questions/323742", "https://english.stackexchange.com", "https://english.stackexchange.com/users/173795/" ]
I would use 'recurring' for this. [dictionary](http://www.dictionary.com/browse/recurring) > > recur > > > > > > > verb (used without object), recurred, recurring. > > > > > > > > > > > > 1. > > > to occur again, as an event, experience, etc. > > > 2. > > > to return to the mind: > > > The idea kept rec...
It is difficult to determine one word that conveys the exact mixture of meanings. However *['extended'](http://www.dictionary.com/browse/extended?s=t)* is an adjective that conveys the meaning of 'smeared out in time'. > > adjective > > > 1 - stretched out: *extended wires.* > > > 2- continued or prolonged: *ext...
323,742
I got a calendaring app and a terminology question. An event that occurs just once, is a ***one-off*** If it occurs every second Monday, and/or 4th Friday of month it is ***regular*** If it happens on a random series of odd days, it is ***irregular*** But if it starts on 12-jan and runs every weekday until 3-mar an...
2016/05/05
[ "https://english.stackexchange.com/questions/323742", "https://english.stackexchange.com", "https://english.stackexchange.com/users/173795/" ]
I would use 'recurring' for this. [dictionary](http://www.dictionary.com/browse/recurring) > > recur > > > > > > > verb (used without object), recurred, recurring. > > > > > > > > > > > > 1. > > > to occur again, as an event, experience, etc. > > > 2. > > > to return to the mind: > > > The idea kept rec...
If an event is set to occur within a specific period of time, that even has been **scheduled** to occur within that time frame. ``` sched·uled ˈskeˌjo͞old,-əld/ (adjective) 1. Included in or planned according to a schedule 2. Arrange or plan (an event) to take place at a particular time. ``` The museum exhibi...
323,742
I got a calendaring app and a terminology question. An event that occurs just once, is a ***one-off*** If it occurs every second Monday, and/or 4th Friday of month it is ***regular*** If it happens on a random series of odd days, it is ***irregular*** But if it starts on 12-jan and runs every weekday until 3-mar an...
2016/05/05
[ "https://english.stackexchange.com/questions/323742", "https://english.stackexchange.com", "https://english.stackexchange.com/users/173795/" ]
I would use 'recurring' for this. [dictionary](http://www.dictionary.com/browse/recurring) > > recur > > > > > > > verb (used without object), recurred, recurring. > > > > > > > > > > > > 1. > > > to occur again, as an event, experience, etc. > > > 2. > > > to return to the mind: > > > The idea kept rec...
I can't think of a one-word example, but "limited-run" seems appropriate for your use, as in "limited-run television series."