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
6,266,652
I have a drop down list on my page & want the list items to be folders from a local directory on the web server... ie.... T:\Forms T:\Manuals T:\Software Here is my code so far... ``` protected void Page_Load(object sender, EventArgs e) { DirectoryInfo di = new DirectoryInfo("C:/"); DirectoryInfo...
2011/06/07
[ "https://Stackoverflow.com/questions/6266652", "https://Stackoverflow.com", "https://Stackoverflow.com/users/636824/" ]
Check out the System.IO.DirectoryInfo and System.IO.FileInfo classes. Obviously you will only be able to read the filesystem of the web server
You can use ``` List<string> dirList=new List<string>(); DirectoryInfo[] DI = new DirectoryInfo(@"T:\Forms\").GetDirectories("*.*",SearchOption.AllDirectories ) ; foreach (DirectoryInfo D1 in DI) { dirList.Add(D1.FullName); } ``` Do that for all three directories and then databind to the list
6,266,652
I have a drop down list on my page & want the list items to be folders from a local directory on the web server... ie.... T:\Forms T:\Manuals T:\Software Here is my code so far... ``` protected void Page_Load(object sender, EventArgs e) { DirectoryInfo di = new DirectoryInfo("C:/"); DirectoryInfo...
2011/06/07
[ "https://Stackoverflow.com/questions/6266652", "https://Stackoverflow.com", "https://Stackoverflow.com/users/636824/" ]
I would suggest using such a piece of code ``` DirectoryInfo di = new DirectoryInfo(@"e:\"); ddlFolders.DataSource = di.GetDirectories(); ddlFolders.DataTextField = "Name"; ddlFolders.DataValueField = "FullName"; ddlFolders.DataBind(); ``` hth
You can use ``` List<string> dirList=new List<string>(); DirectoryInfo[] DI = new DirectoryInfo(@"T:\Forms\").GetDirectories("*.*",SearchOption.AllDirectories ) ; foreach (DirectoryInfo D1 in DI) { dirList.Add(D1.FullName); } ``` Do that for all three directories and then databind to the list
7,244,338
I'm trying to use the same media player but change the data source. Here is what I'm trying to do:  ``` private MediaPlayer mMediaPlayer; public void pickFile1() { initMediaPlayer("myfile1.mp3"); } public void pickFile2() { initMediaPlayer("myfile2.mp3"); } private void initMed...
2011/08/30
[ "https://Stackoverflow.com/questions/7244338", "https://Stackoverflow.com", "https://Stackoverflow.com/users/754559/" ]
Well, I never did get a really good answer for this. I think it might be something funny that happens in the emulator. What I have done that is working great for me, is to download the files to the external SD card and play them from there. That changes the code slightly to this: ``` String path = getExternalFilesDir(...
You declare `private String mediafile="my.mp3";` then you use `AssetFileDescriptor afd = getAssets().openFd(mediafile);` but at no point (from the code you posted) do you change the value of `mediafile`. I would recommend putting `mediafile = theNextFile;` onthe line before `afd = getAssets().openFd(mediafile);` wh...
7,244,338
I'm trying to use the same media player but change the data source. Here is what I'm trying to do:  ``` private MediaPlayer mMediaPlayer; public void pickFile1() { initMediaPlayer("myfile1.mp3"); } public void pickFile2() { initMediaPlayer("myfile2.mp3"); } private void initMed...
2011/08/30
[ "https://Stackoverflow.com/questions/7244338", "https://Stackoverflow.com", "https://Stackoverflow.com/users/754559/" ]
I've actually had this same problem with assets today, and I know the fix. The problem is that the assets are stored as one big chunk of data rather than actually as a bunch of individual files on a real file system somewhere. So, when you get an `assetfiledescriptor`, it points both to a file, but also has an offset ...
You declare `private String mediafile="my.mp3";` then you use `AssetFileDescriptor afd = getAssets().openFd(mediafile);` but at no point (from the code you posted) do you change the value of `mediafile`. I would recommend putting `mediafile = theNextFile;` onthe line before `afd = getAssets().openFd(mediafile);` wh...
7,244,338
I'm trying to use the same media player but change the data source. Here is what I'm trying to do:  ``` private MediaPlayer mMediaPlayer; public void pickFile1() { initMediaPlayer("myfile1.mp3"); } public void pickFile2() { initMediaPlayer("myfile2.mp3"); } private void initMed...
2011/08/30
[ "https://Stackoverflow.com/questions/7244338", "https://Stackoverflow.com", "https://Stackoverflow.com/users/754559/" ]
Make sure to stop and reset mediaplayer before changing datasource. On more important thing when you stop it calls > > onCompletion > > > .. So do check what you are doing in this method. Then call ``` mplayer.setDataSource(audioPath); mplayer.setOnPreparedListener(this); mplayer.prepareAsync(); ```
You declare `private String mediafile="my.mp3";` then you use `AssetFileDescriptor afd = getAssets().openFd(mediafile);` but at no point (from the code you posted) do you change the value of `mediafile`. I would recommend putting `mediafile = theNextFile;` onthe line before `afd = getAssets().openFd(mediafile);` wh...
7,244,338
I'm trying to use the same media player but change the data source. Here is what I'm trying to do:  ``` private MediaPlayer mMediaPlayer; public void pickFile1() { initMediaPlayer("myfile1.mp3"); } public void pickFile2() { initMediaPlayer("myfile2.mp3"); } private void initMed...
2011/08/30
[ "https://Stackoverflow.com/questions/7244338", "https://Stackoverflow.com", "https://Stackoverflow.com/users/754559/" ]
I've actually had this same problem with assets today, and I know the fix. The problem is that the assets are stored as one big chunk of data rather than actually as a bunch of individual files on a real file system somewhere. So, when you get an `assetfiledescriptor`, it points both to a file, but also has an offset ...
Well, I never did get a really good answer for this. I think it might be something funny that happens in the emulator. What I have done that is working great for me, is to download the files to the external SD card and play them from there. That changes the code slightly to this: ``` String path = getExternalFilesDir(...
7,244,338
I'm trying to use the same media player but change the data source. Here is what I'm trying to do:  ``` private MediaPlayer mMediaPlayer; public void pickFile1() { initMediaPlayer("myfile1.mp3"); } public void pickFile2() { initMediaPlayer("myfile2.mp3"); } private void initMed...
2011/08/30
[ "https://Stackoverflow.com/questions/7244338", "https://Stackoverflow.com", "https://Stackoverflow.com/users/754559/" ]
Make sure to stop and reset mediaplayer before changing datasource. On more important thing when you stop it calls > > onCompletion > > > .. So do check what you are doing in this method. Then call ``` mplayer.setDataSource(audioPath); mplayer.setOnPreparedListener(this); mplayer.prepareAsync(); ```
Well, I never did get a really good answer for this. I think it might be something funny that happens in the emulator. What I have done that is working great for me, is to download the files to the external SD card and play them from there. That changes the code slightly to this: ``` String path = getExternalFilesDir(...
7,244,338
I'm trying to use the same media player but change the data source. Here is what I'm trying to do:  ``` private MediaPlayer mMediaPlayer; public void pickFile1() { initMediaPlayer("myfile1.mp3"); } public void pickFile2() { initMediaPlayer("myfile2.mp3"); } private void initMed...
2011/08/30
[ "https://Stackoverflow.com/questions/7244338", "https://Stackoverflow.com", "https://Stackoverflow.com/users/754559/" ]
Make sure to stop and reset mediaplayer before changing datasource. On more important thing when you stop it calls > > onCompletion > > > .. So do check what you are doing in this method. Then call ``` mplayer.setDataSource(audioPath); mplayer.setOnPreparedListener(this); mplayer.prepareAsync(); ```
I've actually had this same problem with assets today, and I know the fix. The problem is that the assets are stored as one big chunk of data rather than actually as a bunch of individual files on a real file system somewhere. So, when you get an `assetfiledescriptor`, it points both to a file, but also has an offset ...
40,153,230
how can i replace value inside ng-repeat. ``` <div ng-repeat="item in test"> <input type="text" data-ng-model="item.qty"> </div> $scope.test = [ {"InventoryItemID":78689,"Location":"My Location",qty:"2"}, {"InventoryItemID":78689,"Location":"My Location",qty:"1"} ] ``` now i have to replace th...
2016/10/20
[ "https://Stackoverflow.com/questions/40153230", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3482007/" ]
Try this.this is solve your problem <http://javapapers.com/android/android-searchview-action-bar-tutorial/>
``` <RelativeLayout> <SearchView> <RecyclerView> </RelativeLayout> ```
63,894,578
I have list of Objects ``` class Product{ String productName; int mfgYear; int expYear; } int testYear = 2019; List<Product> productList = getProductList(); ``` I have list of products here. Have to iterate each one of the Product from the list and get the `List<String> productName` that lies in the range...
2020/09/15
[ "https://Stackoverflow.com/questions/63894578", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1712810/" ]
You can write as following: ``` int givenYear = 2019; List<String> productNames = products.stream() .filter(p -> p.mfgYear <= givenYear && givenYear <= p.expYear) .map(Product::name) .collect(Collectors.toList()); // It ...
``` List<String> process(List<Product> productList) { return productList.stream() .filter(this::isWithinRange) .map(Product::getProductName) .collect(Collectors.toList()); } boolean isWithinRange(Product product) { return product.mfgYear <= 2019 && product.expYear <= 2019; }...
19,846,406
I am making a pentaho transformation and using a table input. The condition is that the name of the table will be passed dynamically as an argument. So the table input has the sql: ``` select * from ? ``` And this table input takes the input from a `Get Variables` step where i have defined a varibale called `'table_...
2013/11/07
[ "https://Stackoverflow.com/questions/19846406", "https://Stackoverflow.com", "https://Stackoverflow.com/users/454671/" ]
To set that address, use a cast like ``` const long* address = (const long*) 0x0000002; // C style ``` or ``` const long* address = reinterpret_cast<const long*>(0x000002); // C++ style ``` BTW, on most systems 0x0000002 is not a valid address (in the usual virtual address space of applications). See wikipa...
You have the address expressed as an integer. You need to cast it to a pointer of the appropriate type: ``` const long *address = reinterpret_cast<const long *>(0x00000002); ``` And you need to perform that cast in standard C++. I'm not sure why you think that the cast can be omitted in standard C++. Of course, whe...
9,268,815
I'm trying to use Scheme in a distributed system. The idea is that one process would evaluate some expressions and pass it on to another process to finish. Example: ``` (do-stuff (f1 x) (f2 x)) ``` would evaluate to ``` (do-stuff res1 (f2 x)) ``` in the first process. This process passes the expression as a stri...
2012/02/13
[ "https://Stackoverflow.com/questions/9268815", "https://Stackoverflow.com", "https://Stackoverflow.com/users/30698/" ]
As [Aslan986](https://stackoverflow.com/users/724395/aslan986) suggested you need support for full continuations. Unfortunately Ironscheme does not support full continuations but only escape continuations, which go the call stack up. See the [known limitations](http://ironscheme.codeplex.com/documentation) of Ironschem...
it's not a real answer, but just an hint. Have you tried with continuations? [Here](http://en.wikipedia.org/wiki/Call-with-current-continuation) I think the can do what you need.
263,092
I'm trying to build a simple low-power water level alarm such that it could run continuously for at least 4 months on just 3x AA batteries. I've found this schematic which uses the 555 timer: [![enter image description here](https://i.stack.imgur.com/hmYaY.jpg)](https://i.stack.imgur.com/hmYaY.jpg) However, the 555 t...
2016/10/12
[ "https://electronics.stackexchange.com/questions/263092", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/80217/" ]
I assume that you are using BLE or similar. Be aware that RSSI is a very blunt instrument indeed and needs both understanding and a degree of magic to work well. There is only so much magic available in an office building and if you expect consistent fine precision you will be disappointed. If working in air (e...
If using a well designed WiFi receiver such as in Laptops, there is a Windows App ( get WiFiInspector-Setup-1.2.1.4.exe ) that will display WiFi signal in 1dB resolution with stripchart or numeric display. Then using **Friis Loss** to define inverse squared Distance losses in RF, one can make a reasonable conversion f...
263,092
I'm trying to build a simple low-power water level alarm such that it could run continuously for at least 4 months on just 3x AA batteries. I've found this schematic which uses the 555 timer: [![enter image description here](https://i.stack.imgur.com/hmYaY.jpg)](https://i.stack.imgur.com/hmYaY.jpg) However, the 555 t...
2016/10/12
[ "https://electronics.stackexchange.com/questions/263092", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/80217/" ]
I assume that you are using BLE or similar. Be aware that RSSI is a very blunt instrument indeed and needs both understanding and a degree of magic to work well. There is only so much magic available in an office building and if you expect consistent fine precision you will be disappointed. If working in air (e...
If you want to calculate the path loss exponent 'n' you would first need to train the linear or straight line model. You can do this by determining the path loss for a range of distances within the region of interest. The path loss exponent can then be determined by fitting a straight line to the distance vs path loss ...
263,092
I'm trying to build a simple low-power water level alarm such that it could run continuously for at least 4 months on just 3x AA batteries. I've found this schematic which uses the 555 timer: [![enter image description here](https://i.stack.imgur.com/hmYaY.jpg)](https://i.stack.imgur.com/hmYaY.jpg) However, the 555 t...
2016/10/12
[ "https://electronics.stackexchange.com/questions/263092", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/80217/" ]
If using a well designed WiFi receiver such as in Laptops, there is a Windows App ( get WiFiInspector-Setup-1.2.1.4.exe ) that will display WiFi signal in 1dB resolution with stripchart or numeric display. Then using **Friis Loss** to define inverse squared Distance losses in RF, one can make a reasonable conversion f...
If you want to calculate the path loss exponent 'n' you would first need to train the linear or straight line model. You can do this by determining the path loss for a range of distances within the region of interest. The path loss exponent can then be determined by fitting a straight line to the distance vs path loss ...
11,229,778
Problem: When I run my tests, I get the following message in the command prompt ``` Started ChromeDriver port=9515 version=21.0.1180.4 log=C:\Users\jhomer\Desktop\Workspace\WebAutomationTesting\Tests\chromedriver.log ``` Chrome then starts, after which I get a windows error message stating the chromedriver has stopp...
2012/06/27
[ "https://Stackoverflow.com/questions/11229778", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1486119/" ]
Const-conversion is covered by section 6.5.16.1 (1) of the standard: > > * both operands are pointers to qualified or unqualified versions of compatible types, > and the type pointed to by the left has all the qualifiers of the type pointed to by the > right; > > > In this case it looks like `T` is `char [6]` and ...
Actually the reasons are quite similar (char \*\* vs. pointer of arrays). For what you are trying to do, the following would suffice (and it works): ``` void fun(const char *p) { printf("%s", p); } int main(int argc, char *argv[]) { char a[6] = "hello"; char *c; c = a; fun(c); } ``` With what...
11,229,778
Problem: When I run my tests, I get the following message in the command prompt ``` Started ChromeDriver port=9515 version=21.0.1180.4 log=C:\Users\jhomer\Desktop\Workspace\WebAutomationTesting\Tests\chromedriver.log ``` Chrome then starts, after which I get a windows error message stating the chromedriver has stopp...
2012/06/27
[ "https://Stackoverflow.com/questions/11229778", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1486119/" ]
It is just a quirk of C language specification. For another example, the `char **` to `const char *const *` conversion is also safe from the const-correctness point of view, yet it is prohibited in C. This quirk of const-correctness rules was "fixed" in C++ language, but C continues to stick to its original specifica...
Const-conversion is covered by section 6.5.16.1 (1) of the standard: > > * both operands are pointers to qualified or unqualified versions of compatible types, > and the type pointed to by the left has all the qualifiers of the type pointed to by the > right; > > > In this case it looks like `T` is `char [6]` and ...
11,229,778
Problem: When I run my tests, I get the following message in the command prompt ``` Started ChromeDriver port=9515 version=21.0.1180.4 log=C:\Users\jhomer\Desktop\Workspace\WebAutomationTesting\Tests\chromedriver.log ``` Chrome then starts, after which I get a windows error message stating the chromedriver has stopp...
2012/06/27
[ "https://Stackoverflow.com/questions/11229778", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1486119/" ]
It is just a quirk of C language specification. For another example, the `char **` to `const char *const *` conversion is also safe from the const-correctness point of view, yet it is prohibited in C. This quirk of const-correctness rules was "fixed" in C++ language, but C continues to stick to its original specifica...
Actually the reasons are quite similar (char \*\* vs. pointer of arrays). For what you are trying to do, the following would suffice (and it works): ``` void fun(const char *p) { printf("%s", p); } int main(int argc, char *argv[]) { char a[6] = "hello"; char *c; c = a; fun(c); } ``` With what...
9,717,159
Could an iOS app get the iTunes link of itself? Is there an API for this?
2012/03/15
[ "https://Stackoverflow.com/questions/9717159", "https://Stackoverflow.com", "https://Stackoverflow.com/users/41948/" ]
You way use iTunes Search API to look up your and other apps on the App Store. Docs: <http://www.apple.com/itunes/affiliates/resources/documentation/itunes-store-web-service-search-api.html> Example: <http://itunes.apple.com/search?media=software&country=us&term=raining%20weather> iTunes may return more then one res...
Until your app is approved and published for the first time you cannot get the app store link. I would recommend using bit.ly shorturl with a random link in your app. Once the app is approved you can change the bit.ly destination to the app store link.
9,717,159
Could an iOS app get the iTunes link of itself? Is there an API for this?
2012/03/15
[ "https://Stackoverflow.com/questions/9717159", "https://Stackoverflow.com", "https://Stackoverflow.com/users/41948/" ]
Here is the answer. 1. The app requests <http://itunes.apple.com/lookup?bundleId=com.clickgamer.AngryBirds> 2. Find the `"version": "2.1.0"` and `"trackId": 343200656` in the JSON response. Warning: This API is undocumented, Apple could change it without notice. References: [1] <https://github.com/nicklockwood/iVer...
You way use iTunes Search API to look up your and other apps on the App Store. Docs: <http://www.apple.com/itunes/affiliates/resources/documentation/itunes-store-web-service-search-api.html> Example: <http://itunes.apple.com/search?media=software&country=us&term=raining%20weather> iTunes may return more then one res...
9,717,159
Could an iOS app get the iTunes link of itself? Is there an API for this?
2012/03/15
[ "https://Stackoverflow.com/questions/9717159", "https://Stackoverflow.com", "https://Stackoverflow.com/users/41948/" ]
Here is the answer. 1. The app requests <http://itunes.apple.com/lookup?bundleId=com.clickgamer.AngryBirds> 2. Find the `"version": "2.1.0"` and `"trackId": 343200656` in the JSON response. Warning: This API is undocumented, Apple could change it without notice. References: [1] <https://github.com/nicklockwood/iVer...
Until your app is approved and published for the first time you cannot get the app store link. I would recommend using bit.ly shorturl with a random link in your app. Once the app is approved you can change the bit.ly destination to the app store link.
29,748
Recently saw a video by a nurse swinging a baby probably under 1 year holding baby's legs. Is it safe to lift 7-month-old girl baby using the legs if the baby enjoys?
2017/04/14
[ "https://parenting.stackexchange.com/questions/29748", "https://parenting.stackexchange.com", "https://parenting.stackexchange.com/users/27334/" ]
This depends somewhat on the baby's age and whether the baby has any problems with his hips. If a baby is cruising (standing holding on to furniture and taking steps this way), I don't think short periods of gentle upside down swinging is harmful; obviously, don't repeat if the baby isn't enjoying it. I would also add ...
The biggest risk I see is hitting the head on something (if swinging) or dropping the baby (head/neck injury). You might think you would never do that... but accidents do happen. Imagine you're holding her close to your face and you suddenly get a stream of vomit coming your way. It could be reflex to put her down a bi...
21,423,965
a little help here. I'm so confused and have done so many variations of converting String array into int array. I get numbers from a file then tokenize it. However, I get a NumberFormatException and a lot of errors when trying to convert the array. Any idea? Here's my code below: ``` int[] intarray=new int[token.len...
2014/01/29
[ "https://Stackoverflow.com/questions/21423965", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2165940/" ]
Probably `str` doesn't represent an `int`. See the [docs](http://docs.oracle.com/javase/7/docs/api/java/lang/Integer.html#parseInt%28java.lang.String%29) - ... `NumberFormatException` - **if the string does not contain a parsable integer**. To know your problem, you can do the following: ``` int[] intarray=new int[to...
Hi i am fully agreed with @maroun but if you say you are passing only numeric value in token array then use the trim because sometime we do not take care of space before and after.. like if you try to convert `" 123 " to int it will throw error because of extra space` so i will suggest you to also use the **trim()**...
21,423,965
a little help here. I'm so confused and have done so many variations of converting String array into int array. I get numbers from a file then tokenize it. However, I get a NumberFormatException and a lot of errors when trying to convert the array. Any idea? Here's my code below: ``` int[] intarray=new int[token.len...
2014/01/29
[ "https://Stackoverflow.com/questions/21423965", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2165940/" ]
Probably `str` doesn't represent an `int`. See the [docs](http://docs.oracle.com/javase/7/docs/api/java/lang/Integer.html#parseInt%28java.lang.String%29) - ... `NumberFormatException` - **if the string does not contain a parsable integer**. To know your problem, you can do the following: ``` int[] intarray=new int[to...
You can get a NumberFormatException if you are reading even the spaces from your input. Please make sure that you trim your string before Integer.parseInt also check whether the string represents an integer
21,423,965
a little help here. I'm so confused and have done so many variations of converting String array into int array. I get numbers from a file then tokenize it. However, I get a NumberFormatException and a lot of errors when trying to convert the array. Any idea? Here's my code below: ``` int[] intarray=new int[token.len...
2014/01/29
[ "https://Stackoverflow.com/questions/21423965", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2165940/" ]
Probably `str` doesn't represent an `int`. See the [docs](http://docs.oracle.com/javase/7/docs/api/java/lang/Integer.html#parseInt%28java.lang.String%29) - ... `NumberFormatException` - **if the string does not contain a parsable integer**. To know your problem, you can do the following: ``` int[] intarray=new int[to...
I face the same problem but in my case string contains only number.and if your token contains only number value then you can try with int[] intarray=new int[token.length]; int i=0; for (String str : token) { intarray[i++] = Integer.valueOf(str); }
21,423,965
a little help here. I'm so confused and have done so many variations of converting String array into int array. I get numbers from a file then tokenize it. However, I get a NumberFormatException and a lot of errors when trying to convert the array. Any idea? Here's my code below: ``` int[] intarray=new int[token.len...
2014/01/29
[ "https://Stackoverflow.com/questions/21423965", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2165940/" ]
Probably `str` doesn't represent an `int`. See the [docs](http://docs.oracle.com/javase/7/docs/api/java/lang/Integer.html#parseInt%28java.lang.String%29) - ... `NumberFormatException` - **if the string does not contain a parsable integer**. To know your problem, you can do the following: ``` int[] intarray=new int[to...
The problem is in the way you're getting the strings from your file. Try this function to get your array of strings: ``` String[] getTokens(String filename) { try { String line; StringBuilder fileInAStringBuilder = new StringBuilder(); BufferedReader fileReader = new BufferedReader(new Fil...
21,423,965
a little help here. I'm so confused and have done so many variations of converting String array into int array. I get numbers from a file then tokenize it. However, I get a NumberFormatException and a lot of errors when trying to convert the array. Any idea? Here's my code below: ``` int[] intarray=new int[token.len...
2014/01/29
[ "https://Stackoverflow.com/questions/21423965", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2165940/" ]
The best way is to make sure your `str` represent `ints` only, by removing all non-digit character: ``` for (String str : token){ if(str.replaceAll("\\D","").length()>0) intarray[i++] = Integer.parseInt(str.replaceAll("\\D","")); } ``` By the way, if `white-spaces` is the only possible non-digit characte...
Hi i am fully agreed with @maroun but if you say you are passing only numeric value in token array then use the trim because sometime we do not take care of space before and after.. like if you try to convert `" 123 " to int it will throw error because of extra space` so i will suggest you to also use the **trim()**...
21,423,965
a little help here. I'm so confused and have done so many variations of converting String array into int array. I get numbers from a file then tokenize it. However, I get a NumberFormatException and a lot of errors when trying to convert the array. Any idea? Here's my code below: ``` int[] intarray=new int[token.len...
2014/01/29
[ "https://Stackoverflow.com/questions/21423965", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2165940/" ]
The best way is to make sure your `str` represent `ints` only, by removing all non-digit character: ``` for (String str : token){ if(str.replaceAll("\\D","").length()>0) intarray[i++] = Integer.parseInt(str.replaceAll("\\D","")); } ``` By the way, if `white-spaces` is the only possible non-digit characte...
You can get a NumberFormatException if you are reading even the spaces from your input. Please make sure that you trim your string before Integer.parseInt also check whether the string represents an integer
21,423,965
a little help here. I'm so confused and have done so many variations of converting String array into int array. I get numbers from a file then tokenize it. However, I get a NumberFormatException and a lot of errors when trying to convert the array. Any idea? Here's my code below: ``` int[] intarray=new int[token.len...
2014/01/29
[ "https://Stackoverflow.com/questions/21423965", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2165940/" ]
The best way is to make sure your `str` represent `ints` only, by removing all non-digit character: ``` for (String str : token){ if(str.replaceAll("\\D","").length()>0) intarray[i++] = Integer.parseInt(str.replaceAll("\\D","")); } ``` By the way, if `white-spaces` is the only possible non-digit characte...
I face the same problem but in my case string contains only number.and if your token contains only number value then you can try with int[] intarray=new int[token.length]; int i=0; for (String str : token) { intarray[i++] = Integer.valueOf(str); }
21,423,965
a little help here. I'm so confused and have done so many variations of converting String array into int array. I get numbers from a file then tokenize it. However, I get a NumberFormatException and a lot of errors when trying to convert the array. Any idea? Here's my code below: ``` int[] intarray=new int[token.len...
2014/01/29
[ "https://Stackoverflow.com/questions/21423965", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2165940/" ]
The best way is to make sure your `str` represent `ints` only, by removing all non-digit character: ``` for (String str : token){ if(str.replaceAll("\\D","").length()>0) intarray[i++] = Integer.parseInt(str.replaceAll("\\D","")); } ``` By the way, if `white-spaces` is the only possible non-digit characte...
The problem is in the way you're getting the strings from your file. Try this function to get your array of strings: ``` String[] getTokens(String filename) { try { String line; StringBuilder fileInAStringBuilder = new StringBuilder(); BufferedReader fileReader = new BufferedReader(new Fil...
7,577,473
I am pretty new to .Net. In classes I have seen objects as IComparer, IEnumerable etc. Could some one explain what does these stand for? Thanks for your help.
2011/09/28
[ "https://Stackoverflow.com/questions/7577473", "https://Stackoverflow.com", "https://Stackoverflow.com/users/968179/" ]
They are interfaces. An interface ensures that an object has certain methods, regardless of it's class. They are useful when you have code that requires a few common methods, but doesn't need to know all of the details of the class. `Object()`, `System.Collections.ArrayList` and `System.Collections.Queue` all implemen...
These are interfaces. The "I" usually denotes this. These contain method contracts that any class implementing the specific interface must implement. In other words, if you have a class that implements IEnumerable then you need to have the methods in your class that are contained in the interface. Interfaces (and obje...
7,577,473
I am pretty new to .Net. In classes I have seen objects as IComparer, IEnumerable etc. Could some one explain what does these stand for? Thanks for your help.
2011/09/28
[ "https://Stackoverflow.com/questions/7577473", "https://Stackoverflow.com", "https://Stackoverflow.com/users/968179/" ]
They are interfaces. An interface ensures that an object has certain methods, regardless of it's class. They are useful when you have code that requires a few common methods, but doesn't need to know all of the details of the class. `Object()`, `System.Collections.ArrayList` and `System.Collections.Queue` all implemen...
I would start by looking into the idea of an [interface](http://msdn.microsoft.com/en-us/library/87d83y5b%28v=vs.80%29.aspx) since these are both interfaces as is evidenced by their [naming conventions](http://msdn.microsoft.com/en-us/library/8bc1fexb%28v=vs.71%29.aspx). It would require a potentially long-winded answe...
7,577,473
I am pretty new to .Net. In classes I have seen objects as IComparer, IEnumerable etc. Could some one explain what does these stand for? Thanks for your help.
2011/09/28
[ "https://Stackoverflow.com/questions/7577473", "https://Stackoverflow.com", "https://Stackoverflow.com/users/968179/" ]
They are interfaces. An interface ensures that an object has certain methods, regardless of it's class. They are useful when you have code that requires a few common methods, but doesn't need to know all of the details of the class. `Object()`, `System.Collections.ArrayList` and `System.Collections.Queue` all implemen...
ICompare is for comparing stuffs. classes that related to sorting/comparing(obviously) may implement this. IEnumerable is for collection, listing, linq stuffs.
1,907,504
I've run into reoccuring problem for which I haven't found any good examples or patterns. I have one core service that performs all heavy datasbase operations and that sends results to different front ends (html, silverlight/flash, web services etc). One of the service operation is "GetDocuments", which provides a li...
2009/12/15
[ "https://Stackoverflow.com/questions/1907504", "https://Stackoverflow.com", "https://Stackoverflow.com/users/112966/" ]
In case anybody gets here looking for an answer to this question, you can follow it here: [Groups not updated on Roster from Database using custom DB](http://www.igniterealtime.org/community/thread/40616?tstart=0) There's a partial solution over there at the Ignite Realtime forums.
A better approach would be to use roster protocol (see [RFC 3921, section 7](http://xmpp.org/rfcs/rfc3921.html#roster)) to modify the roster, perhaps by writing a component for OpenFire. This will modify the caches in transit, as well as sending notifications to clients that are currently logged in for the user. As wel...
32,510,948
I know that plenty of questions have been asked regarding deleting a node from linked list. But my mind got stuck at a point and I am unable to clear my confusion. I have a linked list with nodes 1,2,2 in it. And I want to delete nodes of 2 from it. My code is deleting only first node of 2 not the second one. In short...
2015/09/10
[ "https://Stackoverflow.com/questions/32510948", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5280547/" ]
In below piece of code, after deleting, your temp is not pointing to next node. So, once you delete first entry of "2" your loop stops. ``` if(temp->data == key) { prev->next = temp->next; temp = 0; delete temp; } ``` Try doing below in IF block. ``` itemToDelet...
You have a few problems in your code. If first node equal '2' - you delete only first node. And why do you allocate memory for `Node *prev`? And you have memory leak (see comments). You can try this code: ``` void LinkedList::Delete(int key) { if (head == 0) return; Node* prev = 0; Node* cur = he...
32,510,948
I know that plenty of questions have been asked regarding deleting a node from linked list. But my mind got stuck at a point and I am unable to clear my confusion. I have a linked list with nodes 1,2,2 in it. And I want to delete nodes of 2 from it. My code is deleting only first node of 2 not the second one. In short...
2015/09/10
[ "https://Stackoverflow.com/questions/32510948", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5280547/" ]
In below piece of code, after deleting, your temp is not pointing to next node. So, once you delete first entry of "2" your loop stops. ``` if(temp->data == key) { prev->next = temp->next; temp = 0; delete temp; } ``` Try doing below in IF block. ``` itemToDelet...
I have written in Turbo C++ Compiler. It is working very correctly. ``` //start deleteEnd code void deleteEnd() { if (first == NULL) { cout<<"No list Available"; return; } next = first; while (next->add != NULL) { cur = next; next = next->add; } cur->add=...
32,510,948
I know that plenty of questions have been asked regarding deleting a node from linked list. But my mind got stuck at a point and I am unable to clear my confusion. I have a linked list with nodes 1,2,2 in it. And I want to delete nodes of 2 from it. My code is deleting only first node of 2 not the second one. In short...
2015/09/10
[ "https://Stackoverflow.com/questions/32510948", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5280547/" ]
This is pretty typical C++ beginner's mistake, I bet by the time I'm done typing this answer there will be tones of answers showing you how to delete a pointer (tip: first delete, then nullify -- if you need to). For the sake of completeness, you can avoid having to check `prev` pointer and simplify the code by using ...
You have a few problems in your code. If first node equal '2' - you delete only first node. And why do you allocate memory for `Node *prev`? And you have memory leak (see comments). You can try this code: ``` void LinkedList::Delete(int key) { if (head == 0) return; Node* prev = 0; Node* cur = he...
32,510,948
I know that plenty of questions have been asked regarding deleting a node from linked list. But my mind got stuck at a point and I am unable to clear my confusion. I have a linked list with nodes 1,2,2 in it. And I want to delete nodes of 2 from it. My code is deleting only first node of 2 not the second one. In short...
2015/09/10
[ "https://Stackoverflow.com/questions/32510948", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5280547/" ]
Your code is not deleting anything because you are not going through the list. You are simply checking that the first element is equal to the key (2), but the list's first element is 1. You need to loop through the whole list if you wish to delete every node whose key == the function argument key. ``` node* current_n...
You have a few problems in your code. If first node equal '2' - you delete only first node. And why do you allocate memory for `Node *prev`? And you have memory leak (see comments). You can try this code: ``` void LinkedList::Delete(int key) { if (head == 0) return; Node* prev = 0; Node* cur = he...
32,510,948
I know that plenty of questions have been asked regarding deleting a node from linked list. But my mind got stuck at a point and I am unable to clear my confusion. I have a linked list with nodes 1,2,2 in it. And I want to delete nodes of 2 from it. My code is deleting only first node of 2 not the second one. In short...
2015/09/10
[ "https://Stackoverflow.com/questions/32510948", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5280547/" ]
You have a few problems in your code. If first node equal '2' - you delete only first node. And why do you allocate memory for `Node *prev`? And you have memory leak (see comments). You can try this code: ``` void LinkedList::Delete(int key) { if (head == 0) return; Node* prev = 0; Node* cur = he...
I have written in Turbo C++ Compiler. It is working very correctly. ``` //start deleteEnd code void deleteEnd() { if (first == NULL) { cout<<"No list Available"; return; } next = first; while (next->add != NULL) { cur = next; next = next->add; } cur->add=...
32,510,948
I know that plenty of questions have been asked regarding deleting a node from linked list. But my mind got stuck at a point and I am unable to clear my confusion. I have a linked list with nodes 1,2,2 in it. And I want to delete nodes of 2 from it. My code is deleting only first node of 2 not the second one. In short...
2015/09/10
[ "https://Stackoverflow.com/questions/32510948", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5280547/" ]
This is pretty typical C++ beginner's mistake, I bet by the time I'm done typing this answer there will be tones of answers showing you how to delete a pointer (tip: first delete, then nullify -- if you need to). For the sake of completeness, you can avoid having to check `prev` pointer and simplify the code by using ...
I have written in Turbo C++ Compiler. It is working very correctly. ``` //start deleteEnd code void deleteEnd() { if (first == NULL) { cout<<"No list Available"; return; } next = first; while (next->add != NULL) { cur = next; next = next->add; } cur->add=...
32,510,948
I know that plenty of questions have been asked regarding deleting a node from linked list. But my mind got stuck at a point and I am unable to clear my confusion. I have a linked list with nodes 1,2,2 in it. And I want to delete nodes of 2 from it. My code is deleting only first node of 2 not the second one. In short...
2015/09/10
[ "https://Stackoverflow.com/questions/32510948", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5280547/" ]
Your code is not deleting anything because you are not going through the list. You are simply checking that the first element is equal to the key (2), but the list's first element is 1. You need to loop through the whole list if you wish to delete every node whose key == the function argument key. ``` node* current_n...
I have written in Turbo C++ Compiler. It is working very correctly. ``` //start deleteEnd code void deleteEnd() { if (first == NULL) { cout<<"No list Available"; return; } next = first; while (next->add != NULL) { cur = next; next = next->add; } cur->add=...
50,342,278
I'm still a learner on PHP. I have a button, and it shall run a JavaScript after clicking it, but I want it to show an alert / pop up for users to confirm whether to continue or to abort. Can I do the function in my PHP file in the button code? ``` <TD style='text-align:left;padding:0;margin:0;'> <INPUT type='bu...
2018/05/15
[ "https://Stackoverflow.com/questions/50342278", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6766972/" ]
you need to make function and use `confirm();` ``` <TD style='text-align:left;padding:0;margin:0;'> <INPUT type='button' onmouseup="myFunction();" value='JS1'></INPUT> </TD> ``` And ``` <script> function myFunction() { confirm("Please confrim"); } </script> ```
Have you tried bootstrap modal? <https://www.w3schools.com/bootstrap/bootstrap_modal.asp> <https://getbootstrap.com/docs/4.0/components/modal/> <https://getbootstrap.com/docs/3.3/javascript/> I have provided 3 links. I think these might help you a little. Do a research and it won't be very hard. Good luck.
50,342,278
I'm still a learner on PHP. I have a button, and it shall run a JavaScript after clicking it, but I want it to show an alert / pop up for users to confirm whether to continue or to abort. Can I do the function in my PHP file in the button code? ``` <TD style='text-align:left;padding:0;margin:0;'> <INPUT type='bu...
2018/05/15
[ "https://Stackoverflow.com/questions/50342278", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6766972/" ]
you need to make function and use `confirm();` ``` <TD style='text-align:left;padding:0;margin:0;'> <INPUT type='button' onmouseup="myFunction();" value='JS1'></INPUT> </TD> ``` And ``` <script> function myFunction() { confirm("Please confrim"); } </script> ```
Writing code is not what is supposed here. But, still following pseudo code and concepts should work. Steps: 1. If you are using jQuery, bind the event of click. If you are using core Javscript, use `onclick` attribute. 2. In the `onclick` function, add a `confirmation` popup. 3. `confirm()` returns `true` if user s...
50,342,278
I'm still a learner on PHP. I have a button, and it shall run a JavaScript after clicking it, but I want it to show an alert / pop up for users to confirm whether to continue or to abort. Can I do the function in my PHP file in the button code? ``` <TD style='text-align:left;padding:0;margin:0;'> <INPUT type='bu...
2018/05/15
[ "https://Stackoverflow.com/questions/50342278", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6766972/" ]
Writing code is not what is supposed here. But, still following pseudo code and concepts should work. Steps: 1. If you are using jQuery, bind the event of click. If you are using core Javscript, use `onclick` attribute. 2. In the `onclick` function, add a `confirmation` popup. 3. `confirm()` returns `true` if user s...
Have you tried bootstrap modal? <https://www.w3schools.com/bootstrap/bootstrap_modal.asp> <https://getbootstrap.com/docs/4.0/components/modal/> <https://getbootstrap.com/docs/3.3/javascript/> I have provided 3 links. I think these might help you a little. Do a research and it won't be very hard. Good luck.
5,632
Until now, I thought 新 meant 'new' in all contexts. In class recently, our tutor showed a slide in which he used 生词 for 'new words'. My dictionary gives the meaning of 生 when used as an adjective as 'raw, uncooked, unripe'. Is there some other subtle meaning of 生 when used in this context to distinguish it from 新 - whe...
2014/01/22
[ "https://chinese.stackexchange.com/questions/5632", "https://chinese.stackexchange.com", "https://chinese.stackexchange.com/users/3844/" ]
Try a dictionary such as the excellent [汉典](http://www.zdic.net/). [生](http://www.zdic.net/z/1e/js/751F.htm) is both a common and ancient character, so it has many meanings (汉典 lists 20), although a lot of them are related. The definition you are after is this one, which means "unfamiliar": > >  11. 不熟悉的,不常见的:~疏。~客。...
新词 = new words that did not exist 生词 = words new to me (literally raw/uncooked words) They are as such because the opposition of 新(new) is 老(old)/旧(used), while for 生(raw/living), it is 熟(fully cooked). In French, also, they distinguish 'neuf' and 'nouvel' just so. Generally we make metaphor of the process of learni...
5,632
Until now, I thought 新 meant 'new' in all contexts. In class recently, our tutor showed a slide in which he used 生词 for 'new words'. My dictionary gives the meaning of 生 when used as an adjective as 'raw, uncooked, unripe'. Is there some other subtle meaning of 生 when used in this context to distinguish it from 新 - whe...
2014/01/22
[ "https://chinese.stackexchange.com/questions/5632", "https://chinese.stackexchange.com", "https://chinese.stackexchange.com/users/3844/" ]
Try a dictionary such as the excellent [汉典](http://www.zdic.net/). [生](http://www.zdic.net/z/1e/js/751F.htm) is both a common and ancient character, so it has many meanings (汉典 lists 20), although a lot of them are related. The definition you are after is this one, which means "unfamiliar": > >  11. 不熟悉的,不常见的:~疏。~客。...
新: new 生: fresh. There are many meanings of this character also. Fresh is only one of them.
5,632
Until now, I thought 新 meant 'new' in all contexts. In class recently, our tutor showed a slide in which he used 生词 for 'new words'. My dictionary gives the meaning of 生 when used as an adjective as 'raw, uncooked, unripe'. Is there some other subtle meaning of 生 when used in this context to distinguish it from 新 - whe...
2014/01/22
[ "https://chinese.stackexchange.com/questions/5632", "https://chinese.stackexchange.com", "https://chinese.stackexchange.com/users/3844/" ]
I am a Chinese. 新 means new and 生 means unfamiliar. In your daily study, a word you first see could be either 新词 (new word) or 生词 (unfamiliar word) to you. However, in public articles, 新词 usually stand for newly made word (ABSOLUTELY NEW TO EVERYONE), and 生词 stand for unfamiliar word (RELATIVELY NEW TO SOMEONE). Ho...
Try a dictionary such as the excellent [汉典](http://www.zdic.net/). [生](http://www.zdic.net/z/1e/js/751F.htm) is both a common and ancient character, so it has many meanings (汉典 lists 20), although a lot of them are related. The definition you are after is this one, which means "unfamiliar": > >  11. 不熟悉的,不常见的:~疏。~客。...
5,632
Until now, I thought 新 meant 'new' in all contexts. In class recently, our tutor showed a slide in which he used 生词 for 'new words'. My dictionary gives the meaning of 生 when used as an adjective as 'raw, uncooked, unripe'. Is there some other subtle meaning of 生 when used in this context to distinguish it from 新 - whe...
2014/01/22
[ "https://chinese.stackexchange.com/questions/5632", "https://chinese.stackexchange.com", "https://chinese.stackexchange.com/users/3844/" ]
新词 = new words that did not exist 生词 = words new to me (literally raw/uncooked words) They are as such because the opposition of 新(new) is 老(old)/旧(used), while for 生(raw/living), it is 熟(fully cooked). In French, also, they distinguish 'neuf' and 'nouvel' just so. Generally we make metaphor of the process of learni...
新: new 生: fresh. There are many meanings of this character also. Fresh is only one of them.
5,632
Until now, I thought 新 meant 'new' in all contexts. In class recently, our tutor showed a slide in which he used 生词 for 'new words'. My dictionary gives the meaning of 生 when used as an adjective as 'raw, uncooked, unripe'. Is there some other subtle meaning of 生 when used in this context to distinguish it from 新 - whe...
2014/01/22
[ "https://chinese.stackexchange.com/questions/5632", "https://chinese.stackexchange.com", "https://chinese.stackexchange.com/users/3844/" ]
I am a Chinese. 新 means new and 生 means unfamiliar. In your daily study, a word you first see could be either 新词 (new word) or 生词 (unfamiliar word) to you. However, in public articles, 新词 usually stand for newly made word (ABSOLUTELY NEW TO EVERYONE), and 生词 stand for unfamiliar word (RELATIVELY NEW TO SOMEONE). Ho...
新词 = new words that did not exist 生词 = words new to me (literally raw/uncooked words) They are as such because the opposition of 新(new) is 老(old)/旧(used), while for 生(raw/living), it is 熟(fully cooked). In French, also, they distinguish 'neuf' and 'nouvel' just so. Generally we make metaphor of the process of learni...
5,632
Until now, I thought 新 meant 'new' in all contexts. In class recently, our tutor showed a slide in which he used 生词 for 'new words'. My dictionary gives the meaning of 生 when used as an adjective as 'raw, uncooked, unripe'. Is there some other subtle meaning of 生 when used in this context to distinguish it from 新 - whe...
2014/01/22
[ "https://chinese.stackexchange.com/questions/5632", "https://chinese.stackexchange.com", "https://chinese.stackexchange.com/users/3844/" ]
I am a Chinese. 新 means new and 生 means unfamiliar. In your daily study, a word you first see could be either 新词 (new word) or 生词 (unfamiliar word) to you. However, in public articles, 新词 usually stand for newly made word (ABSOLUTELY NEW TO EVERYONE), and 生词 stand for unfamiliar word (RELATIVELY NEW TO SOMEONE). Ho...
新: new 生: fresh. There are many meanings of this character also. Fresh is only one of them.
14,591,486
I have a story board set up like this: 1. Navigation Controller --- connected to ---> View A ---> table cell segue ---> View B 2. Standalone View C, that is, there is no segue connected to it from any other view in the storyboard. I tap on a cell in View A, that automatically performs segue to View B. In View B, afte...
2013/01/29
[ "https://Stackoverflow.com/questions/14591486", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1971981/" ]
Safari 6's webkit has an older version of web audio. Try it on a nightly build, and it might be better - but yes, these are transient issues.
This is an older question but I'll answer since I've come across this before. It seems that in older Safari versions, the GainNode value was limited to 0..1. In Chrome and newer Safari versions you can assign any value (I've run FM/xmod with gain nodes at 30000, for example). I haven't found a solution to this, other t...
23,830,544
I have a Wordpress set up which requires redirection when the user enters the root of the site to a static HTML file start.html ``` http://www.myhomepage.com/ ``` Redirect to ``` http://www.myhomepage.com/start.html ``` Wordpress adds url rewrites for calls to index.php ``` <IfModule mod_rewrite.c> RewriteEngine...
2014/05/23
[ "https://Stackoverflow.com/questions/23830544", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2591411/" ]
It can be done without mod\_rewrite, with [mod\_dir](http://httpd.apache.org/docs/2.2/mod/mod_dir.html) and the [DirectoryIndex](http://httpd.apache.org/docs/2.2/mod/mod_dir.html#DirectoryIndex) Directive. ``` DirectoryIndex start.html ```
Add this line: ``` RewriteRule ^/?$ /start.html [L] ``` just after this line: ``` RewriteBase / ```
23,830,544
I have a Wordpress set up which requires redirection when the user enters the root of the site to a static HTML file start.html ``` http://www.myhomepage.com/ ``` Redirect to ``` http://www.myhomepage.com/start.html ``` Wordpress adds url rewrites for calls to index.php ``` <IfModule mod_rewrite.c> RewriteEngine...
2014/05/23
[ "https://Stackoverflow.com/questions/23830544", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2591411/" ]
Add this line: ``` RewriteRule ^/?$ /start.html [L] ``` just after this line: ``` RewriteBase / ```
In addition to @Oussama solution, as I have a form which posts to itself on the first page. Posting to start.html would not work. I added a condition so that rule only applies to GET requests. That way form post would be sent to index.php as usual. ``` RewriteCond %{REQUEST_METHOD} GET RewriteRule ^/?$ /start.html [L]...
23,830,544
I have a Wordpress set up which requires redirection when the user enters the root of the site to a static HTML file start.html ``` http://www.myhomepage.com/ ``` Redirect to ``` http://www.myhomepage.com/start.html ``` Wordpress adds url rewrites for calls to index.php ``` <IfModule mod_rewrite.c> RewriteEngine...
2014/05/23
[ "https://Stackoverflow.com/questions/23830544", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2591411/" ]
It can be done without mod\_rewrite, with [mod\_dir](http://httpd.apache.org/docs/2.2/mod/mod_dir.html) and the [DirectoryIndex](http://httpd.apache.org/docs/2.2/mod/mod_dir.html#DirectoryIndex) Directive. ``` DirectoryIndex start.html ```
In addition to @Oussama solution, as I have a form which posts to itself on the first page. Posting to start.html would not work. I added a condition so that rule only applies to GET requests. That way form post would be sent to index.php as usual. ``` RewriteCond %{REQUEST_METHOD} GET RewriteRule ^/?$ /start.html [L]...
4,559,747
Prove that $f$ differentiable at $p$ is continuous at $p$. *Note that proofs of this are readily available on the internet. My goal here is help with* my *proof.* **Proof:** Since $f$ is differentiable, there exists a function $\delta\_d: (0, \infty) \to (0, \infty)$ such that for all $\epsilon\_d > 0$, $$|h| < \delt...
2022/10/23
[ "https://math.stackexchange.com/questions/4559747", "https://math.stackexchange.com", "https://math.stackexchange.com/users/414550/" ]
Proofs of this tend to be reflections of the fact that, in order for: $$\lim\_{h\to0}\frac{f(x+h)-f(x)}{h}$$To even exist, the numerator must also tend to zero. Else you’d observe $\cdot/0$ blowup along some subsequence. Your proof can accordingly be simplified. Note that you can actually have: $$0\le|f(p+h)-f(p)|<|h|...
The definition of the differentiability at $p$ says that $$f(p + h) = f(p) + f'(p)h + o(h).$$ In comparison, the definition of continuity at $p$ says that $$f(p + h) = f(p) + o(1).$$ It is clear that $f'(p)h + o(h) = o(1)$, so differentiability implies continuity. The "it is clear" relies on the facts that $f'(p)h = o(...
4,559,747
Prove that $f$ differentiable at $p$ is continuous at $p$. *Note that proofs of this are readily available on the internet. My goal here is help with* my *proof.* **Proof:** Since $f$ is differentiable, there exists a function $\delta\_d: (0, \infty) \to (0, \infty)$ such that for all $\epsilon\_d > 0$, $$|h| < \delt...
2022/10/23
[ "https://math.stackexchange.com/questions/4559747", "https://math.stackexchange.com", "https://math.stackexchange.com/users/414550/" ]
Proofs of this tend to be reflections of the fact that, in order for: $$\lim\_{h\to0}\frac{f(x+h)-f(x)}{h}$$To even exist, the numerator must also tend to zero. Else you’d observe $\cdot/0$ blowup along some subsequence. Your proof can accordingly be simplified. Note that you can actually have: $$0\le|f(p+h)-f(p)|<|h|...
Here's how I found a simpler proof. *Please comment not only on the correctness, but on the **"how to solve it"** of finding a simpler solution.* The first step is to notice that the OP approach is more complicated than expected, and look for alternate approaches, such as moving from *definitions* (as in the OP) to *c...
41,195,196
I've been looking and looking everywhere for an example of how to get this to work appropriately. I've tried using $q.all() and it doesn't work. I can't seem to get promises to work appropriately or I'm not accessing them correctly. I'm making an API call to retrieve information about movies and I want to keep them ord...
2016/12/17
[ "https://Stackoverflow.com/questions/41195196", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2839879/" ]
Even though this topic already has it's accepted answer, this one is not true in any case. There can be situations, in which your app has all the known architectures as valid architectures, has Build Active Architecture Only to NO for Release and still getting this issue. The reason is: If your deployment target is i...
I suspect you are building the active architecture only. To fix this set `Build Active Architecture Only` to `NO` for `Release` configuration.
135,406
We tried to set the Global Search Center URL in Cental Admin -> Search Servcie Application but it seems not working. We tried to set it by PowerShell script and do an IISREST but when do a search within a site, it is still goes to \_layouts/15/osssearchresults.aspx
2015/03/17
[ "https://sharepoint.stackexchange.com/questions/135406", "https://sharepoint.stackexchange.com", "https://sharepoint.stackexchange.com/users/40563/" ]
This does it: ``` $ssa = Get-SPEnterpriseSearchServiceApplication $ssa.SearchCenterUrl = "$SearchSiteURL" #which ends /pages $ssa.Update() ``` No Site Collection settings need to be updated - only if it should display on a different search center.
How does the URL you tried to set in Central administration look like? Did you add the mandatory `"/Pages/"` to your preferred search center URL? This is the most common miss. Don't forget to update the User Profiles / Mysites search center URL after. Oh, and after this is done, you have to specify in every site coll...
135,406
We tried to set the Global Search Center URL in Cental Admin -> Search Servcie Application but it seems not working. We tried to set it by PowerShell script and do an IISREST but when do a search within a site, it is still goes to \_layouts/15/osssearchresults.aspx
2015/03/17
[ "https://sharepoint.stackexchange.com/questions/135406", "https://sharepoint.stackexchange.com", "https://sharepoint.stackexchange.com/users/40563/" ]
How does the URL you tried to set in Central administration look like? Did you add the mandatory `"/Pages/"` to your preferred search center URL? This is the most common miss. Don't forget to update the User Profiles / Mysites search center URL after. Oh, and after this is done, you have to specify in every site coll...
I had the same issue, that the global search center wasn't being picked up by the site collections when you specified a blank search center url in the site collection settings and had the "use the same results page settings as my parent" checked off. The way I've gotten this to work is by going to the pages library of ...
135,406
We tried to set the Global Search Center URL in Cental Admin -> Search Servcie Application but it seems not working. We tried to set it by PowerShell script and do an IISREST but when do a search within a site, it is still goes to \_layouts/15/osssearchresults.aspx
2015/03/17
[ "https://sharepoint.stackexchange.com/questions/135406", "https://sharepoint.stackexchange.com", "https://sharepoint.stackexchange.com/users/40563/" ]
This does it: ``` $ssa = Get-SPEnterpriseSearchServiceApplication $ssa.SearchCenterUrl = "$SearchSiteURL" #which ends /pages $ssa.Update() ``` No Site Collection settings need to be updated - only if it should display on a different search center.
I had the same issue, that the global search center wasn't being picked up by the site collections when you specified a blank search center url in the site collection settings and had the "use the same results page settings as my parent" checked off. The way I've gotten this to work is by going to the pages library of ...
18,079,421
I have a question about scope or lifetime of variables, let me explain my question with an example.The code below, I've created a local variable c and returned it. In main() function the line `a=foo()`, I think since c is a local variable and the function foo() was done, the memory cell for variable c should have been ...
2013/08/06
[ "https://Stackoverflow.com/questions/18079421", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2653020/" ]
its basically a function activation record,which will be pushed on the system stack and when your function is returning it will first copy all values to the return result area,that is nothing but a=foo(); and then it will destroy that function activation record from the system stack,I hope it would help
It is not necessary to make its value garbage. after function collapse allocated memory is getting freed but its value remain same,it does not overwrite value with another garbage value.
18,079,421
I have a question about scope or lifetime of variables, let me explain my question with an example.The code below, I've created a local variable c and returned it. In main() function the line `a=foo()`, I think since c is a local variable and the function foo() was done, the memory cell for variable c should have been ...
2013/08/06
[ "https://Stackoverflow.com/questions/18079421", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2653020/" ]
its basically a function activation record,which will be pushed on the system stack and when your function is returning it will first copy all values to the return result area,that is nothing but a=foo(); and then it will destroy that function activation record from the system stack,I hope it would help
After `foo` function returns, object `c` is destroyed. In the return statement, `c` object is evaluated and its value is returned. What you are returning is not `c` object but the value of `c`.
18,079,421
I have a question about scope or lifetime of variables, let me explain my question with an example.The code below, I've created a local variable c and returned it. In main() function the line `a=foo()`, I think since c is a local variable and the function foo() was done, the memory cell for variable c should have been ...
2013/08/06
[ "https://Stackoverflow.com/questions/18079421", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2653020/" ]
its basically a function activation record,which will be pushed on the system stack and when your function is returning it will first copy all values to the return result area,that is nothing but a=foo(); and then it will destroy that function activation record from the system stack,I hope it would help
When `return c;` it copy c to a tmporary value .And the then copy the tmporary value to a
18,079,421
I have a question about scope or lifetime of variables, let me explain my question with an example.The code below, I've created a local variable c and returned it. In main() function the line `a=foo()`, I think since c is a local variable and the function foo() was done, the memory cell for variable c should have been ...
2013/08/06
[ "https://Stackoverflow.com/questions/18079421", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2653020/" ]
its basically a function activation record,which will be pushed on the system stack and when your function is returning it will first copy all values to the return result area,that is nothing but a=foo(); and then it will destroy that function activation record from the system stack,I hope it would help
the memory of c was indeed destroyed when the function was done, but the function returned 1 and that 1 was put in `a`. the value was copied to the memory of `a`! but, for example, this next example will not save the value: ``` #include <stdio.h> int foo(int a) { int c=1; a = c; } int main() { int a = 0;...
18,079,421
I have a question about scope or lifetime of variables, let me explain my question with an example.The code below, I've created a local variable c and returned it. In main() function the line `a=foo()`, I think since c is a local variable and the function foo() was done, the memory cell for variable c should have been ...
2013/08/06
[ "https://Stackoverflow.com/questions/18079421", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2653020/" ]
its basically a function activation record,which will be pushed on the system stack and when your function is returning it will first copy all values to the return result area,that is nothing but a=foo(); and then it will destroy that function activation record from the system stack,I hope it would help
> > I think since c is a local variable and the function foo() was done, the memory cell for variable c should have been destroyed > > > Yes, this is likely what happens. But, your function returns a *value*, and in this case 1, the value of `c`. So however the variable `c` is freed, that value is returned, it...
18,079,421
I have a question about scope or lifetime of variables, let me explain my question with an example.The code below, I've created a local variable c and returned it. In main() function the line `a=foo()`, I think since c is a local variable and the function foo() was done, the memory cell for variable c should have been ...
2013/08/06
[ "https://Stackoverflow.com/questions/18079421", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2653020/" ]
its basically a function activation record,which will be pushed on the system stack and when your function is returning it will first copy all values to the return result area,that is nothing but a=foo(); and then it will destroy that function activation record from the system stack,I hope it would help
opps i misunderstood your question in my first reply. actually when you return from any function there are some rules in assembly code. so it copy value in internal register and then value of this register is copied into a.
77,848
I am trying to build a plugin to load a print composer from file, generate an atlas and export to image. So far I have been successful in loading the template and exporting it to image. I have been unable to add any of the layers in the legend (which are also in the toc) to the exported map, which results in a blank m...
2013/11/18
[ "https://gis.stackexchange.com/questions/77848", "https://gis.stackexchange.com", "https://gis.stackexchange.com/users/10415/" ]
If anyone is interested here is the code I ended up with. This will turn on/off specific layers in the table of contents (from a list of layers), load a selected composer template from file, generate an atlas and export the map. Finally, returning the table of contents to its original state. ``` def sort_toc(self): ...
Perhaps this can work on you for getting all current layers: ``` registry = QgsMapLayerRegistry.instance() layers = registry.mapLayers().values() ```
226,838
I want to deploy a "Did you know..." or "Tip of the day" application at the office. It should: * Show a dialog at login time with a random tip. * Obviously, provide some way to store my own tips. * Be easy to disable and reenable by the user itself. I'm using puppet, so I'm covered with the deployment. The tips don't...
2012/12/08
[ "https://askubuntu.com/questions/226838", "https://askubuntu.com", "https://askubuntu.com/users/83068/" ]
This sounds a lot like a graphical interface to `fortune` with a custom fortunes database. Creating the Custom Fortunes Database ===================================== 1. Create a text file containing all of the tips you want to display. Each tip should be on its own line, and there should be line containing only the ...
I ended up hacking a quick solution with Python using Python-webkit. This solution displays HTML files ``` #!/usr/bin/env python import gtk,webkit,os from random import choice win = gtk.Window() win.connect("destroy", lambda w: gtk.main_quit()) scroller = gtk.ScrolledWindow() win.add(scroller) web = webkit.WebVie...
23,397,771
I'm not so great with VHDL and I can't really see why my code won't work. I needed an NCO, found a working program and re-worked it to fit my needs, but just noticed a bug: every full cycle there is one blank cycle. ![](https://i.imgur.com/gmYXHig.jpg) The program takes step for argument (jump between next samples) ...
2014/04/30
[ "https://Stackoverflow.com/questions/23397771", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2561009/" ]
I had the exact same situation a while back while switching to YARN. Basically there was the concept of `task slots` in MRv1 and `containers` in MRv2. Both of these differ very much in how the tasks are scheduled and run on the nodes. The reason that your job is stuck is that it is unable to find/start a `container`. ...
I was facing the same issue.I added the following property to my yarn-site.xml and it solved the issue. ``` <property> <name>yarn.resourcemanager.hostname</name> <value>Hostname-of-your-RM</value> <description>The hostname of the RM.</description> </property> ``` Without the resource man...
10,116,456
I have been trying to implement a solution for cross browser rounded corners and even though the demo works in all browsers, when I try to implement it in my own code, it works in all browsers *except* IE8. Here is my CSS: ``` body { background:#ffffff url("images/bg.gif") repeat-x ; font-family:verdana,helvetica,...
2012/04/12
[ "https://Stackoverflow.com/questions/10116456", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1255168/" ]
This problem has been solved by others on stackoverflow by using CSSPIE: <http://css3pie.com/> In order for rounded-corners to display properly in IE 8, the element with the rounded-corners must have: ``` position: relative; ``` set in the css. see: [CSS rounded corners in IE8](https://stackoverflow.com/questio...
See fiddle for demo: <http://jsfiddle.net/esjzX/1/> , <http://jsfiddle.net/esjzX/1/embedded/result/> ``` Css: b.rtop, b.rbottom{display:block;background: #FFF} b.rtop b, b.rbottom b{display:block;height: 1px; overflow: hidden; background: #9BD1FA} b.r1{margin: 0 5px} b.r2{margin: 0 3px} b.r3{margin: 0 2px} b.rtop...
3,848,960
i'm ASP.NET programmer and have no experience in creating windows services. Service i need to create should send emails to our customers each specified period of time. This service should solve issue when hundreds of emails are sent at the same time and block SMTP service on the server while there are many periods of t...
2010/10/03
[ "https://Stackoverflow.com/questions/3848960", "https://Stackoverflow.com", "https://Stackoverflow.com/users/185824/" ]
I don't know why or maybe is buried in some PEP somewhere, but i do know 2 very basic "find" method for lists, and they are `array.index()` and the `in` operator. You can always make use of these 2 to find your items. (Also, re module, etc)
The "find" method for lists is `index`. I do consider the inconsistency between `string.find` and `list.index` to be unfortunate, both in name and behavior: `string.find` returns -1 when no match is found, where `list.index` raises ValueError. This could have been designed more consistently. The only irreconcilable di...
3,848,960
i'm ASP.NET programmer and have no experience in creating windows services. Service i need to create should send emails to our customers each specified period of time. This service should solve issue when hundreds of emails are sent at the same time and block SMTP service on the server while there are many periods of t...
2010/10/03
[ "https://Stackoverflow.com/questions/3848960", "https://Stackoverflow.com", "https://Stackoverflow.com/users/185824/" ]
I don't know why or maybe is buried in some PEP somewhere, but i do know 2 very basic "find" method for lists, and they are `array.index()` and the `in` operator. You can always make use of these 2 to find your items. (Also, re module, etc)
I think the rationale for not having separate 'find' and 'index' methods is they're not different enough. Both would return the same thing in the case the sought item exists in the list (this is true of the two string methods); they differ in case the sought item is not in the list/string; however you can trivially bui...
58,245,771
I am having the following problem when running or debugging apps on a device or emulator with Android Studio. The application is installed but it is not started on the device (or emulator). In the Run window I can see the following: Launching app on device. Waiting for process to come online... and after some time I ...
2019/10/05
[ "https://Stackoverflow.com/questions/58245771", "https://Stackoverflow.com", "https://Stackoverflow.com/users/501223/" ]
Hey I had this same problem recently, I tried re-starting adb server but no luck, however when I uninstalled the APK present on my device. Then everything was back to normal. When I tried to run it on a emulator which didn't have application already, it worked perfectly fine. Hope this helps :) Thank You.
When these errors occur: * Message in Run * No communication with Run (stacktraces, System.out ...) * No restart button 1. Install the newest Android Studio version 2. Try on different virtual devices, some of them are glitched
58,245,771
I am having the following problem when running or debugging apps on a device or emulator with Android Studio. The application is installed but it is not started on the device (or emulator). In the Run window I can see the following: Launching app on device. Waiting for process to come online... and after some time I ...
2019/10/05
[ "https://Stackoverflow.com/questions/58245771", "https://Stackoverflow.com", "https://Stackoverflow.com/users/501223/" ]
For me, it took marking the build as "debuggable" in the application `build.gradle` file. For example: ``` android { //... buildTypes { // ... releaseStaging { debuggable true // <- add this line signingConfig signingConfigs.release applicationIdSuffix "...
Hey I had this same problem recently, I tried re-starting adb server but no luck, however when I uninstalled the APK present on my device. Then everything was back to normal. When I tried to run it on a emulator which didn't have application already, it worked perfectly fine. Hope this helps :) Thank You.
58,245,771
I am having the following problem when running or debugging apps on a device or emulator with Android Studio. The application is installed but it is not started on the device (or emulator). In the Run window I can see the following: Launching app on device. Waiting for process to come online... and after some time I ...
2019/10/05
[ "https://Stackoverflow.com/questions/58245771", "https://Stackoverflow.com", "https://Stackoverflow.com/users/501223/" ]
For me the problem was that I accidentally removed the Launch of the Default Activity in the "Run > Edit Configurations..." option. Just insert the "Default Activity" under "Launch Options" and your application will run again on your device.
I was using debugging over Bluetooth. Giving Location permission to the WearOS app on my phone solved the problem for me. (Bluetooth scan access is restricted in the modern android versions unless fine Location permission is granted)
58,245,771
I am having the following problem when running or debugging apps on a device or emulator with Android Studio. The application is installed but it is not started on the device (or emulator). In the Run window I can see the following: Launching app on device. Waiting for process to come online... and after some time I ...
2019/10/05
[ "https://Stackoverflow.com/questions/58245771", "https://Stackoverflow.com", "https://Stackoverflow.com/users/501223/" ]
I managed to fix the problem by uninstalling Android studio, deleting all relevant files in the user folder (including gradle cached files) and installing the latest version of Android studio. The problem seems to have been fixed after several months. Note that I am now using Android Studio 4.1.
I tried most of the answers from here and on YouTube. What worked for me is updating my Android studio to the latest version; 4.0.
58,245,771
I am having the following problem when running or debugging apps on a device or emulator with Android Studio. The application is installed but it is not started on the device (or emulator). In the Run window I can see the following: Launching app on device. Waiting for process to come online... and after some time I ...
2019/10/05
[ "https://Stackoverflow.com/questions/58245771", "https://Stackoverflow.com", "https://Stackoverflow.com/users/501223/" ]
For me the problem was that I accidentally removed the Launch of the Default Activity in the "Run > Edit Configurations..." option. Just insert the "Default Activity" under "Launch Options" and your application will run again on your device.
Hey I had this same problem recently, I tried re-starting adb server but no luck, however when I uninstalled the APK present on my device. Then everything was back to normal. When I tried to run it on a emulator which didn't have application already, it worked perfectly fine. Hope this helps :) Thank You.
58,245,771
I am having the following problem when running or debugging apps on a device or emulator with Android Studio. The application is installed but it is not started on the device (or emulator). In the Run window I can see the following: Launching app on device. Waiting for process to come online... and after some time I ...
2019/10/05
[ "https://Stackoverflow.com/questions/58245771", "https://Stackoverflow.com", "https://Stackoverflow.com/users/501223/" ]
For me the problem was that I accidentally removed the Launch of the Default Activity in the "Run > Edit Configurations..." option. Just insert the "Default Activity" under "Launch Options" and your application will run again on your device.
When these errors occur: * Message in Run * No communication with Run (stacktraces, System.out ...) * No restart button 1. Install the newest Android Studio version 2. Try on different virtual devices, some of them are glitched
58,245,771
I am having the following problem when running or debugging apps on a device or emulator with Android Studio. The application is installed but it is not started on the device (or emulator). In the Run window I can see the following: Launching app on device. Waiting for process to come online... and after some time I ...
2019/10/05
[ "https://Stackoverflow.com/questions/58245771", "https://Stackoverflow.com", "https://Stackoverflow.com/users/501223/" ]
Even if I faced the timed out issue in one plus and followed steps that fixed for me. 1. Go to the respective app 2. Hold for 3 sec > App info> permissions> allow for storage>. 3. Next, go to adv settings> battery opt > check "Don't optimize."> 4. Come back and scroll down > display over other apps> enable.... Hope t...
In case it can help someone... try one of the following: 1. Make sure device is not connected the same time via data cable and wifi 2.If you are connecting through wifi, try to connect via data cable. 3.Check maybe your device has some component or anything maybe like fingerprint interfering with the connection.
58,245,771
I am having the following problem when running or debugging apps on a device or emulator with Android Studio. The application is installed but it is not started on the device (or emulator). In the Run window I can see the following: Launching app on device. Waiting for process to come online... and after some time I ...
2019/10/05
[ "https://Stackoverflow.com/questions/58245771", "https://Stackoverflow.com", "https://Stackoverflow.com/users/501223/" ]
There is a bug in the recent Android Studio release. You can revert to previous version or test it from command line.
Everything was working fine for me, when I started getting the error described in this question. So I created and started using a different virtual device for the emulator, and it didn't have the problem.
58,245,771
I am having the following problem when running or debugging apps on a device or emulator with Android Studio. The application is installed but it is not started on the device (or emulator). In the Run window I can see the following: Launching app on device. Waiting for process to come online... and after some time I ...
2019/10/05
[ "https://Stackoverflow.com/questions/58245771", "https://Stackoverflow.com", "https://Stackoverflow.com/users/501223/" ]
For me, it took marking the build as "debuggable" in the application `build.gradle` file. For example: ``` android { //... buildTypes { // ... releaseStaging { debuggable true // <- add this line signingConfig signingConfigs.release applicationIdSuffix "...
When these errors occur: * Message in Run * No communication with Run (stacktraces, System.out ...) * No restart button 1. Install the newest Android Studio version 2. Try on different virtual devices, some of them are glitched
58,245,771
I am having the following problem when running or debugging apps on a device or emulator with Android Studio. The application is installed but it is not started on the device (or emulator). In the Run window I can see the following: Launching app on device. Waiting for process to come online... and after some time I ...
2019/10/05
[ "https://Stackoverflow.com/questions/58245771", "https://Stackoverflow.com", "https://Stackoverflow.com/users/501223/" ]
Even if I faced the timed out issue in one plus and followed steps that fixed for me. 1. Go to the respective app 2. Hold for 3 sec > App info> permissions> allow for storage>. 3. Next, go to adv settings> battery opt > check "Don't optimize."> 4. Come back and scroll down > display over other apps> enable.... Hope t...
Everything was working fine for me, when I started getting the error described in this question. So I created and started using a different virtual device for the emulator, and it didn't have the problem.
8,234,708
I have a multi-module maven project made up of three sub-modules: **web**, **service** and **domain**. I use m2e and have managed to import the maven projects into Eclipse. What's more, the **service** and **domain** projects are in the **web**'s java build path and the **domain** project is in the **service**'s java ...
2011/11/22
[ "https://Stackoverflow.com/questions/8234708", "https://Stackoverflow.com", "https://Stackoverflow.com/users/536299/" ]
Define domain and service modules inside the dependency management tag in super pom. So basically add following definition inside super pom: ``` <dependencyManagement> <dependencies> <dependency> <groupId>com.bignibou</groupId> <artifactId>bignibou-domain</artifactId...
You shouldn't work with eclipses build paths. Add the service and domain to the web pom.xml dependencies. Add the domain to the pom.xml from your service. After you set up the dependencies correctly m2e will configure the build paths correctly for you.
44,205,464
I could not assign `TokenLifetimePolicy` Azure AD application policy from PowerShell. I had an error `BadRequest` : `Message: Open navigation properties are not supported on OpenTypes.Property name: 'policies` I am trying to implement token expiry time from [Configurable token lifetimes in Azure Active Directory](http...
2017/05/26
[ "https://Stackoverflow.com/questions/44205464", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1080738/" ]
I made it work by only using `New-AzureADPolicy` cmdlet and setting `-IsOrganizationDefault $true` not `$false`. The effect takes a while for you to see it. So wait for about 30 minutes to an hour (I don't know how long exactly). After that your new policy will be created and applied. Also remember that this is PowerSh...
Was the application created in B2C portal? Assuming the answer is yes, this behavior is expected: Microsoft has 2 authorization end points, V1 and V2. B2C portal creates V2 apps. The token lifetime setting from powershell probably only works against the V1 apps. There are settings on the b2c blade to change this. T...
44,205,464
I could not assign `TokenLifetimePolicy` Azure AD application policy from PowerShell. I had an error `BadRequest` : `Message: Open navigation properties are not supported on OpenTypes.Property name: 'policies` I am trying to implement token expiry time from [Configurable token lifetimes in Azure Active Directory](http...
2017/05/26
[ "https://Stackoverflow.com/questions/44205464", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1080738/" ]
I test this quite a bit for my customers. I run into issues like this every now and then due to not on the latest version of PowerShell. ``` get-module ``` Latest Version 2.0.0.114 at the moment for AzureADPreview (V2) [Instructions to download here](https://learn.microsoft.com/en-us/powershell/azure/install-adv2?vi...
Was the application created in B2C portal? Assuming the answer is yes, this behavior is expected: Microsoft has 2 authorization end points, V1 and V2. B2C portal creates V2 apps. The token lifetime setting from powershell probably only works against the V1 apps. There are settings on the b2c blade to change this. T...
44,205,464
I could not assign `TokenLifetimePolicy` Azure AD application policy from PowerShell. I had an error `BadRequest` : `Message: Open navigation properties are not supported on OpenTypes.Property name: 'policies` I am trying to implement token expiry time from [Configurable token lifetimes in Azure Active Directory](http...
2017/05/26
[ "https://Stackoverflow.com/questions/44205464", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1080738/" ]
I made it work by only using `New-AzureADPolicy` cmdlet and setting `-IsOrganizationDefault $true` not `$false`. The effect takes a while for you to see it. So wait for about 30 minutes to an hour (I don't know how long exactly). After that your new policy will be created and applied. Also remember that this is PowerSh...
I test this quite a bit for my customers. I run into issues like this every now and then due to not on the latest version of PowerShell. ``` get-module ``` Latest Version 2.0.0.114 at the moment for AzureADPreview (V2) [Instructions to download here](https://learn.microsoft.com/en-us/powershell/azure/install-adv2?vi...
291,057
How to install the varnish cache in magento2. I need setup the varnish cache in my system localhost. can anyone please guide me.
2019/09/27
[ "https://magento.stackexchange.com/questions/291057", "https://magento.stackexchange.com", "https://magento.stackexchange.com/users/55236/" ]
try this: in vendor/magento/module-customer/view/frontend/web/js/customer-data.js (about line 163) this code was added: ``` if (typeof sectionDataIds == 'string') sectionDataIds = JSON.parse(sectionDataIds); ``` the section looks like this now: ``` /** * @param {Object} sections */ updat...
Did you find a solution for this problem? i'm facing the same problem with magento 2.2.8 Thank you,
291,057
How to install the varnish cache in magento2. I need setup the varnish cache in my system localhost. can anyone please guide me.
2019/09/27
[ "https://magento.stackexchange.com/questions/291057", "https://magento.stackexchange.com", "https://magento.stackexchange.com/users/55236/" ]
I had similar problems with Magento 2.4. So I applied quality patch. More about here: [magento quality patches](https://devdocs.magento.com/guides/v2.4/comp-mgr/patching/mqp.html) In my case I applied MC-41359. Open terminal (root folder) and type: $ ./vendor/bin/magento-patches apply MC-41359, then run rm -rf var/di...
Did you find a solution for this problem? i'm facing the same problem with magento 2.2.8 Thank you,
291,057
How to install the varnish cache in magento2. I need setup the varnish cache in my system localhost. can anyone please guide me.
2019/09/27
[ "https://magento.stackexchange.com/questions/291057", "https://magento.stackexchange.com", "https://magento.stackexchange.com/users/55236/" ]
try this: in vendor/magento/module-customer/view/frontend/web/js/customer-data.js (about line 163) this code was added: ``` if (typeof sectionDataIds == 'string') sectionDataIds = JSON.parse(sectionDataIds); ``` the section looks like this now: ``` /** * @param {Object} sections */ updat...
I had similar problems with Magento 2.4. So I applied quality patch. More about here: [magento quality patches](https://devdocs.magento.com/guides/v2.4/comp-mgr/patching/mqp.html) In my case I applied MC-41359. Open terminal (root folder) and type: $ ./vendor/bin/magento-patches apply MC-41359, then run rm -rf var/di...
33,678,543
I have two numpy arrays, A and B. A conatains unique values and B is a sub-array of A. Now I am looking for a way to get the index of B's values within A. For example: ``` A = np.array([1,2,3,4,5,6,7,8,9,10]) B = np.array([1,7,10]) # I need a function fun() that: fun(A,B) >> 0,6,9 ```
2015/11/12
[ "https://Stackoverflow.com/questions/33678543", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4759209/" ]
You can use [`np.in1d`](http://docs.scipy.org/doc/numpy/reference/generated/numpy.in1d.html) with [`np.nonzero`](http://docs.scipy.org/doc/numpy/reference/generated/numpy.nonzero.html) - ``` np.nonzero(np.in1d(A,B))[0] ``` You can also use [`np.searchsorted`](http://docs.scipy.org/doc/numpy/reference/generated/numpy...
Have you tried `searchsorted`? ``` A = np.array([1,2,3,4,5,6,7,8,9,10]) B = np.array([1,7,10]) A.searchsorted(B) # array([0, 6, 9]) ```
33,678,543
I have two numpy arrays, A and B. A conatains unique values and B is a sub-array of A. Now I am looking for a way to get the index of B's values within A. For example: ``` A = np.array([1,2,3,4,5,6,7,8,9,10]) B = np.array([1,7,10]) # I need a function fun() that: fun(A,B) >> 0,6,9 ```
2015/11/12
[ "https://Stackoverflow.com/questions/33678543", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4759209/" ]
You can use [`np.in1d`](http://docs.scipy.org/doc/numpy/reference/generated/numpy.in1d.html) with [`np.nonzero`](http://docs.scipy.org/doc/numpy/reference/generated/numpy.nonzero.html) - ``` np.nonzero(np.in1d(A,B))[0] ``` You can also use [`np.searchsorted`](http://docs.scipy.org/doc/numpy/reference/generated/numpy...
Just for completeness: If the values in `A` are non negative and reasonably small: ``` lookup = np.empty((np.max(A) + 1), dtype=int) lookup[A] = np.arange(len(A)) indices = lookup[B] ```
33,678,543
I have two numpy arrays, A and B. A conatains unique values and B is a sub-array of A. Now I am looking for a way to get the index of B's values within A. For example: ``` A = np.array([1,2,3,4,5,6,7,8,9,10]) B = np.array([1,7,10]) # I need a function fun() that: fun(A,B) >> 0,6,9 ```
2015/11/12
[ "https://Stackoverflow.com/questions/33678543", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4759209/" ]
Have you tried `searchsorted`? ``` A = np.array([1,2,3,4,5,6,7,8,9,10]) B = np.array([1,7,10]) A.searchsorted(B) # array([0, 6, 9]) ```
Just for completeness: If the values in `A` are non negative and reasonably small: ``` lookup = np.empty((np.max(A) + 1), dtype=int) lookup[A] = np.arange(len(A)) indices = lookup[B] ```
20,070,186
I'm using this code to check if a user is granted in my Symfony application : ``` $securityContext = $this->container->get('security.context'); if($securityContext->isGranted('IS_AUTHENTICATED_REMEMBERED') ){ $user = $this->get('security.context')->getToken()->getUser()->getId(); } else { return $this->r...
2013/11/19
[ "https://Stackoverflow.com/questions/20070186", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
[JMSSecurityExtraBundle](https://packagist.org/packages/jms/security-extra-bundle) provides the [@Secure](http://jmsyst.com/bundles/JMSSecurityExtraBundle/1.2/annotations#secure) annotation which eases checking for a certain user-role before invoking a controller/service method. ``` use JMS\SecurityExtraBundle\Annotat...
Your best bet would be to rely on `Kernel` event listeners: <http://symfony.com/doc/current/cookbook/service_container/event_listener.html>. Implement your listener as a service and then you could set `$this->user` to desired value if `isGranted` results `TRUE`. Later on, you could easily retrieve the value within the...
211,885
I have this breadboard: [![enter image description here](https://i.stack.imgur.com/Kevaa.jpg)](https://i.stack.imgur.com/Kevaa.jpg) And I need my Integrated Circuit to be connected exactly like this (Don't pay any attention to the wires. Let's focus on the IC in the middle of the breadboard itself): [![enter image d...
2016/01/17
[ "https://electronics.stackexchange.com/questions/211885", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/97402/" ]
Normally, these breadboards are built exactly for what you're trying to do. And normally, it works, because there aren't many different lengths of pins on ICs. If more force doesn't help (i.e. your IC just can't be pushed in further), I'm afraid all you could try is use a IC socket; but to be honest, that would sound ...
One of my breadboards acts this way. I hated it and decided to sacrifice it to make [This Breadboard Video](https://www.youtube.com/watch?v=ME2wgVFYgIs). Also, YES: longer leaded parts will fit into that breadboard. But you shouldn't need to purchase specific ICs to fit into a breadboard. You just need a better breadb...
211,885
I have this breadboard: [![enter image description here](https://i.stack.imgur.com/Kevaa.jpg)](https://i.stack.imgur.com/Kevaa.jpg) And I need my Integrated Circuit to be connected exactly like this (Don't pay any attention to the wires. Let's focus on the IC in the middle of the breadboard itself): [![enter image d...
2016/01/17
[ "https://electronics.stackexchange.com/questions/211885", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/97402/" ]
If this is a brand new breadboard, it is possible that the contact tines (the contacts within the breadboard sockets) have a nominal opening that is *smaller* than the size of the IC pins; this will 'push' the IC back out of the breadboard sockets. I have seen this (admittedly many years ago), and a piece of non-stran...
One of my breadboards acts this way. I hated it and decided to sacrifice it to make [This Breadboard Video](https://www.youtube.com/watch?v=ME2wgVFYgIs). Also, YES: longer leaded parts will fit into that breadboard. But you shouldn't need to purchase specific ICs to fit into a breadboard. You just need a better breadb...
26,196,609
I want to use the R chunk code output as the Chapter Name but could not figured out how to do this. Below is my minimum working example. ``` \documentclass{book} \usepackage[T1]{fontenc} \begin{document} \chapter{cat( << label=Test1, echo=FALSE, results="asis">>= 2+1 @ ) } Chapter name is the output of R chunk Code...
2014/10/04
[ "https://Stackoverflow.com/questions/26196609", "https://Stackoverflow.com", "https://Stackoverflow.com/users/707145/" ]
This works for me ``` << label=Test1, echo=FALSE>>= cn <- 2+1 @ \chapter*{Chapter \Sexpr{cn}} ```
In RMarkdown you can use the following code ``` # `r I(1+2)` ```
43,247,138
I have basically 2 forms in one page. First one is for login and second one is for insert data. Second form action is working fine. i can insert data with it. But same form I'm using for login user but it's not working. On click submit button nothing happens just page refresh. please see my code and help me to solve m...
2017/04/06
[ "https://Stackoverflow.com/questions/43247138", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7824786/" ]
I assume you are talking about asp.net core. VS2015 and VS2017 are different. VS2015 uses project.json while VS2017 uses \*.csproj But you can convert it: <https://learn.microsoft.com/en-au/dotnet/articles/core/tools/project-json-to-csproj> And for myself, I just recreated in VS2017: <https://github.com/Longfld/A...
I found solution. I need to update Tool preview for visual studio 2015. Here is what I wrote in detail <https://asiftech.wordpress.com/2017/04/06/package-restore-failed-in-visual-studio-2015-after-visual-studio-2017-installation/>
29,519,693
I need your help in grammatically expanding a Jquery's Collapsable div I have tried with number of options This is my fiddle <http://jsfiddle.net/jWaEv/20/> I have tried as following ``` <div data-role="content" class="data"> <div class="my-collaspible" id="first" data-inset="false" data-role="collapsible">...
2015/04/08
[ "https://Stackoverflow.com/questions/29519693", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
You can use this: <http://jsfiddle.net/jWaEv/37/> ``` <div data-role="collapsible-set"> <div id="first" data-role="collapsible"> <h3>Header 1</h3> <p>Content</p> <p>Content</p> </div> <div id="second" data-role="collapsible"> <h3>Header 2</h3> <p>Content</p> <p>Content<...
Use following option : **[`collapsible`](https://api.jquerymobile.com/collapsible/#option-collapsed)**, ``` $("#" + id).collapsible( "option", "collapsed", false ); ``` **[Updated Fiddle](http://jsfiddle.net/jWaEv/22/)**
29,519,693
I need your help in grammatically expanding a Jquery's Collapsable div I have tried with number of options This is my fiddle <http://jsfiddle.net/jWaEv/20/> I have tried as following ``` <div data-role="content" class="data"> <div class="my-collaspible" id="first" data-inset="false" data-role="collapsible">...
2015/04/08
[ "https://Stackoverflow.com/questions/29519693", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
`("#myCollapsible").collapsible("expand");` This worked for me when using jQuery 1.11.1 and JQM 1.4.5
Use following option : **[`collapsible`](https://api.jquerymobile.com/collapsible/#option-collapsed)**, ``` $("#" + id).collapsible( "option", "collapsed", false ); ``` **[Updated Fiddle](http://jsfiddle.net/jWaEv/22/)**
2,608,763
While debugging slow startup of an Eclipse RCP app on a Citrix server, I came to find out that java.io.createTempFile(String,String,File) is taking 5 seconds. It does this only on the first execution and only for certain user accounts. Specifically, I am noticing it Citrix anonymous user accounts. I have not tried many...
2010/04/09
[ "https://Stackoverflow.com/questions/2608763", "https://Stackoverflow.com", "https://Stackoverflow.com/users/312944/" ]
It might be the intialisation of the secure random number generator which is causing the problem. In particular if a secure random seed is not obtainable from the operating system, then the fall-back mechanism attempts to gain entropy. IIRC, one of the things it does is to list temporary files, so if you have a large n...
I'm not a Citrix expert, but I know someone who is, and who conjectures: The accounts may be set up so that application reads/writes are redirected to non-local resources. The latency you're experiencing may be related to the initialization or performance of that resolution. Another possibility is that the applicatio...