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
382,659
Turns out, everything i put inside any folder in my mac, is being uploaded to the cloud, showing me the cloud icon, and files are not available when i need them.(which by itself is a strange UX) To stop this, i went into iCloud Drive ->options->, and uncheck the **Documents and Desktop Folders**. Then i get a mesage ...
2020/02/20
[ "https://apple.stackexchange.com/questions/382659", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/349012/" ]
> > .. and files are not available when i need them .. > > > macOS < 10.15: System Preferences → iCloud → iCloud Drive options → Uncheck Optimise Storage. macOS 10.15+: System Preferences → Apple ID → iCloud Drive options → Uncheck Optimise Storage. All files will be found locally, always, as well as on iCloud...
You should uncheck the Optimize Storage button and wait for your files to finish downloading. Restart your computer if you don't see any progress right away. When they've downloaded, you'll be able to move them instantly.
382,659
Turns out, everything i put inside any folder in my mac, is being uploaded to the cloud, showing me the cloud icon, and files are not available when i need them.(which by itself is a strange UX) To stop this, i went into iCloud Drive ->options->, and uncheck the **Documents and Desktop Folders**. Then i get a mesage ...
2020/02/20
[ "https://apple.stackexchange.com/questions/382659", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/349012/" ]
> > .. and files are not available when i need them .. > > > macOS < 10.15: System Preferences → iCloud → iCloud Drive options → Uncheck Optimise Storage. macOS 10.15+: System Preferences → Apple ID → iCloud Drive options → Uncheck Optimise Storage. All files will be found locally, always, as well as on iCloud...
I made a same mistake I turned on iCloud and then turn it off. I thought my files are gone because they were not visible in recovery software. Then I put the name of file to finder search and it was in iCloud version of Documents folder completely fine. But for some reason I did not see that folder in finder or my user...
382,659
Turns out, everything i put inside any folder in my mac, is being uploaded to the cloud, showing me the cloud icon, and files are not available when i need them.(which by itself is a strange UX) To stop this, i went into iCloud Drive ->options->, and uncheck the **Documents and Desktop Folders**. Then i get a mesage ...
2020/02/20
[ "https://apple.stackexchange.com/questions/382659", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/349012/" ]
You should uncheck the Optimize Storage button and wait for your files to finish downloading. Restart your computer if you don't see any progress right away. When they've downloaded, you'll be able to move them instantly.
I made a same mistake I turned on iCloud and then turn it off. I thought my files are gone because they were not visible in recovery software. Then I put the name of file to finder search and it was in iCloud version of Documents folder completely fine. But for some reason I did not see that folder in finder or my user...
154,981
I am a beginner learning about computer animation(for games). So far, the only method that I have come across is drawing each frame, every frame update. So at the start of every frame, the entire frame is erased, and then the things for that are needed that frame are redrawn. My question is whether or not this method ...
2018/03/04
[ "https://gamedev.stackexchange.com/questions/154981", "https://gamedev.stackexchange.com", "https://gamedev.stackexchange.com/users/113139/" ]
Very old games used a technique where only those parts of a frame are redrawn that changed on that frame. What I can remember, the game "Little Big Adventure" uses this technique (1994). But you can see that the game has for most of the time a static camera. only when you move out of the visible area the scene is redra...
No. === At least if you include old games from the 70s which used vector displays. For example, the widely known game Asteroids, which was originally developed for vector displays which are a fundamentally different way of rendering graphics to a screen. > > Vector monitors were also used by some late-1970s to mid-...
154,981
I am a beginner learning about computer animation(for games). So far, the only method that I have come across is drawing each frame, every frame update. So at the start of every frame, the entire frame is erased, and then the things for that are needed that frame are redrawn. My question is whether or not this method ...
2018/03/04
[ "https://gamedev.stackexchange.com/questions/154981", "https://gamedev.stackexchange.com", "https://gamedev.stackexchange.com/users/113139/" ]
Very old games used a technique where only those parts of a frame are redrawn that changed on that frame. What I can remember, the game "Little Big Adventure" uses this technique (1994). But you can see that the game has for most of the time a static camera. only when you move out of the visible area the scene is redra...
Short answer: No. Long story: When I learned some game programming in school, we were taught to do the following: Decide what fps rate we wanted in the game (30 for example). Write some code that adds 1 to a counter for each interval (33 msec for 30 fps). This code runs concurrently with the game loop. Then the ga...
154,981
I am a beginner learning about computer animation(for games). So far, the only method that I have come across is drawing each frame, every frame update. So at the start of every frame, the entire frame is erased, and then the things for that are needed that frame are redrawn. My question is whether or not this method ...
2018/03/04
[ "https://gamedev.stackexchange.com/questions/154981", "https://gamedev.stackexchange.com", "https://gamedev.stackexchange.com/users/113139/" ]
No. === At least if you include old games from the 70s which used vector displays. For example, the widely known game Asteroids, which was originally developed for vector displays which are a fundamentally different way of rendering graphics to a screen. > > Vector monitors were also used by some late-1970s to mid-...
Before one can say whether video games "draw" the display every frame, it's first necessary to define what is meant by "draw". There are certainly many video games certainly do not all draw every frame by assembling a bitmap from scratch; indeed, many gaming platforms never assemble full bitmaps *at all*. There are a ...
154,981
I am a beginner learning about computer animation(for games). So far, the only method that I have come across is drawing each frame, every frame update. So at the start of every frame, the entire frame is erased, and then the things for that are needed that frame are redrawn. My question is whether or not this method ...
2018/03/04
[ "https://gamedev.stackexchange.com/questions/154981", "https://gamedev.stackexchange.com", "https://gamedev.stackexchange.com/users/113139/" ]
Short answer: No. Long story: When I learned some game programming in school, we were taught to do the following: Decide what fps rate we wanted in the game (30 for example). Write some code that adds 1 to a counter for each interval (33 msec for 30 fps). This code runs concurrently with the game loop. Then the ga...
Before one can say whether video games "draw" the display every frame, it's first necessary to define what is meant by "draw". There are certainly many video games certainly do not all draw every frame by assembling a bitmap from scratch; indeed, many gaming platforms never assemble full bitmaps *at all*. There are a ...
154,981
I am a beginner learning about computer animation(for games). So far, the only method that I have come across is drawing each frame, every frame update. So at the start of every frame, the entire frame is erased, and then the things for that are needed that frame are redrawn. My question is whether or not this method ...
2018/03/04
[ "https://gamedev.stackexchange.com/questions/154981", "https://gamedev.stackexchange.com", "https://gamedev.stackexchange.com/users/113139/" ]
Short answer: No. Long story: When I learned some game programming in school, we were taught to do the following: Decide what fps rate we wanted in the game (30 for example). Write some code that adds 1 to a counter for each interval (33 msec for 30 fps). This code runs concurrently with the game loop. Then the ga...
To put it briefly, I would say not all frames are drawn but just the ones required to present your story or theme of game or game-play are. Plus the timing of the things you would want to happen at certain instances would matter.
154,981
I am a beginner learning about computer animation(for games). So far, the only method that I have come across is drawing each frame, every frame update. So at the start of every frame, the entire frame is erased, and then the things for that are needed that frame are redrawn. My question is whether or not this method ...
2018/03/04
[ "https://gamedev.stackexchange.com/questions/154981", "https://gamedev.stackexchange.com", "https://gamedev.stackexchange.com/users/113139/" ]
On the lowest level, the graphics processor on your machine will indeed compute each frame from the ground up and send it to your screen. You will only be exposed to this, however, if you manage this low-level stuff yourself [1] Any graphics (and with that, game-) engine however, will handle these things for you, and y...
Before one can say whether video games "draw" the display every frame, it's first necessary to define what is meant by "draw". There are certainly many video games certainly do not all draw every frame by assembling a bitmap from scratch; indeed, many gaming platforms never assemble full bitmaps *at all*. There are a ...
154,981
I am a beginner learning about computer animation(for games). So far, the only method that I have come across is drawing each frame, every frame update. So at the start of every frame, the entire frame is erased, and then the things for that are needed that frame are redrawn. My question is whether or not this method ...
2018/03/04
[ "https://gamedev.stackexchange.com/questions/154981", "https://gamedev.stackexchange.com", "https://gamedev.stackexchange.com/users/113139/" ]
Very old games used a technique where only those parts of a frame are redrawn that changed on that frame. What I can remember, the game "Little Big Adventure" uses this technique (1994). But you can see that the game has for most of the time a static camera. only when you move out of the visible area the scene is redra...
On the lowest level, the graphics processor on your machine will indeed compute each frame from the ground up and send it to your screen. You will only be exposed to this, however, if you manage this low-level stuff yourself [1] Any graphics (and with that, game-) engine however, will handle these things for you, and y...
154,981
I am a beginner learning about computer animation(for games). So far, the only method that I have come across is drawing each frame, every frame update. So at the start of every frame, the entire frame is erased, and then the things for that are needed that frame are redrawn. My question is whether or not this method ...
2018/03/04
[ "https://gamedev.stackexchange.com/questions/154981", "https://gamedev.stackexchange.com", "https://gamedev.stackexchange.com/users/113139/" ]
No. === At least if you include old games from the 70s which used vector displays. For example, the widely known game Asteroids, which was originally developed for vector displays which are a fundamentally different way of rendering graphics to a screen. > > Vector monitors were also used by some late-1970s to mid-...
Short answer: No. Long story: When I learned some game programming in school, we were taught to do the following: Decide what fps rate we wanted in the game (30 for example). Write some code that adds 1 to a counter for each interval (33 msec for 30 fps). This code runs concurrently with the game loop. Then the ga...
154,981
I am a beginner learning about computer animation(for games). So far, the only method that I have come across is drawing each frame, every frame update. So at the start of every frame, the entire frame is erased, and then the things for that are needed that frame are redrawn. My question is whether or not this method ...
2018/03/04
[ "https://gamedev.stackexchange.com/questions/154981", "https://gamedev.stackexchange.com", "https://gamedev.stackexchange.com/users/113139/" ]
On the lowest level, the graphics processor on your machine will indeed compute each frame from the ground up and send it to your screen. You will only be exposed to this, however, if you manage this low-level stuff yourself [1] Any graphics (and with that, game-) engine however, will handle these things for you, and y...
To put it briefly, I would say not all frames are drawn but just the ones required to present your story or theme of game or game-play are. Plus the timing of the things you would want to happen at certain instances would matter.
154,981
I am a beginner learning about computer animation(for games). So far, the only method that I have come across is drawing each frame, every frame update. So at the start of every frame, the entire frame is erased, and then the things for that are needed that frame are redrawn. My question is whether or not this method ...
2018/03/04
[ "https://gamedev.stackexchange.com/questions/154981", "https://gamedev.stackexchange.com", "https://gamedev.stackexchange.com/users/113139/" ]
Very old games used a technique where only those parts of a frame are redrawn that changed on that frame. What I can remember, the game "Little Big Adventure" uses this technique (1994). But you can see that the game has for most of the time a static camera. only when you move out of the visible area the scene is redra...
Before one can say whether video games "draw" the display every frame, it's first necessary to define what is meant by "draw". There are certainly many video games certainly do not all draw every frame by assembling a bitmap from scratch; indeed, many gaming platforms never assemble full bitmaps *at all*. There are a ...
265,617
I am using gnome on wayland on arch. I used to start my keyboards leds with xset led 3. How can this be accomplished while using wayland?
2016/02/25
[ "https://unix.stackexchange.com/questions/265617", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/148018/" ]
I also struggled with this and finally came up with a solution: <https://gist.github.com/ps1dr3x/b15c62eafb388ddf8bb7d3896d1a1cee> Basically you can turn on/off the keyboard backlight by changing the brightness value in /sys/class/leds/`input`/brightness e.g. ``` sudo sh -c 'echo 1 > /sys/class/leds/input0::scrolll...
Here is a suggested script to switch the keyboard lights on and off under Wayland. It finds the proper path then uses it with the command provided by @Michele above. ``` #!/bin/bash pathbeginswith=$(find /sys/class/leds -iname "*scrolllock") completepath="$pathbeginswith/brightness" if test "$(id -u)" -ne 0 ; then ...
14,676,613
I'm working with a CMS which I only have access to the CSS file. So, I can't include anything in the `<head>` of the document. I was wondering if there was a way to import the web font from within the CSS file?
2013/02/03
[ "https://Stackoverflow.com/questions/14676613", "https://Stackoverflow.com", "https://Stackoverflow.com/users/579049/" ]
Use the [`@import`](https://developer.mozilla.org/en-US/docs/Web/CSS/@import) method: ```css @import url('https://fonts.googleapis.com/css?family=Open+Sans&display=swap'); ``` Obviously, "Open Sans" (`Open+Sans`) is the font that is imported. So replace it with yours. If the font's name has multiple words, URL-encod...
Along with the above answers, do also consider this site; <https://google-webfonts-helper.herokuapp.com/fonts> Main Advantage: * **allows you to *self-host* those google fonts for better response times** Other Advantages : * choose your font(s) * choose your character set * choose your font styles/weight * choose y...
14,676,613
I'm working with a CMS which I only have access to the CSS file. So, I can't include anything in the `<head>` of the document. I was wondering if there was a way to import the web font from within the CSS file?
2013/02/03
[ "https://Stackoverflow.com/questions/14676613", "https://Stackoverflow.com", "https://Stackoverflow.com/users/579049/" ]
``` <link rel="stylesheet" href="//fonts.googleapis.com/css?family=Open+Sans:300,400,600,700&amp;lang=en" /> ``` Better to not use `@import`. Just use the `link` element, as shown above, in your layout's head.
1. Just go to <https://fonts.google.com/> 2. Add font by clicking **+** 3. Go to selected font > Embed > @IMPORT > copy url and paste in your .css file above body tag. 4. It's done.
14,676,613
I'm working with a CMS which I only have access to the CSS file. So, I can't include anything in the `<head>` of the document. I was wondering if there was a way to import the web font from within the CSS file?
2013/02/03
[ "https://Stackoverflow.com/questions/14676613", "https://Stackoverflow.com", "https://Stackoverflow.com/users/579049/" ]
Use the [`@import`](https://developer.mozilla.org/en-US/docs/Web/CSS/@import) method: ```css @import url('https://fonts.googleapis.com/css?family=Open+Sans&display=swap'); ``` Obviously, "Open Sans" (`Open+Sans`) is the font that is imported. So replace it with yours. If the font's name has multiple words, URL-encod...
``` <link href="https://fonts.googleapis.com/css?family=(any font of your choice)" rel="stylesheet" type="text/css"> ``` To choose the font you can visit the link : **<https://fonts.google.com>** *Write the font name of your choice from the website excluding the brackets.* **For example** you chose Lobster as a fo...
14,676,613
I'm working with a CMS which I only have access to the CSS file. So, I can't include anything in the `<head>` of the document. I was wondering if there was a way to import the web font from within the CSS file?
2013/02/03
[ "https://Stackoverflow.com/questions/14676613", "https://Stackoverflow.com", "https://Stackoverflow.com/users/579049/" ]
Use the tag @import ``` @import url('http://fonts.googleapis.com/css?family=Kavoon'); ```
You can also use @font-face to link to the URLs. <http://www.css3.info/preview/web-fonts-with-font-face/> Does the CMS support iframes? You might be able to throw an iframe into the top of your content, too. This would probably be slower - better to include it in your CSS.
14,676,613
I'm working with a CMS which I only have access to the CSS file. So, I can't include anything in the `<head>` of the document. I was wondering if there was a way to import the web font from within the CSS file?
2013/02/03
[ "https://Stackoverflow.com/questions/14676613", "https://Stackoverflow.com", "https://Stackoverflow.com/users/579049/" ]
Add the Below code in your CSS File to import Google Web Fonts. ``` @import url(https://fonts.googleapis.com/css?family=Open+Sans); ``` Replace the **Open+Sans** parameter value with your Font name. Your CSS file should look like: ``` @import url(https://fonts.googleapis.com/css?family=Open+Sans); body{ font-f...
You can also use @font-face to link to the URLs. <http://www.css3.info/preview/web-fonts-with-font-face/> Does the CMS support iframes? You might be able to throw an iframe into the top of your content, too. This would probably be slower - better to include it in your CSS.
14,676,613
I'm working with a CMS which I only have access to the CSS file. So, I can't include anything in the `<head>` of the document. I was wondering if there was a way to import the web font from within the CSS file?
2013/02/03
[ "https://Stackoverflow.com/questions/14676613", "https://Stackoverflow.com", "https://Stackoverflow.com/users/579049/" ]
Use the tag @import ``` @import url('http://fonts.googleapis.com/css?family=Kavoon'); ```
We can easily do that in css3. We have to simply use @import statement. The following video easily describes the way how to do that. so go ahead and watch it out. <https://www.youtube.com/watch?v=wlPr6EF6GAo>
14,676,613
I'm working with a CMS which I only have access to the CSS file. So, I can't include anything in the `<head>` of the document. I was wondering if there was a way to import the web font from within the CSS file?
2013/02/03
[ "https://Stackoverflow.com/questions/14676613", "https://Stackoverflow.com", "https://Stackoverflow.com/users/579049/" ]
Use the tag @import ``` @import url('http://fonts.googleapis.com/css?family=Kavoon'); ```
``` <link href="https://fonts.googleapis.com/css?family=(any font of your choice)" rel="stylesheet" type="text/css"> ``` To choose the font you can visit the link : **<https://fonts.google.com>** *Write the font name of your choice from the website excluding the brackets.* **For example** you chose Lobster as a fo...
14,676,613
I'm working with a CMS which I only have access to the CSS file. So, I can't include anything in the `<head>` of the document. I was wondering if there was a way to import the web font from within the CSS file?
2013/02/03
[ "https://Stackoverflow.com/questions/14676613", "https://Stackoverflow.com", "https://Stackoverflow.com/users/579049/" ]
Add the Below code in your CSS File to import Google Web Fonts. ``` @import url(https://fonts.googleapis.com/css?family=Open+Sans); ``` Replace the **Open+Sans** parameter value with your Font name. Your CSS file should look like: ``` @import url(https://fonts.googleapis.com/css?family=Open+Sans); body{ font-f...
1. Go to <https://fonts.google.com/> and select your desired font family (you can search by name): [![Step 1: selecting a font](https://i.stack.imgur.com/8VBL5.jpg)](https://i.stack.imgur.com/8VBL5.jpg) 2. Select the desired variations (weight, italics, etc.): [![Step 2: selecting the variations](https://i.stack.imgu...
14,676,613
I'm working with a CMS which I only have access to the CSS file. So, I can't include anything in the `<head>` of the document. I was wondering if there was a way to import the web font from within the CSS file?
2013/02/03
[ "https://Stackoverflow.com/questions/14676613", "https://Stackoverflow.com", "https://Stackoverflow.com/users/579049/" ]
Add the Below code in your CSS File to import Google Web Fonts. ``` @import url(https://fonts.googleapis.com/css?family=Open+Sans); ``` Replace the **Open+Sans** parameter value with your Font name. Your CSS file should look like: ``` @import url(https://fonts.googleapis.com/css?family=Open+Sans); body{ font-f...
Jus go through the link <https://developers.google.com/fonts/docs/getting_started> To import it to stylesheet use ``` @import url('https://fonts.googleapis.com/css?family=Open+Sans'); ```
14,676,613
I'm working with a CMS which I only have access to the CSS file. So, I can't include anything in the `<head>` of the document. I was wondering if there was a way to import the web font from within the CSS file?
2013/02/03
[ "https://Stackoverflow.com/questions/14676613", "https://Stackoverflow.com", "https://Stackoverflow.com/users/579049/" ]
Along with the above answers, do also consider this site; <https://google-webfonts-helper.herokuapp.com/fonts> Main Advantage: * **allows you to *self-host* those google fonts for better response times** Other Advantages : * choose your font(s) * choose your character set * choose your font styles/weight * choose y...
1. Go to <https://fonts.google.com/> and select your desired font family (you can search by name): [![Step 1: selecting a font](https://i.stack.imgur.com/8VBL5.jpg)](https://i.stack.imgur.com/8VBL5.jpg) 2. Select the desired variations (weight, italics, etc.): [![Step 2: selecting the variations](https://i.stack.imgu...
50,356,897
I created a cloud dataproc cluster and in my initialization script I try to install libopencv-dev but I keep getting unmet dependencies error: ``` sudo apt-get install libopencv-dev Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. Thi...
2018/05/15
[ "https://Stackoverflow.com/questions/50356897", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1356645/" ]
It seems they use backports so to install libopencv-dev I had to install it from the backports repo with this command: ``` sudo apt-get -t jessie-backports install libopencv-dev ```
Try installing with aptitude Run the following sudo apt install aptitude -y sudo aptitude install libopencv-dev
13,664,098
Why am I getting the error `Input string was not in a correct format`. in this line of my code? ``` Convert.ToInt32(listView1.Items[4].SubItems[4].ToString()) ``` Below is the full code I am using it with: ``` foreach (ListViewItem iiii in listView1.Items) { if (Convert.ToInt32(listView1.Items[4].SubItems[4].To...
2012/12/01
[ "https://Stackoverflow.com/questions/13664098", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1801629/" ]
using cell2struct is by far the fastest method I could figure out. Just check the following code to make a comparison: ``` clear; N = 10000; cel2s=0; repm=0; for i=1:100 a=0.0; b=0.0; tic; a = cell2struct(cell(1,N), {'x'}, 1 ); cel2s = cel2s + toc; tic; b = repmat(struct('x',1), N, 1 ); repm = repm + toc; end dis...
According to [this answer](https://stackoverflow.com/a/13336106/311834), there's also another way to do it: ``` [a.x] = deal(val); ``` where `val` is the value you want to assign to *every* element of the struct. The effect of this command is different from those of the others, as every `x` field of every structure...
13,664,098
Why am I getting the error `Input string was not in a correct format`. in this line of my code? ``` Convert.ToInt32(listView1.Items[4].SubItems[4].ToString()) ``` Below is the full code I am using it with: ``` foreach (ListViewItem iiii in listView1.Items) { if (Convert.ToInt32(listView1.Items[4].SubItems[4].To...
2012/12/01
[ "https://Stackoverflow.com/questions/13664098", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1801629/" ]
The way this is supposed to be done, and the simplest is ``` a=struct('x',cell(1,N)); ``` If you fix the missing "tic" and add this method to the benchmarking code presented by jerad, the method I propose above is a bit slower than repmat but much simpler to implement, here is the output: ``` No preallocation: ...
Instead of pre-allocating the array of structs it may be easier to reverse the loop. In this way the array is allocated in the first iteration and the rest of the iterations are used to fill the structs. ``` a = [] for i = 100:-1:1 a(i).x = i; end ```
13,664,098
Why am I getting the error `Input string was not in a correct format`. in this line of my code? ``` Convert.ToInt32(listView1.Items[4].SubItems[4].ToString()) ``` Below is the full code I am using it with: ``` foreach (ListViewItem iiii in listView1.Items) { if (Convert.ToInt32(listView1.Items[4].SubItems[4].To...
2012/12/01
[ "https://Stackoverflow.com/questions/13664098", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1801629/" ]
There's a bunch of ways you can initialize a structure. For example, you can use the `struct` command: ``` a(1:100) = struct('x',[]); ``` which sets all fields `x` to empty. You can also use `deal` to create and fill the structure if you know what data should go in there ``` xx = num2cell(1:100); [a(1:100).x]=deal...
The way this is supposed to be done, and the simplest is ``` a=struct('x',cell(1,N)); ``` If you fix the missing "tic" and add this method to the benchmarking code presented by jerad, the method I propose above is a bit slower than repmat but much simpler to implement, here is the output: ``` No preallocation: ...
13,664,098
Why am I getting the error `Input string was not in a correct format`. in this line of my code? ``` Convert.ToInt32(listView1.Items[4].SubItems[4].ToString()) ``` Below is the full code I am using it with: ``` foreach (ListViewItem iiii in listView1.Items) { if (Convert.ToInt32(listView1.Items[4].SubItems[4].To...
2012/12/01
[ "https://Stackoverflow.com/questions/13664098", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1801629/" ]
Using `repmat` is by far the most efficient way to preallocate structs : ``` N = 10000; b = repmat(struct('x',1), N, 1 ); ``` This is **~10x faster** using Matlab 2011a than preallocating via indexing, as in ``` N = 10000; b(N).x = 1 ``` The indexing method is only marginally faster than not preallocati...
using cell2struct is by far the fastest method I could figure out. Just check the following code to make a comparison: ``` clear; N = 10000; cel2s=0; repm=0; for i=1:100 a=0.0; b=0.0; tic; a = cell2struct(cell(1,N), {'x'}, 1 ); cel2s = cel2s + toc; tic; b = repmat(struct('x',1), N, 1 ); repm = repm + toc; end dis...
13,664,098
Why am I getting the error `Input string was not in a correct format`. in this line of my code? ``` Convert.ToInt32(listView1.Items[4].SubItems[4].ToString()) ``` Below is the full code I am using it with: ``` foreach (ListViewItem iiii in listView1.Items) { if (Convert.ToInt32(listView1.Items[4].SubItems[4].To...
2012/12/01
[ "https://Stackoverflow.com/questions/13664098", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1801629/" ]
There's a nice discussion about this in [Loren on the Art of MATLAB](http://blogs.mathworks.com/loren/2008/02/01/structure-initialization/) blog. If I understand you correctly, here's a ways to initialize the struct you want: ``` a(100).x = 100; ``` With this method, we can see that elements are filled in with empt...
Instead of pre-allocating the array of structs it may be easier to reverse the loop. In this way the array is allocated in the first iteration and the rest of the iterations are used to fill the structs. ``` a = [] for i = 100:-1:1 a(i).x = i; end ```
13,664,098
Why am I getting the error `Input string was not in a correct format`. in this line of my code? ``` Convert.ToInt32(listView1.Items[4].SubItems[4].ToString()) ``` Below is the full code I am using it with: ``` foreach (ListViewItem iiii in listView1.Items) { if (Convert.ToInt32(listView1.Items[4].SubItems[4].To...
2012/12/01
[ "https://Stackoverflow.com/questions/13664098", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1801629/" ]
The way this is supposed to be done, and the simplest is ``` a=struct('x',cell(1,N)); ``` If you fix the missing "tic" and add this method to the benchmarking code presented by jerad, the method I propose above is a bit slower than repmat but much simpler to implement, here is the output: ``` No preallocation: ...
According to [this answer](https://stackoverflow.com/a/13336106/311834), there's also another way to do it: ``` [a.x] = deal(val); ``` where `val` is the value you want to assign to *every* element of the struct. The effect of this command is different from those of the others, as every `x` field of every structure...
13,664,098
Why am I getting the error `Input string was not in a correct format`. in this line of my code? ``` Convert.ToInt32(listView1.Items[4].SubItems[4].ToString()) ``` Below is the full code I am using it with: ``` foreach (ListViewItem iiii in listView1.Items) { if (Convert.ToInt32(listView1.Items[4].SubItems[4].To...
2012/12/01
[ "https://Stackoverflow.com/questions/13664098", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1801629/" ]
Using `repmat` is by far the most efficient way to preallocate structs : ``` N = 10000; b = repmat(struct('x',1), N, 1 ); ``` This is **~10x faster** using Matlab 2011a than preallocating via indexing, as in ``` N = 10000; b(N).x = 1 ``` The indexing method is only marginally faster than not preallocati...
There's a bunch of ways you can initialize a structure. For example, you can use the `struct` command: ``` a(1:100) = struct('x',[]); ``` which sets all fields `x` to empty. You can also use `deal` to create and fill the structure if you know what data should go in there ``` xx = num2cell(1:100); [a(1:100).x]=deal...
13,664,098
Why am I getting the error `Input string was not in a correct format`. in this line of my code? ``` Convert.ToInt32(listView1.Items[4].SubItems[4].ToString()) ``` Below is the full code I am using it with: ``` foreach (ListViewItem iiii in listView1.Items) { if (Convert.ToInt32(listView1.Items[4].SubItems[4].To...
2012/12/01
[ "https://Stackoverflow.com/questions/13664098", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1801629/" ]
using cell2struct is by far the fastest method I could figure out. Just check the following code to make a comparison: ``` clear; N = 10000; cel2s=0; repm=0; for i=1:100 a=0.0; b=0.0; tic; a = cell2struct(cell(1,N), {'x'}, 1 ); cel2s = cel2s + toc; tic; b = repmat(struct('x',1), N, 1 ); repm = repm + toc; end dis...
Instead of pre-allocating the array of structs it may be easier to reverse the loop. In this way the array is allocated in the first iteration and the rest of the iterations are used to fill the structs. ``` a = [] for i = 100:-1:1 a(i).x = i; end ```
13,664,098
Why am I getting the error `Input string was not in a correct format`. in this line of my code? ``` Convert.ToInt32(listView1.Items[4].SubItems[4].ToString()) ``` Below is the full code I am using it with: ``` foreach (ListViewItem iiii in listView1.Items) { if (Convert.ToInt32(listView1.Items[4].SubItems[4].To...
2012/12/01
[ "https://Stackoverflow.com/questions/13664098", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1801629/" ]
There's a nice discussion about this in [Loren on the Art of MATLAB](http://blogs.mathworks.com/loren/2008/02/01/structure-initialization/) blog. If I understand you correctly, here's a ways to initialize the struct you want: ``` a(100).x = 100; ``` With this method, we can see that elements are filled in with empt...
According to [this answer](https://stackoverflow.com/a/13336106/311834), there's also another way to do it: ``` [a.x] = deal(val); ``` where `val` is the value you want to assign to *every* element of the struct. The effect of this command is different from those of the others, as every `x` field of every structure...
13,664,098
Why am I getting the error `Input string was not in a correct format`. in this line of my code? ``` Convert.ToInt32(listView1.Items[4].SubItems[4].ToString()) ``` Below is the full code I am using it with: ``` foreach (ListViewItem iiii in listView1.Items) { if (Convert.ToInt32(listView1.Items[4].SubItems[4].To...
2012/12/01
[ "https://Stackoverflow.com/questions/13664098", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1801629/" ]
Using `repmat` is by far the most efficient way to preallocate structs : ``` N = 10000; b = repmat(struct('x',1), N, 1 ); ``` This is **~10x faster** using Matlab 2011a than preallocating via indexing, as in ``` N = 10000; b(N).x = 1 ``` The indexing method is only marginally faster than not preallocati...
According to [this answer](https://stackoverflow.com/a/13336106/311834), there's also another way to do it: ``` [a.x] = deal(val); ``` where `val` is the value you want to assign to *every* element of the struct. The effect of this command is different from those of the others, as every `x` field of every structure...
44,650,508
I have a simple case where I want to use pattern matching to identify the algorithm I need to use to perform a collision test between two generic Octrees. My basic case is two Octrees of triangles. The skeleton of the code is. ``` public class Triangle { public static bool Intersects (...
2017/06/20
[ "https://Stackoverflow.com/questions/44650508", "https://Stackoverflow.com", "https://Stackoverflow.com/users/158285/" ]
Pattern matching in C# 7.0 has a requirement stating that there must be an explicit or implicit conversion from the left-hand-side type to the right-hand-side type. In C# 7.1, the spec will be expanded so that either the left-hand-side or the right-hand-side can be an open type.
its a bug. take a look at this: <https://github.com/dotnet/roslyn/issues/16195>
44,650,508
I have a simple case where I want to use pattern matching to identify the algorithm I need to use to perform a collision test between two generic Octrees. My basic case is two Octrees of triangles. The skeleton of the code is. ``` public class Triangle { public static bool Intersects (...
2017/06/20
[ "https://Stackoverflow.com/questions/44650508", "https://Stackoverflow.com", "https://Stackoverflow.com/users/158285/" ]
There is a work around to the bug/feature. You can use the **Try\*** pattern with inline declared outvariables. ``` bool TryIs<TU>(object t, out TU u) { if (t is TU uu) { u = uu; return true; } u = default(TU); return false; } ``` then you can use it like ``` public bool Intersec...
its a bug. take a look at this: <https://github.com/dotnet/roslyn/issues/16195>
3,085,796
Show that any null sequence $(a\_n)\_{n\in\mathbb R}, \ a\_n\neq 0$ fulfils $$\lim\_{n\to\infty}\frac{\sqrt{1+a\_n}-1}{a\_n}=\frac{1}{2}\tag{1}$$ Was wondering if my approach is valid. Let's assume that $\lim\_{n\to\infty}a\_n$ exists and that $\lim\_{n\to\infty}=0$ then we know that $\lim\_{n\to\infty} (\sqrt{1+a\...
2019/01/24
[ "https://math.stackexchange.com/questions/3085796", "https://math.stackexchange.com", "https://math.stackexchange.com/users/33176/" ]
You divide by zero, which is not allowed. If you know a bit of calculus you can find the solution by examining the derivative of the root function at the point x=1.
Multiply numerator and denominator by $$\sqrt{1+a\_n}+1$$
3,085,796
Show that any null sequence $(a\_n)\_{n\in\mathbb R}, \ a\_n\neq 0$ fulfils $$\lim\_{n\to\infty}\frac{\sqrt{1+a\_n}-1}{a\_n}=\frac{1}{2}\tag{1}$$ Was wondering if my approach is valid. Let's assume that $\lim\_{n\to\infty}a\_n$ exists and that $\lim\_{n\to\infty}=0$ then we know that $\lim\_{n\to\infty} (\sqrt{1+a\...
2019/01/24
[ "https://math.stackexchange.com/questions/3085796", "https://math.stackexchange.com", "https://math.stackexchange.com/users/33176/" ]
Regarding your question whether there is a flaw: You need to be careful with mixing the assumptions and what you actually want to prove. You cannot use $$\lim\_{n\to\infty}\frac{\sqrt{1+a\_n}-1}{a\_n}=\frac{1}{2}$$ in (2) because this is what you actually want to prove! Even if the following steps are equivalences (and...
Multiply numerator and denominator by $$\sqrt{1+a\_n}+1$$
3,085,796
Show that any null sequence $(a\_n)\_{n\in\mathbb R}, \ a\_n\neq 0$ fulfils $$\lim\_{n\to\infty}\frac{\sqrt{1+a\_n}-1}{a\_n}=\frac{1}{2}\tag{1}$$ Was wondering if my approach is valid. Let's assume that $\lim\_{n\to\infty}a\_n$ exists and that $\lim\_{n\to\infty}=0$ then we know that $\lim\_{n\to\infty} (\sqrt{1+a\...
2019/01/24
[ "https://math.stackexchange.com/questions/3085796", "https://math.stackexchange.com", "https://math.stackexchange.com/users/33176/" ]
Regarding your question whether there is a flaw: You need to be careful with mixing the assumptions and what you actually want to prove. You cannot use $$\lim\_{n\to\infty}\frac{\sqrt{1+a\_n}-1}{a\_n}=\frac{1}{2}$$ in (2) because this is what you actually want to prove! Even if the following steps are equivalences (and...
You divide by zero, which is not allowed. If you know a bit of calculus you can find the solution by examining the derivative of the root function at the point x=1.
1,961,805
I am trying to create a way to show and hide a number of different elements on my page, depending if the user is logged in or not. For example I want to hide 'Logout' is users are not logged in, and 'login' when they are. I'm using Coldfusion and Dreamweaver - is there any quick easy code I am able to use to wrap ar...
2009/12/25
[ "https://Stackoverflow.com/questions/1961805", "https://Stackoverflow.com", "https://Stackoverflow.com/users/237850/" ]
Generically, if you have a session variable called "loggedIn" and (assuming it's boolean) it's as simple as: ``` <cfif session.loggedIn> <!--- display logged in code ---> </cfif ``` OR ``` <cfif NOT session.loggedIn> <!--- display not logged in code ---> </cfif> ``` But, I mean, it really depends on how you'r...
If you are using the standard CFLOGIN built into Coldfusion you can show/hide elements by checking for a logged in user: ``` <cfif GetAuthUser() neq ""> Show Logout button </cfif> ``` <http://livedocs.adobe.com/coldfusion/8/Tags_j-l_07.html>
1,961,805
I am trying to create a way to show and hide a number of different elements on my page, depending if the user is logged in or not. For example I want to hide 'Logout' is users are not logged in, and 'login' when they are. I'm using Coldfusion and Dreamweaver - is there any quick easy code I am able to use to wrap ar...
2009/12/25
[ "https://Stackoverflow.com/questions/1961805", "https://Stackoverflow.com", "https://Stackoverflow.com/users/237850/" ]
Generically, if you have a session variable called "loggedIn" and (assuming it's boolean) it's as simple as: ``` <cfif session.loggedIn> <!--- display logged in code ---> </cfif ``` OR ``` <cfif NOT session.loggedIn> <!--- display not logged in code ---> </cfif> ``` But, I mean, it really depends on how you'r...
If you are using Dreamweaver's Log In User server behavior, then it creates a session variable named MM\_Username (Session.MM\_Username) that contains the user name from the log in form. When that variable exists and is not an empty string, then the user is considered logged in. All you should need to do is to check fo...
2,337,438
I came across a weird situation when trying to count the number of rows that DO NOT have varchar values specified by a select statement. Ok, that sounds confusing even to me, so let me give you an example: Let's say I have a field "MyField" in "SomeTable" and I want to count in how many rows MyField values do not belo...
2010/02/25
[ "https://Stackoverflow.com/questions/2337438", "https://Stackoverflow.com", "https://Stackoverflow.com/users/251581/" ]
For NOT IN, it is always false if the subquery returns a NULL value. The accepted answer to [this question](https://stackoverflow.com/questions/129077/sql-not-in-constraint-and-null-values) elegantly describes why. The NULLability of a column value is independent of the datatype used too: most likely your varchar colu...
gbn has a more complete answer, but I can't be bothered to remember all that. Instead I have the religious habit of filtering nulls out of my IN clauses: ``` SELECT COUNT(*) FROM SomeTable WHERE [MyField] NOT IN ( SELECT MyOtherField FROM SomeOtherTable WHERE MyOtherField is not null ) ```
539,666
In Larry Wasserman's book "All of statistics" on p.151 there is the definition of a one-sided test: > > A test of the form > > $H\_0: \theta \le \theta\_0~~$ versus $~~H\_1: \theta \gt \theta\_0$ > > or > > $H\_0: \theta \ge \theta\_0~~$ versus $~~H\_1: \theta \lt \theta\_0$ > > is called a one-sided test...
2021/08/09
[ "https://stats.stackexchange.com/questions/539666", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/172777/" ]
$H\_0: \theta = \theta\_0$ versus $H\_1: \theta \gt \theta\_0$ is OK, but some authors might write $H\_0: \theta \le \theta\_0$ versus $H\_1: \theta \gt \theta\_0.$ $H\_0: \theta = \theta\_0$ versus $H\_1: \theta \lt \theta\_0$ is OK, but some authors might write $H\_0: \theta \ge \theta\_0$ versus $H\_1: \theta \lt \...
It would be more appropriate to write them this way. $H\_0: \theta = \theta\_0~~$ versus $~~H\_1: \theta \ne \theta\_0$ (two-sided) $H\_0: \theta \le \theta\_0~~$ versus $~~H\_1: \theta > \theta\_0$ (one-sided [upper-tailed]) $H\_0: \theta \ge \theta\_0~~$ versus $~~H\_1: \theta < \theta\_0$ (one-sided [lower-tail...
8,169,297
I have this Javascript snippet in my application to prevent clickjacking: ``` <script language="javascript" type="text/javascript"> var style = document.createElement('style'); style.type = "text/css"; style.id = "antiClickjack"; style.innerHTML = "body{display:none !important;}"; document.hea...
2011/11/17
[ "https://Stackoverflow.com/questions/8169297", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2612112/" ]
You can't set the content of a `<style>` element via `innerHTML`. I think the correct property name is `cssText` but I'll have to check MSDN. *edit* — yup that's it. Thus your code can do this: ``` var style = document.createElement('style'); style.type = "text/css"; style.id = "antiClickjack"; if ('cssText' in ...
In the document HEAD element, add the following: ``` <style id="antiClickjack">body{display:none !important;}</style> <script type="text/javascript"> if (self === top) { var antiClickjack = document.getElementById("antiClickjack"); antiClickjack.parentNode.removeChild(antiClickjack); } else { ...
90,491
If the value of a measure on any subset in a generator of a sigma algebra is known, will the measure for the sigma algebra also be uniquely determined? Thanks!
2011/12/11
[ "https://math.stackexchange.com/questions/90491", "https://math.stackexchange.com", "https://math.stackexchange.com/users/1281/" ]
There is a famous example: A compact separable metric space, two different finite Borel measures on the space, but the two measures agree with each other on all of the balls for the metric. R. O. Davies, "Measures not approximable or not specifiable by means of balls." Mathematika 18 (1971) 157--160
Consider the $\sigma$-algebra given by all subsets of $\{a,b,c\}$. It is generated by $A = \{a,b\}$ and $C = \{b,c\}$. Let $\mu(A) = \mu(C) = 1$. It could be that $\mu(\{a\}) = \mu(\{b\}) = \mu(\{c\}) = \frac{1}{2}$. It could also be that $\mu(\{a\}) = \mu(\{c\}) = \frac{1}{3}$ and $\mu(\{b\}) = \frac{2}{3}$.
90,491
If the value of a measure on any subset in a generator of a sigma algebra is known, will the measure for the sigma algebra also be uniquely determined? Thanks!
2011/12/11
[ "https://math.stackexchange.com/questions/90491", "https://math.stackexchange.com", "https://math.stackexchange.com/users/1281/" ]
Consider the $\sigma$-algebra given by all subsets of $\{a,b,c\}$. It is generated by $A = \{a,b\}$ and $C = \{b,c\}$. Let $\mu(A) = \mu(C) = 1$. It could be that $\mu(\{a\}) = \mu(\{b\}) = \mu(\{c\}) = \frac{1}{2}$. It could also be that $\mu(\{a\}) = \mu(\{c\}) = \frac{1}{3}$ and $\mu(\{b\}) = \frac{2}{3}$.
Caratheodory’s measure extension theorem.: Theorem 1.41 (Caratheodory). Let $A ⊂ 2^Ω$ be a ring and let $µ$ be a $σ$-finite premeasure on $A$. There exists a unique measure $µ'$ on $σ(A)$ such that $µ'(E) = µ(E)$ for all $E ∈ A$. Furthermore, $µ'$ is $σ$-finite. p. 19 of <http://www.math.unipd.it/~daipra/didattica/gali...
90,491
If the value of a measure on any subset in a generator of a sigma algebra is known, will the measure for the sigma algebra also be uniquely determined? Thanks!
2011/12/11
[ "https://math.stackexchange.com/questions/90491", "https://math.stackexchange.com", "https://math.stackexchange.com/users/1281/" ]
There is a famous example: A compact separable metric space, two different finite Borel measures on the space, but the two measures agree with each other on all of the balls for the metric. R. O. Davies, "Measures not approximable or not specifiable by means of balls." Mathematika 18 (1971) 157--160
Consider flipping two coins. Let $A$ be the event that the first coin is heads, and $B$ the event that the second coin is heads. $A$ and $B$ together generate the $\sigma$-algebra of all possible events. Suppose we know that $P(A) = P(B) = 1/2$ (i.e. each coin is unbiased). This is not enough information to determine w...
90,491
If the value of a measure on any subset in a generator of a sigma algebra is known, will the measure for the sigma algebra also be uniquely determined? Thanks!
2011/12/11
[ "https://math.stackexchange.com/questions/90491", "https://math.stackexchange.com", "https://math.stackexchange.com/users/1281/" ]
Consider the Borel $\sigma$-algebra $\mathcal B(\mathbb R)$, and the class $\mathcal C:=\left\{(a,+\infty),a\in\mathbb R\right\}$. Then the class $\mathcal C$ generates $\mathcal B(\mathbb R)$. Consider the counting measure $\mu$ over $\mathcal B(\mathbb R)$, that is $\mu(B)=\begin{cases} \operatorname{card} A&\mbox{...
There is a famous example: A compact separable metric space, two different finite Borel measures on the space, but the two measures agree with each other on all of the balls for the metric. R. O. Davies, "Measures not approximable or not specifiable by means of balls." Mathematika 18 (1971) 157--160
90,491
If the value of a measure on any subset in a generator of a sigma algebra is known, will the measure for the sigma algebra also be uniquely determined? Thanks!
2011/12/11
[ "https://math.stackexchange.com/questions/90491", "https://math.stackexchange.com", "https://math.stackexchange.com/users/1281/" ]
Consider flipping two coins. Let $A$ be the event that the first coin is heads, and $B$ the event that the second coin is heads. $A$ and $B$ together generate the $\sigma$-algebra of all possible events. Suppose we know that $P(A) = P(B) = 1/2$ (i.e. each coin is unbiased). This is not enough information to determine w...
Caratheodory’s measure extension theorem.: Theorem 1.41 (Caratheodory). Let $A ⊂ 2^Ω$ be a ring and let $µ$ be a $σ$-finite premeasure on $A$. There exists a unique measure $µ'$ on $σ(A)$ such that $µ'(E) = µ(E)$ for all $E ∈ A$. Furthermore, $µ'$ is $σ$-finite. p. 19 of <http://www.math.unipd.it/~daipra/didattica/gali...
90,491
If the value of a measure on any subset in a generator of a sigma algebra is known, will the measure for the sigma algebra also be uniquely determined? Thanks!
2011/12/11
[ "https://math.stackexchange.com/questions/90491", "https://math.stackexchange.com", "https://math.stackexchange.com/users/1281/" ]
Consider the Borel $\sigma$-algebra $\mathcal B(\mathbb R)$, and the class $\mathcal C:=\left\{(a,+\infty),a\in\mathbb R\right\}$. Then the class $\mathcal C$ generates $\mathcal B(\mathbb R)$. Consider the counting measure $\mu$ over $\mathcal B(\mathbb R)$, that is $\mu(B)=\begin{cases} \operatorname{card} A&\mbox{...
Let consider the above mentioned assertion due to Davide Giraudo. **Fact 1.** Let $μ$ a $\sigma$-finite measure on a measurable space $(X,S)$ , $\cal{A}$ an algebra which generates $S$ and $μ\_1 ,μ\_2$ two measures on $S$ such that for each $A\in\cal{A}$ , $μ\_1 (A)=μ\_2 (A)=μ(A)$. Then $μ\_1 (B)=μ\_2 (B)$ for each $...
90,491
If the value of a measure on any subset in a generator of a sigma algebra is known, will the measure for the sigma algebra also be uniquely determined? Thanks!
2011/12/11
[ "https://math.stackexchange.com/questions/90491", "https://math.stackexchange.com", "https://math.stackexchange.com/users/1281/" ]
There is a famous example: A compact separable metric space, two different finite Borel measures on the space, but the two measures agree with each other on all of the balls for the metric. R. O. Davies, "Measures not approximable or not specifiable by means of balls." Mathematika 18 (1971) 157--160
Caratheodory’s measure extension theorem.: Theorem 1.41 (Caratheodory). Let $A ⊂ 2^Ω$ be a ring and let $µ$ be a $σ$-finite premeasure on $A$. There exists a unique measure $µ'$ on $σ(A)$ such that $µ'(E) = µ(E)$ for all $E ∈ A$. Furthermore, $µ'$ is $σ$-finite. p. 19 of <http://www.math.unipd.it/~daipra/didattica/gali...
90,491
If the value of a measure on any subset in a generator of a sigma algebra is known, will the measure for the sigma algebra also be uniquely determined? Thanks!
2011/12/11
[ "https://math.stackexchange.com/questions/90491", "https://math.stackexchange.com", "https://math.stackexchange.com/users/1281/" ]
Consider the Borel $\sigma$-algebra $\mathcal B(\mathbb R)$, and the class $\mathcal C:=\left\{(a,+\infty),a\in\mathbb R\right\}$. Then the class $\mathcal C$ generates $\mathcal B(\mathbb R)$. Consider the counting measure $\mu$ over $\mathcal B(\mathbb R)$, that is $\mu(B)=\begin{cases} \operatorname{card} A&\mbox{...
Caratheodory’s measure extension theorem.: Theorem 1.41 (Caratheodory). Let $A ⊂ 2^Ω$ be a ring and let $µ$ be a $σ$-finite premeasure on $A$. There exists a unique measure $µ'$ on $σ(A)$ such that $µ'(E) = µ(E)$ for all $E ∈ A$. Furthermore, $µ'$ is $σ$-finite. p. 19 of <http://www.math.unipd.it/~daipra/didattica/gali...
90,491
If the value of a measure on any subset in a generator of a sigma algebra is known, will the measure for the sigma algebra also be uniquely determined? Thanks!
2011/12/11
[ "https://math.stackexchange.com/questions/90491", "https://math.stackexchange.com", "https://math.stackexchange.com/users/1281/" ]
There is a famous example: A compact separable metric space, two different finite Borel measures on the space, but the two measures agree with each other on all of the balls for the metric. R. O. Davies, "Measures not approximable or not specifiable by means of balls." Mathematika 18 (1971) 157--160
Let consider the above mentioned assertion due to Davide Giraudo. **Fact 1.** Let $μ$ a $\sigma$-finite measure on a measurable space $(X,S)$ , $\cal{A}$ an algebra which generates $S$ and $μ\_1 ,μ\_2$ two measures on $S$ such that for each $A\in\cal{A}$ , $μ\_1 (A)=μ\_2 (A)=μ(A)$. Then $μ\_1 (B)=μ\_2 (B)$ for each $...
90,491
If the value of a measure on any subset in a generator of a sigma algebra is known, will the measure for the sigma algebra also be uniquely determined? Thanks!
2011/12/11
[ "https://math.stackexchange.com/questions/90491", "https://math.stackexchange.com", "https://math.stackexchange.com/users/1281/" ]
Let consider the above mentioned assertion due to Davide Giraudo. **Fact 1.** Let $μ$ a $\sigma$-finite measure on a measurable space $(X,S)$ , $\cal{A}$ an algebra which generates $S$ and $μ\_1 ,μ\_2$ two measures on $S$ such that for each $A\in\cal{A}$ , $μ\_1 (A)=μ\_2 (A)=μ(A)$. Then $μ\_1 (B)=μ\_2 (B)$ for each $...
Caratheodory’s measure extension theorem.: Theorem 1.41 (Caratheodory). Let $A ⊂ 2^Ω$ be a ring and let $µ$ be a $σ$-finite premeasure on $A$. There exists a unique measure $µ'$ on $σ(A)$ such that $µ'(E) = µ(E)$ for all $E ∈ A$. Furthermore, $µ'$ is $σ$-finite. p. 19 of <http://www.math.unipd.it/~daipra/didattica/gali...
25,082,517
The following code works without error or exception - but still, it does not do what it should ! I wanted to save an image into the iOS library/Application Support folder. More precisely, the image should be placed into a /library/Application Support/bundleID\_name/subfolder/ (and the subfolder being called "location1"...
2014/08/01
[ "https://Stackoverflow.com/questions/25082517", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3826232/" ]
It took a while but I actually got it working by doing this in onTouch: ``` final int X = (int) event.getRawX(); final int Y = (int) event.getRawY(); ImageView j = (ImageView) findViewById(R.id.image); switch (event.getAction()) { case MotionEvent.ACTION_DOWN: _xDelta = (int) (X - j.getTranslat...
There is no MotionEvent.ACTION\_MOVE defined in DragEvent class OnDragListener interface defined the method ``` abstract boolean onDrag(View v, DragEvent event) ``` Action are: * ACTION\_DRAG\_STARTED * ACTION\_DRAG\_ENTERED * ACTION\_DRAG\_LOCATION * ACTION\_DRAG\_EXITED * ACTION\_DROP * ACTION\_DRAG\_ENDED Plea...
15,008,258
i got jailbreak iphone ios 6 in my tweak on ios 4&5 I used (void) kill to close other app running in the background. this is my code: ```objc #import "SBApplication.h" SBApplication *app ; app = [[objc_getClass("SBApplicationController") sharedInstance] applicationWithDisplayIdentifier:@"my killed program...
2013/02/21
[ "https://Stackoverflow.com/questions/15008258", "https://Stackoverflow.com", "https://Stackoverflow.com/users/998346/" ]
After few investigations I didn't find any code in jersey where the option list is populated. (probably something that is *not supported yet*) So you can implement your own WadlGenerator and inserting it the generator chain. Here is a sample `OptionsWadlGenerator` adding the `<option>` elements for parameter of type...
A quick search for the usages of `com.sun.research.ws.wadl.Param.getOption()` (see results [here](http://grepcode.com/search/usages?type=method&id=repo1.maven.org%24maven2@com.sun.jersey%24jersey-server@1.17@com%24sun%24research%24ws%24wadl@Param@getOption%28%29&k=u)) shows that it's actually never invoked from the lib...
31,363,867
I am trying to optimize layout of a set of boxes w.r.t. their hanger locations s.t. the boxes are most aligned with their hangers and do not crowd out each other. Using quadprog. Givens: ``` 1. box hanger x-locations (P). =710 850 990 1130 2. box-sizes (W). =690 550 690 130 3. usable x-spread tuple (S). =-150 ...
2015/07/12
[ "https://Stackoverflow.com/questions/31363867", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1397919/" ]
Strings are compared using [lexicographical order](https://en.wikipedia.org/wiki/Lexicographical_order), which at its simplest is what you would think of as “dictionary ordering”: the string `apple` is less than the string `banana` because the character `a` precedes the character `b` according to my English locale; but...
Think of the simplest possible C implementation of the function: ``` int strcmp(char *p1, char *p2) { int diff; do diff = *p1 - *p2; while (*p1++ && *p2++ && diff); return diff; } ``` The returned value happens to have the proper sign, but the value itself is just an artifact of the compariso...
43,523
What is the structure of $\ce{[Co(NH3)5SO4]+}$? If sulfate is a bidentate ligand, then the coordination number of cobalt would become 7. How is this possible?
2016/01/10
[ "https://chemistry.stackexchange.com/questions/43523", "https://chemistry.stackexchange.com", "https://chemistry.stackexchange.com/users/24227/" ]
There's a certain amount of misinformation here: > > sulfate is a bidentate ligand > > > Sulfate is actually a flexidentate ligand, which is a term used to describe a polydentate ligand which is found to show different denticity in different complexes. Sulfate can act both as mono- or a bidentate ligand. Remember...
Interestingly enough, it seems that crystal structure of $\ce{[Co(NH3)5(SO4)]+}$ has not yet been obtained. Probably it has something to do with [*trans*-effect](https://en.wikipedia.org/wiki/Trans_effect) of $\ce{SO4^2-}$, which makes $\ce{NH3}$ ligand extremely labile. Also, C.N. 7 is also very common for cobalt and ...
4,862,181
I'm using jquery validations and i want to clone rules from an element to another one. Is it possible? ``` var rule = $('[id=' + elementToCopy + ']').rules(); $(this).rules("add", rule); ```
2011/02/01
[ "https://Stackoverflow.com/questions/4862181", "https://Stackoverflow.com", "https://Stackoverflow.com/users/511021/" ]
What you're attempting appears to work, at least for simple rules like `required`. Make sure and use the [Id selector](http://api.jquery.com/id-selector/) (`$("#" + elementToCopy)`) when you want to retrieve an element by id. Also, be aware of the restriction on the [`rules("add", rules)`](http://docs.jquery.com/Plugin...
Yes you can do it. But will more elegant if you do this task using jQuery clone function. That make a deep copy of the set of matched elements. <http://api.jquery.com/clone/> Passing first parameter you can copy the element with ALL events and attributes.
4,862,181
I'm using jquery validations and i want to clone rules from an element to another one. Is it possible? ``` var rule = $('[id=' + elementToCopy + ']').rules(); $(this).rules("add", rule); ```
2011/02/01
[ "https://Stackoverflow.com/questions/4862181", "https://Stackoverflow.com", "https://Stackoverflow.com/users/511021/" ]
The script below copies the rules and the messages, the code you have only does it for the rules. Note the query for the messages uses element name, not element id. ``` var rules = $('#elementtocopy').rules(); rules['messages'] = $('form').data('validator').settings["your element name, NOT id"]; $('#newelementid').rul...
Yes you can do it. But will more elegant if you do this task using jQuery clone function. That make a deep copy of the set of matched elements. <http://api.jquery.com/clone/> Passing first parameter you can copy the element with ALL events and attributes.
2,741,300
When I try to run my ASP.NET app from my development environment I get the following error message: *Compiler Error Message: CS1502: The best overloaded method match for 'mmars.Printing.printFunctions.SetPrintSummaryProperties(mmars.contextInfo, ref mmars.Printing.printObjSummary)' has some invalid arguments*. When I ...
2010/04/29
[ "https://Stackoverflow.com/questions/2741300", "https://Stackoverflow.com", "https://Stackoverflow.com/users/307960/" ]
Turns out the solution to this problem was simply renaming my App\_Code folder to something else. Apparently the development web-server tries to do JIT compilation on stuff in a folder called App\_Code, even if all the members of those files already exist in the compiled assembly, which is what was causing this problem...
Have you tried clearing the Temporary ASP.NET Files? It's possible a cached version of an assembly is out of sync or something... Another possibility (remote), is that the old version of the dll is in your Assembly Cache?
7,117,778
I'm trying to do a scrollTO function with my code but I keeps just popping up to the top like its not connecting to the id im telling it to go to is there something im doing wrong?. ``` <div class="a-z"> <? $a1=range("A","Z"); foreach($a1 as $char2){ echo "<a href='#$char2' onclick='$.scrollTo( '#$char2', 800,...
2011/08/19
[ "https://Stackoverflow.com/questions/7117778", "https://Stackoverflow.com", "https://Stackoverflow.com/users/874185/" ]
Both MX and Spark `TextAreas` supports `editable` and `selectable` properties. The first one prevent user to change text, the second - to select it: ``` <mx:TextArea editable="false" selectable="false" text="Sample Text"/> <s:TextArea editable="false" selectable="false" text="Sample Text"/> ```
If you're talking about [MX `TextArea`](http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/controls/TextArea.html) you can disable component: ``` myTextArea.enabled = false; ``` If you're using [Spark `TextArea`](http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/spark/components/T...
7,117,778
I'm trying to do a scrollTO function with my code but I keeps just popping up to the top like its not connecting to the id im telling it to go to is there something im doing wrong?. ``` <div class="a-z"> <? $a1=range("A","Z"); foreach($a1 as $char2){ echo "<a href='#$char2' onclick='$.scrollTo( '#$char2', 800,...
2011/08/19
[ "https://Stackoverflow.com/questions/7117778", "https://Stackoverflow.com", "https://Stackoverflow.com/users/874185/" ]
I am not sure if I understand your problem, but it sounds like it could be the Safari 5.1 / Flash Debug player bug. Try switching to another browser when debugging/testing your project. If you get the same behaviour, forget everything I just said. Read more here: <https://discussions.apple.com/message/15666579#156665...
If you're talking about [MX `TextArea`](http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/controls/TextArea.html) you can disable component: ``` myTextArea.enabled = false; ``` If you're using [Spark `TextArea`](http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/spark/components/T...
7,117,778
I'm trying to do a scrollTO function with my code but I keeps just popping up to the top like its not connecting to the id im telling it to go to is there something im doing wrong?. ``` <div class="a-z"> <? $a1=range("A","Z"); foreach($a1 as $char2){ echo "<a href='#$char2' onclick='$.scrollTo( '#$char2', 800,...
2011/08/19
[ "https://Stackoverflow.com/questions/7117778", "https://Stackoverflow.com", "https://Stackoverflow.com/users/874185/" ]
Both MX and Spark `TextAreas` supports `editable` and `selectable` properties. The first one prevent user to change text, the second - to select it: ``` <mx:TextArea editable="false" selectable="false" text="Sample Text"/> <s:TextArea editable="false" selectable="false" text="Sample Text"/> ```
I am not sure if I understand your problem, but it sounds like it could be the Safari 5.1 / Flash Debug player bug. Try switching to another browser when debugging/testing your project. If you get the same behaviour, forget everything I just said. Read more here: <https://discussions.apple.com/message/15666579#156665...
28,373,328
The title is my question - how would I go about flipping all the bits in an std::ifstream that's been loaded from a file? ``` ifstream file( "filename.png" ); if ( !file.is_open( ) ) { return false; } ``` I don't know how I should be going from here. By flipping, I'm referring to inverting the bits (0 if 1, 1 i...
2015/02/06
[ "https://Stackoverflow.com/questions/28373328", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1709725/" ]
This is an X-Y problem. I really doubt you want to flip all the bits in a PNG format file, simply because there are other fields in the file besides the bitmap bits. Also, unless the image is pure black & white, there is more to the color bits than inverting the bits. That said, here's how to flip the bits. ``` While...
Here's one way to do it: ``` #include <fstream> int main(int argc, char **argv) { std::ifstream ifile(argv[1]); /// input std::ofstream ofile(argv[2]); /// output if (ifile.is_open() && ofile.is_open()) { char ch; std::string data = ""; while (ifile.get(ch)) { for (un...
15,952,669
I am using the FOSUserBundle to manage my website users. My goal is to make the login form get displayed in a modal window based on the boostrap framework. Down is my code for the modal window ``` <div class="modal hide" data-backdrop="static" id="login"> <div class="modal-header"> <a class="close" data-dismiss="m...
2013/04/11
[ "https://Stackoverflow.com/questions/15952669", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2269738/" ]
You can check if there are errors after logging in using: ``` {% if error %} {# do something #} {% endif %} ``` This means that you can check whether you want to modal hidden or if you want to show it on the page-load like so: ``` <div class="modal{% if not error %} hide{% endif %}"> <!-- model window --> <...
I think this is the best way to manage redirections after login succes/faillure using FOSUserBundle : Stackoverflow question : [redirect after login fos user bundle symfony](https://stackoverflow.com/questions/16020508/redirect-after-login-fos-user-bundle-symfony) Basicly, add a [LoginSuccessHandler](http://www.reece...
15,952,669
I am using the FOSUserBundle to manage my website users. My goal is to make the login form get displayed in a modal window based on the boostrap framework. Down is my code for the modal window ``` <div class="modal hide" data-backdrop="static" id="login"> <div class="modal-header"> <a class="close" data-dismiss="m...
2013/04/11
[ "https://Stackoverflow.com/questions/15952669", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2269738/" ]
I solved that overriding the login.twig.html and putting this near the beginning ``` {% if error %} <script> $('.modal').modal("show"); </script> <div>{{ error|trans }}</div> {% endif %} ``` but im still missing how to make this modal appear when the user clicks on a secured action and get redire...
I think this is the best way to manage redirections after login succes/faillure using FOSUserBundle : Stackoverflow question : [redirect after login fos user bundle symfony](https://stackoverflow.com/questions/16020508/redirect-after-login-fos-user-bundle-symfony) Basicly, add a [LoginSuccessHandler](http://www.reece...
427,102
> > **Possible Duplicate:** > > [Turn off display in Windows 7 without additional software](https://superuser.com/questions/321342/turn-off-display-in-windows-7-without-additional-software) > > > I have windows 7 installed with two monitors connected to it. I want to create a shortcut that will put both of my...
2012/05/21
[ "https://superuser.com/questions/427102", "https://superuser.com", "https://superuser.com/users/14946/" ]
Engaging the screen saver doesn't turn off the monitor. Also, using the `Windows` + `L` doesn't either, it only locks it. So, you could try a utility at NirSoft called [NirCmd](http://www.nirsoft.net/utils/nircmd.html) which will do what you need, as well as many other things. You will just need to set up a short cut ...
For standbying the 2 monitors i am now using the progam "LCDoff" , I was using "monitoroff", both are very tiny utilities. <http://www.kev009.com/wp/projects/lcdoff/> I made a shortcut to it, and it works. One time a video playback program was running that disables monitor standby, other than that, it is working....
54,636
On a 10.7.4 Lion Server installation the Server Admin.app fails to start correctly. The window is drawn and the last known server and its services are displayed, but a spinning wheel keeps spinning on the bottom status bar. Console.app log shows: ``` Jun 24 18:19:56 mac01 servermgrd[437]: [437] error in getAndLockCon...
2012/06/24
[ "https://apple.stackexchange.com/questions/54636", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/21252/" ]
Review the firewall configuration of the authoritative DNS servers for the PTR records of your (public) IP address. In our case, when looking up the PTR records of the public IP address (123.45.67.89 for example) by using the reverse notation (89.67.45.123.in-addr.arpa) in Terminal on the Lion Server: 1. `$ dig NS 67...
`$ sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.servermgrd.plist` and the issue was gone for a few minutes.
54,636
On a 10.7.4 Lion Server installation the Server Admin.app fails to start correctly. The window is drawn and the last known server and its services are displayed, but a spinning wheel keeps spinning on the bottom status bar. Console.app log shows: ``` Jun 24 18:19:56 mac01 servermgrd[437]: [437] error in getAndLockCon...
2012/06/24
[ "https://apple.stackexchange.com/questions/54636", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/21252/" ]
I had the same issue. As suggested here, I tracked the problem down to a bad NS record (typo) for the reverse zone. changeip -checkhostname reported no issues manually checking the forward/reverse all looked good. But when I specifically checked the NS record for the reverse zone, noticed the typo.
`$ sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.servermgrd.plist` and the issue was gone for a few minutes.
54,636
On a 10.7.4 Lion Server installation the Server Admin.app fails to start correctly. The window is drawn and the last known server and its services are displayed, but a spinning wheel keeps spinning on the bottom status bar. Console.app log shows: ``` Jun 24 18:19:56 mac01 servermgrd[437]: [437] error in getAndLockCon...
2012/06/24
[ "https://apple.stackexchange.com/questions/54636", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/21252/" ]
Review the firewall configuration of the authoritative DNS servers for the PTR records of your (public) IP address. In our case, when looking up the PTR records of the public IP address (123.45.67.89 for example) by using the reverse notation (89.67.45.123.in-addr.arpa) in Terminal on the Lion Server: 1. `$ dig NS 67...
1. Add a firewall "Address Group" for IP address "127.0.0.1". 2. Give the "Services"-tab "Allow all traffic" permissions for that newly created group.
54,636
On a 10.7.4 Lion Server installation the Server Admin.app fails to start correctly. The window is drawn and the last known server and its services are displayed, but a spinning wheel keeps spinning on the bottom status bar. Console.app log shows: ``` Jun 24 18:19:56 mac01 servermgrd[437]: [437] error in getAndLockCon...
2012/06/24
[ "https://apple.stackexchange.com/questions/54636", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/21252/" ]
I had the same issue. As suggested here, I tracked the problem down to a bad NS record (typo) for the reverse zone. changeip -checkhostname reported no issues manually checking the forward/reverse all looked good. But when I specifically checked the NS record for the reverse zone, noticed the typo.
1. Add a firewall "Address Group" for IP address "127.0.0.1". 2. Give the "Services"-tab "Allow all traffic" permissions for that newly created group.
54,636
On a 10.7.4 Lion Server installation the Server Admin.app fails to start correctly. The window is drawn and the last known server and its services are displayed, but a spinning wheel keeps spinning on the bottom status bar. Console.app log shows: ``` Jun 24 18:19:56 mac01 servermgrd[437]: [437] error in getAndLockCon...
2012/06/24
[ "https://apple.stackexchange.com/questions/54636", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/21252/" ]
I had the same issue. As suggested here, I tracked the problem down to a bad NS record (typo) for the reverse zone. changeip -checkhostname reported no issues manually checking the forward/reverse all looked good. But when I specifically checked the NS record for the reverse zone, noticed the typo.
Review the firewall configuration of the authoritative DNS servers for the PTR records of your (public) IP address. In our case, when looking up the PTR records of the public IP address (123.45.67.89 for example) by using the reverse notation (89.67.45.123.in-addr.arpa) in Terminal on the Lion Server: 1. `$ dig NS 67...
6,886,018
I'm building a WP7 app that gets all its data through WCF services. I want to implement MVVM-Light in it but in tutorials I've done, I see that in the ViewModelLocator it wants to create a static instance of all my ViewModels when the app starts. My problem is that in my constructors for my VM's is where I make my WCF ...
2011/07/30
[ "https://Stackoverflow.com/questions/6886018", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2391654/" ]
As ever in MVVM there is no *right* way ... as it is about feedom ... :-) You can put the code into your view model if you want. However, you then will have to also generate the design time data in the view model too - if you want to use it. The big disadvantage with this approach is that you introduce a coupling b...
I don't think it's good to put WCF call in ViewModel, you should encapsulate the WCF call in another class. Your ViewModel should only contain the GUI logic. I think what you get from the WCF call is the model, you can use the model to create ViewModel.
6,886,018
I'm building a WP7 app that gets all its data through WCF services. I want to implement MVVM-Light in it but in tutorials I've done, I see that in the ViewModelLocator it wants to create a static instance of all my ViewModels when the app starts. My problem is that in my constructors for my VM's is where I make my WCF ...
2011/07/30
[ "https://Stackoverflow.com/questions/6886018", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2391654/" ]
As ever in MVVM there is no *right* way ... as it is about feedom ... :-) You can put the code into your view model if you want. However, you then will have to also generate the design time data in the view model too - if you want to use it. The big disadvantage with this approach is that you introduce a coupling b...
Here is my example of my CommonServiceHelper.cs file ``` public void GetUserSettings(UserInfoIn input, Action<UserInfoOut, Exception> callback) { var proxy = new CommonServiceClient(); try { proxy.GetUserSettingsCompleted += (sender, eventargs) => { ...
19,215,948
Can the synchronization statements be reordered. i.e : Can : ``` synchronized(A) { synchronized(B) { ...... } } ``` become : ``` synchronized(B) { synchronized(A) { ...... } } ```
2013/10/07
[ "https://Stackoverflow.com/questions/19215948", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1630327/" ]
> > Can the synchronization statements be reordered? > > > I assume you are asking if the compiler can reorder the `synchronized` blocks so the lock order happens in a different order than the code. The answer is no. A `synchronized` block (and a `volatile` field access) impose ordering restrictions on the compil...
Yes and no. The order must be consistent. Suppose you are creating a transaction between two bank accounts, and always grab the sender's lock first, then grab the receiver's lock. Problem is - say both Dan and Bob want to transfer money to each other at the same time. Thread 1 might grab Dan's lock, as it processes ...
19,215,948
Can the synchronization statements be reordered. i.e : Can : ``` synchronized(A) { synchronized(B) { ...... } } ``` become : ``` synchronized(B) { synchronized(A) { ...... } } ```
2013/10/07
[ "https://Stackoverflow.com/questions/19215948", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1630327/" ]
> > Can the synchronization statements be reordered? > > > I assume you are asking if the compiler can reorder the `synchronized` blocks so the lock order happens in a different order than the code. The answer is no. A `synchronized` block (and a `volatile` field access) impose ordering restrictions on the compil...
Synchronized statements are never reordered by the compiler as it has a big effect on what ends up happening. Synchronized blocks are used to obtain a lock on the specific Object placed between the synchronized parenthesis. ``` private final Object LOCK_1 = new Object(); public void foo(){ synchronized(LOCK_...
12,096,325
I want to select a range of model records via created\_at attribute, I tried this query ``` Client.where('created_at BETWEEN ? AND ?', 30.days.from_now, DateTime.now.utc) ``` But it return an empty array. ``` 1.9.3-p125 :029 > Client.where('created_at BETWEEN ? AND ?', 30.days.from_now, DateTime.now.utc) Posting ...
2012/08/23
[ "https://Stackoverflow.com/questions/12096325", "https://Stackoverflow.com", "https://Stackoverflow.com/users/611350/" ]
``` Client. where(created_at: 30.days.ago..Date.current). group_by{|u| u.created_at.to_date} ``` You can pass `where` an array of values between which you would like the results (for inclusive vs. exclusive ranges, look up the differences between `..` and `...`). Further, you can group results by calling `group_...
I believe what you want is (note ago versus from now): ``` Client.where('created_at BETWEEN ? AND ?', 30.days.ago.utc, Time.now.utc) ```
35,752,918
``` private void button1_Click(object sender, EventArgs e) { string accountsSettingsFile = Path.GetDirectoryName(Application.LocalUserAppDataPath) + "\\accounts" + "\\accounts.txt"; if (!File.Exists(accountsSettingsFile)) File.Create(accountsSettingsFile); System.IO.File.Writ...
2016/03/02
[ "https://Stackoverflow.com/questions/35752918", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5921706/" ]
I would go with something like this, especially if your list of controls might get longer later on: ``` private void button1_Click(object sender, EventArgs e) { Form1.WriteToFile(textBox1, textBox2, textBox3, checkBox); } private static void WriteToFile(params Control[] controls) { s...
``` var checked = checkBox.Checked ? "true" : "false"; var textToBeSaved = string.Format("{0}\n{1}\n{2}\n{3}", textBox1.Text, textBox2.Text, textBox3.Text, checked) ```
35,752,918
``` private void button1_Click(object sender, EventArgs e) { string accountsSettingsFile = Path.GetDirectoryName(Application.LocalUserAppDataPath) + "\\accounts" + "\\accounts.txt"; if (!File.Exists(accountsSettingsFile)) File.Create(accountsSettingsFile); System.IO.File.Writ...
2016/03/02
[ "https://Stackoverflow.com/questions/35752918", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5921706/" ]
I would go with something like this, especially if your list of controls might get longer later on: ``` private void button1_Click(object sender, EventArgs e) { Form1.WriteToFile(textBox1, textBox2, textBox3, checkBox); } private static void WriteToFile(params Control[] controls) { s...
``` private void button1_Click(object sender, EventArgs e) { string accountsSettingsFile = Path.GetDirectoryName(Application.LocalUserAppDataPath) + "\\accounts" + "\\accounts.txt"; if (!File.Exists(accountsSettingsFile)) File.Create(accountsSettingsFile); //New Code StringBuil...
9,408,210
> > **Possible Duplicate:** > > [Display numbers from 1 to 100 without loops or conditions](https://stackoverflow.com/questions/2044033/display-numbers-from-1-to-100-without-loops-or-conditions) > > > Interview question: Print 1 to 10 without any loop in java.
2012/02/23
[ "https://Stackoverflow.com/questions/9408210", "https://Stackoverflow.com", "https://Stackoverflow.com/users/559070/" ]
Simple way: `System.out.println` the values: ``` System.out.println(1); System.out.println(2); System.out.println(3); System.out.println(4); System.out.println(5); System.out.println(6); System.out.println(7); System.out.println(8); System.out.println(9); System.out.println(10);...
If you like your programs obtuse, no loops, condition statements or main method. ``` static int i = 0; static { try { recurse(); } catch (Throwable t) { System.exit(0); } } private static void recurse() { System.out.print(++i + 0 / (i - 11) + " "); recurse(); } ``` --- This uses...
83,619
I'm displaying an overview table of items. The items have a: * category * a date * additional, domain-specific information that needs to be displayed in the same view On the overview list, only one item is shown per category. The **most interesting**, from the user's point of view, is an item **in a given category** ...
2015/08/26
[ "https://ux.stackexchange.com/questions/83619", "https://ux.stackexchange.com", "https://ux.stackexchange.com/users/33936/" ]
It wasnt made clear if they only need to know if there are future items or if they need to know what these items are. I'll go under the premise that they do. It's also not clear why this is important. I'll add a bit of data to your example. Item 1, Category A, 2015-04-12 Item 2, Category A, 2015-06-30 Item 3, Categor...
The language in your wireframes doesn't seem to match how you're explaining things. It sounds like the thing a user needs to do to get from the full table to the "most interesting" view, is **hide future dates**. ![mockup](https://i.stack.imgur.com/l3mbd.png) [download bmml source](/plugins/mockups/download?image=htt...
83,619
I'm displaying an overview table of items. The items have a: * category * a date * additional, domain-specific information that needs to be displayed in the same view On the overview list, only one item is shown per category. The **most interesting**, from the user's point of view, is an item **in a given category** ...
2015/08/26
[ "https://ux.stackexchange.com/questions/83619", "https://ux.stackexchange.com", "https://ux.stackexchange.com/users/33936/" ]
It wasnt made clear if they only need to know if there are future items or if they need to know what these items are. I'll go under the premise that they do. It's also not clear why this is important. I'll add a bit of data to your example. Item 1, Category A, 2015-04-12 Item 2, Category A, 2015-06-30 Item 3, Categor...
Okay. If I am reading this correct: items appear in the client-side database, they have a name, date (of creation or access), some metadata, maybe amount. The user need is to follow the right items availability. A simple date filter would allow your users filter data by date and filter out future only or existing ite...
83,619
I'm displaying an overview table of items. The items have a: * category * a date * additional, domain-specific information that needs to be displayed in the same view On the overview list, only one item is shown per category. The **most interesting**, from the user's point of view, is an item **in a given category** ...
2015/08/26
[ "https://ux.stackexchange.com/questions/83619", "https://ux.stackexchange.com", "https://ux.stackexchange.com/users/33936/" ]
It wasnt made clear if they only need to know if there are future items or if they need to know what these items are. I'll go under the premise that they do. It's also not clear why this is important. I'll add a bit of data to your example. Item 1, Category A, 2015-04-12 Item 2, Category A, 2015-06-30 Item 3, Categor...
After reading the comment thread on dennislees' answer, it seems like we have a table that's trying to do too much. There are two items of interest for the user. - What's the the most recently "delivered" item for each category - What items are scheduled to be "delivered" It'll make sense to break this up into 2 sepa...
14,556,569
For some reason, my camera app saves all photos rotated 90 degrees (pictures only look right when taken with camera on landscape mode) I believe onPictureTaken should rotate photos automatically but I read there is a problem with Samsung devices (I haven't been able to test it on another brand so I don't know if it's t...
2013/01/28
[ "https://Stackoverflow.com/questions/14556569", "https://Stackoverflow.com", "https://Stackoverflow.com/users/535967/" ]
I think is caused by the character set you used in you HTML file. Check out the wiki page about charset <http://en.wikipedia.org/wiki/Character_encodings_in_HTML> And, this problem can also be caused by using a different charset in your text editor from your HTML charset. For non-ascii chars, I recommend to use UTF-...
This is a character encoding issue. From the symptoms, it seems that the HTML document is in fact UTF-8 encoded, which is fine, but it is being treated as being in another encoding, probably ISO-8859-6. You can check this out by selecting UTF-8 in the character encoding menu in “View” command (or equivalent) in your br...
19,154,780
``` public void clear() { lblage.Text = ""; lblclosingbirds.Text = ""; lbltypeoffeed.Text = ""; lbltypeoffeedf.Text = ""; lblstdfeed.Text = ""; lblstdfeedf.Text = ""; lblstdhd.Text = ""; lblstdhe.Text = ""; lblExpeggs.Text = ""; lblbirdsf.Text = ""; txtacteggs.Text = ""; ...
2013/10/03
[ "https://Stackoverflow.com/questions/19154780", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2813924/" ]
``` void ClearAllControlsRecursive(Control container) { foreach(var control As Control in container.Controls) { if(typeof control is TextBox) { ((TextBox)control).Text = String.Empty; } if(control.HasControls()) { ClearAllControlsRecursive(control)...
you can try like this ``` foreach (object control in form1.Controls) { if (control is TextBox) { control.Text = ""; } } ```
19,154,780
``` public void clear() { lblage.Text = ""; lblclosingbirds.Text = ""; lbltypeoffeed.Text = ""; lbltypeoffeedf.Text = ""; lblstdfeed.Text = ""; lblstdfeedf.Text = ""; lblstdhd.Text = ""; lblstdhe.Text = ""; lblExpeggs.Text = ""; lblbirdsf.Text = ""; txtacteggs.Text = ""; ...
2013/10/03
[ "https://Stackoverflow.com/questions/19154780", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2813924/" ]
``` void ClearAllControlsRecursive(Control container) { foreach(var control As Control in container.Controls) { if(typeof control is TextBox) { ((TextBox)control).Text = String.Empty; } if(control.HasControls()) { ClearAllControlsRecursive(control)...
you can use this extension method : ``` public static IEnumerable<TControl> GetChildControls(this Control control) where TControl : Control { var children = (control.Controls != null) ? control.Controls.OfType<TControl>() : Enumerable.Empty<TControl>(); return children.SelectMany(c => GetChildCont...
19,154,780
``` public void clear() { lblage.Text = ""; lblclosingbirds.Text = ""; lbltypeoffeed.Text = ""; lbltypeoffeedf.Text = ""; lblstdfeed.Text = ""; lblstdfeedf.Text = ""; lblstdhd.Text = ""; lblstdhe.Text = ""; lblExpeggs.Text = ""; lblbirdsf.Text = ""; txtacteggs.Text = ""; ...
2013/10/03
[ "https://Stackoverflow.com/questions/19154780", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2813924/" ]
``` void ClearAllControlsRecursive(Control container) { foreach(var control As Control in container.Controls) { if(typeof control is TextBox) { ((TextBox)control).Text = String.Empty; } if(control.HasControls()) { ClearAllControlsRecursive(control)...
``` void ClearAllControlsRecursive(Control container) { foreach (var control in container.Controls) { if (control is TextBox) { ((TextBox)control).Text = String.Empty; } } } ``` and i cal this method like... ``` ClearAllControlsRecursive(panel1); ```
19,154,780
``` public void clear() { lblage.Text = ""; lblclosingbirds.Text = ""; lbltypeoffeed.Text = ""; lbltypeoffeedf.Text = ""; lblstdfeed.Text = ""; lblstdfeedf.Text = ""; lblstdhd.Text = ""; lblstdhe.Text = ""; lblExpeggs.Text = ""; lblbirdsf.Text = ""; txtacteggs.Text = ""; ...
2013/10/03
[ "https://Stackoverflow.com/questions/19154780", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2813924/" ]
you can try like this ``` foreach (object control in form1.Controls) { if (control is TextBox) { control.Text = ""; } } ```
you can use this extension method : ``` public static IEnumerable<TControl> GetChildControls(this Control control) where TControl : Control { var children = (control.Controls != null) ? control.Controls.OfType<TControl>() : Enumerable.Empty<TControl>(); return children.SelectMany(c => GetChildCont...
19,154,780
``` public void clear() { lblage.Text = ""; lblclosingbirds.Text = ""; lbltypeoffeed.Text = ""; lbltypeoffeedf.Text = ""; lblstdfeed.Text = ""; lblstdfeedf.Text = ""; lblstdhd.Text = ""; lblstdhe.Text = ""; lblExpeggs.Text = ""; lblbirdsf.Text = ""; txtacteggs.Text = ""; ...
2013/10/03
[ "https://Stackoverflow.com/questions/19154780", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2813924/" ]
``` void ClearAllControlsRecursive(Control container) { foreach (var control in container.Controls) { if (control is TextBox) { ((TextBox)control).Text = String.Empty; } } } ``` and i cal this method like... ``` ClearAllControlsRecursive(panel1); ```
you can try like this ``` foreach (object control in form1.Controls) { if (control is TextBox) { control.Text = ""; } } ```
19,154,780
``` public void clear() { lblage.Text = ""; lblclosingbirds.Text = ""; lbltypeoffeed.Text = ""; lbltypeoffeedf.Text = ""; lblstdfeed.Text = ""; lblstdfeedf.Text = ""; lblstdhd.Text = ""; lblstdhe.Text = ""; lblExpeggs.Text = ""; lblbirdsf.Text = ""; txtacteggs.Text = ""; ...
2013/10/03
[ "https://Stackoverflow.com/questions/19154780", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2813924/" ]
``` void ClearAllControlsRecursive(Control container) { foreach (var control in container.Controls) { if (control is TextBox) { ((TextBox)control).Text = String.Empty; } } } ``` and i cal this method like... ``` ClearAllControlsRecursive(panel1); ```
you can use this extension method : ``` public static IEnumerable<TControl> GetChildControls(this Control control) where TControl : Control { var children = (control.Controls != null) ? control.Controls.OfType<TControl>() : Enumerable.Empty<TControl>(); return children.SelectMany(c => GetChildCont...
12,422,744
I had an issue that code `Type.GetType(myTypeName)` was returning `null` because assembly with that type is not current executing assembly. The solution I found for this issue is next: ``` var assemblies = AppDomain.CurrentDomain.GetAssemblies(); Type myType = assemblies.SelectMany(a => a.GetTypes()) ...
2012/09/14
[ "https://Stackoverflow.com/questions/12422744", "https://Stackoverflow.com", "https://Stackoverflow.com/users/801306/" ]
It is possible that the type is in an assembly that has not yet been loaded. Later in your program it then is. If you look at the output window this should give you sn idea of when the assemblies are being loaded.
And if you exlucde mscorlib assembly?? , you can try this: ``` var assemblies = AppDomain.CurrentDomain.GetAssemblies().Where(asb=>!asb.FullName.StartsWith("mscorlib")).ToList(); Type myType = assemblies.SelectMany(a => a.GetTypes()) .Single(t => t.FullName == myTypeName); ```
12,422,744
I had an issue that code `Type.GetType(myTypeName)` was returning `null` because assembly with that type is not current executing assembly. The solution I found for this issue is next: ``` var assemblies = AppDomain.CurrentDomain.GetAssemblies(); Type myType = assemblies.SelectMany(a => a.GetTypes()) ...
2012/09/14
[ "https://Stackoverflow.com/questions/12422744", "https://Stackoverflow.com", "https://Stackoverflow.com/users/801306/" ]
Problem you are facing is caused by design of [GetAssemblies](http://msdn.microsoft.com/en-us/library/system.appdomain.getassemblies.aspx) method of `AppDomain` class - according to documentation this method: > > Gets the assemblies that have been loaded into the execution context of this application domain. > > > ...
It is possible that the type is in an assembly that has not yet been loaded. Later in your program it then is. If you look at the output window this should give you sn idea of when the assemblies are being loaded.
12,422,744
I had an issue that code `Type.GetType(myTypeName)` was returning `null` because assembly with that type is not current executing assembly. The solution I found for this issue is next: ``` var assemblies = AppDomain.CurrentDomain.GetAssemblies(); Type myType = assemblies.SelectMany(a => a.GetTypes()) ...
2012/09/14
[ "https://Stackoverflow.com/questions/12422744", "https://Stackoverflow.com", "https://Stackoverflow.com/users/801306/" ]
It is possible that the type is in an assembly that has not yet been loaded. Later in your program it then is. If you look at the output window this should give you sn idea of when the assemblies are being loaded.
BTW if you *do* know the `FullName` of the assembly containing the type (or an assembly containing a `TypeForwardedToAttribute` for the type) you *can* use `Type.GetType`. Specifically, `Type.GetType(Assembly.CreateQualifiedName(assembly.FullName, myTypeName))` which will look something like: ``` Type.GetType("Some.Co...
12,422,744
I had an issue that code `Type.GetType(myTypeName)` was returning `null` because assembly with that type is not current executing assembly. The solution I found for this issue is next: ``` var assemblies = AppDomain.CurrentDomain.GetAssemblies(); Type myType = assemblies.SelectMany(a => a.GetTypes()) ...
2012/09/14
[ "https://Stackoverflow.com/questions/12422744", "https://Stackoverflow.com", "https://Stackoverflow.com/users/801306/" ]
It is possible that the type is in an assembly that has not yet been loaded. Later in your program it then is. If you look at the output window this should give you sn idea of when the assemblies are being loaded.
Another [answer](https://stackoverflow.com/a/39489661/147511) shows the best way for obtaining (at runtime) a `Type` defined in an `Assembly` that might not be loaded: ``` var T1 = Type.GetType("System.Web.Configuration.IAssemblyCache, " + "System.Web, " + "Version=4.0.0.0...
12,422,744
I had an issue that code `Type.GetType(myTypeName)` was returning `null` because assembly with that type is not current executing assembly. The solution I found for this issue is next: ``` var assemblies = AppDomain.CurrentDomain.GetAssemblies(); Type myType = assemblies.SelectMany(a => a.GetTypes()) ...
2012/09/14
[ "https://Stackoverflow.com/questions/12422744", "https://Stackoverflow.com", "https://Stackoverflow.com/users/801306/" ]
Problem you are facing is caused by design of [GetAssemblies](http://msdn.microsoft.com/en-us/library/system.appdomain.getassemblies.aspx) method of `AppDomain` class - according to documentation this method: > > Gets the assemblies that have been loaded into the execution context of this application domain. > > > ...
And if you exlucde mscorlib assembly?? , you can try this: ``` var assemblies = AppDomain.CurrentDomain.GetAssemblies().Where(asb=>!asb.FullName.StartsWith("mscorlib")).ToList(); Type myType = assemblies.SelectMany(a => a.GetTypes()) .Single(t => t.FullName == myTypeName); ```
12,422,744
I had an issue that code `Type.GetType(myTypeName)` was returning `null` because assembly with that type is not current executing assembly. The solution I found for this issue is next: ``` var assemblies = AppDomain.CurrentDomain.GetAssemblies(); Type myType = assemblies.SelectMany(a => a.GetTypes()) ...
2012/09/14
[ "https://Stackoverflow.com/questions/12422744", "https://Stackoverflow.com", "https://Stackoverflow.com/users/801306/" ]
Another [answer](https://stackoverflow.com/a/39489661/147511) shows the best way for obtaining (at runtime) a `Type` defined in an `Assembly` that might not be loaded: ``` var T1 = Type.GetType("System.Web.Configuration.IAssemblyCache, " + "System.Web, " + "Version=4.0.0.0...
And if you exlucde mscorlib assembly?? , you can try this: ``` var assemblies = AppDomain.CurrentDomain.GetAssemblies().Where(asb=>!asb.FullName.StartsWith("mscorlib")).ToList(); Type myType = assemblies.SelectMany(a => a.GetTypes()) .Single(t => t.FullName == myTypeName); ```
12,422,744
I had an issue that code `Type.GetType(myTypeName)` was returning `null` because assembly with that type is not current executing assembly. The solution I found for this issue is next: ``` var assemblies = AppDomain.CurrentDomain.GetAssemblies(); Type myType = assemblies.SelectMany(a => a.GetTypes()) ...
2012/09/14
[ "https://Stackoverflow.com/questions/12422744", "https://Stackoverflow.com", "https://Stackoverflow.com/users/801306/" ]
Problem you are facing is caused by design of [GetAssemblies](http://msdn.microsoft.com/en-us/library/system.appdomain.getassemblies.aspx) method of `AppDomain` class - according to documentation this method: > > Gets the assemblies that have been loaded into the execution context of this application domain. > > > ...
BTW if you *do* know the `FullName` of the assembly containing the type (or an assembly containing a `TypeForwardedToAttribute` for the type) you *can* use `Type.GetType`. Specifically, `Type.GetType(Assembly.CreateQualifiedName(assembly.FullName, myTypeName))` which will look something like: ``` Type.GetType("Some.Co...
12,422,744
I had an issue that code `Type.GetType(myTypeName)` was returning `null` because assembly with that type is not current executing assembly. The solution I found for this issue is next: ``` var assemblies = AppDomain.CurrentDomain.GetAssemblies(); Type myType = assemblies.SelectMany(a => a.GetTypes()) ...
2012/09/14
[ "https://Stackoverflow.com/questions/12422744", "https://Stackoverflow.com", "https://Stackoverflow.com/users/801306/" ]
Problem you are facing is caused by design of [GetAssemblies](http://msdn.microsoft.com/en-us/library/system.appdomain.getassemblies.aspx) method of `AppDomain` class - according to documentation this method: > > Gets the assemblies that have been loaded into the execution context of this application domain. > > > ...
Another [answer](https://stackoverflow.com/a/39489661/147511) shows the best way for obtaining (at runtime) a `Type` defined in an `Assembly` that might not be loaded: ``` var T1 = Type.GetType("System.Web.Configuration.IAssemblyCache, " + "System.Web, " + "Version=4.0.0.0...