text
stringlengths 3
1.74M
| label
class label 2
classes | source
stringclasses 3
values |
---|---|---|
No Sound on Intel Ubuntu 18.04 chromebook. <p>I Have downloaded Ubuntu 18.04 LTS on to my computer (which is a Intel Chromebook) I have looked all over the web (including ask ubuntu) but have no answers that work. Can someone please help!!!</p>
<p>Thanks!! </p>
| 0non-cybersec
| Stackexchange |
NSPredicate that ignores whitespaces. <p>I need to use NSPredicate to match two strings, case-insensitive, diacritic insensitive, <strong>and whitespace-insensitive</strong>.</p>
<p>The predicate would look something like this:</p>
<pre><code>[NSPredicate predicateWithFormat:@"Key ==[cdw] %@", userInputKey];
</code></pre>
<p>The 'w' modifier is an invented one to express what I'd like to use.</p>
<p>I can't just trim the <code>userInputKey</code> because the data-source "Key" values might have whitespaces in them too (they need those whitespaces, I can't just trim them beforehand).</p>
<p>For example, given a <code>userInputKey</code> "abc" the predicate should match all of <pre>{"abc", "a b c", " a B C "}</pre> and so on. Given a <code>userInputKey</code>"a B C" the predicate should also match all the values in the set above.</p>
<p>This can't be so hard to do, can it?</p>
| 0non-cybersec
| Stackexchange |
Shorten both ends of a line with one key. <p>Consider the following snippet:</p>
<pre><code>\begin{tikzpicture}
\def\ptRad{2pt}
\fill (0,0) circle (\ptRad);
\fill (1,1) circle (\ptRad);
\draw[<->, shorten <=\ptRad,shorten >=\ptRad] (0,0) -- (1,1);
\end{tikzpicture}
</code></pre>
<p>Is there a way to use only <em>one</em> shortening key for both ends at the same time?</p>
| 0non-cybersec
| Stackexchange |
Are there any fonts with Asian coverage that can be used freely on web-pages?. <p>I have searched through the site but didn't find anything related to my question so I'm asking; I also hope this is the right place to ask.</p>
<p>I've tried to look around but there seems to be lack of free fonts that support Asian scripts and that can be used freely on the internet.</p>
<p>Are there (preferably official) sites that provide such fonts for free? All of those I found support only Latin/Cyrillic/Greek but not Asian like Chinese/Japanese/Korean scripts.</p>
| 0non-cybersec
| Stackexchange |
stick win everytime. | 0non-cybersec
| Reddit |
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 |
A cross section of the titanic made entirely in MS paint. The level of detail is very impressive. | 0non-cybersec
| Reddit |
What timezone does DST refer to?. <p>I'm using WSL with ubuntu 16.04, and was having network issues today. Here's what date outputs</p>
<pre><code>$ date
Thu Sep 21 13:37:00 DST 2017
</code></pre>
<p>What does DST refer to? I know it stands for "Daylight savings time", but that's <a href="https://en.wikipedia.org/wiki/List_of_time_zone_abbreviations" rel="nofollow noreferrer">not a timezone name</a>. I'm suspicious that it's a contrived timezone that changes on the equinox, which would explain my problem today.</p>
<p>I was able to fix my problem by setting my timezone to <code>US/Pacific</code>, which changed the output to <code>PDT</code>:</p>
<pre><code>$ date
Thu Sep 21 13:37:00 PDT 2017
</code></pre>
<p>However, I have a second machine with the same problem, and am curious what timezone it thinks its in.</p>
<p>Is there anyway to get the <code>X/Y</code> string (Olson database name) that corresponds to <code>DST</code> out of the system?</p>
| 0non-cybersec
| Stackexchange |
Bored of everything. Not sure if this is the right place to post this anyway.
Ever since high school iv been incredibly bored of everything like nothing interest me, Im in college now and it has not changed the friends I have i don't really care about and the new people I meet just don't interest me, Im incredibly apathetic to a an extreme amount and I get angry easily, I also don't have feelings for anyone i dont know when it happened but at some point I stopped liking people like they just annoy me I have never been in love because of this. I stem this to being a little bit gifted but never being able to show it early on and i know it sounds conceited but its true.
Even now in college i am maintaining a 4.0 in engineering but it does not challenge me and i even do self destructive things to try fail some of my classes like leaving quizzes empty or skipping classes and lab repeatedly but even than i i do good and also in college i create a facade to people and professors i mean i make friends and am nice on the outside but on the inside everything is annoying and i wish i could act like i really want to like the rude egotistical dick i am but if i did that idk it seems things would go bad real quick like people praise me for my good work but what does it matter when it took no effort on my part, i know this sounds stupid but i have conetemplated suicide because of how boring life right now is and people will tell me to try new things but iv done that many times but it just wears off in a couple of weeks for me. Idk i just needed to get this off my chest maybe someday soon ill actually start feeling again | 0non-cybersec
| Reddit |
Redirecting Report Server connections using host file. <p>I am connected remotely to a server called New_Server and trying to connect to the Report Server which is installed on it by referring to another server: </p>
<p>I've changed the <strong>host file</strong> on NEW_SERVER to POINT to ITSELF when referring to another server: if I put in Old_Server name, it SHOULD point to itself; NEW_Server</p>
<p>So I put in this link: <a href="http://New_Server/ReportServer/" rel="nofollow noreferrer">http://New_Server/ReportServer/</a> - it works
But then when I put in the link: <a href="http://OLD_SERVER/ReportServer/" rel="nofollow noreferrer">http://OLD_SERVER/ReportServer/</a>
then it asks me to RE-AUTHENTICATE, which I do, but it doens't seem to respond at all. It just seem to get my input and do nothing with it (since I am reprompted again and again for the username/password). </p>
<p>Issues: </p>
<ol>
<li><p>Why should it even ask me to re-authenticate; should it NOT just replace "Old_Server" with "New_Server"? So shouldn't it just connect to
<a href="http://New_Server/ReportServer/" rel="nofollow noreferrer">http://New_Server/ReportServer/</a> ??</p></li>
<li><p>Why does it ask for, then ignore authentication? </p></li>
</ol>
<p>It's worth mentioning that I've blocked the OLD_SERVER using firewall. But again, this should not matter since I changed the host to refer to itself when it's trying to access OLD_Server</p>
<p><em>My research</em>: </p>
<ol>
<li><p>I've read this blog about changing URLROOT, and again this is not
something I want to do or am trying to achieve. I am trying to fool
the server to <em>think</em> it's connecting to OLD_SERVER but then
referring it to NEW_SERVER </p></li>
<li><p>Using CNAME/DNS Alias is not an option</p></li>
<li><p><a href="https://stackoverflow.com/questions/19447582/windows-8-ie-cannot-reach-sites-listed-in-hosts-file">https://stackoverflow.com/questions/19447582/windows-8-ie-cannot-reach-sites-listed-in-hosts-file</a> - I've done the troubleshooting steps from that question.</p></li>
<li><p><a href="https://support.solarwinds.com/Success_Center/Network_Performance_Monitor_(NPM)/Knowledgebase_Articles/Edit_the_host_file_to_add_static_entry_for_hosts_that_are_not_resolving_by_DNS" rel="nofollow noreferrer">https://support.solarwinds.com/Success_Center/Network_Performance_Monitor_(NPM)/Knowledgebase_Articles/Edit_the_host_file_to_add_static_entry_for_hosts_that_are_not_resolving_by_DNS</a></p></li>
</ol>
| 0non-cybersec
| Stackexchange |
How to Launch and debug Ghidra from Eclipse with two Modules I'm developing at the same time?. <p>Ghidra comes with its own Eclipse extensions that allow you to develop new Scripts and Modules for Ghidra.</p>
<p>I'm working on several new Modules for Ghidra that will work together. But I've basically never used Java or Eclipse before.</p>
<p>Normally you're just working on one Module at a time and to test it you launch it in debug mode from the Eclipse IDE.</p>
<p>But Ghidra creates one Configuration for each project and will only include the current Module. Everything in your other Modules won't be linked in to Ghidra, even if you've had all their files open in the IDE and you're switching between them, you can only debug with one present at a time.</p>
<p>How can I get Ghidra to launch with three Modules I'm working on all together?</p>
<p>I've been going through the configuration dialogs and I've Googled various wordings of the problem in relation to Ghidra, in relation to Eclipse, and both together, to no avail.</p>
<p>I did clone one of the configurations and add the other modules' projects to that configuration in the "classpath" window, but on launching, only the main module is there. What am I missing?</p>
| 0non-cybersec
| Stackexchange |
Why Typeahead shows json object in input after click. <p>My suggestion engine works fine, I just have a problem because when I click on item its json object appears in input element. I would like only OrgName to appear in input value.</p>
<pre><code><input class="form-control companySearch" type="text" value="" name="q" autocomplete="off" placeholder="Search a company">
var organization = new Bloodhound({
remote: {
url: '/search/org?term=%QUERY%',
wildcard: '%QUERY%'
},
datumTokenizer: Bloodhound.tokenizers.whitespace('term'),
queryTokenizer: Bloodhound.tokenizers.whitespace
});
$(".companySearch").typeahead({
hint: true,
highlight: true,
minLength: 1,
},
{
source: organization.ttAdapter(),
name: 'organizationsList',
templates: {
suggestion: function (data) {
return '<a class="list-group-item ">' + data.OrgName + ', '+ data.address.Address+ ', '+ data.address.city.City+ ', ' + data.address.city.country.Country + '</a>';
}
}
}
);
</code></pre>
<p><a href="https://i.stack.imgur.com/NLQbo.png" rel="noreferrer"><img src="https://i.stack.imgur.com/NLQbo.png" alt="Example how I get"></a></p>
| 0non-cybersec
| Stackexchange |
Add git commit SHA to iOS application. <p>I want to show the current git SHA of when my project was built in my App. What is a good way of doing this in an iOS project with minimal effort?</p>
| 0non-cybersec
| Stackexchange |
Differences between a Cartan subalgebra and a Levi subalgebra?. <p>Let $\mathfrak{h}$ be a Cartan subalgebra and $\mathfrak{l}$ be a Levi subalgebra of $\mathfrak{gl_n}$, where $\mathfrak{h}$ and $\mathfrak{l}$ are both semisimple subalgebras. </p>
<p>This is a simple question but I am not sure how to answer this for myself: how are they different? </p>
| 0non-cybersec
| Stackexchange |
High volume low overhead requests. <p>I have an application that will process data it receives through <em>high volume, low overhead requests</em> sent from different internet-enabled hardware devices. These data will be received continually and will only increase in future as more and more devices are added to the system. Once data is received, after some small processing, it will be inserted in to the database (MySQL). </p>
<p>My question is, what sort of server software should I use for this? Is <strong>node.js</strong> the best candidate for processing the maximum number of such requests within a given hardware constraint or is <strong>nginx</strong> better for such applications? Also are there any <em>best practices</em> for handling such requests? For example, I read that if I use node.js, I might have to take a look at the <em>ulimit</em> of the OS to ensure that enough files can be created in case of large number of concurrent requests...</p>
<p>Thanks.</p>
| 0non-cybersec
| Stackexchange |
Windows 7 - Why is the Network on my Loopback Adapter Showing as Unidentified and thus Public?. <p>I'm running a virtual machine (Win XP, but OS doesn't really matter) on my Windows 7 PC using the loopback adapter to create a private network between my host computer and the virtual machine.</p>
<p>However, unfortunately communication between my virtual machine and my host machine is restricted by Windows Firewall (e.g. I can't communicate over port 80, etc), because Windows 7 says the network on the loopback adapter is unidentified, and thus its default profile (e.g. network location) is public. To make matters worse, there is no way to change the profile of the network!</p>
<p>How can I force Windows to allow me to change the profile of the loopback network, so that I can change it to private and thus communicate between the vm and the host under the more permissive private Windows Firewall profile?</p>
| 0non-cybersec
| Stackexchange |
Taco Bar setup. For my kids birthday party, we are thinking about doing a taco bar. I just need someone to check my plan.
* 20-25 people, some are little kids (baby to 10 years old)
* Planning on having tacos with the fixings, chips and salsa, cupcakes, maybe some other random finger food.
My thought is to make 6 pounds of taco meat the night before, let it chill in the fridge over night then warm it up via a crock pot starting in the morning.
Any pitfalls to this idea? | 0non-cybersec
| Reddit |
Connecticut Man Who Shot Up Ahmadi Mosque Goes Back For Forgiveness — and Receives It. | 0non-cybersec
| Reddit |
Chappelle. | 0non-cybersec
| Reddit |
Flutter - http.get fails on macos build target: Connection failed. <p>I started porting my Flutter app to <strong>macos Desktop</strong>. The UI started fine. However, as soon as the app makes a network call, it fails instantly with <strong>Connection failed (OS Error: Operation not permitted)</strong>.</p>
<p>Running a one-liner: </p>
<pre><code>final response = await http.get('https://jsonplaceholder.typicode.com/posts/1');
</code></pre>
<p>fails with: </p>
<pre><code>Unhandled Exception: SocketException: Connection failed (OS Error:
Operation not permitted, errno = 1),
address = jsonplaceholder.typicode.com, port = 443
#0 IOClient.send (package:http/src/io_client.dart:33:23)
</code></pre>
<p>The macos build target comes from Google's sample <a href="https://github.com/google/flutter-desktop-embedding" rel="noreferrer">here</a>.</p>
<p><em>Flutter (Channel master, v1.9.8-pre.108)</em></p>
| 0non-cybersec
| Stackexchange |
Set XML .@<index> based on interator AS3. <p>In AS3 is it possible to export multiple iterations of the same variable as seen in the below example:</p>
<pre><code>var item:String = "obj";
var child:XML = new XML(<{item}/>);
child.@x = String(object.x);
child.@y = String(object.y);
child.@n = String(object.name);
child.@w = String(object.width);
child.@h = String(object.height);
//...instead of:
child.@s = String(object.sprite);
//...is the below possible:
for (i = 0; i < <length>; ++i) {
child.@s[i] = String(object.get_sprite(i));
}
//...desired <filename>.xml output:
obj.s0 = "sprite_0"
obj.s1 = "sprite_1"
obj.s2 = "sprite_2"
obj.s3 = "sprite_3"
etc..
</code></pre>
| 0non-cybersec
| Stackexchange |
how could you. How could you not answer your phone? How could you not come home? You made me hate you. I cant cry myself to sleep over you anymore. I cant be up at 5am wondering where you are. I hate you for hurting me and I hate myself for letting you treat me this way. Its 11am and your still not home. How could you do this to me?
broken hearted (f21) | 0non-cybersec
| Reddit |
pfsense long ping to google. <p>I have a pfsense box set up. What happens is I set a rule so I can't hit the admin interface <code>192.168.3.1</code> from the box. </p>
<p>With the rule enabled</p>
<pre><code>--- www.l.google.com ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 5080ms
rtt min/avg/max/mdev = 37.684/37.776/37.869/0.215 ms
root@bad-apple:/etc#
</code></pre>
<p>Rule disabled </p>
<pre><code>--- www.l.google.com ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 42.064/44.104/46.144/2.040 ms
</code></pre>
<p>disallow Rule that causes it. </p>
<pre><code>ID Proto Source Port Destination Port Gateway Queue Schedule Description
* APPLESERVER net * 192.168.3.1 * * none
</code></pre>
<p>I don't want the server to be able to hit admin interface, but would like to hit internet for configuration of the machine. Has anybody had this problem before? I have below this disallow rule an allow all from APPLESERVER NET to * because if I set destination to WAN net dns dies.</p>
<p>Well what happens is with the rule enabled I ping and it shows up about every 5-10 seconds for a line to appear in ssh. Without the rule it runs like a normal machine, very fast-like. This issue doesn't either of my LANS and they have the same respective dns servers and block [pfsense]admin. [one lAN is admin lan so no block rule on that] I run everything on LAN2 and plug in manually to LAN1 for administration. </p>
<p>Update - added /tmp/debug.config</p>
<hr>
<pre><code>#System aliases
loopback = "{ lo0 }"
WAN = "{ re0 }"
ADMIN = "{ re1 }"
LAN = "{ re2 }"
APPLESERVER = "{ re3 }"
#SSH Lockout Table
table <sshlockout> persist
table <webConfiguratorlockout> persist
#Snort tables
table <snort2c>
table <virusprot>
# User Aliases
table <EasyRuleBlockHostsWAN> { 10.35.0.1/32 }
EasyRuleBlockHostsWAN = "<EasyRuleBlockHostsWAN>"
# Gateways
GWOPT1GW = " route-to ( re2 192.168.1.1 ) "
GWWAN = " route-to ( re0 wan ip ) "
set loginterface re1
set optimization normal
set limit states 23000
set limit src-nodes 23000
set skip on pfsync0
scrub in on $WAN all fragment reassemble
scrub in on $ADMIN all fragment reassemble
scrub in on $LAN all fragment reassemble
scrub in on $APPLESERVER all fragment reassemble
no nat proto carp
no rdr proto carp
nat-anchor "natearly/*"
nat-anchor "natrules/*"
# Outbound NAT rules
# Subnets to NAT
tonatsubnets = "{ 192.168.1.0/24 192.168.2.0/24 192.168.3.0/24 127.0.0.0/8 }"
nat on $WAN from $tonatsubnets port 500 to any port 500 -> 24.220.153.106/32 port 500
nat on $WAN from $tonatsubnets to any -> 24.220.153.106/32 port 1024:65535
# Load balancing anchor
rdr-anchor "relayd/*"
# TFTP proxy
rdr-anchor "tftp-proxy/*"
rdr pass on re2 proto udp from any to any port tftp -> 127.0.0.1 port 6969
table <negate_networks> { 24.220.152.0/23 192.168.1.0/24 192.168.2.0/24 192.168.3.0/24 }
# NAT Inbound Redirects
rdr on re0 proto { tcp udp } from any to any port 21 -> 192.168.2.3
rdr on re0 proto { tcp udp } from any to any port 5000:5050 -> 192.168.2.3
rdr on re0 proto { tcp udp } from any to any port 80 -> 192.168.3.2
rdr on re0 proto { tcp udp } from any to any port 443 -> 192.168.3.2
# UPnPd rdr anchor
rdr-anchor "miniupnpd"
anchor "relayd/*"
#---------------------------------------------------------------------------
# default deny rules
#---------------------------------------------------------------------------
block in log all label "Default deny rule"
block out log all label "Default deny rule"
# We use the mighty pf, we cannot be fooled.
block quick proto { tcp, udp } from any port = 0 to any
block quick proto { tcp, udp } from any to any port = 0
# Block all IPv6
block in quick inet6 all
block out quick inet6 all
# Snort package
block quick from <snort2c> to any label "Block snort2c hosts"
block quick from any to <snort2c> label "Block snort2c hosts"
# SSH lockout
block in log quick proto tcp from <sshlockout> to any port 22 label "sshlockout"
# webConfigurator lockout
block in log quick proto tcp from <webConfiguratorlockout> to any port 443 label "webConfiguratorlockout"
block in quick from <virusprot> to any label "virusprot overload table"
table <bogons> persist file "/etc/bogons"
# block bogon networks
# http://www.cymru.com/Documents/bogon-bn-nonagg.txt
block in log quick on $WAN from <bogons> to any label "block bogon networks from WAN"
antispoof for re0
# block anything from private networks on interfaces with the option set
antispoof for $WAN
block in log quick on $WAN from 10.0.0.0/8 to any label "block private networks from wan block 10/8"
block in log quick on $WAN from 127.0.0.0/8 to any label "block private networks from wan block 127/8"
block in log quick on $WAN from 172.16.0.0/12 to any label "block private networks from wan block 172.16/12"
block in log quick on $WAN from 192.168.0.0/16 to any label "block private networks from wan block 192.168/16"
# allow our DHCP client out to the WAN
pass in on $WAN proto udp from any port = 67 to any port = 68 label "allow dhcp client out WAN"
pass out on $WAN proto udp from any port = 68 to any port = 67 label "allow dhcp client out WAN"
# Not installing DHCP server firewall rules for WAN which is configured for DHCP.
antispoof for re1
# allow access to DHCP server on ADMIN
pass in quick on $ADMIN proto udp from any port = 68 to 255.255.255.255 port = 67 label "allow access to DHCP server"
pass in quick on $ADMIN proto udp from any port = 68 to 192.168.1.1 port = 67 label "allow access to DHCP server"
pass out quick on $ADMIN proto udp from 192.168.1.1 port = 67 to any port = 68 label "allow access to DHCP server"
antispoof for re2
# allow access to DHCP server on LAN
pass in quick on $LAN proto udp from any port = 68 to 255.255.255.255 port = 67 label "allow access to DHCP server"
pass in quick on $LAN proto udp from any port = 68 to 192.168.2.1 port = 67 label "allow access to DHCP server"
pass out quick on $LAN proto udp from 192.168.2.1 port = 67 to any port = 68 label "allow access to DHCP server"
antispoof for re3
# allow access to DHCP server on APPLESERVER
pass in quick on $APPLESERVER proto udp from any port = 68 to 255.255.255.255 port = 67 label "allow access to DHCP server"
pass in quick on $APPLESERVER proto udp from any port = 68 to 192.168.3.1 port = 67 label "allow access to DHCP server"
pass out quick on $APPLESERVER proto udp from 192.168.3.1 port = 67 to any port = 68 label "allow access to DHCP server"
# loopback
pass in on $loopback all label "pass loopback"
pass out on $loopback all label "pass loopback"
# let out anything from the firewall host itself and decrypted IPsec traffic
pass out all keep state allow-opts label "let out anything from firewall host itself"
pass out route-to ( re0 wan ip ) from 24.220.153.106 to !24.220.152.0/23 keep state allow-opts label "let out anything from firewall host itself"
# make sure the user cannot lock himself out of the webConfigurator or SSH
pass in quick on re1 proto tcp from any to (re1) port { 80 443 22 } keep state label "anti-lockout rule"
# User-defined rules follow
anchor "userrules/*"
block in quick on $WAN reply-to ( re0 wan ip ) from $EasyRuleBlockHostsWAN to any label "USER_RULE: Easy Rule: Blocked from Firewall Log View"
pass in quick on $WAN reply-to ( re0 wan ip ) proto { tcp udp } from any to 192.168.2.3 port 21 label "USER_RULE: NAT "
pass in quick on $WAN reply-to ( re0 wan ip ) proto { tcp udp } from any to 192.168.2.3 port 4999 >< 5051 label "USER_RULE: NAT "
pass in quick on $WAN reply-to ( re0 wan ip ) proto { tcp udp } from any to 192.168.3.2 port 80 label "USER_RULE: NAT Rule for web 80"
pass in quick on $WAN reply-to ( re0 wan ip ) proto { tcp udp } from any to 192.168.3.2 port 443 label "USER_RULE: NAT ssl web "
block in quick on $WAN reply-to ( re0 wan ip ) from any to any label "USER_RULE"
block in quick on $ADMIN from any to any label "USER_RULE"
block in quick on $LAN from any to 192.168.2.1 label "USER_RULE"
block in quick on $LAN from any to 192.168.1.1 label "USER_RULE"
block in quick on $LAN from any to 192.168.3.1 label "USER_RULE"
pass in quick on $LAN from 192.168.2.1/24 to any keep state label "USER_RULE: Default allow OPT1 to any rule"
pass in quick on $LAN proto tcp from any to 192.168.3.1/24 port 22 flags S/SA keep state label "USER_RULE"
pass in quick on $LAN proto tcp from any to 192.168.3.1/24 port 80 flags S/SA keep state label "USER_RULE"
pass in quick on $LAN proto tcp from any to 192.168.3.1/24 port 81 flags S/SA keep state label "USER_RULE"
pass in quick on $LAN proto { tcp udp } from any to 192.168.3.2 port 10000 keep state label "USER_RULE"
pass in quick on $LAN proto tcp from 192.168.2.1/24 to 192.168.3.1/24 port 443 flags S/SA keep state label "USER_RULE"
block in quick on $LAN from any to any label "USER_RULE"
block in quick on $APPLESERVER from any to 192.168.2.1 label "USER_RULE"
block in quick on $APPLESERVER proto { tcp udp } from any to 192.168.3.1 port 80 label "USER_RULE"
block in quick on $APPLESERVER proto { tcp udp } from any to 192.168.3.1 port 443 label "USER_RULE"
block in quick on $APPLESERVER proto { tcp udp } from any to 192.168.3.1 port 22 label "USER_RULE"
block in quick on $APPLESERVER from any to 192.168.1.0/24 label "USER_RULE"
pass in quick on $APPLESERVER from 192.168.3.1/24 to any keep state label "USER_RULE"
# VPN Rules
anchor "tftp-proxy/*"
</code></pre>
<p>I've updated it with the debug.config file. So my workaround for the fix was to only block 22,80,443 from the 192.168.3.0/24 subnet [appleserver subnet]. This fixed my speed issue, but I'm not sure if this is a great way for a correct fix. </p>
<p>Perhaps it could be a dns issue, but then entering in a wan ip on a remote machine takes about the same[long] amount of time with all block rule enabled as domain name route. </p>
| 0non-cybersec
| Stackexchange |
My friend hit the jackpot. | 0non-cybersec
| Reddit |
I found this little friend while eating candy. | 0non-cybersec
| Reddit |
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 |
Generating only positive random numbers in SQLite. <p>In SQLite </p>
<blockquote>
<p>The <code>random()</code> function returns a pseudo-random integer between -9223372036854775808 and +9223372036854775807.</p>
</blockquote>
<p>You can get an random with maximum value n with <code>Select random() % n ;</code></p>
<p>But that still generates negative numbers. How can I generate only positive random numbers in SQLite ?</p>
| 0non-cybersec
| Stackexchange |
Calculating probability of $~p~$ from binary entropy using logarithm. <p>A person roll a dice using a dice that is not fair The result of dice rolling is reported in even odd
and large / medium / small ("Small" mean <span class="math-container">$\{1,2\}$</span> , medium means <span class="math-container">$\{3,4\}$</span> , large means <span class="math-container">$\{5,6\}$</span>)</p>
<p><span class="math-container">$X$</span> represent probability distribution
where <span class="math-container">$Pr~\{\text{even, odd}\}$</span> and <span class="math-container">$~Y~$</span> represent probability distribution <span class="math-container">$Pr ~\{S,M,L\}$</span></p>
<p>It is known that the probability
that the fourth eye of this dice appears and the odd probability are equal, and further that the entropy of the random variable <span class="math-container">$~X~$</span> is <span class="math-container">$~H (X) =0.97095~$</span> bits.
Find the probability of getting <span class="math-container">$~4~$</span> eyes (<span class="math-container">$Pr~ \{X=\text{odd}\}$</span>)</p>
<p><span class="math-container">$$H(X)=0.97095= - ~p ~\ln p - (1-p)~\ln(1-p)$$</span>
I need to find <span class="math-container">$~p~$</span>.</p>
<p>The answer is <span class="math-container">$~0.6~$</span> and <span class="math-container">$~0.4~$</span>,
but how can I find it when the logarithm is in base <span class="math-container">$~2~$</span>?
and also how can I find <span class="math-container">$~p~$</span> with just only this information and using logarithm property ?</p>
<p><span class="math-container">$$\ln 0.97095=\ln \frac{1}{p^p}~ \frac {1}{(1-p)^{1-p}}~?$$</span></p>
| 0non-cybersec
| Stackexchange |
Disk Utility First Aid Failed: fsroot tree invalid. <p>I tried to run Disk Utility in my iMac. It said that:</p>
<blockquote>
<p>fsroot tree is invalid</p>
</blockquote>
<p>How to resolve this issue? Is my HDD going to die?</p>
<p><a href="https://i.stack.imgur.com/0DIc3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0DIc3.png" alt="Disk Utility Fails"></a></p>
<hr>
<p><strong>UPDATE</strong>: Already tried <code>/sbin/fsck -fy</code> in Single-user mode. Same error occurred and the problem is not resolved.</p>
| 0non-cybersec
| Stackexchange |
Boyfriend’s close relationship with his ex bothered me, so he ended it. Ex was not happy.. My boyfriend [23] and I [20] have been together for some time now. Before we met, he had slept with a female co-worker and they had gone out for less than a month. It didn’t work out in the end, so they decided to just stay friends.
At the beginning of our relationship, he told me about this situation with his co-worker and I thought nothing of it at first. But then he told me that they had a monthly “dinner date” at either one’s place - they cooked and ate dinner together, basically. This made me feel a bit uncomfortable, because in my opinion it’s weird to keep having intimate dinner nights with your ex. I was honest with my boyfriend and told him how it made me feel. He reassured me that I had no reason to be concerned, as he and his co-worker were just friends.
Since I know that my boyfriend would never cheat on me, I decided to brush it off... but a part of me was still weirded out by the whole ordeal - I just couldn’t stop feeling uncomfortable about it. We talked about it a few more times after that and he always told me I had nothing to worry about, that I would have to accept that she was his friend.
I tried my best to accept their friendship, no matter how odd it seemed to me. I even tried to strike up a conversation with her at a party we both happened to be attending, but she mostly ignored me and talked to my boyfriend instead (I get it, I’m not a social butterfly myself). But the dinner nights just bugged me to the point where I thought about it constantly.
Fast-forward a few months to when I was visiting my family abroad for a couple of months. One day, my boyfriend informed me that he was having his co-worker for dinner again. For some reason, that was the moment I snapped at him and told him that I didn’t like the way he kept “dating” his ex like that. He was confused at first , because he thought I had accepted their friendship (which was probably my fault for not having expressed
my feelings more explicitly before). He was incredibly sweet to me during our whole “argument”, in which I angrily let out all my repressed feelings of weirdness towards him and his co-worker. Out of his own initiative, my boyfriend then decided to cancel the dinner date with the co-worker, explaining to her very briefly to her that it made me too uncomfortable, and that he valued his relationship with me more than he valued a monthly dinner tradition. He even added that they would begin catching up in some other way, like at coffee after work, or at work parties.
The co-worker immediately went ballistic, telling my boyfriend that I was manipulating him and that he needed to break up with me at once. From the screenshots he showed me, I even came to realise that she had wanted him to keep the dinner date a secret from me. (These screenshots in question were from before our “argument”, so she possibly predicted my resentment of their dates). She finished off by saying something along the lines of “if you’re choosing her over me, I never want to speak to you again”.
My boyfriend was shocked and a bit saddened by the co-worker’s reaction, but expressed relief for having ‘dodged a bullet’. It’s been a few months since this incident and they haven’t talked since, to my knowledge. I’ve had mixed reactions from my friends, some agreeing with my actions, and some saying I should’ve just kept it all to myself to prevent destroying a friendship.
I feel a bit guilty for snapping at my boyfriend back then, he didn’t deserve it. And also for breaking up a friendship, even if it was a weirdly intimate one between exes. Months later, I still can’t keep this incident out of my mind and I’m starting to have doubts. Did I get worked up over nothing back then? Am I really manipulative like the co-worker said? | 0non-cybersec
| Reddit |
Thanks Reddit! Was just notified that my shirt won the WotC T-Shirt Comp! I want to give one away to say thank you!. Thanks so much everyone who voted for my design. In the end, I took the grand prize (Judges Choice), and I want to say thank you to you all for being so awesome!
I have been told the shirt will be available online, and when it does I want to give one away! Just leave a comment on here and I will pick a winner at random, and organise getting it posted out to you.
Thanks again Reddit, very much appreciated!
For those who missed it, this is what the design looks like :)
http://i.imgur.com/GePvjfT.png
| 0non-cybersec
| Reddit |
Teacher - 9/2/18. | 0non-cybersec
| Reddit |
Baby Capybara. | 0non-cybersec
| Reddit |
Piss off /r/europe with one sentence. | 0non-cybersec
| Reddit |
django formset within a form / dynamic arrays within forms. <p>I have a platform with completely different json configs. Any user can create a new json config that is completely different. Hence I cannot model this staticly.</p>
<p>I am trying to make a dynamic form for these json configs.</p>
<p>Some of the json configs have array of values or objects. Visually, I will need these to be a list of inputs with an 'add more' button.</p>
<p>I see that <code>formsets</code> are the generally accepted way to add arrays of values in django forms. (I'm already using mysql so I can't switch to postgres ArrayField). However from django examples, multiple formsets are initialized separately and passed into the view.</p>
<p>Since my configs are dynamic, I don't know what formsets to initialize and further, the order of fields intermingle between formsets and the form.</p>
<p>For example I am following <a href="https://spapas.github.io/2013/12/24/django-dynamic-forms/" rel="noreferrer">this link</a> and creating my form classes dynamically like so:</p>
<pre><code>class FieldHandler():
def __init__(self, fields):
self.formfields = {}
for field in fields:
options = self.get_options(field)
f = getattr(self, "create_field_for_" +
field['type'])(field, options)
self.formfields[field['name']] = f
def get_options(self, field):
options = {}
options['label'] = field['name']
options['help_text'] = field.get("help_text", None)
options['required'] = bool(field.get("required", 0))
return options
def create_field_for_text(self, field, options):
options['max_length'] = int(field.get("max_length", "20"))
return django.forms.CharField(**options)
def create_field_for_number(self, field, options):
options['max_value'] = int(field.get("max_value", "999999999"))
options['min_value'] = int(field.get("min_value", "-999999999"))
return django.forms.IntegerField(**options)
# This does not work, formsets are not shown in the template
def create_field_for_array(self, field, options):
fh = FieldHandler(field['elements'])
form_class = type('DynamicForm', (django.forms.Form,), fh.formfields)
DynamicFormSet = formset_factory(form_class)
return DynamicFormSet(prefix=field['name'])
</code></pre>
<p>and in the view:</p>
<pre><code># arg to FieldHandler is an example config, it will be retrieved from db
fh = FieldHandler([
{'type': 'text', 'label': 'position'},
{'type': 'array', 'label': 'calendar', 'elements': [
{'type': 'text', 'label': 'country'},
{'type': 'text', 'label': 'url'},
]},
{'type': 'number', 'label': 'maxSize'}
])
form_class = type('DynamicForm', (django.forms.Form,), fh.formfields)
form = form_class(request.POST or None)
</code></pre>
<p>as you can see, the dynamic form is initialized with a config of <code>position</code>, an array of <code>calendar</code> elements and a <code>maxSize</code> field. </p>
<p>My problem is that my dynamic formset is not being shown in the view at all. If I were to separate the formsets, I would somehow have to insert it somewhere inside the original form, so I can't just iterate over the fields, and dynamically create the <code>form</code> first, then dynamically create <code>formsets</code> from the array fields. </p>
<p>Hence I am hoping for a way to dynamically create this type of form, where some fields in the form are <code>formsets</code>. </p>
<p>How do I do this? Or how should I approach this?</p>
| 0non-cybersec
| Stackexchange |
Testing Whether a Vertical Line Intersects a Plane. <p>Okay, so, I'm not the greatest with geometry (I actually need this for game development), but basically, I need to be able to test whether a vertical (the y-axis is my vertical axis for this) line intersects a triangular plane. I know the 3 vertices of the triangle. The vertical line is actually a line segment, and I know the 2 points that define it. I was thinking that maybe I could test, if the top point on the line is above the plane, and the bottom point is below the plane, then there is an intersection. How would you suggest doing this? I also know that the triangle plane will never be parallel to the y-axis (it never makes a vertical wall), so we don't have to worry about that case. I guess if I could determine the y value on the plane at a given x and z, I could use that, but I don't know how to do that given the 3 vertices that I have. Or maybe I'm thinking about this completely wrong.</p>
| 0non-cybersec
| Stackexchange |
How to remove second caption here?. <p>I have a table spread over multiple pages using tabularx:</p>
<pre><code>\documentclass[11pt,
a4paper,
parskip=half,
BCOR=10mm,
ngerman,
english]{scrbook}
\usepackage{booktabs}
\usepackage{ltablex}
\begin{document}
\begin{tabularx}{\linewidth}{XXX}
\caption[Hardware and Software]{List of hardware and software used during generating and analyzing data for this thesis.}\\
\toprule
\textbf{Hardware} & \textbf{Name} & \textbf{Manufacturer}\\[6pt]
\midrule
\endhead
Gelelektrophoresis power supply & peqPOWER 250V & PEQLAB Biotechnologie GmbH, Erlangen, Germany\\
\midrule
DNA amplifier & T Professional Thermocycler & Biometra GmbH, Jena, Germany\\
\cmidrule{2-3}
& T Personal Thermocycler & Biometra GmbH, Jena, Germany\\
\midrule
Centrifuge & Multifuge Heraeus X1R & Thermo Scientific, Rockford, USA\\
\cmidrule{2-3}
& 2k15 &SIGMA Laboratory Centrifuges GmbH, Osterode, Germany\\
\cmidrule{2-3}
& xxx &xxx\\
\midrule
Gelelektrophoresis power supply & peqPOWER 250V & PEQLAB Biotechnologie GmbH, Erlangen, Germany\\
\midrule
DNA amplifier & T Professional Thermocycler & Biometra GmbH, Jena, Germany\\
\cmidrule{2-3}
& T Personal Thermocycler & Biometra GmbH, Jena, Germany\\
\midrule
Centrifuge & Multifuge Heraeus X1R & Thermo Scientific, Rockford, USA\\
\cmidrule{2-3}
& 2k15 &SIGMA Laboratory Centrifuges GmbH, Osterode, Germany\\
\cmidrule{2-3}
& xxx &xxx\\
\midrule
Gelelektrophoresis power supply & peqPOWER 250V & PEQLAB Biotechnologie GmbH, Erlangen, Germany\\
\midrule
DNA amplifier & T Professional Thermocycler & Biometra GmbH, Jena, Germany\\
\cmidrule{2-3}
& T Personal Thermocycler & Biometra GmbH, Jena, Germany\\
\midrule
Centrifuge & Multifuge Heraeus X1R & Thermo Scientific, Rockford, USA\\
\cmidrule{2-3}
& 2k15 &SIGMA Laboratory Centrifuges GmbH, Osterode, Germany\\
\cmidrule{2-3}
& xxx &xxx\\
\bottomrule
\end{tabularx}
\end{document}
</code></pre>
<p>This works fine but I'd like to remove the caption above the table on the second page... Does anyone know, how to do this?</p>
<p>Thanks and regards!</p>
| 0non-cybersec
| Stackexchange |
GNS3 nat configuration issue. <p>I'm studying for my CCENT exam, and I'm trying to practice configuration of the NAT.</p>
<p><a href="https://i.stack.imgur.com/Bu7sF.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Bu7sF.png" alt="enter image description here"></a></p>
<p>R1 configuration:</p>
<pre><code>Building configuration...
Current configuration : 1211 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R1
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
no ip icmp rate-limit unreachable
!
!
ip cef
no ip domain lookup
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
ip tcp synwait-time 5
!
!
!
!
!
interface FastEthernet0/0
ip address 192.168.100.1 255.255.255.0
duplex auto
speed auto
!
interface Serial1/0
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/1
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/2
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/3
no ip address
shutdown
serial restart-delay 0
!
interface FastEthernet2/0
ip address 200.2.2.2 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet3/0
no ip address
shutdown
duplex auto
speed auto
!
no ip http server
no ip http secure-server
ip route 0.0.0.0 0.0.0.0 200.2.2.3
!
!
!
no cdp log mismatch duplex
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
!
line con 0
exec-timeout 0 0
privilege level 15
logging synchronous
line aux 0
exec-timeout 0 0
privilege level 15
logging synchronous
line vty 0 4
login
!
!
end
</code></pre>
<p>R4 configuration:</p>
<pre><code>Building configuration...
Current configuration : 845 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R4
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
no ip icmp rate-limit unreachable
!
!
ip cef
no ip domain lookup
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
ip tcp synwait-time 5
!
!
!
!
!
interface FastEthernet0/0
ip address 200.2.2.3 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet1/0
ip address 200.2.0.1 255.255.255.0
duplex auto
speed auto
!
no ip http server
no ip http secure-server
ip route 0.0.0.0 0.0.0.0 200.2.2.2
!
!
!
no cdp log mismatch duplex
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
!
line con 0
exec-timeout 0 0
privilege level 15
logging synchronous
line aux 0
exec-timeout 0 0
privilege level 15
logging synchronous
line vty 0 4
login
!
!
end
</code></pre>
<p>I didn't set up the NAT yet, but the PC3 is able to ping PC1 and PC2, can you explain me why? I thought that private IP won't be able to communicate with public without the NAT. What configuration should I create to be able to practice NAT?</p>
| 0non-cybersec
| Stackexchange |
Parenting at its best.. | 0non-cybersec
| Reddit |
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 |
Here’s my daily dark little scenescape. I’m glad how much you guys have liked the last ones, as I am very much enjoying making them. Hope you like this one. IG: Weareallcorrupted. | 0non-cybersec
| Reddit |
IMAP/Dovecot sync drafts folder between mail clients. <p>I don't understand how different mail clients work with the mails inside the drafts folder. Firstly the Gmail and Outlook android app doesn't sync any drafts at all despite I selected the drafts folder in the outlook app (I think the gmail app doesn't offers such a feature). Now I downloaded "K-9 Mail" and selected the drafts folder. It syncs the drafts and I can edit them. But after I edited a draft inside K-9 app the Outlook for Windows can't edit them. The drafts show up in the drafts folder but as received email such as described <a href="https://superuser.com/questions/1400627/how-to-edit-mail-from-drafts-folder-created-with-k9">here</a>. Though in Thunderbird I can edit them. Is there a way to fix that with dovecot or is it the responsibility of the mail clients?</p>
<p><code>namespace inbox</code> section from <code>doveconf -n</code>:</p>
<pre><code>namespace inbox {
inbox = yes
location =
mailbox Drafts {
auto = subscribe
special_use = \Drafts
}
mailbox Sent {
auto = subscribe
special_use = \Sent
}
mailbox Spam {
auto = subscribe
special_use = \Junk
}
mailbox Trash {
auto = subscribe
special_use = \Trash
}
prefix =
}
</code></pre>
| 0non-cybersec
| Stackexchange |
Should brackets be placed around an exponentiated factorial?. <p>For example, one can derive an approximation of $\pi$ from Stirling's approximation with one additional term as
$$
\lim_{n \to \infty} \frac{72n(n!)^2}{n^{2n} e^{-2n} (12n+1)^2}
$$</p>
<p>but is it correct to write</p>
<p>$$
\lim_{n \to \infty} \frac{72n(n!^2)}{n^{2n} e^{-2n} (12n+1)^2}?
$$</p>
<p>Is the ! sufficient to separate the factoriand (if that's the word) from the exponent? I've seen both used in various places.</p>
| 0non-cybersec
| Stackexchange |
System of a Down B.Y.O.B Acapella. [System Of A Down- B.y.o.b Acapella version](https://www.youtube.com/watch?feature=player_detailpage&v=IYFROyvllkE#t=14s)
Sounds so weird, Yet Beautiful.
EDIT: My initial fears became true, and this is not A capella, its only the words to the song without music. Sorry Guys! | 0non-cybersec
| Reddit |
XeLaTeX: \mathrm in a footnote uses a different typeface from that specified by \setmathfont. <p>In the following XeLaTeX example,</p>
<pre><code>\documentclass{article}
\usepackage{fontspec,unicode-math}
\setmainfont{Libertinus Serif}
\setmathfont{Libertinus Math}
\begin{document}
$\mathrm{d}$: d\footnote{$\mathrm{d}$: d}
\end{document}
</code></pre>
<p><code>\mathrm</code> in the main text is fine (both d's look the same), whereas that in the footnote doesn't use the correct typeface (the first d is different). What's happening here and how do I get around it?</p>
<p><a href="https://i.stack.imgur.com/unEhU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/unEhU.png" alt="different mathrm"></a></p>
| 0non-cybersec
| Stackexchange |
Microsoft Office 2016 Word crashes when starting. <p>The program seems to launch correctly. When I launch it, the interface appears but the program freezes immediately afterward with the message "Microsoft Word has stopped working". I tried uninstalling Office and then reinstalling. I've also tried running the repair tool. I have no add-ons installed. The host machine is running Windows 7 x86. Word is able to start in safe mode (<a href="https://support.office.com/en-us/article/open-office-apps-in-safe-mode-on-a-windows-pc-dedf944a-5f4b-4afb-a453-528af4f7ac72" rel="nofollow noreferrer">https://support.office.com/en-us/article/open-office-apps-in-safe-mode-on-a-windows-pc-dedf944a-5f4b-4afb-a453-528af4f7ac72</a>).</p>
<p>How can I fix this? Thanks.</p>
| 0non-cybersec
| Stackexchange |
Spanning-Tree-Protocol and BFS? (Distributed Computing). <p>Given is graph with networks and bridges/switches. We know, the root
Bridge is the bridge with the minimal Bridge-ID. The connections between every bridge and network is 1.</p>
<p>In the lecture slides they calculated the "best"(shortest) path from one network to the root bridge. I assume they used BFS, because it would be the easiest way to calculate the shortest path, but if they used BFS, why is the algorithm called Spanning-Tree-Algorithm?</p>
| 0non-cybersec
| Stackexchange |
How to be less controlling. How do you know when to take control and when to let it go? My girls are 2 and 3 1/2 and very independent and stubborn (just like me yay!) I have such a hard time knowing when to assert myself with my eldest and when to let things go. Sometimes it feels like if I let things go then she will just end up walking all over me. Any books, techniques, advice are greatly welcomed! | 0non-cybersec
| Reddit |
Does this polynomial exist?. <p>I'm looking for a polynomial $P(x)$ with the following properties:</p>
<ol>
<li>$P(0) = 0$.</li>
<li>$P\left(\frac13\right) = 1$</li>
<li>$P\left(\frac23\right) = 0$</li>
<li>$P'\left(\frac13\right) = 0$</li>
<li>$P'\left(\frac23\right) = 0$</li>
</ol>
<p>From 1 and 3 we know that $P(x) = x\left(x - \frac23\right)Q(x)$. From 4 and 5 we know that $P'(x) = \alpha\left(x - \frac13\right)\left(x - \frac23\right)$.
$$
\begin{align}
P(x) & = \alpha\int\left(x - \frac13\right)\left(x - \frac23\right)\text{d}x \\
& = \alpha\left(\frac13x^3 - \frac12x^2 + \frac29x + \text{C}\right)
\end{align}
$$
Now 1 implies that the constant is $\text{C} = 0$, but 3 implies that the constant is $\text{C} = -\frac{2}{81}$. Am I doing something wrong or does this polynomial not exist? </p>
<p>If it doesn't exist, how close could I get to making a polynomial that satisfies these 5 conditions?</p>
| 0non-cybersec
| Stackexchange |
ERROR: Specified config file /etc/opscode/pivotal.rb does not exist. <p>I keep getting the following when trying to install Chef:</p>
<pre><code>[root@COMMAND ~]# chef-server-ctl org-create chef "Chef Software, Inc." -f /tmp/chef.key
ERROR: Specified config file /etc/opscode/pivotal.rb does not exist!
</code></pre>
<p>I am following this guide:</p>
<pre><code>https://docs.chef.io/install_dk.html
</code></pre>
<p>Where am I going wrong in trying to setup the Chef Server? I've search and tried the reconfigure and other options mentioned.</p>
<p>This a CentOS 7 machine VM running as a container in proxmox with 512MB RAM if that means anything. </p>
<p>I've installed version 12.03 as people said that worked for the Chef Server and the latest as well but I keep getting the same results when trying to setup the Chef Server by the guide. </p>
<p>EDIT:
Rebuilt the VM several times and set RAM to 2GBs same result. </p>
<p>Is it always this hard to setup a central Chef server to send management commands from to other servers?</p>
| 0non-cybersec
| Stackexchange |
Limit with fractional part and greatest integer part. <blockquote>
<p><strong>Find $$\lim_{x\rightarrow 2-} \{x+(x-[x]^2)\}$$</strong></p>
</blockquote>
<p>For $x\to 2-$, $[x]=1$, i.e $[x]^2=1$, </p>
<p>so $\lim_{x\rightarrow 2-} \{x+(x-1)\}=\lim_{x\rightarrow 2-} \{2x-1\}=3.$</p>
<p>I don't know whether $\{\}$ symbolizes fractional part=$x-[x]$ or not for this particular question. I have assumed $\{\}$ not as fractional part and solved. Please check my solution is correct or not.</p>
<blockquote>
<p><strong>In case $\{\}$ symbolizes fractional part=$x-[x]$, then what will be the answer?</strong> </p>
</blockquote>
| 0non-cybersec
| Stackexchange |
Problem with using Tclx. <p>The installed version of Tcl is Tcl 8.5. The installed version of Tclx is 8.4.
The incompatibility between the two versions creates problems. Any remedy?</p>
| 0non-cybersec
| Stackexchange |
This girl had some hot buns. | 0non-cybersec
| Reddit |
How to *really* solve a non-homogeneous recurrence. <p>First let me state that I am not asking about the usual procedure for finding a trial solution to a non-homogeneous recurrence. I have been doing this for many years and can solve all the basic types, but I am looking for some deeper insight.</p>
<p>Here are a few examples to serve as a basis for the discussion.</p>
<ol>
<li><p>For $a_n-a_{n-1}-6a_{n-2}=n^2$ we guess $a_n=cn^2+dn+e$. Why not just $cn^2$? If you want to say "because $(n-1)^2$ contains lower order terms" please read the rest of the question before posting that answer.</p></li>
<li><p>For $a_n-a_{n-1}-6a_{n-2}=2^n$ we guess $a_n=c2^n$: no further terms as in the previous example.</p></li>
<li><p>For $a_n-a_{n-1}-6a_{n-2}=3^n$ we guess $a_n=cn3^n$. Why not just $c3^n$? (And again, I <strong>do not</strong> want the answer "because $3^n$ satisfies the homogeneous recurrence", I know that already.) Why is it not necessary to include a term $dn^23^n$?</p></li>
<li><p>For $a_n-a_{n-1}-6a_{n-2}=2^n+3^n$ we guess $a_n=c2^n+dn3^n$. How do we <em>really</em> know that $c2^n$ is OK but $d3^n$ is not?</p></li>
<li><p>For $a_n-6a_{n-1}+9a_{n-2}=n3^n$ we guess $a_n=cn^33^n+dn^23^n$. As above, how do we know in advance that we will not need a term $en^43^n$?</p></li>
</ol>
<p>My thoughts on this are very vague, any insight (perhaps even proofs) would be greatly appreciated.</p>
<p>I feel that the answer must have something to do with linear independence in the vector space $V$ of all (let's say real) sequences $\{a_0,a_1,\ldots\}$.</p>
<p>In case 5, for example, if we start with the homogeneous solutions, we have to continue the set
$$\{3^n,\,n3^n,\ldots\}$$
until we get four independent sequences - but why four?</p>
<p>In case 4, I assume that we treat the two summands separately because the sequences $\{2^n\}$ and $\{3^n\}$ are linearly independent.</p>
<p>On the other hand, $\{n\}$ and $\{n^2\}$ are also linearly independent and this would be different. For this reason, and also to account for example 1, I suspect that we also need to consider the finite difference operator
$$S:\{a_0,a_1,\ldots\}\mapsto\{a_1-a_0,a_2-a_1,\ldots\}\ ,$$
which is a linear transformation on $V$, and perhaps to consider whether $a_n,\,S(a_n),\,S^2(a_n),\ldots$ are linearly independent.</p>
<p>What I would like to see is a theorem of the following shape.</p>
<blockquote>
<p>If the $k$th order linear recurrence with constant coefficients
$$a_n+\cdots+c_ka_{n-k}=0$$
has solutions ${\rm span}({\bf h}_1,\ldots,{\bf h}_k)$, then the recurrence
$$a_n+\cdots+c_ka_{n-k}=f(n)$$
has solutions of the form $a_n={}????$</p>
</blockquote>
<p>Any ideas will be read with interest! - but once again, please do not tell me how to solve recurrences! I know <strong>how</strong>, I am trying to understand <strong>why</strong>.</p>
| 0non-cybersec
| Stackexchange |
Got a new laptop, finally able to do this for the first time.. | 0non-cybersec
| Reddit |
Is it just me or is this new boots of mobility jungler meta making most laning phases just a cluster fuck botlane. It seems that since the jungler can get across the map so fast he is almost always there for a counter gank. Then once the jungler and two bot lane champs have near killed each other the mid will roam down for clean up causing 8 players to be bottom a good amount of time. | 0non-cybersec
| Reddit |
update-initramfs missing /lib/modules/4.4.0-13-generic. <p>I just upgraded <code>linux-firmware</code> package and after that I used <code>$ sudo update-initramfs -u -k all</code> but I got some errors:</p>
<pre><code>$ sudo update-initramfs -u -k all
[sudo] password for piotrek:
update-initramfs: Generating /boot/initrd.img-4.4.0-34-generic
Warning: No support for locale: en_US.utf8
update-initramfs: Generating /boot/initrd.img-4.4.0-31-generic
Warning: No support for locale: en_US.utf8
update-initramfs: Generating /boot/initrd.img-4.4.0-13-generic
WARNING: missing /lib/modules/4.4.0-13-generic
Ensure all necessary drivers are built into the linux image!
depmod: ERROR: could not open directory /lib/modules/4.4.0-13-generic: No such file or directory
depmod: FATAL: could not search modules: No such file or directory
Warning: No support for locale: en_US.utf8
depmod: WARNING: could not open /var/tmp/mkinitramfs_LJbkti/lib/modules/4.4.0-13-generic/modules.order: No such file or directory
depmod: WARNING: could not open /var/tmp/mkinitramfs_LJbkti/lib/modules/4.4.0-13-generic/modules.builtin: No such file or directory
</code></pre>
<p>I'm sure I don't have kernel 4.4.0-13. I might have had it some time ago but removed it: </p>
<pre><code>$ apt list --installed | grep linux-
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
linux-base/xenial,xenial,now 4.0ubuntu1 all [installed,automatic]
linux-firmware/now 1.159 all [installed,local]
linux-headers-4.4.0-31/xenial-updates,xenial-updates,xenial-security,xenial-security,now 4.4.0-31.50 all [installed]
linux-headers-4.4.0-31-generic/xenial-updates,xenial-security,now 4.4.0-31.50 amd64 [installed]
linux-headers-4.4.0-34/xenial-updates,xenial-updates,xenial-security,xenial-security,now 4.4.0-34.53 all [installed]
linux-headers-4.4.0-34-generic/xenial-updates,xenial-security,now 4.4.0-34.53 amd64 [installed]
linux-image-4.4.0-31-generic/xenial-updates,xenial-security,now 4.4.0-31.50 amd64 [installed]
linux-image-4.4.0-34-generic/xenial-updates,xenial-security,now 4.4.0-34.53 amd64 [installed]
linux-image-extra-4.4.0-31-generic/xenial-updates,xenial-security,now 4.4.0-31.50 amd64 [installed]
linux-image-extra-4.4.0-34-generic/xenial-updates,xenial-security,now 4.4.0-34.53 amd64 [installed]
linux-libc-dev/xenial-updates,xenial-security,now 4.4.0-34.53 amd64 [installed]
linux-sound-base/xenial,xenial,now 1.0.25+dfsg-0ubuntu5 all [installed]
syslinux-common/xenial,xenial,now 3:6.03+dfsg-11ubuntu1 all [installed]
syslinux-legacy/xenial,now 2:3.63+dfsg-2ubuntu8 amd64 [installed]
</code></pre>
<p>How to fix those <code>update-initramfs</code> errors?</p>
| 0non-cybersec
| Stackexchange |
"Weird Al" Yancovic -- Trapped in the Drive-Thru [Parody] - We all need a reminder of Weird Al's Genius every once in a while.. | 0non-cybersec
| Reddit |
How to remove mouse cursor in chrome?. <p>I recently started using Vimium to not use the mouse that often. Now I find it disturbing when I always see the mouse cursor within Chrome.</p>
<p>So I want it to disappear from screen when I am not using the mouse. How can I achieve that?</p>
| 0non-cybersec
| Stackexchange |
C++: parameter pack expansion inside lambda fails. <p>I'm trying to create a way to directly expand multiple parameter packs. I have created a function <code>template<size_t X,typename F> auto sequenceFunc(F&& f)</code>, that calls a given function <code>f</code> with a expanded <code>integer_sequence</code>.</p>
<p>This works well for small functions like this:</p>
<pre><code>template<typename T,
size_t A,size_t B>
vec<B,T> col(const mat<A,B,T>& a,const size_t& i){
return sequenceFunc<A>([&](auto... J) -> vec<B,T>{
return { a[J][i]... }; //expands to a[0][i], a[1][i], ... a[A-1][i]
});
}
</code></pre>
<p>Unfortunately I can't expand multiple parameter packs, even if I follow the rule, that only one parameter pack can be inside a <code>...</code>-expression.
This is my attempt at using this function for matrix multiplication:</p>
<pre><code>template<typename S,typename T,
size_t A,size_t B,size_t C>
mat<C,B,S> mul(const mat<A,B,S>& a,const mat<C,A,T>& b){
return sequenceFunc<B>([&](auto... I)->mat<C,B,S>{ //for all B rows in a...
return {
sequenceFunc<C>([&](auto... J)->vec<C,S>{ // ... look at all C columns in b and calculate dot product.
auto i = I; //putting "I" outside the expansion of "J"
return {
dot(row(a,i),col(b,J))... //expands J
};
})... //expands I
};
});
}
</code></pre>
<p>This is the error:</p>
<pre><code>error: parameter packs not expanded with '...':
auto i = I;
^
</code></pre>
<p>I don't really understand why an expansion is necessary, because there is another <code>...</code> outside the expression. I use GCC 5.1.0.</p>
<p><strong>Information</strong> <code>vec</code> and <code>mat</code> are only <code>using</code>-declarations for <code>std::array</code> and a nested <code>std::array<std::array<A,T>,B></code></p>
| 0non-cybersec
| Stackexchange |
How to change desktop shell to only gedit and wallpaper?. <p>I'm working with the uck tool to get customized ubuntu live image(kernel).</p>
<p>It can be fully customized with it, but I can not change desktop shell.</p>
<p>Normally, when booting with the live CD, there's no log-in session.
So what I want to do is as below.</p>
<p>After boot with my live cd, my applications(ex, gedit) are the only ones to auto-start along with my wallpaper with some logos.</p>
<p>In other words, is it possible to change desktop shell to just my application, with no desktop icons, task bar and panel?</p>
| 0non-cybersec
| Stackexchange |
create an image by css. <p>I'm trying to do the next thing in css:</p>
<p><img src="https://i.stack.imgur.com/tKOBY.png" alt="enter image description here"></p>
<p>when the user over on all of the image with his mouse,</p>
<p>the css would be changed to:</p>
<p><img src="https://i.stack.imgur.com/KMAjt.png" alt="enter image description here"></p>
<p>in image number 2 and 3, I have to enable him to press the small circles. I enabled it.</p>
<p><img src="https://i.stack.imgur.com/lvaz2.png" alt="enter image description here"></p>
<p><strong>I didn't succeed to start the blue line from the small circle (like in image 1):</strong></p>
<p><strong>this blue line can go to the left or to the right by a given input (100 will color all the right gray shape. -100 will color all the left gray shape. in this example, I assume the user inserts the parameter: 25. and then quarter of the right gray shape was colored)</strong></p>
<p><strong>can someone help me with that please?</strong></p>
<p><strong>the blue line is in the class <code>PersonaCanvasMini</code> and it exactly like <code>PersonaCanvas</code></strong></p>
<p><strong>any help appreciated!</strong></p>
<p>here's my jsfiddle:</p>
<p><a href="http://jsfiddle.net/kyfha/74/" rel="nofollow noreferrer">http://jsfiddle.net/kyfha/74/</a></p>
<p>this is my html:</p>
<pre><code><div id="goalDetails" onmouseOver="addDetails();" onmouseout="removeDetails();">
<div class="PersonaCanvas">
<div class="smallCircle" onclick="showProjection();"></div>
<div id="smallestCircle" style="display: none" onclick="showBurnRate();"></div>
</div>
<div id="details" style="display: none">
<div id="dolarsDetails">77$</div>
<div id="projOrBurn">Projection</div>
</div>
<div id="mainShape" class="bigCircle">
<div id="cpaDetails">7.03</div>
</div>
<div class="PersonaCanvasMini"></div>
<div id="mainLine" style="display:none"></div>
<div id="secondaryLine" style="display:none"></div>
</div>
</code></pre>
<p>and my css is in the jsfiddle.</p>
| 0non-cybersec
| Stackexchange |
TBH it's flawless logic. | 0non-cybersec
| Reddit |
Finished transitions. Please enjoy!. | 0non-cybersec
| Reddit |
How to Select File on android using Intent. <p>I use this code to use Intent to select any type of file and get it's path in my application</p>
<pre><code> //this when button click
public void onBrowse(View view) {
Intent chooseFile;
Intent intent;
chooseFile = new Intent(Intent.ACTION_GET_CONTENT);
chooseFile.addCategory(Intent.CATEGORY_OPENABLE);
chooseFile.setType("file/*");
intent = Intent.createChooser(chooseFile, "Choose a file");
startActivityForResult(intent, ACTIVITY_CHOOSE_FILE);
}
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
if (resultCode != RESULT_OK) return;
String path = "";
if(requestCode == ACTIVITY_CHOOSE_FILE)
{
Uri uri = data.getData();
String FilePath = getRealPathFromURI(uri); // should the path be here in this string
System.out.print("Path = " + FilePath);
}
}
public String getRealPathFromURI(Uri contentUri) {
String [] proj = {MediaStore.Images.Media.DATA};
Cursor cursor = getContentResolver().query( contentUri, proj, null, null,null);
if (cursor == null) return null;
int column_index = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);
cursor.moveToFirst();
return cursor.getString(column_index);
}
</code></pre>
<p>the problem when the file browser open i can't select a file it seems like it's not enable when i pressed on a file nothing happend so what is the wrong with this code<br>
i upload a screenshot from my android mobile <br>
<a href="https://s28.postimg.org/gb5h2unf1/Screenshot_20161217_002712.png" rel="noreferrer">image</a>
<br>
Thanks in advance</p>
| 0non-cybersec
| Stackexchange |
Construct two circular arcs meeting at a common point. <p>Suppose we are given a ray $\rho_a$ beginning at point $a$ and a ray $\rho_b$ beginning at point $b$. I want to find a circle $C_a$ tangent to $\rho_a$ at point $a$ and another circle $C_b$ tangent to $\rho_b$ at point $b$ such that there exists some point $c$ and a line $\ell$ passing through $c$ such that $C_a$ and $C_b$ intersect at $c$ tangent to $\ell$.</p>
<p>Note that if we insisted on a particular point $c$ and line $\ell$ given ahead of time, then each circle would be over-constrained. However, since we don't insist on a particular point $c$, I think that this should be possible. </p>
<p><img src="https://i.stack.imgur.com/Z6vKW.png" alt="rays"></p>
<hr>
<p>Edit:
<a href="https://i.stack.imgur.com/avHfU.png" rel="nofollow noreferrer">Here</a> are two possible solutions (approximate, b/c it's hard to draw)</p>
| 0non-cybersec
| Stackexchange |
SwiftUI and MVVM design pattern. <p>
I am trying to get my head round how i can achive the following using the MVVM design pattern with SwiftUI.</p>
<p>I want to have only 1 instance of a networking operation queue (using OperationQueue) where any view model that needs to send any networking requests but i have heard that creating a Singleton is not preferred and i should be passing the networking queue object around where it is needed.</p>
<p>So if i create the instance of the network operation queue in the Scene Delegate and pass them into the ContentView initialiser and store it in an object there to then pass into the views then created.</p>
<p>This doesnt seem like good MVVM design practice as from what i understand the View should Own the ViewModel only?</p>
<p>What is the best way of achieving this?</p>
<p>Edit: thought a bit more about this and I can pass it into the view via its constructor and then within the constructor I can create the view model and pass it straight through so the view doesn’t own anything.</p>
<p>But I still will require a singleton so how can I pass the singleton as a dependency injection rather than using it globally?</p>
<p>Thanks</p>
| 0non-cybersec
| Stackexchange |
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 |
How do i implement If statement in Flex/bison. <p>I dont get the error, please can you help me out, here is the .l and .y file.thanks.</p>
<pre><code>%{
#include "ifanw.tab.h"
extern int yylval;
%}
%%
"=" { return EQ; }
"!=" { return NE; }
"<" { return LT; }
"<=" { return LE; }
">" { return GT; }
">=" { return GE; }
"+" { return PLUS; }
"-" { return MINUS; }
"*" { return MULT; }
"/" { return DIVIDE; }
")" { return RPAREN; }
"(" { return LPAREN; }
":=" { return ASSIGN; }
";" { return SEMICOLON; }
"IF" { return IF; }
"THEN" { return THEN; }
"ELSE" { return ELSE; }
"FI" { return FI; }
"WHILE" { return WHILE; }
"DO" { return DO; }
"OD" { return OD; }
"PRINT" { return PRINT; }
[0-9]+ { yylval = atoi(yytext); return NUMBER; }
[a-z] { yylval = yytext[0] - 'a'; return NAME; }
\ { ; }
\n { nextline(); }
\t { ; }
"//".*\n { nextline(); }
. { yyerror("illegal token"); }
%%
</code></pre>
<p>Yacc-file</p>
<pre><code>%start ROOT
%token EQ
%token NE
%token LT
%token LE
%token GT
%token GE
%token PLUS
%token MINUS
%token MULT
%token DIVIDE
%token RPAREN
%token LPAREN
%token ASSIGN
%token SEMICOLON
%token IF
%token THEN
%token ELSE
%token FI
%token WHILE
%token DO
%token OD
%token PRINT
%token NUMBER
%token NAME
%%
ROOT:
stmtseq { execute($1); }
;
statement:
designator ASSIGN expression { $$ = assignment($1, $3); }
| PRINT expression { $$ = print($2); }
| IF expression THEN stmtseq ELSE stmtseq FI
{ $$ = ifstmt($2, $4, $6); }
| IF expression THEN stmtseq FI
{ $$ = ifstmt($2, $4, empty()); }
| WHILE expression DO stmtseq OD { $$ = whilestmt($2, $4); }
;
stmtseq:
stmtseq SEMICOLON statement { $$ = seq($1, $3); }
| statement { $$ = $1; }
;
expression:
expr2 { $$ = $1; }
| expr2 EQ expr2 { $$ = eq($1, $3); }
| expr2 NE expr2 { $$ = ne($1, $3); }
| expr2 LT expr2 { $$ = le($1, $3); }
| expr2 LE expr2 { $$ = le($1, $3); }
| expr2 GT expr2 { $$ = gt($1, $3); }
| expr2 GE expr2 { $$ = gt($1, $3); }
;
expr2:
expr3 { $$ == $1; }
| expr2 PLUS expr3 { $$ = plus($1, $3); }
| expr2 MINUS expr3 { $$ = minus($1, $3); }
;
expr3:
expr4 { $$ = $1; }
| expr3 MULT expr4 { $$ = mult($1, $3); }
| expr3 DIVIDE expr4 { $$ = divide ($1, $3); }
;
expr4:
PLUS expr4 { $$ = $2; }
| MINUS expr4 { $$ = neg($2); }
| LPAREN expression RPAREN { $$ = $2; }
| NUMBER { $$ = number($1); }
| designator { $$ = $1; }
;
designator:
NAME { $$ = name($1); }
;
%%
</code></pre>
<hr>
<p>I have another question,
is there a possibility to implement a JMP instruction with flex/bison like in Assembler to go to a label like my example, thanks for your help.</p>
<pre><code>:L1
IF FLAG AND X"0001"
EVT 23;
ELSE
WAIT 500 ms;
JMP L1;
END IF;
</code></pre>
| 0non-cybersec
| Stackexchange |
Podcasts for learning?. I have a day job where I can listen to audio through headphones for my entire work day, but I can't watch anything. I would assume learning programming through audio wouldn't really work, but I figured I'd ask anyway and see if anyone has any good audio resources. Thanks. | 0non-cybersec
| Reddit |
Is there a distribution which looks like this?. <p>I was playing around with some data. And I got a distribution which looks like the following. Does this resemble any of the known distributions?</p>
<p><a href="https://i.stack.imgur.com/8Zr2c.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8Zr2c.jpg" alt="enter image description here"></a></p>
| 0non-cybersec
| Stackexchange |
Names of temp tables. <p>I created a temp table which resides in the temp table folder. The problem is the name is unacceptably long which make it almost impossible to efficiently work on querying some field from it. Is it any way to have a shorter name like <code>db.#SPR1</code> instead of the long one as below? </p>
<p><code>dbo.#SPR1_______________________________________________________________________________________________________________000000003A3E</code></p>
| 0non-cybersec
| Stackexchange |
What is mon.wlan0?. <p>I used hostapd to create a wifi hotspot on Linux, but when it created a interface named "mon.wlan0", what is it used for ? Should I assign it a ip address ?</p>
<p>Now I have "wlan0" and "mon.wlan0", I only give "wlan0" a ip address and it works fine.</p>
| 0non-cybersec
| Stackexchange |
My skin doesn't fit anymore.. It started out small.
Just a little patch above my left pinky. You know how on your knuckles you can kind of move and squish the skin. It was like that, but more.
I could pull that little patch of skin several inches suddenly. It didn’t hurt or anything, it actually felt kind of good. Soothing almost. Any time I got stressed I would find my fingers running over the loose, stretchy skin. Playing with it, folding it, molding it to my heart's content.
Then one morning, it happened. I was getting ready for work and pulling my socks on when I felt a weird shift on my foot. Confused I pulled my sock off only for my heart to skip a beat. The skin that once hung from the bottom of my foot now sagged loosely. I reached my hand down and touched it.
Chills shot through my body, the feeling was unreal. I grabbed onto the loose skin and began tugging at it. Pulling up closer to calves. I cried out in pain and joy. I wanted more.
The next few days I stayed held up in my home. Nothing mattered except the exquisite joy of my skin clinging loosely to my body.
Some parts seemed to dangle on their own accord, some I pulled loose. I prefered the ones that I pulled, it felt more intimate and exciting.
I felt more limber and full of energy than ever. I could reach parts of my body like never before. Even if I couldn’t reach it at first I would just begin pulling at the nearby flesh until it released sending orgasmic bolts through my body. I truly wish I could explain how it feels during the release.
Eventually my worst fear came true.
I had nothing left to pull off. I was disfigured and horrifying. My skin hung limply from my skeleton. My face was a disgusting mess of flesh drooping several inches from where it once was. I could no longer talk or express myself properly as everything was so loose. That didn’t matter though. All that mattered was finding a way to regain the pleasure of release again.
I began pulling at every inch, trying to find a piece that hadn’t yet been released but to no avail. Until I felt that icy prick of release return, not like it was before though, different, even better.
Upon investigation I found the source of this pleasure. A tear. A rip in my own flesh. No blood came out though. It was just an open hole where my skin had once been solid.
I pulled at it again ripping it open just a little bit further and almost passed out from the pleasure I felt. This was it, this was what I had been searching for.
Tugging and pulling, folding and stretching I kept working at the hole. The feeling was divine as the hole grew from only a few centimeters to a few inches and further. It began to resemble more of a creatures maw as I worked my fingers deep inside tearing away.
I moaned louder and louder as I felt my body give out under the waves of pleasure. I needed more though. I needed to keep pulling and tearing. Ripping deeper into the soft pink flesh that once was so tight against me.
After many hours, possibly days I ripped the last bits. My once tight flesh laid at my feet in ribbons. I felt so alone now. My raw muscles twitching against the cold air. The pain of each step as the nerves in my feet stepped over my shedded parts and hit the hardwood floor again.
I stared at the mirror in disbelief of what I had done to myself. I was unrecognizable. Just raw meat in the shape of a human now. What was I supposed to do.
I did the only thing I could truly think to do. I reached up and began to pull at my face hoping to find a new deeper release. Digging my fingers deep into the red muscle.
Please someone help, I want to feel that release again.
[X](https://www.facebook.com/BradRSchmelzer/)
[O](https://www.reddit.com/r/Yuebeo/comments/9gzzjw/yuebeos_happy_time_story_masterlist/) | 0non-cybersec
| Reddit |
Terminal Show Multiple Languages. <p>At work, I need to connect to databases, and these database contain fields that hold Chinese, Russian, Spanish, Japanese, etc. characters. When pulling them up in my terminal, I get question marks. I know there is a way to show the actual characters instead of question marks, but how?</p>
<p><code>:~$ locale</code> on the remote results in:</p>
<pre><code>LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
</code></pre>
<p><code>:~$ locale</code> on the clint results in:</p>
<pre><code>LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
</code></pre>
| 0non-cybersec
| Stackexchange |
Found an ancient treasure 💛. | 0non-cybersec
| Reddit |
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 |
A woman with a larger figure becomes extremely exasperated when a man won't "move over" and stop "pushing on her breast". (Please try and tolerate the few moments of obnoxious editing). | 0non-cybersec
| Reddit |
First baby born via uterus transplant from a deceased donor. | 0non-cybersec
| Reddit |
does anyone know of any places to practice optimizing code for speed?. | 0non-cybersec
| Reddit |
Stomach octopus done by Sam Smith at Bushido in Calgary, Alberta. | 0non-cybersec
| Reddit |
Some ideas for cleaning up my entertainment system (consoles). Right now it's a bit of a mess and cluttered and sitting inside cube storage - http://imgur.com/a/ZFx4B
Any thoughts? There's two things I'd like to accomplish
1. Reduce the amount of floor space being used. The area I use isn't huge so if we can reduce the footprint of the current piece of furniture there, that'd be great.
2. Less wires please!
I was thinking of cutting into the dry wall and doing an recessed cabinet, but I only have about 5 inches before I hit the concrete slab. Opened to ideas! | 0non-cybersec
| Reddit |
How to map an array of objects in React. <p>I have an array of objects. I would like to map this array of objects. I know how to map an array, but can't figure out how to map an array of objects. Here is what I have done so far : </p>
<p>The array of objects I want to map : </p>
<pre><code>const theData = [
{
name: 'Sam',
email: '[email protected]'
},
{
name: 'Ash',
email: '[email protected]'
}
]
</code></pre>
<p>My component : </p>
<pre><code>class ContactData extends Component {
render() {
//works for array
const renData = this.props.dataA.map((data, idx) => {
return <p key={idx}>{data}</p>
});
//doesn't work for array of objects
const renObjData = this.props.data.map(function(data, idx) {
return <p key={idx}>{data}</p>
});
return (
<div>
//works
{rennData}
<p>object</p>
//doesn't work
{renObjData}
</div>
)
}
}
ContactData.PropTypes = {
data: PropTypes.arrayOf(
PropTypes.obj
),
dataA: PropTypes.array
}
ContactData.defaultProps = {
data: theData,
dataA: dataArray
}
</code></pre>
<p>What am I missing ?</p>
| 0non-cybersec
| Stackexchange |
What is the total volume of wood used for the model?. <p><img src="https://i.stack.imgur.com/I2QwP.png" alt="enter image description here"></p>
<p>A person makes a model of a house in construction class. The block of wood for the base measures 6 inches by 4 inches, and is 4 inches tall. He used a triangular prism for the roof, whose rectangular face hangs over the base by half an inch on all sides and is 4 1/3 inches in height.Calculate the total volume of wood used for the model. Is this question as simple as finding both volumes of both shapes and adding them together?</p>
<p>Volume of triangular prism= 1/2 * l * w * h<br/>
Length = 7 inches<br/>
height = 4.333333333 inches<br/>
Width = 5 inches<br/>
V = 75.83333333</p>
<p>Rectangular prism volume = l x w x h<br/>
Length = 6 inches<br/>
Width = 4 inches<br/>
Height = 4 inches<br/>
v = 96</p>
<p>So, would the total volume of wood used for the model be 171.83 inches?</p>
| 0non-cybersec
| Stackexchange |
LALR(1) or GLR on Windows - Alternatives to Bison++ / Flex++ that are current?. <p><strong>UPDATE: This question is out of date, but left for informational purposes.</strong></p>
<p>Original Question</p>
<p>I have been using the same version of bison++ (1.21-8) and flex++ (2.3.8-7) since 2002.</p>
<p>I'm not looking for an alternative to LALR(1) or GLR at this time, just looking for the most current options. Is anyone aware of any later ports of these than the original that aren't Cygwin dependent?</p>
<p>What are other folks using in Windows environments for C++ compiler development (besides ANTLR or Boost.spirit)? Commercial options are ok, if you have firsthand experience. I do need to compile on Linux as well.</p>
<p>UPDATE: This old question was asked when I wasn't aware of the policies about tool recommendations (not sure if policy existed in 2010 but regardless...</p>
<p>I since updated to Bison 3.0 which has GLR capabilities and have begun experimenting with that.</p>
<p>I eventually decided that any rewrite of my parser would be a recursive descent, to improve error reporting and allow easier use in tools besides the compiler, so for now I will complete the reference version in Bison. I see little point in converting to a different PG tool at this time.</p>
| 0non-cybersec
| Stackexchange |
Starting work as a pentester. I somehow managed to land a pentesting role at a medium sized consulting company with great pay, but I am worried about my abilities. I have OSCP but feel like I managed to get easy boxes on the exam and I also am not very familiar with Windows environments (which will be the majority of what I work on). I am fresh out of college with no background in security as well.
I am extremely concerned that I literally don’t know anything and I start this week. Throughout my interviews, it seemed like they knew that I had no formal background in infosec and there was a lot I needed to learn, but I still feel very insecure about myself. Is this normal for a junior pentester? I see stuff all over the board from “pentesting isn’t entry level” to “all you need is passion”.
Getting started, do you have any advice on what to do and not to do getting started in pentesting specifically? | 1cybersec
| Reddit |
belly dancing skills. | 0non-cybersec
| Reddit |
What does /r/sports think about 96 teams in next year's NCAAB tournament?. | 0non-cybersec
| Reddit |
CSS reset via „all: unset“ breaks inline SVG. <p>When using a CSS reset like</p>
<pre><code>* {
all: unset;
}
</code></pre>
<p>inline SVG graphics are not shown correctly, see <a href="https://jsfiddle.net/593qysxp/1/" rel="noreferrer">https://jsfiddle.net/593qysxp/1/</a></p>
<p>I have tested this with Safari 11 and Chrome 61.</p>
<p>I tried to solve this with setting the svg element to <code>display: block</code> or <code>all: initial</code>but this did not help.</p>
<p>Does anyone has a solution?</p>
| 0non-cybersec
| Stackexchange |
So a kid is standing in the middle of a field with a baseball and a bat.... He tosses the ball up to hit it. He swings, misses, and yells "Strike ONE!"
Tosses it up a second time. Swings. Misses. "Strike TWO!"
On the third time he tosses it up, he swings, and yet again, misses. "Strike THREE!"
"Wow," he said. "I didn't know I was such a good pitcher!" | 0non-cybersec
| Reddit |
Spilled stuff on my Delete key, which won't work now.. Hi, I use a Mid- 2012 MacBook Air, which I recently spilled some sparking water on. The computer's Delete key does not work whatsoever, and sometimes, it starts deleting what I'm typing randomly. It's happening to me right now, typing this, so if there are any weird typo that I missed, that's why. The Right Bracket Key also activates randomly. I'm completely clueless as to what I have to do to fix this issue. Any suggestions? | 0non-cybersec
| Reddit |
RX 5700 XT or RTX 2070 Super?. So I'm about to do my first real PC build. I already ordered a lot of parts and had it all planned out. In my original parts list, I had an AMD RX 5700 XT, but now I'm having second thoughts on that. I'm reading about crashes, bad drivers and poor performance.
As the Nvidia equivalent to the 5700 is the RTX 2070 Super, I'm considering getting that one instead of the AMD card even though it's more expensive.
What do you think? Spend that extra money on the RTX or go with the 5700? And if it's gonna be the Nvidia, which brand would you recommend?
Thanks for your help! | 0non-cybersec
| Reddit |
IN OAuth 2.0, how is the client secret supposed to be kept secret?. <p>Using most OAuth 2.0 flows, a client application can identify itself to the authorization server by means of a "client id" and "client secret."</p>
<p>The OAuth 2 specification says that the client secret should indeed be kept secret.</p>
<p>However, if the client secret is inside of the application, then it's not secret - someone can use a debugger, disassembler, etc to view it.</p>
<p>So I am not sure the effectiveness and/or purpose of this client secret. Furthermore, are there any recommendations for securing a client secret on a client under the control of the general populace? The purpose here is to establish some form of trust between the client application and the Authorization server, independent of the resource owner (user).</p>
<p>Finally, what is the difference between using an OAuth flow without a client secret vs. using one with a client secret and not keeping that "client secret" actually secret?</p>
| 0non-cybersec
| Stackexchange |
$E^2[X]$ vs.$E[X^2]$, what's the difference?. <p>This has come up in a homework problem, but I've never seen exponents defined in terms of random variables and expected values. I've tried googling this, but I must not be using the right words. If anyone could define both terms for me, or briefly explain the difference, it would help a lot.</p>
<p>Thanks in advance.</p>
| 0non-cybersec
| Stackexchange |
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 |
Purple, orange, and green. | 0non-cybersec
| Reddit |
DIYRock.Com - Enjoying Your DIY Life Here! - 2 Services for DIY Mobile Social Networks. | 0non-cybersec
| Reddit |
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 |
Dog Road Rage. | 0non-cybersec
| Reddit |
STM32, Position independent code - function pointers not in GOT?. <p>I need a position independent code (PIC) working on STM32F401. But i have problem with pointers to functions used e.g. in struct. </p>
<p>Short example:</p>
<pre><code>struct process {
struct process *next;
const char *name;
PT_THREAD((* thread)(struct pt *, process_event_t, process_data_t));
struct pt pt;
unsigned char state, needspoll;
};
process etimer_process...
static void call_process(struct process *p, process_event_t ev, process_data_t data) {
int ret;
ret = p->thread(&p->pt, ev, data);
}
</code></pre>
<p>After diassembly:</p>
<pre><code>Disassembly of section .data:
...
20000768 <etimer_process>:
20000768: 00000000 andeq r0, r0, r0
2000076c: 0803b134 stmdaeq r3, {r2, r4, r5, r8, ip, sp, pc}
20000770: 08027435 stmdaeq r2, {r0, r2, r4, r5, sl, ip, sp, lr}
20000774: 00000000 andeq r0, r0, r0
...
Disassembly of section .text:
...
8027da4: 68fb ldr r3, [r7, #12] //R3 = 0x20000768
8027da6: 689b ldr r3, [r3, #8] //R3 = 0x8027435
...
8027db2: 4798 blx r3 //Branch to R3
...
</code></pre>
<p>Branch address in R3 is wrong for code at offset different than 0. I don't see use of GOT here. It is a bug or missing compiler/linker option?</p>
<hr>
<p>Things which i have probably successfully solved:</p>
<ul>
<li>GOT fixup</li>
<li>Interrupt table fixup</li>
<li>Newlib compiled with appropriate cflags</li>
</ul>
<p>Used CFLAGS: </p>
<blockquote>
<p>-mlittle-endian -mthumb -mthumb-interwork -mcpu=cortex-m4 -fsingle-precision-constant -Wdouble-promotion -msoft-float -fpic -msingle-pic-base -mpic-data-is-text-relative -mpic-register=r10 -Wno-strict-aliasing -lc</p>
</blockquote>
<p>and linking with </p>
<blockquote>
<p>-fpic</p>
</blockquote>
| 0non-cybersec
| Stackexchange |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.