text
stringlengths
36
35k
label
class label
2 classes
source
stringclasses
3 values
tokens_length
int64
128
4.1k
text_length
int64
36
35k
Sales People vs IT People...WHY?. The past positions that I have had I have started noticing that the Sales Department always has a chip on their shoulder regarding the IT Department. I know that a lot of sales people have that Superiority Complex where they think the company only is there because of them but...come on I just normally see it with Sales vs IT. I never hear the sales people talk about the accounting people or customer service people. Just the internal IT department. Now that I am now the Sys Admin of a smaller company, I am seeing it more and more. I was just wondering if anyone else has came across this, and what are some nice comebacks to the sales people when they go on ignorant rants.
0non-cybersec
Reddit
154
714
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application. I need to scale my app adding some spot instances that EB do not support.</p> <p>So I create a second autoscaling from a launch configuration with spot instances. The autoscaling use the same load balancer created by beanstalk.</p> <p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p> <p>This work fine, but:</p> <ol> <li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p> </li> <li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p> </li> </ol> <p><strong>UPDATE</strong></p> <p>Elastic Beanstalk add support to spot instance since 2019... see: <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
0non-cybersec
Stackexchange
349
1,234
Tracking down the cause of loss of network connectivity. <p>I have been having issues with short (seconds, but long enough to break a TCP connection) periods of loss of internet connectivity. I have tracked this down to what appears to be an actual loss of connectivity with my router (a BT Home Hub 4, provided by my ISP / landlord, I wont be able to get this changed without a good explanation).</p> <p>I tried making a simple program using IcmpSendEcho (to 192.168.1.254), which will at these points give error 11010 "Error due to lack of resources." which doesn't seem to really tell me anything more than "ping" does...</p> <p>Is there anything I can do to get a more detailed explanation, or at least work my way to a conclusion?</p> <p>I am thinking of monitoring it over direct Ethernet, but I have experienced this even in the same room with WiFi, so don't think there should be that much interference (and if that is possible, what could be a source, how to prove it, and what can be done about it?). But otherwise this is really not something I have ever seen before...</p>
0non-cybersec
Stackexchange
265
1,088
Could not load file or assembly in VS2017 with IIS express. <p>We have a ASP.NET project in the company that runs for 5/6 developers. All Visual Studio 2017 and debug on IIS Express, no crazy setting or anything to make it run.</p> <p>1 colleague cannot get it to work, he always gets the following exception:</p> <p><a href="https://i.stack.imgur.com/MsOBz.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MsOBz.png" alt="enter image description here"></a></p> <p>We had this problem a few months back, then out of frustration the PC was re-installed and the problem was gone. He didn't develop for a few weeks and today the problem appeared again.</p> <p>I searched long and far but it's such a generic error I can't really figure this one out.</p> <p>When I run the fusion log viewer I see the following result:</p> <p><a href="https://pastebin.com/aCVZn3EB" rel="nofollow noreferrer">https://pastebin.com/aCVZn3EB</a></p> <pre><code>The operation failed. Bind result: hr = 0x80131018. No description available. Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll Running under executable C:\Program Files\IIS Express\iisexpress.exe --- A detailed error log follows. === Pre-bind state information === LOG: DisplayName = System.ServiceModel.Activities, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 (Fully-specified) LOG: Appbase = file:///C:/Users/User/Projects/project/project.UserSite/ LOG: Initial PrivatePath = C:\Users\User\Projects\project\project.UserSite\bin LOG: Dynamic Base = C:\Users\User\AppData\Local\Temp\Temporary ASP.NET Files\vs\e0254dae LOG: Cache Base = C:\Users\User\AppData\Local\Temp\Temporary ASP.NET Files\vs\e0254dae LOG: AppName = 38c6ff11 Calling assembly : (Unknown). === LOG: This bind starts in default load context. LOG: Using application configuration file: C:\Users\User\Projects\project\project.UserSite\web.config LOG: Using host configuration file: C:\Users\User\Documents\IISExpress\config\aspnet.config LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config. LOG: Binding succeeds. Returns assembly from C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Activities\v4.0_4.0.0.0__31bf3856ad364e35\System.ServiceModel.Activities.dll. LOG: Assembly is loaded in default load context. ERR: Unrecoverable error occurred during pre-download check (hr = 0x80131018). *** Assembly Binder Log Entry (7/18/2017 @ 8:55:15 AM) *** </code></pre>
0non-cybersec
Stackexchange
791
2,534
Shorewall missing from Ubuntu 11.10 default repository?. <p>I'm looking to configure my network using Shorewall on my Ubuntu 11.10 laptop. </p> <p>When I run <code>apt-cache search</code> it doesn't find Shorewall, is there some other repository I can add it from? </p> <p>Or is the <a href="http://www.shorewall.net/download.htm" rel="nofollow">Debian package listed on the Shorewall</a> website compatible with Ubuntu 11.10, since Ubuntu is Debian-based?</p>
0non-cybersec
Stackexchange
140
465
Django Custom MultiWidget Retaining Old Values. <p>I have created a simple custom <code>MultiValueField</code> and <code>MultiWidget</code> for the purpose of entering a date of birth but allowing separate entry of the day, month and year. The rationale is that the app is for entry of historical data, so one or more of these fields could be unknown. There is also a checkbox that displays 'unknown' on the user-facing site.</p> <p>I've found that everything works fine, except that when I save an instance of an object in the admin site and go to create a new instance, the blank admin form displays the date values from the previous entry:</p> <p><a href="https://i.stack.imgur.com/QBejq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QBejq.png" alt="Custom MultiWidget"></a></p> <p>All those fields should be blank for a new entry.</p> <p>It looks like the field is not being reinitialised correctly, but I am not sure where this should take place. I have added a workaround by checking in the form whether to reinitialise the fields, but I feel that this should be done in the custom field/widget.</p> <p>Sample code:</p> <pre class="lang-py prettyprint-override"><code> class CustomDateWidget(forms.MultiWidget): """Custom MultiWidget to allow saving different date values.""" template_name = 'myapp/widgets/custom_date_widget.html' def __init__(self, attrs=None): _widgets = (forms.NumberInput(attrs=({'placeholder': 'DD'})), forms.NumberInput(attrs=({'placeholder': 'MM'})), forms.NumberInput(attrs=({'placeholder': 'YYYY'})), forms.CheckboxInput()) super().__init__(_widgets, attrs) def decompress(self, value): if value: return value else: return '', '', '', False def value_from_datadict(self, data, files, name): value_list = [ widget.value_from_datadict(data, files, name + '_%s' % i) for i, widget in enumerate(self.widgets) ] return value_list class CustomDateField(forms.MultiValueField): """Custom MultiValueField to allow saving different date values.""" def __init__(self, **kwargs): fields = (forms.IntegerField(min_value=1, max_value=31), forms.IntegerField(min_value=1, max_value=12), forms.IntegerField(min_value=1800, max_value=9999), forms.BooleanField()) super().__init__(fields=fields, widget=CustomDateWidget, require_all_fields=True, **kwargs) def compress(self, data_list): return data_list class PersonAdminForm(forms.ModelForm): """Custom Person admin form.""" date_of_birth = CustomDateField(required=False) class Meta: model = Person fields = '__all__' def __init__(self, *args, **kwargs): super(PersonAdminForm, self).__init__(*args, **kwargs) # Dirty workaround? if not self.instance.pk: self.fields['date_of_birth'] = CustomDateField(required=False) ... </code></pre> <p>Widget template:</p> <pre class="lang-html prettyprint-override"><code> &lt;style&gt; .custom-date-widget-container { padding-right: 15px; } .custom-date-widget td { width: 25%; } .custom-date-widget td &gt; input { width: 100%; box-sizing: border-box; } &lt;/style&gt; {% spaceless %} &lt;div class="custom-date-widget-container"&gt; &lt;table class="custom-date-widget"&gt; &lt;thead&gt; &lt;tr&gt; &lt;th&gt;Day&lt;/th&gt; &lt;th&gt;Month&lt;/th&gt; &lt;th&gt;Year&lt;/th&gt; &lt;th&gt;Unknown&lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt; &lt;tr&gt; {% for widget in widget.subwidgets %} &lt;td&gt;{% include widget.template_name %}&lt;/td&gt; {% endfor %} &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;/div&gt; {% endspaceless %} </code></pre>
0non-cybersec
Stackexchange
1,224
4,472
django: TypeError: &#39;tuple&#39; object is not callable. <p>Getting a type error, 'tuple' object is not callable. Any idea what it could be? (dont worry about the indentation. It copies in weird.) I'm trying to create choices based on PackSize of storeliquor.</p> <p>Views.py:</p> <pre><code>def storeliquor(request, store_id, liquor_id): a = StoreLiquor.objects.get(StoreLiquorID=liquor_id) s = Store.objects.get(StoreID=store_id) x = Order.objects.get(storeID=s, Active=True) y = a.OffPremisePrice c = a.BottleSize g = request.POST.get('OrderAmount', '') b = a.PackSize h = b*2 d = b*3 e = b*4 r = b*5 if c == "1750 ML": pack_size = ( ('1', '1') ('3', '3') (b, b) (h, h) (d, d) (e, e) (r, r) ) elif c == "1000 ML": pack_size = ( ('1', '1') ('3', '3') ('6', '6') (b, b) (h, h) (d, d) (e, e) (r, r) ) elif c == "750 ML": pack_size = ( ('1', '1') ('3', '3') ('6', '6') (b, b) (h, h) (c, d) (e, e) (r, r) ) elif c == "375 ML": pack_size = ( ('3', '3') ('6', '6') ('12', '12') (b, b) (h, h) (d, d) (e, e) (r, r) ) elif c == "200 ML": pack_size = ( ('12', '24') ('24', '24') (b, b) (c, c) (c, d) (e, e) (r, r) ) else: pack_size = ( (b, b) (c, c) (c, d) (e, e) (r, r) ) if request.method == "POST": f = AddToOrderForm(request.POST) if f.is_valid(): z = f.save(commit=False) z.TotalPrice = (float(y)) * (float(g)) z.storeliquorID = a z.orderID = x z.save() return HttpResponseRedirect('/stores/get/%s' % store_id) else: f = AddToOrderForm() f.fields['OrderAmount'].choices = pack_size args = {} args['liquor'] = a args['s'] = s args['form'] = f return render(request,'storeliquor.html', args) </code></pre> <p>Models file:</p> <pre><code>class LiquorOrder(models.Model): LiquorOrderID = models.AutoField(primary_key=True) storeliquorID = models.ForeignKey(StoreLiquor) orderID = models.ForeignKey(Order) OrderAmount = models.CharField('Order Amount', max_length=3) TotalPrice = models.DecimalField('Total Price', max_digits=5, decimal_places=2) StorePrice = models.DecimalField('Store Price', max_digits=5, decimal_places=2) </code></pre> <p>Forms file:</p> <pre><code>class AddToOrderForm(forms.ModelForm): class Meta: model = LiquorOrder fields = ('OrderAmount', 'StorePrice') </code></pre>
0non-cybersec
Stackexchange
1,041
2,716
PHP/JS software copy protection. <p>First of all I know nothing I can do that 100% prevents illegal copying of my software. I'd like to just make it reasonably hard for a competent person to do, and almost impossible for an unknowledgeable person to do.</p> <p>I have a contract job coming up to develop a web app using the WAMP stack, commissioned by a company's IT manager. During our meeting and conversations, he kept being generic about the software requirements, seemingly refusing to develop requirements specific to his company. So I got the impression as if he was intending to resell the software to other companies for his profit.</p> <p>And for people who say "people who pirate software aren't in your target market anyway", obviously that doesn't apply in this case because if he resells my software to other companies, those companies ARE in my target market.</p> <p>The functionality in my software will be divided both in the server-side (PHP) and client-side (JS) using a good JS framework, if possible I want to protect both, (but I think for JS the only thing I can do is obfuscate the code).</p> <p>I can't just refuse the contract because I need the money.</p> <p>Is there anything at all I can do?</p> <p>Edit: I'm also open to using external applications (i.e. written in C, Java, etc. or compiled into dll) to handle the copy-protection. Just need to know the general mechanism of it, if possible.</p>
0non-cybersec
Stackexchange
353
1,433
vb.Net TabControl best practise. In wondering if I'm going about something the right way. I need to represent many instances of a 'config', so I have a form that repopulates whenever a new tab is selected. You add tabs to create new configs and save them. My solution at the moment is to give the TabPage.Text property the config.id value. This is a crap solution. I wish there was a TabPage.value like combo boxes have. What's the best way to associate each tab with a config. The config is essentially a record in a SQL database.
0non-cybersec
Reddit
130
533
rails 4 strong params + dynamic hstore keys. <p>I'm having a problem overcoming the new strong params requirement in Rails 4 using Hstore and dynamic accessors</p> <p>I have an Hstore column called <code>:content</code> which I want to use to store content in multiple languages, ie <code>:en, :fr</code>, etc. And I don't know which language upfront to set them in either the model or the controller.</p> <pre><code>store_accessor :content, [:en, :fr] #+226 random other il8n languages won't work. </code></pre> <p>How can I override strong params (or allow for dynamic hstore keys) in rails 4 for one column?</p> <pre><code> params.require(:article).permit( :name, :content, :en, :fr #+226 random translations ) </code></pre> <p>Short of...</p> <pre><code>params.require(:article).permit! </code></pre> <p>which of course does work.</p>
0non-cybersec
Stackexchange
269
858
GeoDjango can&#39;t find geos library. <p>When attempting to fire up the django server, I get the following error:</p> <pre><code>django.core.exceptions.ImproperlyConfigured: Could not import user-defined GEOMETRY_BACKEND "geos". </code></pre> <p>I'm running postgresql8.4 on Mac OS Lion.</p> <p>I've used Macports to install PostGIS. Here's what $ port installed shows:</p> <p>postgis @1.5.2_1+postgresql84 postgis @1.5.2_1+postgresql90 postgis @1.5.3_0+postgresql90 postgis @1.5.3_0+postgresql91 (active)</p> <p>Here's what I get when attempting to determine what version of PostGIS I've got:</p> <pre><code>geodjango=# SELECT PostGIS_full_version(); ERROR: could not access file "$libdir/postgis-1.5": No such file or directory CONTEXT: SQL statement "SELECT postgis_lib_version()" PL/pgSQL function "postgis_full_version" line 11 at SQL statement </code></pre>
0non-cybersec
Stackexchange
318
879
How to select elements row-wise from a NumPy array?. <p>I have an array like this numpy array</p> <pre><code>dd= [[foo 0.567 0.611] [bar 0.469 0.479] [noo 0.220 0.269] [tar 0.480 0.508] [boo 0.324 0.324]] </code></pre> <p>How would one loop through array selecting foo and getting 0.567 0.611 as floats as a singleton. Then select bar and getting 0.469 0.479 as floats as a singleton .....</p> <p>I could get vector the first elements as list by using </p> <pre><code>dv= dd[:,1] </code></pre> <p>The 'foo', and 'bar' elements are not unknown variables, they can change. </p> <p>How would I change if element is in position [1]?</p> <pre><code>[[0.567 foo2 0.611] [0.469 bar2 0.479] [0.220 noo2 0.269] [0.480 tar2 0.508] [0.324 boo2 0.324]] </code></pre>
0non-cybersec
Stackexchange
317
797
Powershell query lastlogondate (lastlogontimestamp) returning mostly blank values (not matching the ADSIedit value for corresponding user attribute). <p>I am running a very short script to simply print out all users and their last logon time:</p> <p>get-aduser -filter * -property * |ft name, lastlogondate</p> <p>I noticed only a small handful of users have a logon date value while the vast majority it is blank. These are active users logging in every day. It is my understanding that lastlogondate is some sort of powershell alias that converts the 'lastlogontimestamp' user attribute value from a large integer into a readable date. I had success with this query in the past and again it works fine for some users. I went into ADSIedit and found that all users have a value in lastlogontimestamp. Despite this, if I directly query that value I still get blank in PS for each user in question:</p> <p>get-aduser -filter * -property * |ft name, lastlogontimestamp</p> <p>This behavior is true on all 3 DCs in the domain. I am baffled. This is part of a larger script that reports and acts on user accounts who haven't logged in longer than X days and has been running fine on a quarterly basis until today. In running it today I noticed that very few users were appearing on the report as being stale, so in troubleshooting I included the most basic query to see what it would do. The blank time stamp being returned in powershell is definitely wrong and why so few users show up on my report as stale (script excludes blank logon values), but I don't know why the value in PS is blank while the value in ADSI editor for the specific user is definitely populated. This is true of several other attributes like 'logoncount' as well, and only for those affected users (majority) while the few users that are working properly have no descrepencies between ADSI attribute and what PS shows at all. </p> <p>All 3 DCs in this example are 2012 R2 and I noticed this behavior also happens on user accounts in a smaller mixed domain we have (2008 and 2012 DCs) but went unnoticed because hardly any users reside there so it isn't that much of a focus.</p> <p>One other important thing, if I run this PS command against computer accounts Get-ADcomputer instead of Get-ADuser I have no such issues, all Computers report a lastlogondate correctly with no blanks.</p> <p>Any help before I call Microsoft?</p>
0non-cybersec
Stackexchange
583
2,406
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application. I need to scale my app adding some spot instances that EB do not support.</p> <p>So I create a second autoscaling from a launch configuration with spot instances. The autoscaling use the same load balancer created by beanstalk.</p> <p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p> <p>This work fine, but:</p> <ol> <li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p> </li> <li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p> </li> </ol> <p><strong>UPDATE</strong></p> <p>Elastic Beanstalk add support to spot instance since 2019... see: <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
0non-cybersec
Stackexchange
349
1,234
vueJS + webpack: importing fonts, CSS, and node_modules. <p>I'm starting with Vue.js and Webpack and I'm having some doubts about how to correctly import and reference my fonts, CSS, and <code>node_modules</code> correctly.</p> <p>I started my application using <code>vue-cli</code>, and here's the resultant structure:</p> <pre><code>build config node_modules src --assets --components --router static </code></pre> <p>And here's my <code>webpack.base.conf</code> file:</p> <pre><code>var path = require('path') var utils = require('./utils') var config = require('../config') var vueLoaderConfig = require('./vue-loader.conf') function resolve (dir) { return path.join(__dirname, '..', dir) } module.exports = { entry: { app: './src/main.js' }, output: { path: config.build.assetsRoot, filename: '[name].js', publicPath: process.env.NODE_ENV === 'production' ? config.build.assetsPublicPath : config.dev.assetsPublicPath }, resolve: { extensions: ['.js', '.vue', '.json'], alias: { 'vue$': 'vue/dist/vue.esm.js', '@': resolve('src') } }, module: { rules: [ { test: /\.(js|vue)$/, loader: 'eslint-loader', enforce: 'pre', include: [resolve('src'), resolve('test')], options: { formatter: require('eslint-friendly-formatter') } }, { test: /\.vue$/, loader: 'vue-loader', options: vueLoaderConfig }, { test: /\.js$/, loader: 'babel-loader', include: [resolve('src'), resolve('test')] }, { test: /\.(png|jpe?g|gif|svg)(\?.*)?$/, loader: 'url-loader', options: { limit: 10000, name: utils.assetsPath('img/[name].[hash:7].[ext]') } }, { test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/, loader: 'url-loader', options: { limit: 10000, name: utils.assetsPath('fonts/[name].[hash:7].[ext]') } } ] } } </code></pre> <p>First of all, where is the correct place to put my custom CSS and images? I'm currently putting them inside <code>assets/css</code> and <code>assets/img</code>, respectively (I created these folders). Is it correct?</p> <p>I also have some CSS and fonts from external libraries (Bootstrap and Font Awesome, for example) that I have installed via NPM. They're located at <code>node_modules</code>.</p> <p>If I'm not wrong, Webpack transforms, and copies these files to another location. How can I reference them on my Vue files and CSS files?</p> <p>Using <code>import './assets/css/style.css'import '../node_modules/path/to/bootstrap.min.css'</code> works (at least in production), but should I be using another path?</p> <p>Inside my custom CSS files, I reference some fonts from an external library using:</p> <pre><code>src: url('/node_modules/roboto-fontface/fonts/Roboto/Roboto-LightItalic.eot') </code></pre> <p>The code compiles, but when I open the page in the browser, I receive a 404 error when searching for these fonts. How should I be referencing these fonts in my custom CSS?</p>
0non-cybersec
Stackexchange
997
3,156
[WP] Critiquecast call for submissions: brought the wrong one [x-post /r/shutupandwrite]. *x-posted from /r/shutupandwrite. Talk here if you wanna, but please submit to the [official thread](http://www.reddit.com/r/shutupandwrite/comments/1fj7hx/critiquecast_call_for_submissions_brought_the/).* **** The Critiquecast is taking your stories again! Yes, finally. Yes, it's been two months. Yes, we're a little bit more on top of things now. **What is [the Critiquecast](http://shutupandwrite.net/category/critiquecast/)?** We are a group of amateur writers who got together and decided to critique others' writing on the air. It's not meant to be a serious critique (*amateur* writers, remember); it's more so to give you the experience of hearing your writing read aloud by an unforgiving and unfair audience. For this cycle we will be picking **six** stories to critique on the air. How? You're going to tell us which ones, that's how. The official submission thread in /r/shutupandwrite will be put into Contest Mode for the duration of the week, and whatever ones you want to see critiqued, you can upvote. We have the ultimate say in which ones we will pick to critique, but highly upvoted stories will be given more consideration. Recordings speak louder than words: * [26. A Cut Below](http://shutupandwrite.net/2013/05/20/critiquecast-026-a-cut-below/) * [14. People McNuggets](http://shutupandwrite.net/2013/04/01/critiquecast-14-people-mcnuggets/) * [12. Breakfast with a Boner](http://shutupandwrite.net/2013/03/24/critiquecast-012-breakfast-with-a-boner/) **THE PROMPT** > The main character realizes that he/she brought the wrong one. No, that's not a typo. You're supposed to fill in the wrong *what* (or *who* or *whatever*) with your imagination. **Submission guidelines** * Maximum submission length: 1,200 words. Bonus points if you keep it to 1,000. * Submissions must be in the form of a Google doc. * Submissions *must* be on the /r/shutupandwrite thread, otherwise voting's going to be a headache for everyone involved. * Submissions are due on MIDNIGHT EST, Sunday, June 9th. **Voting guidelines** Vote for whatever stories you'd like to see critiqued on the show! A few days after submissions end, we'll announce which six we're going to critique. Unfortunately that means we might be neglecting a few stories, so feel free to submit your own audio critiques as replies to the submitter. Anything that's well-done and in the style of the critiquecast (unprofessional and blatantly unfair) may be selected as a bonus episode to go up whenever we feel like it. **Reddit Gold** The arbitrarily selected "winner" of this cycle of the critiquecast will be awarded Reddit Gold. That's about all there is to it. Enjoy your glided comment, future winner!
0non-cybersec
Reddit
777
2,783
How do I iterate over an entire MongoDB collection using mongojs?. <p>I'm using <code>mongojs</code> and I'm trying to iterate over all elements in a collection</p> <pre><code>index = 0 db.keys.find({}, {uid: 1, _id: 0}).forEach((err, key) =&gt; if err? console.log err else console.log (++index) + " key: " + key_uid </code></pre> <p>which logs</p> <pre><code>1 key: bB0KN 2 key: LOtOL 3 key: 51xJM 4 key: x9wFP 5 key: hcJKP 6 key: QZxnE . . . 96 key: EeW6E 97 key: wqfmM 98 key: LIGHK 99 key: bjWTI 100 key: 2zNGE 101 key: F71mL </code></pre> <p>and then stops. However when I log into mongo from the terminal and run</p> <pre><code>&gt; db.keys.count() 2317381 </code></pre> <p>So clearly it should be returning a lot more keys. Do you have any ideas what could be causing this behavior? </p>
0non-cybersec
Stackexchange
326
828
How can we know the answer to 1-1+1-1+1...?. <p>I was watching this <a href="https://www.youtube.com/watch?v=P913qwtXihk" rel="nofollow">video</a> I noticed that the teacher said that 1-1+1-1+1... equals 1/2. How can we know that? The proof he uses doesn't make sense to me. We go from 1 to 0 to 1 and back again, etc. If it goes on like so forever, where does a fraction come into play?</p>
0non-cybersec
Stackexchange
135
392
How to determine asymptotics properties for estimators. <p>The question is as follows: If $X_i,\ldots,X_n$ are iid $N(\theta, \sigma^2)$, compare the asymptotic variance of the sample mean and sample median. </p> <p>Attempt:</p> <p>Would the asymptotic variance for the mean be the limit as $n$ approaches infinity of the quantity $\sigma^2/n$? Could we use the Cramer Rao Information bound as an approximation to the asymptotic variance? Also, does it matter what the parent distribution is? Wouldn't the asymptotic variance of the mean always be $\sigma^2/n$ due to the central limit theorem?</p>
0non-cybersec
Stackexchange
160
602
how to change /etc/environment from bash. <p>So I messed up. I was experimenting with path environment, and I accidentally edited the <code>/etc/environemnt</code> and added <code>PATH=$PATH:$JAVA_HOME/bin</code> and now I stucked on login loop.</p> <p>I tried to fix my mistake by editing the <code>/etc/environment</code> from <code>ctrl+alt+f3</code> but I got `Permission denied.</p> <p>I also tried to use <code>/bin/su</code> but again, I got error:</p> <pre><code>bash: kesspipe: command not found bash: dircolors: command not found </code></pre> <p>Is there a way to fix this? Thank you.</p>
0non-cybersec
Stackexchange
198
604
search sequence of sequences for single first match efficiently. <p>I want to figure out the single matching group. As all groups are disjoint, only a single match is possible. If no match is found <code>other</code> is returned.</p> <p>A single match is enough. It is not efficient to search the whole sequence How can the search be stopped after the first match?</p> <p>How can this be written in a more scala-like/functional way which is less clumsy?</p> <pre><code>val input = 1 val groupings = Seq(Seq(1), Seq(2, 4), Seq(6, 7)) def computeGroup(input: Int, groups: Seq[Seq[Int]]): String = { val result = for (s &lt;- groupings if (s.contains(input))) yield s val matchingGroup: Seq[Int] = result.flatten if (matchingGroup.isEmpty) { "other" } else { matchingGroup.mkString("-") } } computeGroup(1, groupings) // expected 1 computeGroup(2, groupings) // expected 2-4 computeGroup(5, groupings) // expected other </code></pre> <p>Following the advice of <a href="https://stackoverflow.com/questions/16883591/find-the-first-element-that-satisfies-condition-x-in-a-seq">Find the first element that satisfies condition X in a Seq</a></p> <pre><code>groupings.find(_ == Seq(input)) </code></pre> <p>partially works for <code>computeGroup(1, groupings)</code>. It is already better as it should stop after the first match.</p> <pre><code>Some(List(1)) None None </code></pre> <p>Unfortunately, it will not (yet) handle the other cases.</p>
0non-cybersec
Stackexchange
476
1,475
Database schema tracking patient stats over time. <p>I want to create a database which allows to record patient reading data points like: <em>weight</em>, <em>height</em>, <em>pressure</em>, etc., over time.</p> <p>I found a database schema like the one discussed <a href="https://stackoverflow.com/questions/11216080/data-structure-for-storing-height-and-weight-etc-over-time-for-multiple-users">in this Q &amp; A</a> which is looks similar to my needs. I'm wondering if such design offers a good performance for a large number of users?</p> <p>For example, if we're planning to track 10 parameters for 10 000 users at least 20 times a year - it's around 2 000 000 rows/per year.</p> <p>Available engine - InnodDB, MyISAM.</p> <pre><code>DB healthstats TABLE user memberID (int*, auto increment, unsigned, primary key) name (varchar, 50) gender (char, 1) birthdate (date) TABLE reading readingID (int*, auto increment, unsigned, primary key) memberID (int*, FK: TABLE user) date (datetime) TABLE stat statID (int*, auto increment, unsigned, primary key) readingID (int*, FK: TABLE reading) type (varchar, 3)* value (decimal 4.1)* </code></pre>
0non-cybersec
Stackexchange
359
1,195
sql query that groups different items into buckets. <p>I am trying to write a query that returns the count of items whose price falls into certrain buckets:</p> <p>For example if my table is:</p> <pre><code>item_name | price i1 | 2 i2 | 12 i3 | 4 i4 | 16 i5 | 6 </code></pre> <p>output:</p> <pre><code>range | number of item 0 - 10 | 3 10 - 20 | 2 </code></pre> <p>The way I am doing it so far is </p> <pre><code>SELECT count(*) FROM my_table Where price &gt;=0 and price &lt;10 </code></pre> <p>then </p> <pre><code>SELECT count(*) FROM my_table Where price &gt;=10 and price &lt;20 </code></pre> <p>and then copy pasting my results each time into excel.</p> <p>Is there an automatic way to do this in an sql query?</p>
0non-cybersec
Stackexchange
283
771
Replace sqlite3.3.6-5 for sqlite3.7.0-1 on centos5. <p>I want to update my sqlite3 version. I'm using centos5 (VPS requeriment), I have a new version downloaded (.rpm) and a previous installed (with the os) I have this error.</p> <p><img src="https://i.stack.imgur.com/WZc13.png" alt="image of my problem"></p> <p>Well, I have noob on centos distributions, and dont know well the yum, rpm yet, but I cant found a solution for this.. Any idea? Sorry my bad english.</p> <p>Is a test environment, I will havent problem with install the two versions on same time if these are posible. Thanks</p>
0non-cybersec
Stackexchange
189
596
How do projects manage security with so many dependencies in open source projects?. <p>Some node.js libraries (just as an example) can pull in literally hundreds of dependencies. Some of these dependencies are small packages that only have one contributor. Often times the contributor doesn't even have any personal information listed other than their username.</p> <p>How is it possible to trust that nobody in those hundreds of libraries will never act maliciously, get their account hacked, have a change of heart, purposefully introduce a vulnerability, etc?</p> <p>It seems that all it would take is one point in the chain to get compromised, or have never had good intentions from the beginning, and that could lead to huge security problems or data breaches. A compromised plugin in a build system could steal source code.</p> <p>It just seems like the wild west and a disaster waiting to happen. Do companies really review the source code of every single package they use, and the changes on every single update? That just sounds unmaintainable.</p> <p>I could understand trusting a paid library published by a business, but I don't understand projects using these deeply nested dependencies published by internet strangers.</p> <p>I guess what my question is that I am having trust issues and don't know how to properly include a library without worrying that I could accidentally compromise a customer's business.</p>
1cybersec
Stackexchange
302
1,433
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application. I need to scale my app adding some spot instances that EB do not support.</p> <p>So I create a second autoscaling from a launch configuration with spot instances. The autoscaling use the same load balancer created by beanstalk.</p> <p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p> <p>This work fine, but:</p> <ol> <li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p> </li> <li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p> </li> </ol> <p><strong>UPDATE</strong></p> <p>Elastic Beanstalk add support to spot instance since 2019... see: <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
0non-cybersec
Stackexchange
349
1,234
Optimization based on partial derivative. <p>I want to maximize $f(a,b,c)$ over the variables $a,b,c$, such that </p> <p>1) $0\leq a\leq K$, </p> <p>2) $0\leq b\leq K$, </p> <p>3) $0\leq c \leq K$</p> <p>where $K$ is a constant.</p> <p>The $f(a,b,c)$ is some rational function (2nd order polynomial divided by 1st order polynomial in $a,b,c$). </p> <p>The observation is that $\frac{\partial f(a,b,c)}{\partial a} &gt; 0$, and that $\frac{\partial f(a,b,c)}{\partial b} &gt; 0$, for the domain. Both of these derivatives are continuous, smooth, and well-behavior on that domain.</p> <p><em>I am wondering to solve this maximization problem, am I safe to simply put $a=K, b=K$, and simplify it to</em>:</p> <p>$Maixmize$ $f(a=K, b=K, c)$ such that $0\leq c \leq K$</p> <p>Is this correct?? In this case, this would be a single variable optimization problem. </p>
0non-cybersec
Stackexchange
341
879
How does Tor protect against fake entry nodes / total redirection?. <p>There is much material on how to protect yourself from malicious exit nodes, especially by using SSL and minimizing the leakage of identifying information (user-agent, screen size, etc.).</p> <p>However, I was wondering why an attacker could not just setup a bunch of fake Tor <em>entry</em> nodes, and redirect your outgoing connections to them (assuming you must route all data through their network). They could even virtualize or fake the whole Tor network with ease.</p> <p>What measures does Tor have against such attacks, and what can a user do against it?</p> <p>Are there e.g. a list of hardcoded entry servers with known public keys? If so, how do I know that those priviliged servers are not operated by the NSA or the Chinese or whoever? They could be a) compromized from day one, or b) someone could have manipulated <code>torproject.org</code> when I downloaded the software, and replaced the server list and checksums.</p> <hr> <p>(I hope this doesn't sound too paranoid. I got this idea when I was working a large (US-)government-run facility, and noticed how pervasive their computer security measures were (probably with good reason). If I were a dissident or had something to hide, they could have easily 'rabbit-holed' my entire network. I guess this is a much more pressing problem in other countries.)</p>
0non-cybersec
Stackexchange
336
1,404
Sendmail says it has sent, but doesn&#39;t actually send. <p>I installed sendmail using this tutorial:</p> <p><a href="http://pc-freak.net/blog/install-sendmail-debian-gnu-linux/" rel="nofollow">Install sendmail debian gnu linux</a></p> <p>I am using this command to send my test email:</p> <pre><code>mail -s "Subject" "[email protected]" &lt;&lt;&lt; "This is the body" </code></pre> <p><code>mail.log</code> in <code>/var/log</code> says:</p> <pre><code>Dec 29 18:15:28 raspberrypi sendmail[14546]: tBU2FSim014546: from=root, size=232, class=0, nrcpts=1, msgid=&lt;[email protected]&gt;, relay=root@localhost Dec 29 18:15:28 raspberrypi sm-mta[14547]: tBU2FS3h014547: from=&lt;[email protected]&gt;, size=480, class=0, nrcpts=1, msgid=&lt;[email protected]&gt;, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1] Dec 29 18:15:28 raspberrypi sendmail[14546]: tBU2FSim014546: [email protected], ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30232, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (tBU2FS3h014547 Message accepted for delivery) </code></pre> <p>Despite what the log says about the message being accepted, I never get the message. Does anyone know what is going on? I didn't know what to include in my question, so if you need more info, just ask. Thank you!</p> <p>I am using Debian Jessie.</p>
0non-cybersec
Stackexchange
551
1,418
If a ring $R$ with $1$ has characteristic $0$, then it has a subring isomorphic to the integers.. <blockquote> <p>If a ring $R$ with $1$ has characteristic $0$, show that $R$ contains a subring that is in 1-1 correspondence with $\mathbb{Z}$ (this subring is called the prime subring of $R$).</p> </blockquote> <p>Let $f: R\rightarrow\mathbb{Z}$, if $x \in R$ then $x\mapsto ?$. As I define $f$ so that it is a 1-1 correspondence? Which subring should consider?</p>
0non-cybersec
Stackexchange
155
470
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application. I need to scale my app adding some spot instances that EB do not support.</p> <p>So I create a second autoscaling from a launch configuration with spot instances. The autoscaling use the same load balancer created by beanstalk.</p> <p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p> <p>This work fine, but:</p> <ol> <li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p> </li> <li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p> </li> </ol> <p><strong>UPDATE</strong></p> <p>Elastic Beanstalk add support to spot instance since 2019... see: <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
0non-cybersec
Stackexchange
349
1,234
Is it a good practice to set an object to null after processing?. <p>I have scenario like this:</p> <pre><code>public void processData(String name,String value) { /* line 1 */ MyDTO dto = new MyDTO(); /* line 2 */ dto.setName(name); /* line 3 */ dto.setValue(value); /* line 4 */ sendThroughJMSChannel(dto); /* line 5 */ dto = null; //As a best practice, should I do this ? } </code></pre> <p>In my program after <em>line 4</em> I don't require <code>dto</code> for further processing. As a best practice, should I set <code>dto</code> to <code>null</code> as in <em>line 5</em> or ignore it?</p> <p>By setting it to <code>null</code>, I'm expecting fast garbage collection. Is it correct?</p>
0non-cybersec
Stackexchange
244
716
how to detect a file over internet using ping or similar command?. <p>I have a shell script to download some of my stuff over Internet. How can I know if a file exists over the Internet? Let's say I want to know if <code>http://192.168.1.1/backup/01012011.zip</code> exists or not? I have try using <code>ping</code> command, but it shows error, i guess this because <code>/</code> character.</p> <p>Can anyone can help me? or is there another way?</p>
0non-cybersec
Stackexchange
132
455
What is being done in this Integration by Parts proof of $\int_0^1 x^a(1-x)^b \, dx$?. <p><a href="https://i.stack.imgur.com/3Y0Gd.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3Y0Gd.png" alt="enter image description here" /></a></p> <p>Part a.) I was able to understand that you can use integral properties to flip the limits which would essentially make the u sub an x sub but with reverse a and b</p> <p>part b.) I get this mostly but wouldn't it be <span class="math-container">$1/1$</span> for <span class="math-container">$I(0,a)$</span> therefore making <span class="math-container">$I(a,0)\ne I(0,a)$</span>?</p> <p>part c.) I used <span class="math-container">$u=x^a$</span> and got <span class="math-container">$a-1$</span> and <span class="math-container">$b+1$</span> which I understand are pulled from the new integral but why can they be pulled from the new integral and how do they prove that <span class="math-container">$a\ge1$</span> and <span class="math-container">$b\ge0$</span>?</p> <p>part d.) Just plug in. I get it. Simple.</p> <p>part e.) On the second line I can't understand fully how <span class="math-container">$a$</span> gets to be 1. I understand that every iteration moves the the numbers further from <span class="math-container">$0$</span> so therefore if we set <span class="math-container">$a-1=0$</span> we can understand that <span class="math-container">$b+a$</span> will always give us the correct iteration regardless but if we do that how does <span class="math-container">$a$</span> not become zero when we plug it back therefore making the numerator <span class="math-container">$-1$</span> not <span class="math-container">$1.$</span> It feels like <span class="math-container">$a$</span> is simultaneously two numbers. My only guess is that we are simply taking <span class="math-container">$a$</span> and making it one because we set the rules to be that <span class="math-container">$a$</span> can be no lower I just don't know how you can explain that mathematically.</p> <p>This is so over my head.</p> <p>E: Thank you to the moderator that improved my title.</p>
0non-cybersec
Stackexchange
664
2,137
Real Analysis Proof on Axiom of Completeness. <p>The Question: Assume $A$ and $B$ are non-empty, bounded above subset of the $\mathbb{R}$ and that $B \subseteq A$. Show that $\sup(B) \leq \sup(A)$. </p> <p>My Attempt: Let $A$ and $B$ be as stated. Then by the Axiom of Completeness, $\sup(A)$, and $\sup(B)$ exists and is a real number. Define $a_0 = \sup(A)$ and $b_0 = \sup(B)$. From Lemma 1.3.7., $a_0= \sup(A)$ if and only if for all $\epsilon &gt; 0$, there exists an $a \in A$, such that $a_0 - \epsilon &lt; a$. Similarly, $b_0 = \sup(B)$ if for all $\epsilon_{0} &gt;0$, there exists an $b \in B$, such that $b_{0} - \epsilon_{0} &lt; b$. </p> <p>I am trying to manipulate these inequalities in some way to get $a_{0} \leq b_{0}$. So am I even on the right track so far? Can you try to give me some hints instead of working out the problem? I would really appreciate it. Thank you very much!</p> <p>Textbook: <em>Understanding Analysis</em> by Stephen Abbott : <strong>Exercise 1.3.4.</strong>, page 18.</p>
0non-cybersec
Stackexchange
362
1,021
A continuous function on $S^1$- unit circle .. <p>$$S^1=\{z\in \mathbb C : |z|=1\}$$ be the unit circle. Then which of the following is <strong>false</strong> $?$</p> <p>Any <strong>continuous</strong> function from $S^1$ to $\mathbb R$ is</p> <p>A. bounded</p> <p>B. uniformly continuous.</p> <p>C. has image containing a non empty open subset of $\mathbb R.$</p> <p>D. has a point $z\in S^1$ such that $f(z)=f(-z)$</p> <p>Since $S^1$ is compact any continuous function would be bounded or uniformly continuous so $A$ and $B$ are correct. </p> <p>For $C$, the constant function does not have any open interval in its image. Thus, $C$ is <strong>the</strong> <strong>false</strong> statement.</p> <p>That leaves $D$ to be correct. How can I prove the existence of a point $z$ having properties like said in $D$?</p>
0non-cybersec
Stackexchange
308
844
Ubuntu 18.04 - A script to shut down a PC in an event. <p>With support from here or on other forums, I have managed to launch the nVidia Render Farm Multi GPU for network computing in Octane Render Slave Daemon.</p> <p>Now I am trying to find a way - standalone script or nested in Conky setting, which will allow to shut down PC at certain event?</p> <p>I need more precisely:<br> When monitoring nvidia-settings = GPU Utilization will be less than 10% for eg 300sec, then shut down the computer.</p> <p>So far I have this script from another user to shut down my PC. But I need to extend it by another time-out condition to avoid turning off the PC as soon as the value falls below 10%. Since there are some load variations in the calculation (for example, from one frame of the animation to the next).</p> <pre class="lang-bsh prettyprint-override"><code>#!/bin/bash GPU=$(execi 60 nvidia-settings -query [gpu:0]/GPUCoreTemp -t) if [[ ${GPU} -le 10 ]]; then dbus-send --system --print-reply --dest=org.freedesktop.login1 /org/freedesktop/login1 org.freedesktop.login1.Manager.PowerOff boolean:false fi </code></pre>
0non-cybersec
Stackexchange
324
1,123
Why is &quot;hibernate.connection.autocommit = true&quot; not recommended in Hibernate?. <p>In Hibernate API, there is a property <a href="https://docs.jboss.org/hibernate/orm/4.3/manual/en-US/html/ch03.html#configuration-jdbc-properties" rel="noreferrer">hibernate.connection.autocommit</a> which can be set to true. </p> <p>But in the API, they have mentioned that it is not recommended to set it like so:</p> <blockquote> <p>Enables autocommit for JDBC pooled connections (it is not recommended).</p> </blockquote> <p>Why is it not recommended ? What are the ill-effects of setting this property to true ?</p>
0non-cybersec
Stackexchange
197
621
JS array concatenation for results of recursive flattening. <p>Good day!</p> <p>Task would be to get a flat version of an array, that may include some amount of nested arrays as well as other elements. For input <code>[1, [2], [3, [[4]]]]</code> output <code>[1, 2, 3, 4]</code> expected. <em>FreeCodeCamp spoiler alert.</em> Naturally, recursive solution comes to mind, e.g.:</p> <pre><code>function steamrollArray(arr) { var result = []; for(var i = 0; i &lt; arr.length; i++){ //part of interest if (Array.isArray(arr[i])){ var nestedElements = steamrollArray(arr[i]); for(var j = 0; j &lt; nestedElements.length; j ++){ result.push(nestedElements[j]); } //&lt;/part of interest&gt;. } else { console.log("pushing: " + arr[i]); result.push(arr[i]); } } return result; } </code></pre> <p>And it does it's thing. Result of sample run would be:</p> <pre><code>pushing: 1 pushing: 2 pushing: 3 pushing: 4 [1, 2, 3, 4] </code></pre> <p>And the question is: what goes awry, when we use concat to add <code>nestedElements</code> (that supposedly store return result of recursive call). If we are to change first <code>if{}</code> block in <code>for</code> loop (marked as part of interest) with snippet below:</p> <pre><code>if (Array.isArray(arr[i])){ var nestedElements = steamrollArray(arr[i]); result.concat(nestedElements); } else { </code></pre> <p>we will observe the following result: </p> <pre><code>pushing: 1 pushing: 2 pushing: 3 pushing: 4 [1] </code></pre> <p>My understanding was to pass the result of each recursive call to the <code>concat</code> function, which will add the returned array to the result, but for some reason it's not the case. Questions on this task was asked, like <a href="https://stackoverflow.com/questions/30582352/flatten-nested-arrays-using-recursion-in-javascript">this one</a>, but those concerned with the flattening algorithm part, which is not questioned here. I still fail to see the answer what exactly causes the difference. It very well might be something I simply overlooked in a hassle or as a result of my limited experience. Sorry if that's the case. </p>
0non-cybersec
Stackexchange
692
2,213
Finding the complexity of a recursive method. <p>An assignment question asks me to find the complexity of a [tail] recursive algorithm, copied below. While I understand all the complexity specifics, for example that the while loop's complexity is $n-1$ and the complexity of setting $j$ to $0$ is 1, I don't understand how I could trace the code recursively, that is within itsel - it's too hard to keep track of. </p> <p>What I tried doing, is turning the algorithm into an iterative one, by simply putting all the code into a big while loop and thus avoiding the recursive call. But I'm not sure if this affects the complexity of the original algorithm.</p> <pre><code>Algorithm MyAlgorithm(A, n) Input: Array of integer containing n elements Output: Possibly modified Array A done ← true j ← 0 while j ≤ n - 2 do { if A[j] &gt; A[j + 1] then { swap(A[j], A[j + 1]) done:= false } j ← j + 1 end while j ← n - 1 while j ≥ 1 do if A[j] &lt; A[j - 1] then swap(A[j - 1], A[j]) done:= false j ← j - 1 end while if ¬ done MyAlgorithm(A, n) else return A </code></pre>
0non-cybersec
Stackexchange
355
1,189
Canon 7D V2.0 firmware posted on USA site! . http://www.usa.canon.com/cusa/consumer/products/cameras/slr_cameras/eos_7d/#DriversAndSoftware As reported by DPReview, some of the new features: Improved maximum burst for RAW images (up to 25) In-camera RAW image editing In-camera Image Rating In-camera JPEG resizing Maximum Auto ISO setting (ISO 400-6400) Manual audio level adjustment in movie recording GPS compatibility File name customisation Time zone settings Faster scrolling of magnified images Quick control screen during playback Download only available from link above (pre-announcement page has not yet been updated) EDIT: Full list of new features: http://cpn.canon-europe.com/content/news/firmware_update_to_enhance_EOS_7D.do EDIT: There's a video: http://web.canon.jp/imaging/eosd/samples/eos7d/firmware.html EDIT: pick OSX Lion even if you run Mountain Lion, or you will not see the update. The DMG download doesn't have an installer, just copy the FIR to your CF card and follow instructions.
0non-cybersec
Reddit
309
1,031
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application. I need to scale my app adding some spot instances that EB do not support.</p> <p>So I create a second autoscaling from a launch configuration with spot instances. The autoscaling use the same load balancer created by beanstalk.</p> <p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p> <p>This work fine, but:</p> <ol> <li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p> </li> <li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p> </li> </ol> <p><strong>UPDATE</strong></p> <p>Elastic Beanstalk add support to spot instance since 2019... see: <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
0non-cybersec
Stackexchange
349
1,234
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application. I need to scale my app adding some spot instances that EB do not support.</p> <p>So I create a second autoscaling from a launch configuration with spot instances. The autoscaling use the same load balancer created by beanstalk.</p> <p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p> <p>This work fine, but:</p> <ol> <li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p> </li> <li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p> </li> </ol> <p><strong>UPDATE</strong></p> <p>Elastic Beanstalk add support to spot instance since 2019... see: <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
0non-cybersec
Stackexchange
349
1,234
How to write degrees into angles?. <p>So I have this code.</p> <pre><code>\draw(A)-- (X)-- (D) pic["$\epsilon$"] {angle= A--X--D}; </code></pre> <p>And it works perfectly. But I don't know how to display numbers. For example </p> <pre><code>\draw(A)-- (C)-- (D) pic["$34$"] {angle= A--C--D}; </code></pre> <p>and I get this</p> <p><a href="https://i.stack.imgur.com/iXsfl.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/iXsfl.png" alt="enter image description here"></a></p> <p>How to fix that? I mean how can I display the number (with degree symbol) like I did epsilon?</p>
0non-cybersec
Stackexchange
234
601
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application. I need to scale my app adding some spot instances that EB do not support.</p> <p>So I create a second autoscaling from a launch configuration with spot instances. The autoscaling use the same load balancer created by beanstalk.</p> <p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p> <p>This work fine, but:</p> <ol> <li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p> </li> <li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p> </li> </ol> <p><strong>UPDATE</strong></p> <p>Elastic Beanstalk add support to spot instance since 2019... see: <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
0non-cybersec
Stackexchange
349
1,234
A general theory of multiplicity-free actions of $G\times H$?. <p>There seem to be a bunch of different results of the form "This nice representation $V$ of $G\times H$ breaks up as $\bigoplus_\lambda V_\lambda \otimes W_\lambda$, where the $(V_\lambda)$ are distinct irreps of $G$ and the $(W_\lambda)$ are distinct irreps of $H$."</p> <p>Examples I know (described algebraically):</p> <ol> <li><p>$G = S_n$, $H = GL(k)$, $V = ({\mathbb C}^k)^{\otimes n}$.</p></li> <li><p>$G = H$, $V = Fun(G)$ (the Peter-Weyl theorem)</p></li> <li><p>$G = GL(m)$, $H = GL(n)$, $V = Sym({\mathbb C}^m \otimes {\mathbb C}^n)$.</p></li> </ol> <p>I know there should be some analogous one with $O(m)$ and $Sp(n)$...</p> <p>My questions: </p> <ol> <li><p>What are other examples?</p></li> <li><p>Is there a general theory of these, that in particular would encompass Peter-Weyl? (So not just about actions on symmetric algebras.)</p></li> </ol>
0non-cybersec
Stackexchange
339
932
Went to a Planet Fitness today. It went better than expected.. After reading all of the reviews on here and bodybuilding.com, I was expecting something really awful. To be honest, it wasn't that bad. I'm traveling at the moment and went looking for a gym nearby today. All of the locally owned gyms were trying to charge me something like $50-$70/week for a short-term, non-commitment membership! I even tried to get student discounts, but they weren't having it. They tried explaining that I get full access to their facilities though (pool, spa, fitness classes, tanning). Um...hello? McFly? I don't want that stuff, just give me some damn weights. Called up the local PF, they let me get a one month, non-committal membership for $39, with $10/month for each additional month. **My review:** The guys working the desk were way cool. Mid-20s, had a very "yeah man, do whatever" attitude. They did **not** tell me I couldn't do squats, DL, or anything. The only thing they mentioned was about the no grunting policy (I'm not much of a grunter as it is). I was a bit nervous about it being really crowded since I went at 5:30 in the evening (usually when my gym is most-crowded), but it was maybe half-full. The longest I waited for anything to open up was one set, and the people there were more than cool with letting me work in. There were plenty of cardio machines open, too. Also, it wasn't full of overweight that they needed a "judgement free zone" and didn't know how to exercise. There were some guys in there doing some serious weight, and some very fit looking women lifting free weights as well. *Equipment:* No squat racks, only smith machines :-( Also, the angle on the Smith machines is pretty bad. Next time I go, I may try and rig something up where I can use the barbells from the benches in the Smith Machine racks to do legit squats. They did have several barbell benches (incline too), and lots of dumbbells that went up to 90lb I believe. Also, I observed one guy taking advantage of the benches (which sat pretty low) to do rack deadlifts and nobody gave him any issues. I asked him about it and he said nobody has ever given him any problems. I didn't see pizza, bagels, nor candy, but they did have tables and chairs set up at the front for people to eat/drink at (like a mini-cafe). Never heard the lunk alarm once. Never saw anybody getting warned for anything. Also, the color scheme makes me want to vomit. *tl;dr: Went to the infamous Planet Fitness. Everything went better than expected.*
0non-cybersec
Reddit
639
2,535
How do define get and set for an array data member?. <p>I am making a class <code>Customer</code> that has the following data members and properties:</p> <pre><code>private string customerName; private double[] totalPurchasesLastThreeDays; //array of 3 elements that will hold the totals of how much the customer purchased for the past three days i.e. element[0] = 100, element[1] = 50, element[2] = 250 public string CustomerName { get { return customerName; } set { customerName = value; } } public double[] TotalPurchasesLastThreeDays { ? } </code></pre> <p>How do I define the get and set for the array data member?</p>
0non-cybersec
Stackexchange
184
628
How to meet new people?. I’m so frustrated right now. I just moved to a new city for an internship. Within two weeks of my moving here, the guy I had been seeing for almost two years broke it off which fucking sucked. I moved in with a girl I knew from college who has been here for 1 1/2 years so she’s pretty established as far as friends go. I do hang it with her sometimes, but we have pretty different schedules. I’m such an introverted extrovert, it just takes me some time to get used to you once I’ve met you. I have no idea how to go out and make friends in the real world. Everyone I’ve met is because of school (mutual classes/same program) and then through mutual friends. I’ve tried stupid apps, girl groups on Facebook, etc. I don’t feel like I can just walk up to some random girls in a bar or whatever because it just seems dumb. Please help meeee
0non-cybersec
Reddit
219
869
Absolute value of product is less than product of absolute values: $|(1+a_1)(1+a_2)\dots (1+a_n)-1|\leq (1+|a_1|)(1+|a_2|)\dots (1+|a_n|)-1$. <p>For a sequence $a_n\in\mathbb{C}$ I want to show that $$|(1+a_1)(1+a_2)\dots (1+a_n)-1|\leq (1+|a_1|)(1+|a_2|)\dots (1+|a_n|)-1$$</p> <p>I think I should show this by induction on $n$. For the base case I'm sort of stuck, because $|(1+a_1)(1+a_2)-1|=|1+a_1+a_2+a_1a_2-1|\leq 1+|a_1|+|a_2|+|a_1a_2-1|$ and I don't see how to factor this into the result I want. The inductive step also isn't clear after I assume the statement to be true for some $n&gt;2$. There might be some property of $\mathbb{C}$ that I'm missing for this.</p>
0non-cybersec
Stackexchange
287
677
$T\in\mathcal{L}(\mathbf{R^3})$ with eigen values $-4,5,\sqrt{7}$. <p>Is my attempt at the following proof correct?</p> <p><strong>PRELIMINARY NOTATION AND PROOFS</strong> </p> <ul> <li><p>$\mathcal{L}(\mathbf{R^3})$ denotes the set of Linear operator on $\mathbf{R^3}$.</p></li> <li><p><strong>$5.10$</strong> is the result that eigenvectors of a Linear operator $T$ corresponding to distinct eigenvalues form a linearly independent list.</p></li> </ul> <p><strong>Theorem.</strong> Given that $T\in\mathcal{L}(\mathbf{R^3})$ such that $-4,5$ and $\sqrt{7}$ are eigenvalues of $T$. There exists a $x\in\mathbf{R^3}$ such that $Tx-9x = (-4,5,\sqrt{7})$.</p> <p><em>Proof.</em> Let $v_1,v_2,v_3$ be the eigenvectors corresponding to $-4,5$ and $\sqrt{7}$ respectively. Since $-4,5,\sqrt{7}$ are distinct it follows by theorem $\textbf{5.10}$ that the vectors $v_1,v_2,v_3$ are linearly independent and thus a basis for $\mathbf{R^3}$ but then so is the list $v_1+\overset{9}w_1,v_1+\overset{9}w_2,v_1+\overset{9}w_3$ where $\overset{9}w_i$ denotes a column vector of length $3$ with the $i^{th}$ row equal to $9$ and all others $0$.</p> <p>With $v_1+\overset{9}w_1,v_1+\overset{9}w_2,v_1+\overset{9}w_3$ as a basis for $V$ it follows that the matrix of $T$ i.e. $\mathcal{M}(T)$ is as follows $$ \mathcal{M}(T) = \begin{pmatrix} 5&amp;0&amp;0\\ 0&amp;14&amp;0\\ 0&amp;0&amp;\sqrt{7}+9 \end{pmatrix} $$ and as a consequence that of the transformation $T-9I$ i.e. $\mathcal{M}(T-9I)$ is $$ \mathcal{M}(T-9I) = \begin{pmatrix} -4&amp;0&amp;0\\ 0&amp;5&amp;0\\ 0&amp;0&amp;\sqrt{7} \end{pmatrix} $$ Thus the vector $x = (1,1,1)$ yields the required result.</p>
0non-cybersec
Stackexchange
670
1,663
how to replace a variable in shell script string. <p>I'm having problems getting this to work...</p> <p>I have a variable that is holding a SQL to with a placeholder:</p> <pre><code>echo $SQL SELECT PX_PROMOTION_ID, PRIORITY, STATUS, EXCLSVE, TYPE, PERORDLMT, PERSHOPPERLMT, TOTALLMT, RSV_INT, PX_GROUP_ID, CAMPAIGN_ID, STOREENT_ID, VERSION, REVISION, EFFECTIVE, TRANSFER, CDREQUIRED, EXPIRE, LASTUPDATEBY, TO_CHAR(LASTUPDATE, 'YYYYMMDD HH24MMSS') AS LASTUPDATE, TO_CHAR(STARTDATE, 'YYYYMMDD HH24MMSS') AS STARTDATE, TO_CHAR(ENDDATE, 'YYYYMMDD HH24MMSS') AS ENDDATE, TO_CHAR(RSV_TIME, 'YYYYMMDD HH24MMSS') AS RSV_TIME, RSV_REAL, TGTSALES, NAME, CODE, RSV_VCH, OPTCOUNTER FROM PX_PROMOTION WHERE LASTUPDATE BETWEEN (SELECT MAX(BATCHSTART) FROM XRPTEBATCHCONTROL) AND TIMESTAMP('$BATCH_END') </code></pre> <p>I have another variable that holds the value:</p> <pre><code>echo $BATCH_END 2012-11-14 17:06:13 </code></pre> <p>I want to replace the placeholder with the value. I'm not particularly great at Unix scripting, but I've tried this:</p> <pre><code>echo $SQL | sed -e "s/'$BATCH_END/$BATCH_END/g" </code></pre> <p>but it still doesn't get replaced...</p> <p>Can anyone help? I want to replace the placeholder, and keep the final string assigned to $SQL</p> <p>I also need to know how to get the value of the output back into the variable, for example, I tried:</p> <pre><code> SQL=`echo "$SQL" | echo "${SQL//\$BATCH_END/$BATCH_END}"` </code></pre>
0non-cybersec
Stackexchange
547
1,463
How do you fix the &quot;element not interactable&quot; exception?. <p>I know this has been asked lots of times before but how do you get around the "element not interactable" exception?</p> <p>I'm new to Selenium so excuse me if I get something wrong.</p> <p>Here is my code:</p> <pre><code>button = driver.find_element_by_class_name(u"infoDismiss") type(button) button.click() driver.implicitly_wait(10) </code></pre> <p>Here is the HTML:</p> <pre><code>&lt;button class="dismiss infoDismiss"&gt; &lt;string for="inplay_button_dismiss"&gt;Dismiss&lt;/string&gt; &lt;/button&gt; </code></pre> <p>And here is the error message:</p> <pre><code>selenium.common.exceptions.ElementNotInteractableException: Message: </code></pre> <p>After is says message there is literally nothing.</p> <p>I have spent lots of time searching the web, not finding anything that solves my issue. I would really appreciate an answer.</p> <p>Thanks in advance.</p> <p><strong>Edit:</strong> Changed "w" to driver so it is easier to read</p> <p><strong>Update:</strong> I have just realized that I've found the HTML of the wrong button! The real button HTML is below:</p> <pre><code>&lt;button class="dismiss"&gt; &lt;string for="exit"&gt;Dismiss&lt;/string&gt; &lt;/button&gt; </code></pre> <p>Also, I've used the answers and comments and edited my code to look like this:</p> <pre><code>button = driver.find_element_by_css_selector("button.dismiss") w.implicitly_wait(10) ActionChains(w).move_to_element(button).click(button) </code></pre> <p>And now I get a new error:</p> <pre><code>selenium.common.exceptions.WebDriverException: Message: Tried to run command without establishing a connection </code></pre> <p>The error happens in line 1: <code>button = driver.find_element_by_css_selector("button.dismiss")</code></p> <p><strong>Note:</strong> I really appreciate the help that has been given, thanks</p>
0non-cybersec
Stackexchange
631
1,914
What should junior developer expect from their senior team lead. <p>Disclaimer: Opinions expressed are solely my own and do not express the views or opinions of my employer.</p> <p>I work for a small company, in which few people are developers, others are QA/Test and 1 is a Manager. I joined this company 1.5 years ago. 3 senior developers have 8+ years of experience. </p> <p>These are the observations which I made about the team lead. (considering me as a fresher with less experience compared to them in all aspects )</p> <ol> <li>They never discuss 1:1 or they never consider the junior suggestion (I agree that it's up to them, whether they accept it or not, at least they should consider an opinion). </li> <li>As senior team leader they can try to refactor the codebase with new technologies ( including the factor of rolling out new technologies is possible and other developer and infrastructure also ready), but these team leader feel less in-secure to work with new technologies, as they are not up to date. (reason I am telling, they don't know what current programming trend, *(such as popular open source projects like modernizr, bootstrap and many others). </li> <li>In our codebase more than 10000+ lines are repeated, so I told them about <code>DRY: Don't Repeat yourself</code>. Their reply was : "It is a fascinating article, but never works in practice". I just told them if we do not make it 100% DRY, we can at least use interfaces, but that also was not considered. *(interfaces can be added for new features, not touching the previous codebase, if they are not ready to refactor) </li> <li>All senior developers do maintenance and hot fixing of patches. The rest of the time they just spend on entertainment sites. They are just happy to finish the task. </li> <li>Introducing new technology is bad? *(including factor of feasibility can be done). </li> <li>Manager also least concerned about the things which I am talking about. </li> <li>Junior expects they can learn many things from team lead. *(not by asking help or senior coding for them). </li> </ol> <p>My questions are:</p> <ol> <li>Am I too aggressive about the changes which I am proposing? </li> <li>What should I expect from senior dev leads who have 8+ years experience? </li> <li>Am I wrong to expect to learn and gain experience from a company?</li> </ol> <p>Update : </p> <p>Why they feel DRY is impractical: because they don't want get involved with OOP concepts. They are happy with repeating tasks. </p> <p>New technologies I am proposing:</p> <ol> <li>Usage of Minification of CSS, JS, SPrite images </li> <li>Usage of Interfaces and .net framework 4, generics and many others.</li> <li>Client side libraries such as modernizr, knockout js, bootstrap for responsive, </li> </ol>
0non-cybersec
Stackexchange
724
2,790
Overview of what to learn for Web Development. I'm trying to get a general overview of all aspects of web development before diving in to studying a specific area of it. I came across [this video](https://www.youtube.com/watch?v=zXqs6X0lzKI) which seemed really useful. Is this a fair and accurate overview of what is needed from people going in to web development? It's just that when I hear things like 'you can learn HTML in 2 days', it puts me off a little; I'm not trying to learn in the quickest possible way - I'm just trying to get a comprehensive overview of what will be expected of me in terms of knowledge should I pursue web development; if each part takes months then so be it. Can you recommend any other good sources for web development information, or verify that the video I linked is an accurate source of general information?
0non-cybersec
Reddit
195
848
can&#39;t use paratype font even after running updmap. <p>I am trying to use a paratype font by putting the following into the preamble of my document:</p> <pre><code>\RequirePackage{paratype} \renewcommand*\familydefault{\sfdefault} \RequirePackage[T1]{fontenc} </code></pre> <p>This works fine on my work machine, but on my personal machine I am getting the following error message when I try to compile my document:</p> <pre><code>kpathsea: Running mktexpk --mfmode / --bdpi 600 --mag 1+340/600 --dpi 940 PTSans-Italic-tlf-t1--base mktexpk: don't know how to create bitmap font for PTSans-Italic-tlf-t1--base. mktexpk: perhaps PTSans-Italic-tlf-t1--base is missing from the map file. kpathsea: Appending font creation commands to missfont.log. </code></pre> <p>I have tried to fix this with <code>updmap</code> (I realize there are downsides to using <code>updmap-user</code> as opposed to <code>updmap-sys</code>; that is not what I care about at the moment however):</p> <pre><code>sudo updmap-user --force --enable Map=paratype-truetype.map </code></pre> <p>Here is the output from the above command:</p> <pre><code>updmap [WARNING]: resetting $HOME value (was /home/username) to root's actual home (/root). updmap will read the following updmap.cfg files (in precedence order): /root/.texlive2017/texmf-config/web2c/updmap.cfg /etc/texmf/web2c/updmap.cfg /usr/share/texmf/web2c/updmap.cfg /usr/share/texlive/texmf-dist/web2c/updmap.cfg updmap may write changes to the following updmap.cfg file: /root/.texlive2017/texmf-config/web2c/updmap.cfg dvips output dir: "/root/.texlive2017/texmf-var/fonts/map/dvips/updmap" pdftex output dir: "/root/.texlive2017/texmf-var/fonts/map/pdftex/updmap" dvipdfmx output dir: "/root/.texlive2017/texmf-var/fonts/map/dvipdfmx/updmap" updmap [WARNING]: font PTSans-Narrow-tlf-t1--base is defined multiple times: updmap [WARNING]: paratype-type1.map (from /usr/share/texlive/texmf-dist/web2c/updmap.cfg) updmap [WARNING]: paratype-truetype.map (from /etc/texmf/web2c/updmap.cfg) (used) ... (ommitting many similar warnings) ... updmap is creating new map files using the following configuration: LW35 font names : URWkb (default) prefer outlines : true (default) texhash enabled : true download standard fonts (dvips) : true (default) download standard fonts (pdftex) : true (default) jaEmbed replacement string : noEmbed (default) jaVariant replacement string : &lt;empty&gt; (default) scEmbed replacement string : noEmbed (default) tcEmbed replacement string : noEmbed (default) koEmbed replacement string : noEmbed (default) create a mapfile for pxdvi : false (default) Scanning for LW35 support files [ 3 files] Scanning for MixedMap entries [ 50 files] Scanning for KanjiMap entries [ 11 files] Scanning for Map entries [265 files] Generating output for dvipdfmx... Generating output for ps2pk... Generating output for dvips... Generating output for pdftex... Files generated: /root/.texlive2017/texmf-var/fonts/map/dvips/updmap: 15786 2018-10-11 14:15:12 builtin35.map 21259 2018-10-11 14:15:12 download35.map 2445741 2018-10-11 14:15:12 psfonts_pk.map 2706850 2018-10-11 14:15:12 psfonts_t1.map 2700806 2018-10-11 14:15:12 ps2pk.map 14 2018-10-11 14:15:14 psfonts.map -&gt; psfonts_t1.map /root/.texlive2017/texmf-var/fonts/map/pdftex/updmap: 2700813 2018-10-11 14:15:14 pdftex_dl14.map 2699148 2018-10-11 14:15:13 pdftex_ndl14.map 15 2018-10-11 14:15:14 pdftex.map -&gt; pdftex_dl14.map /root/.texlive2017/texmf-var/fonts/map/dvipdfmx/updmap: 6706 2018-10-11 14:15:12 kanjix.map Transcript written on "/root/.texlive2017/texmf-var/web2c/updmap.log". updmap: Updating ls-R files. </code></pre> <p>However when I go to look at the generated files in my file explorer it appears they have not been updated; the date on them is 9/27/2018. I am at a loss; many other answers I have looked at suggest that running <code>updmap</code> should fix this issue.</p> <p>I will note that adding <code>\pdfmapfile{+paratype-truetype.map}</code> to the preamble of my document fixes the problem, but this is not a good permanent solution.</p> <p>I am running Xubuntu 18.04, TexLive 2017.</p>
0non-cybersec
Stackexchange
1,486
4,350
Convergence of $\sqrt[n]{a_n}$ given $a_{n+m}\leq a_na_m$.. <p>The situation is that $(a_n)$ is a sequence of (strictly) positive real nubmers such that $a_{n+m}\leq a_na_m$ for all $n,m\in\mathbb N$. Then we claim that $(\sqrt[n]{a_n})$ converges. It is easy to see that $a_n^{1/n}\leq a_1$ for all $n$, such that there is a convergent subsequence, but I cannot prove convergence. Thanks for the help!</p>
0non-cybersec
Stackexchange
147
407
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application. I need to scale my app adding some spot instances that EB do not support.</p> <p>So I create a second autoscaling from a launch configuration with spot instances. The autoscaling use the same load balancer created by beanstalk.</p> <p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p> <p>This work fine, but:</p> <ol> <li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p> </li> <li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p> </li> </ol> <p><strong>UPDATE</strong></p> <p>Elastic Beanstalk add support to spot instance since 2019... see: <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
0non-cybersec
Stackexchange
349
1,234
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application. I need to scale my app adding some spot instances that EB do not support.</p> <p>So I create a second autoscaling from a launch configuration with spot instances. The autoscaling use the same load balancer created by beanstalk.</p> <p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p> <p>This work fine, but:</p> <ol> <li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p> </li> <li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p> </li> </ol> <p><strong>UPDATE</strong></p> <p>Elastic Beanstalk add support to spot instance since 2019... see: <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
0non-cybersec
Stackexchange
349
1,234
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application. I need to scale my app adding some spot instances that EB do not support.</p> <p>So I create a second autoscaling from a launch configuration with spot instances. The autoscaling use the same load balancer created by beanstalk.</p> <p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p> <p>This work fine, but:</p> <ol> <li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p> </li> <li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p> </li> </ol> <p><strong>UPDATE</strong></p> <p>Elastic Beanstalk add support to spot instance since 2019... see: <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
0non-cybersec
Stackexchange
349
1,234
p tag in button tag not allowed?. <p>I have a <code>&lt;button&gt;</code> element and within it, a <code>&lt;p&gt;</code> element. The <code>&lt;p&gt;</code> element is used in combination with css, <code>margin-top</code>, in a class to vertical align the text within the button (the button has a specific height).</p> <p>The html looks like this:</p> <pre><code>&lt;button class="someClass"&gt; &lt;img ... /&gt; &lt;p class="anotherClass"&gt;Caption&lt;/p&gt; &lt;/button&gt; </code></pre> <p>This works fine, the text is vertically aligned like it should be. However I get a warning inside visual studio 2012 saying: </p> <blockquote> <p>Element 'p' cannot be nested inside element 'button'.</p> </blockquote> <hr> <p><strong>My questions:</strong> why isn't the <code>&lt;p&gt;</code> element allowed inside a <code>&lt;button&gt;</code> element? And what is the alternative?</p>
0non-cybersec
Stackexchange
299
901
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application. I need to scale my app adding some spot instances that EB do not support.</p> <p>So I create a second autoscaling from a launch configuration with spot instances. The autoscaling use the same load balancer created by beanstalk.</p> <p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p> <p>This work fine, but:</p> <ol> <li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p> </li> <li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p> </li> </ol> <p><strong>UPDATE</strong></p> <p>Elastic Beanstalk add support to spot instance since 2019... see: <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
0non-cybersec
Stackexchange
349
1,234
In a REST service project, where should we put code that calls a third party REST API?. <p>My project is organized in layers like</p> <ul> <li>Configuration</li> <li>Controller</li> <li>Service</li> <li>Repository</li> <li>Domain</li> </ul> <p>Our REST Controller is in the Controller layer. We need to connect to another API via REST calls and I'm not sure if I should make a new Controller or do it in the Service layer.</p> <p>I'm going to implement the REST calls with <a href="http://docs.spring.io/spring-framework/docs/4.0.x/javadoc-api/org/springframework/web/client/RestTemplate.html" rel="nofollow">Spring's RestTemplate</a>.</p> <p>The way our API will be used is like this: </p> <ul> <li>REST call is made that goes through our REST endpoint. </li> <li>Our REST endpoint will call the third party API (either by calling another controller method or a service method).</li> <li>We will then do a conversion between our format and the third party format</li> <li>Then we will return the JSON of our format back to the client</li> </ul>
0non-cybersec
Stackexchange
317
1,051
$\epsilon-\delta$ graph. <p>I'm wondering if it's possible to do something like this in Latex?</p> <p><a href="https://i.stack.imgur.com/igILj.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/igILj.png" alt="$\epsilon-\delta$ limit "></a></p> <p>I have seen the similar question <a href="https://tex.stackexchange.com/questions/395153/how-to-reproduce-this-epsilon-delta-definition-diagram-with-tikz">here</a>, but I'm wondering if there is a way to shade, have dotted lines, and have the dot? Ideally, I'd want to have a way to show how different $\epsilon$ values affect the $\delta$ values, i.e., as $\epsilon$ gets smaller, there is a $\delta$ that works.</p> <p>So far, I've simply recreated the image in PowerPoint which I then copy paste in my tex document.</p>
0non-cybersec
Stackexchange
255
790
Don&#39;t want the subsection number to be italisized. <p>My MWE:</p> <pre><code>\documentclass[12pt,twoside]{article} \usepackage{titlesec} \titleformat{\subsection} {\normalfont\itshape} {\thesubsection}{1em}{} \begin{document} \section{Section} \subsection{Subsection} \end{document} </code></pre> <p>This gives the subsection title as, <em>1.1 Subsection</em></p> <p>Instead, I want, 1.1 <em>Subsection</em></p>
0non-cybersec
Stackexchange
164
457
Can I use several pipelines as a argument?. <p>I want to check the difference of two file list </p> <p>one is <code>ls | cut -c 1-4</code> another is <code>ls | cut -c 1-4 | uniq</code></p> <p>does there exists any way can let me do like this <code>diff (ls | cut -c 1-4) (ls | cut -c 1-4 | uniq)</code> or anyway can let me without saving the two list command into files then check the difference of it ..</p> <p>thanks</p>
0non-cybersec
Stackexchange
147
428
WOTS+: Why does it XOR before running data through the hash function?. <p>I'm implementing WOTS+ in a new language and I can't seem to wrap my head around the fact that WOTS+ XOR's their input with its mask right before hashing it.</p> <p>I tried to look for any reasoning but so far haven't found any. In my mind I also can't seem to come up with the logic that would make this more secure. For instance, <a href="https://tools.ietf.org/html/rfc8391#section-3.1" rel="noreferrer">this source</a> says:</p> <blockquote> <p>In each iteration, PRF is used to generate a key for F and a bitmask that is XORed to the intermediate result before it is processed by F.</p> </blockquote> <p>But it doesn't explain why this XOR is so important. Why is there a random mask needed in the first place? As far as I can understand, you are supposed to disclose the mask along with the signature and the message in order to get to the final public key that signed it.</p>
0non-cybersec
Stackexchange
275
972
Is an arbitrary union of a chain of countable sets countable?. <blockquote> <p>Let <span class="math-container">$C$</span> be a chain of countable sets, i.e. <span class="math-container">$\forall S, T \in C: S \subseteq T \lor T \subseteq S$</span>, and that every <span class="math-container">$S \in C$</span> is countable.</p> <p>Then, is <span class="math-container">$\bigcup C := \{ t \mid \exists S \in C: t \in S\}$</span> countable?</p> </blockquote> <p>The answer is no, and a counter-example is <span class="math-container">$C = \omega_1$</span>, the first uncountable cardinal/ordinal.</p> <p>Is there a more elementary example that doesn't involve, say, cardinals and ordinals?</p>
0non-cybersec
Stackexchange
225
693
Martingale as the Product of i.i.d Non-Negative Random Variables. <p>I am currently working my way through Durett's Probability Theory, 4th edition and am a bit confused about what something means. It is problem 5.2.9.</p> <p>Let $Y_{1},Y_{2},...$ be nonnegative i.i.d random variables with $\mathbb{E}Y_{m}=1$ and $\mathbb{P}\left(Y_{m}=1\right)&lt;1$. Define $X_{n}=\prod_{k=1}^{n}Y_{n}$.</p> <p>The first two parts of the problem I can do. First is to show that $X_{n}$ is a martingale. Second is to show that $X_{n}\to0$ a.s.</p> <p>The part I am confused about is: Use the strong law of large numbers to conclude that $\frac{1}{n}\log X_{n}\to c&lt;0$.</p> <p>My solution uses Jensen's inequality with $\varphi(x)=\log(x)$ and then finds that $\mathbb{E}\log Y_{i}\in[-\infty,0]$. We then can use this in the strong law of large numbers since $\frac{1}{n}\log X_{n}=\frac{1}{n}\sum_{i=1}^{n}\log Y_{i}$ and this converges to $\mathbb{E}Y_{i}=\mathbb{E}Y_{1}$.</p> <p>What I don't understand is what this means? What information about $X_{n}$ is this result giving us? I tried looking at this from the context of a non-negative distribution, such as considering $Y_{i}\sim Poisson(\lambda=1)$, but that didn't help. My other thought is that this is saying something about $\mathbb{E}\left[\sup_{n\in\mathbb{N}}X_{n}\right]$.</p> <p>If someone could explain the meaning of this result, I would be very appreciative!</p>
0non-cybersec
Stackexchange
472
1,429
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application. I need to scale my app adding some spot instances that EB do not support.</p> <p>So I create a second autoscaling from a launch configuration with spot instances. The autoscaling use the same load balancer created by beanstalk.</p> <p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p> <p>This work fine, but:</p> <ol> <li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p> </li> <li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p> </li> </ol> <p><strong>UPDATE</strong></p> <p>Elastic Beanstalk add support to spot instance since 2019... see: <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
0non-cybersec
Stackexchange
349
1,234
Simplifying $27^\frac23$ without a calculator. <p>I am trying to solve $27^\frac23$ without a calculator and so far I did this: $$27^\frac23=27^{\frac13+\frac13}=27^\frac13\cdot27^\frac13=\sqrt[3]{27}\cdot\sqrt[3]{27}=3\cdot3=9$$ My book, however, presents a different way of solving this: $$27^\frac23=\sqrt[3]{27^2}=\sqrt[3]{3^6}=3^2=9$$ I know that $27^\frac23=\sqrt[3]{27^2}$ because having an exponent of $\frac23$ is the same as calculating the square of the base and then the cubic root, or the other way around.</p> <p>What I don't understand is how 27 becomes $3^6$. So, my questions are:</p> <ol> <li>In my attempt I knew that the cube root of 27 is 3, so solving this was easy. But what if there was a more complicated number instead of 27? Would I be able to solve the problem this way?</li> <li>What was the thought process used to convert 27 into $3^6$?</li> </ol>
0non-cybersec
Stackexchange
291
881
How to print/output overlapping diamonds in python3. <p>How would you output n overlapping diamonds with each diamond having a height of 2n-1. Here are the required outputs for:</p> <p>n = 3</p> <pre><code> * * * * * * * * * * * * * * * * * * * * * * * * * </code></pre> <p>n = 4</p> <pre><code> * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * </code></pre> <p>n = 5 </p> <pre><code> * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * </code></pre> <p>I have tried some code using loops. I have managed to output each shape correctly w.r.t the input n. However, I could not display the diamonds on a 'single line' only on multiple lines like this:</p> <p>n = 3 </p> <pre><code> * * * * * * * * * * * * * * * * * * * * * * * * * * * </code></pre> <p>This is the code I used:</p> <pre><code>n = int(input()) #for number of diamonds per row height = 2*n - 1 for j in range(1, n + 1): #for printing h no. of diamonds #from row 1 to middle row for row in range(1, (height + 1)//2 + 1): for spaces in range((height + 1)//2 - row): #print spaces per row print(" ", end = "") for stars in range((2*row) - 1): #print stars per row if stars % 2 == 0: print("*", end = "") else: print(" ", end = "") print() #from middle row to last row for row in range((height + 1)//2 + 1, height + 1): for spaces in range(row - (height + 1)//2): print(" ", end = "") for stars in range((height + 1 - row)*2 - 1): if stars % 2 == 0: print("*", end = "") else: print(" ", end = "") print() </code></pre>
0non-cybersec
Stackexchange
805
2,151
OpenType font embedding permissions: what exactly do these mean?. <p>In our web site, we are using <code>@font-face</code> to embed fonts (we're using Font Squirrel). Currently, we are using only free fonts, but I'd like for us to purchase some high-quality OpenType fonts. One option is an <a href="http://store1.adobe.com/cfusion/store/html/index.cfm?code=1900&amp;store=OLS-US&amp;nr=0&amp;event=displayFontPackage&amp;newsample=InstantPage&amp;view=View" rel="nofollow">Adobe "Value Pack"</a>. <a href="http://www.adobe.com/type/browser/info/embedding.html" rel="nofollow">According to Adobe</a>, they allow embedding in all electronic documents.</p> <p>What we have some confusion about is which permission settings are required to allow the use of <code>@font-face</code>. Here are the permissions mentioned by Adobe's site:</p> <blockquote> <p>No Embedding: This permission signals that the font or any portion of the font may not be embedded in any electronic document. While there are no Adobe Type Showroom fonts with this permission, some third-party font foundries may set their fonts to “no embedding” or prohibit embedding through their end user license agreement.</p> </blockquote> <p>Obviously, couldn't use these fonts at all.</p> <blockquote> <p>Preview &amp; Print: A font with an embedding permission of Preview &amp; Print allows the font, either fully or as a subset, to be embedded in an electronic document solely for the purpose of viewing that document on screen and/or printing that document. While a font with a Preview &amp; Print embedding permission (either through data in the font file or the font’s license agreement) may be embedded in an electronic document, the embedded font may not be used to further edit the document it is contained in or to edit or create other documents. Most fonts in the Adobe Type Showroom are set for Preview &amp; Print embedding.</p> </blockquote> <p>Would a static web page fall under this category?</p> <blockquote> <p>Editable: Fonts with an editable embedding permission can be embedded in electronic documents, and the embedded font can then be used by the recipient of the electronic document to view, print and further edit or modify the text and structure of the document in which it is embedded. These changes or edits can then be saved in the original document. Several fonts in the Adobe Type Showroom, including all Adobe Originals typefaces, other Adobe-owned typefaces and certain third-party font foundry typefaces, allow for editable embedding.</p> </blockquote> <p>Would a web page that can include user-generated content fall under this category?</p> <blockquote> <p>Installable: Fonts with an installable embedding permission may be embedded in electronic documents for viewing, printing and editing, with the added capability that they may be also be permanently installed on the computer that receives the electronic document containing the embedded font. This allows the font to be used to create and author new documents. It is intended that the recipient of a font set to installable embedding obtains all of the same rights as the person who originally licensed the font.</p> </blockquote> <p>Would the fact that a browser uses a cache make it so that all <code>@font-face</code> fonts require the "Installable" permission?</p> <p>Can anybody here clear up our confusion about license terms and embedding fonts on web pages?</p>
0non-cybersec
Stackexchange
850
3,442
My plan to lose weight while still being able to play hours of Diablo 3.. ~220lbs, 5'7', male. I want to lose about 30 pounds. 190 is a very comfortable weight for me. 180 would be better. I eat well and I run from time to time, but I also to spend lots of time standing still, or sitting still, while playing video games. Then I decided to change that. I didn't want to give up video games, but I wanted to exercise more often. So! I combined them into [this!](http://i.imgur.com/cR36s.jpg) I do not think I have ever made a better decision in my life, ever! Now I walk 2mph while I play my games. I am clocking in at over 21 miles a week and every day I feel better about myself. I am losing weight slowly and at a safe pace. This is something all gamers should play on, all the time. The primary components clock in at under $350 ([desk](http://www.ikeafans.com/home/modular-desks-ikeas-jerker-is-undisputed-king/) and [treadmill](http://www.ebay.com/itm/CONFIDENCE-FITNESS-NEW-ELECTRIC-FOLDING-TREADMILL-W-PRO-TRACK-MOTORIZED-BELT-/330723563855?pt=US_Cardio_Treadmills&hash=item4d00a9194f)) and it is very easy to do. It does not effect your ability to play games or use a PC if you walk the proper speed. I have found that somewhere between 1 and 2.5 MPH is perfect, depending on the task. Edit: I have stared a new diet also. I am not neglecting that part of weight loss. This is also not my only form of exercise. I run a few (3+) time a week and am doing other things like using the dumbbells you see. Push ups, sit ups, and and using a total gym. This is just a way to turn the gaming part of my life into part of a total fitness and weight loss program instead of it being counter to my over all goals. Edit: It is not hard to play like this. I do not run. I walk. I use a mouse, it is easy. Doesn't mess with your game at all. Keep it around 2 mph and using a computer doesn't change. Plus, this was cross posted to Gaming and Diablo, like some of you suggested. Give it some love!
0non-cybersec
Reddit
576
2,001
&quot;can&#39;t return a result set in the given context&quot; error when calling stored procedure - differences between mysql 5.0 and 5.5?. <p>I have a <a href="https://gist.github.com/4692790#file-edgelisttonestedset-sql" rel="nofollow">stored procedure</a> to regenerate leafs (nleft, nright) in simple (id, id_parent) tree. (<a href="https://gist.github.com/4692790#file-data-sql" rel="nofollow">sample table</a>)</p> <p>When I'am calling </p> <pre><code>CALL EdgeListToNestedSet( 'category', 'id_category', 'id_parent'); </code></pre> <p>it works great with version <strong>5.5.29</strong> of mysql but on <strong>5.0.26</strong> I've got an error: </p> <pre><code>#1312 - PROCEDURE test.EdgeListToNestedSet can't return a result set in the given context </code></pre> <p>Any ideas what can be wrong and how to make it working?</p>
0non-cybersec
Stackexchange
297
843
Mate panel not working with Compiz in 16.04. <p>So, I tried to set up Compiz as my window manager in Mate. I am running Ubuntu 16.04, but I didn't install Ubuntu Mate. Instead, I installed a different flavor of Ubuntu and installed Mate in it. When I login I can't move Windows around and the panel for Mate is completely unresponsive. I can do Ctrl+Alt+T to open a terminal and such, but I want to be able to use Compiz in Mate so I can use features like the Compiz Cube. I believe I used <a href="http://www.webupd8.org/2014/11/how-to-use-compiz-in-ubuntu-mate-1404.html" rel="nofollow noreferrer">this</a> guide to get Compiz to work, except I had no need for installing Compiz because it is already installed and used as default in the official Ubuntu flavor.</p>
0non-cybersec
Stackexchange
215
768
Latest iPhone iOS Mail app client size attachment size limit. <p>Our Exchange Server with ActiveSync used by mobile clients has a 300 MB attachment limit.</p> <p>We noticed that the Mail app on the latest iPhone removes attachments over a certain size (20 Mb??) before sending emails.</p> <p>Other software (ex. AquaMail on Android) manages to send attachments up to 80 MB with the same email account. </p> <p>We are 100% sure there are no iPhone specific smaller limits on the server side.</p> <p>Does anyone know where to find the official maximum attachment size usable by the Mail app on iPhone?</p> <p>I found this - <a href="https://support.apple.com/en-us/HT202305" rel="nofollow noreferrer">https://support.apple.com/en-us/HT202305</a> - but that's specific to iCloud mail accounts</p>
0non-cybersec
Stackexchange
225
799
Limit of a Bessel function is a Gaussian. <p>Let <span class="math-container">$x$</span> and <span class="math-container">$\nu$</span> be real. Is the following true?</p> <p><span class="math-container">$$ e^{-\frac{x^2}{4}}=\lim_{\nu\rightarrow\infty}\Gamma(\nu+1)\left(\frac{2}{\sqrt\nu x}\right)^\nu J_\nu\left(\sqrt{\nu} x\right), $$</span></p> <p>It appears to be true numerically, but I couldn't prove it. </p>
0non-cybersec
Stackexchange
152
419
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application. I need to scale my app adding some spot instances that EB do not support.</p> <p>So I create a second autoscaling from a launch configuration with spot instances. The autoscaling use the same load balancer created by beanstalk.</p> <p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p> <p>This work fine, but:</p> <ol> <li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p> </li> <li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p> </li> </ol> <p><strong>UPDATE</strong></p> <p>Elastic Beanstalk add support to spot instance since 2019... see: <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
0non-cybersec
Stackexchange
349
1,234
show that $\cos(\theta_{2}-\theta_{3})+\cos(\theta_{3}-\theta_{1})+\cos(\theta_{1}-\theta_{3})+1=0$. <p>If $$a = \cos\theta_{1} + i\sin\theta_{1}, \\ b = \cos\theta_{2} + i\sin\theta_{2}, \\ c = \cos\theta_{3} + i\sin\theta_{3}$$ and $a+b+c=abc$, then show that </p> <blockquote> <p>$$\cos(\theta_{2}-\theta_{3})+\cos(\theta_{3}-\theta_{1})+\cos(\theta_{1}-\theta_{2})+1=0$$</p> </blockquote> <p>I am confused with where to start. I did try to proceed with the De Moivre's Theorem but was not able to get hold of the required equation. </p> <p>Kindly provide a hint. </p> <p>Thanks in advance !</p>
0non-cybersec
Stackexchange
244
606
Default key for Python builtin max/min functions. <p>The documentation for the built-in functions <code>max</code> and <code>min</code> in Python indicate that the <code>key</code> parameter should operate like it does in the <code>sort</code> function. In other words, I should be able to do this:</p> <pre><code>a = [1, 2, 3, 4] max(a, key=None) </code></pre> <p>However, this raises an error: <code>TypeError: 'NoneType' object is not callable</code></p> <p>But, if I do something similar with the <code>sort</code> function, I get the expected results:</p> <pre><code>a = [1, 2, 3, 4] a.sort(key=None) </code></pre> <p>No error is generated and the default sort is used. Several books also imply that I should be able to get away with the same behavior in the <code>max</code> and <code>min</code> functions. See this excerpt from <a href="http://books.google.com/books?id=JnR9hQA3SncC&amp;lpg=PA58&amp;ots=Jb3UEt090u&amp;dq=set%20key%20argument%20to%20none%20python%20max&amp;pg=PA58#v=onepage&amp;q=set%20key%20argument%20to%20none%20python%20max&amp;f=false">Python in a Nutshell</a>.</p> <p>Is this really the default behavior of the <code>max</code> and <code>min</code> functions? Should it be? Shouldn't they match the sort function?</p>
0non-cybersec
Stackexchange
438
1,255
Computer using hard drive in place of RAM?. <p>I am doing some school work about computer components and I came across this piece of information.</p> <blockquote> <p>you will find that if you don’t have enough RAM it can really bog down your computer. <strong>This is because your operating system will try to use your hard drive and your hard drive is a lot slower than the RAM</strong>.</p> </blockquote> <p>I don't understand this and don't want to learn the wrong facts, could someone please clarify this and if it is true or not?</p>
0non-cybersec
Stackexchange
145
548
Python: How to offer a single executable file without showing the code in 2020. <p>Stack Overflow has many questions about</p> <ul> <li>How to give someone else a python script protecting the source code</li> <li>How to compile python files</li> <li>How to create packages and deploy the code</li> </ul> <p>But I could not find the answer to my problem:</p> <p>I want to give someone else my python script, without giving him the source code. My current attempt is <strong>compiling</strong> the file and giving away the .pyc file. </p> <p>This is for sure not the best solution. Moreover, my code is made by different files. To offer a single executable pyc file, I put the code all together in a single file before compiling it: a true hell for a developer</p> <p>How can I obtain my goal in a cleaner way?</p> <h2>Side-notes</h2> <p>I know .pyc files are not going to hide so much, but it is for sure better compared to giving .py files</p> <p>Still, .pyc files can be incredibly problematic (as they can be system-dependant)</p>
0non-cybersec
Stackexchange
302
1,041
Orbits of independent sets of the hypercube. <p>How does one enumerate the distinct orbit classes of independent sets of the hypercube modulo symmetries of the hypercubes? </p> <p>The counting of the number of independent sets in an <span class="math-container">$n$</span>-dimensional hypercube modulo symmetries of the hypercube has been done up to <span class="math-container">$n=5$</span> by D.Eppstein as seen in the <a href="http://oeis.org/A060631" rel="nofollow noreferrer">OEIS</a>. We do have a bound on the number of independent sets of a regular graph as found by <a href="http://yufeizhao.com/papers/indep_reg.pdf" rel="nofollow noreferrer">Y.Zhao</a>. But I'm not aware of other results to this old problem of mine.</p> <p>Does anyone know of a resource on how to go about this enumeration? I've already coded a brute-force program to do this listing and had reproduced Eppstein's results up to <span class="math-container">$n=5$</span>. The <span class="math-container">$n=6$</span> took too much time and memory space on my personal computer that it always crashed. But this was years ago. I was just reminded of this recently, so here's my first post on MO.</p>
0non-cybersec
Stackexchange
336
1,180
Is it possible to expand a Hyper-V drive if there are checkpoints?. <p>I have a Hyper-V VM with 3 checkpoints. Now I want to extend the virtual hard drive, but I cannot because there are checkpoints.</p> <p>Is there a tool that would allow me to do it anyway? I would like to preserve the checkpoints, of course.</p> <ul> <li>Both the host and the guest machines are Windows 10.</li> <li>The drive is VHDX.</li> <li>The VM is Gen2.</li> </ul>
0non-cybersec
Stackexchange
138
445
Revert a deleted file several commits later. <p>So I started down a new branch of development and decided that some files needed to go.</p> <p>Several commits later I realise that a certain decision was wrong and I need a couple of the files back.</p> <p>My initial thought of how to get the files back is to just take copies from the other branch and commit them to the head of the new branch, but I worry that this means that the files won't be associated with their old history.</p> <p>Is there a way to do this that keeps the history intact?</p> <p>I'm using mercurial version 1.5.2</p>
0non-cybersec
Stackexchange
160
595
It doesn't bleed but it stings, sometimes. My mama said physical appearances don't matter. That's why, as a kid, I did well in my studies, follow all the rules, and believe that people will love you if you're good and sincere. Yet, I had friends that talk to me when they need something. People would avoid me and think I'm weird since I don't talk much (Because I know I'd get rejected. I experienced it a lot of times before). I was always the second option. I told mama how sad my high school years were but she comforted me with words that I know were too good to be true. Mama loved to sugarcoat things. Even though I'm ugly, she assured me that I'm beautiful. Even though I'm fat, she told me that I have a healthy body. That was then, 3 years to be exact. Recently, I asked mama the same questions. It breaks my heart that mama didn't reply. She would change the subject to not hurt my feelings with the truth. The treatment that people gave me in the past wasn't that different today. Some would be painfully straightforward in their opinions. Others would choose mild words but the meaning's still the same. But that is okay. I accepted it then and now. I already know that this would happen. I was wounded with words and experiences that lashed my childhood and early teenage years. However, time's a healer. I became partially numb. The only thing that's left is a scar. It stands as a remembrance. Yes, it's invisible. It doesn't bleed. But it definitely stings, sometimes.
0non-cybersec
Reddit
345
1,486
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application. I need to scale my app adding some spot instances that EB do not support.</p> <p>So I create a second autoscaling from a launch configuration with spot instances. The autoscaling use the same load balancer created by beanstalk.</p> <p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p> <p>This work fine, but:</p> <ol> <li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p> </li> <li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p> </li> </ol> <p><strong>UPDATE</strong></p> <p>Elastic Beanstalk add support to spot instance since 2019... see: <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
0non-cybersec
Stackexchange
349
1,234
Does anyone think that saying there is a twist is one of the worst, if not the worst, spoiler you can give?. I can't help but notice that even when people are being knowledgeable that you don't want to know anything about a movie, they don't mind saying there's a twist as if that's not a spoiler. For myself, it's probably the worst thing you could have said out of all other things since it totally ruins the entire experience and effect of a twist. Instead of being able to play along and then have your mind blown, you end up not trusting and second guessing everything anyone says and then when the twist comes it's just like "oh, that's what it was." While I appreciate the fact that people who do this are trying to not ruin the movie for me, I feel it is crucial to know that saying a twist exists is in fact, a spoiler.
0non-cybersec
Reddit
192
833
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application. I need to scale my app adding some spot instances that EB do not support.</p> <p>So I create a second autoscaling from a launch configuration with spot instances. The autoscaling use the same load balancer created by beanstalk.</p> <p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p> <p>This work fine, but:</p> <ol> <li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p> </li> <li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p> </li> </ol> <p><strong>UPDATE</strong></p> <p>Elastic Beanstalk add support to spot instance since 2019... see: <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
0non-cybersec
Stackexchange
349
1,234
Just one request for Destiny 3: Don't remove tons of features like you did with D2.. **Don't just up and abandon like 90% of the QoL changes in the transition to D3 like what happened between D1 and D2:** * Strike Scoring was added to D1 and it was phenominal. In D2? Only the Nightfall has scoring and it's got no medals, and multikills and kill streaks aren't worth crap. * Strike Specific loot was a huge part of endgame Strike content in D1. D2? It was all added later as Nightfall exclusive. * Random rolls in D1? D2 had fixed rolls for everything until we begged them to change it back. * D1 had collections for ships and sparrows and stuff. Again, removed in D2 and we had to beg for it back. * In D1 we had more control over what game modes we played in the Crucible, had 6v6, Rumble, Mayhem, and it was good. In D2? It launched with just 4v4. That's it, just 4v4. We had to wait for Rumble, we had to wait for 6v6. We had to wait for Private matches even though D1 had it first. We had Rift in D1, and that *still* hasn't come back! * In D1 we could pick specific Strikes, in D2 they took it out and we had to beg them to put it back in. * In D1 we could replay any story mission whenever we wanted. D2? Campaigns are once and done. We want to replay campaign missions? We can only do the ones that happen to be available that day. The only way to do a complete playthrough anymore is to delete a character and start over, that sucks! * In D1 we had lore pickups, in D2 we had to beg before they were put back in. * In D2, they decided that we'd be better off having every weapon that was remotely powerful crammed into one slot and being forced to carry 2 primaries. Again, we begged for it to be changed back. * In D1 we had the Grimoire. Yeah, it was online only, and yeah we've got Lore in D2 now...but the original solution to the Lore being online only (and thus inconvenient) was for there to be *no Lore*. Another thing we had to beg Bungie to add back. **Summary:** Things like Private Matches in the Crucible, all of the different Game Types, Strike Scoring, that new thing where we can preview armor of other classes, Gambit, private matches in that, Trials, all of that needs to be in D3 *from the beginning*. It needs to be in D3 when it launches. We shouldn't have to sit there with a subpar game for several months just for it to get somewhat close to the standard set by the previous game. The whole point of having a sequel is for it to be *better*, not worse. We don't want any of this trimming the fat nonsense! If anything, we want the game to be fatter! More juicy! Please, take your time and make D3 the best it can possibly be! **A tiny personal request** Could you also let us recustomize our characters' appearances in D3...and maybe give them actual names? My Hunter's been stuck forever with no name and a really fugly haircut, and the lack of barbers/cosmetic surgeons on the Tower is really starting to irritate him. Edit: Formatting and grammar. Edit 2: Holy cow! Right at the top of the subreddit! *Ahem* To any Bungie employee that might be reading this, I love your company and I love this series. I complain because I want the series to be as good as it can possibly be. I don't know if Destiny 3 will be the final game, or if there will be a Destiny 4. All I want is for the transition to Destiny 3 to be an upgrade as opposed to a downgrade. Bungie, *you* control when the game is released now, you don't have to adhere to a release schedule decided upon by someone else. Please take advantage of that. I don't care if you have to delay the game, I just want it to have all of the features we're used to right out of the gate when it launches. Take your time, please.
0non-cybersec
Reddit
984
3,726
Yen (&#165;) symbol for backslash (\) in TexWorks. <p>Hi I am running TexWorks 0.6.2 on windows 10. In my text editor ( of texworks) whenever I type backslash (<code>\</code>) it is replaced by yen symbol (¥). The code compiles normally and if I copy the code and paste it on notepad or some other editor it shows (<code>\</code>). I was wondering if there is some setup in TexWorks which is causing this issue. I don't have this issue on command prompt or any other editor.</p>
0non-cybersec
Stackexchange
131
479
I think I may have overwritten my harddrive while installing Ubuntu. <p>Crappy first experience with Ubuntu, and I think all my old files are gone. So I just downloaded Ubuntu yesterday and have been trying to install it. Errors every single step of the way. I won't mention them all but here are the pertinent ones:</p> <p>I followed <a href="http://www.ubuntu.com/download/desktop/create-a-usb-stick-on-ubuntu" rel="nofollow noreferrer">Ubuntu's directions to create a bootable USB</a>, and when I restarted my computer through Ubuntu, I clicked the Install icon, clicked through the settings, etc and then clicked "Install now." All it showed was a "loading" cursor. Though it was installing and maybe it's just gonna take a while, went to sleep, woke up this morning and it was still showing the same screen. Apparently their own Installation routine is screwed.</p> <p>So I googled and followed an example of how to install with more manually selected options, in case the default ones were incorrect. I selected the option called "Something else" as the installation type. I created a boot, ext4 by partitioning free space in memory. I did <strong>NOT</strong> select "delete everything" or overwrite Windows. After clicking "Install now" it hung on "Detecting file systems." It clearly was not moving, and it didn't give me an option to cancel. The tiny box supposedly for displaying output could barely be read, and cropped off a few letters on the left side -- couldn't read the errors, and I couldn't copy them either. Wanted to terminate the process screen because I was so frustrated at the poor design of Ubuntu, so I found a utility called xkill, went to use it, but the stupid installer window had disappeared behind the other windows, so I couldn't click the window.. figured I could go and click its icon on the left, then BAM the whole system terminates!! and I am asked to log in, even though I haven't made a username!</p> <p>So I had to restart my computer. Doesn't get anywhere past the very first default loading screen--after that it just shows a black screen with a blinking underscore. ctrl+alt+del to restart again and choose F12 to see what options I have. Running from HDD is fu**ed. Can only choose Ubuntu, and when I get back in, the "OS" icon I once saw is gone--I can't see any of my old files. Many years of files GONE IN AN INSTANT. What kind of crap is this, Ubuntu? Jesus Christ.</p> <p><strong>Is there any way I can restore my old memory???? PLEASE. THANKS.</strong></p>
0non-cybersec
Stackexchange
610
2,514
dhclient can&#39;t get ip address. <p>I have two interfaces: eth0 and eth1. eth0 gets ip address upon bootup, but eth1 never gets ip address. Here's what I get with </p> <blockquote> <p>sudo dhclient eth1</p> </blockquote> <pre><code>Internet Systems Consortium DHCP Client 4.2.4 Copyright 2004-2012 Internet Systems Consortium. All rights reserved. For info, please visit https://www.isc.org/software/dhcp/ Listening on LPF/eth1/08:00:27:99:8e:91 Sending on LPF/eth1/08:00:27:99:8e:91 Sending on Socket/fallback DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 3 (xid=0x3b2d7ff3) DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 5 (xid=0x3b2d7ff3) DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 12 (xid=0x3b2d7ff3) </code></pre>
0non-cybersec
Stackexchange
297
766
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application. I need to scale my app adding some spot instances that EB do not support.</p> <p>So I create a second autoscaling from a launch configuration with spot instances. The autoscaling use the same load balancer created by beanstalk.</p> <p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p> <p>This work fine, but:</p> <ol> <li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p> </li> <li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p> </li> </ol> <p><strong>UPDATE</strong></p> <p>Elastic Beanstalk add support to spot instance since 2019... see: <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
0non-cybersec
Stackexchange
349
1,234
Squat and OHP Form Check. Hi, currently doing strong lifts. These are some videos from the OHP / DL day. Battery ran out after OHP. Any and all advice is appreciated. Height: 5' 6" Weight: 224 lb Exercise: Squat High back (225 lb) Overhead Press (110 lbs) Questions: For squats I'm concerned with the width of my legs. Also I think I have a slight preference on my right leg which should be visible in the "squat back" video. Also I'd like to check if my back straightnes is straight enough. Also is the speed i'm going down. Is it prone to injury or not? Prior I was having a slight issues with pain in my hip, but after doing some warm-ups(Agile 8) this particular weight was alot easier. Is my form potentially affecting or contributing to this? For OHP, I think my back is going back too much and i'm not stabalizing enough? OHP Back - https://youtu.be/3SzPurvvUN0 OHP Side - https://youtu.be/qTyKkOcj7KA squat back - https://youtu.be/2evPIkVpRe0 squat side - https://youtu.be/Y9b4lM2ZuNc
0non-cybersec
Reddit
306
999
Ex broke up with live in GF. Hi All First, thanks in advance for any input or advice, especially if you have gone through something similar. Background: I (34/F) live with my fiancee (35/m) and my daughter (9). We have all been living together for 3 years. Prior to that, my daughter and I lived alone from when she was 14 months. My ex (36/m) lives about 1 1/2 hours away and has our daughter every other weekend. He has been living with his girlfriend (25?) for about three years, dating for about the same amount of time. My daughter LOVES the girlfriend. She is a preschool teacher and spends a lot of time doing cool activities when my daughter visits. They paint nails, cook, play, etc... THe Girlfriend is awesome and only over-stepped once. I said something to my ex and it immediately stopped. She is nice and polite where the ex is generally scowly and ignores me and my fiancee. I like The Girlfriend even though I can't figure out why the hell she is with my ex. When my daughter comes home from weekends at her dad's, she talks about The Girlfriend. When I ask about her dad, she says that her dad played video games and slept... Not all of the time, but a lot of the time.... for the past THREE YEARS. The problem: My ex called me on Thursday. He broke up with The Girlfriend. She is gone and not coming back- not even to say goodbye to our daughter. This is his weekend with our daughter. He didn't want our daughter to be upset and cry. To which I respond that she SHOULD cry because it is healthy and an appropriate response. I also say that he should let our daughter know that HE is also sad as a way to validate her feelings. Here is where I need help... What do I say to my daughter? Part of me is pissed off at my ex for being an idiot and letting The Girlfriend forge such a close relationship with our daughter if this wasn't a relationship that was going anywhere. I asked him a year ago if he thought this was it for him and he wasn't sure. Well that's fine, but on your weekends don't sit on your ass and let the GF take over! The other part of me is so sad for my daughter. She lost someone who she considered to be a parental figure without any warning and no chance to say goodbye. I want to help her through this, but I don't know how... My daughter can be very emotional and sometimes struggles to display her emotions. I'm worried that she will bottle this up and won't talk about it with me. I don't trust my ex to talk about it with her... His plan is to put on a happy face and pretend everything is hunky dory. Our daughter is 9, not 4... pretending isn't going to help her. I've thought about having her write The Girlfriend a letter. I feel like having The Girlfriend fade away gradually is a far better way to deal with this then just cutting her out completely. Shouldn't our daughter at least get to say goodbye, get her address and send her a note on occasion?? UPDATE: Ex's sister is going to give The Girlfriend my phone number and address if she hears from her. If she doesn't make contact in the next week or so, I will call/ Facebook The Girlfriend. I haven't called during one of their visits in years, but I did call today to check on them. The ex and daughter are having a good weekend so far and playing lots of games and doing stuff. I didn't mention The Girlfriend to my daughter. We just picked on her dad because he was losing the game they were playing- all in good fun to keep them both smiling.
0non-cybersec
Reddit
814
3,465
Grub menu not being shown after installation of kubuntu 15.04. <p>I am using windows 10 ( upgraded from 8.1 ) and I installed kubuntu 15.04 using a bootable usb. I installed this into sda5 with 40GB capacity. I also created a swap partition of 8GB. After installation when it asked me to reboot, I did so. No GRUB menu was being shown and the system went directly into windows 10. Inside windows, the partitions (40GB and 8GB) were shown as RAW file systems and I am asked to format those when I try to access them from Windows. In UEFI boot settings, I had enabled legacy boot and disabled secure boot for installing kubuntu. </p> <p>Please help me in bringing out the GRUB menu so that I can use kubuntu from the start itself. Otherwise I have to go to UEFI boot options each time and select boot from Notebook Hard disk option. Also when Windows starts it shows "Scanning and repairing drive(J)". (One of the above mentioned partitions) </p>
0non-cybersec
Stackexchange
232
947
Prove that if $p_1,\dots,p_k$ are distinct odd primes then 1 has $2^k$ square roots $\mod m$ where $m$ is the product of the primes.. <p>I think I am most of the way through this proof but I am stuck. Here was my approach: I looked at the square roots of $1$ mod $105$, and noticed that each one corresponded to one less than an integer multiple of a subset of the prime factors of $105$, i.e. we have for instance $71=24\cdot3-1$ or $29=2\cdot(3\cdot 5)-1$ and so on. I conjectured that given a subset of the prime factors of $m$, I could construct a unique square root of $1$ mod $m$, which would show that there are (at least) $2^k$ of them.</p> <p>So I did that and I think that it worked. Pick some set of the prime factors of $m$, say $p_{a_1},\dots,p_{a_j}$. Claim: we can find a corresponding $n$ such that $n\prod_{i=1}^jp_{a_i}-1$ is a square root of $1$ mod $m$.</p> <p>Proof: We are looking for a solution to </p> <p>$$\left(n\prod_{i=1}^jp_{a_i}-1\right)^2\equiv 1 \pmod m$$ which may be rewritten as </p> <p>$$\left(\prod_{i=1}^jp_{a_i}\right)^2n^2 - 2\prod_{i=1}^jp_{a_i}n\equiv 0 \pmod m$$</p> <p>Now since $\prod_{i=1}^jp_{a_i}|m$ we may write this as $$\prod_{i=1}^jp_{a_i}n^2-2n \equiv 0\mod \frac{m}{\prod_{i=1}^jp_{a_i}}$$</p> <p>or</p> <p>$$n\left(\prod_{i=1}^jp_{a_i}n-2\right) \equiv 0 \mod {\frac{m}{\prod_{i=1}^jp_{a_i}}}$$</p> <p>This has solutions when $n\equiv0\mod \frac{m}{\prod_{i=1}^jp_{a_i}}$ or when $\prod_{i=1}^jp_{a_i}n-2\equiv 0 \mod \frac{m}{\prod_{i=1}^jp_{a_i}}$. In the first case we end up with the same root for any choice of $p_{a_i}$'s so that's sort of a degenerate one. But in the second case we have $\prod_{i=1}^jp_{a_i}n\equiv 2 \mod \frac{m}{\prod_{i=1}^jp_{a_i}}$, which has a unique and nonzero solution for $n$. Plugging that $n$ back into $n\prod_{i=1}^jp_{a_i}-1$ thus gives a square root of $1$ mod $m$ which corresponds uniquely to your choice of prime factors, thus showing that there are (at least) $2^k-1$ square roots of 1. Then we add 1 in which corresponds to the empty set of prime factors and we get the full $2^k$.</p> <p>My problem is ruling out the possibility of <em>more</em> square roots of 1, i.e. if $x^2\equiv1\mod m$ I need to show that it corresponds uniquely to something of the form $n\prod_{i=1}^jp_{a_i}-1$. This is proving to be difficult if not impossible.</p> <p>I put a lot of work into going the one way and I really don't want it all to be for nothing. Can anyone see a way to go the other direction?</p>
0non-cybersec
Stackexchange
911
2,504
DevOps vs Docker. <p>I am wondering how exactly does docker fit into CI /CD . I understand that with help of containers, you may focus on code , rather than dependencies/environment. But once you check-in your code, you will expect tools like TeamCity, Jenkins or Bamboo to take care of integration build , integration test/unit tests and deployment to target servers ( after approvals) where you will expect same Docker container image to run the built code. However, in all above, Docker is nowhere in the CI/CD cycle , though it comes into play when execution happens at server. So, why do I see articles listing it as one of the things for DevOps. I could be wrong , as I am not a DevOps guru, please enlighten !</p>
0non-cybersec
Stackexchange
174
723